Method for encoding / decoding image and computer-readable recording medium
By constructing a list of motion information candidates and selecting suitable motion information candidates for inter-frame prediction, the problem of low image encoding/decoding efficiency in the prior art is solved, and efficient entropy coding and compression rate improvement is achieved.
Patent Information
- Application Number
- CN202510260215.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-02-21
- Filing Date
- 2020-02-21
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to effectively improve image encoding/decoding efficiency, especially when processing high-resolution and high-quality images, resulting in increased transmission and storage costs.
By constructing a list of motion information candidates for the current block, select suitable motion information candidates for inter prediction, and prioritize the shared motion candidates suitable for each block to improve entropy coding efficiency.
The image encoding/decoding efficiency and entropy encoding efficiency are achieved, the number of representation bits in the intra prediction mode is reduced, the most likely mode selectivity in small blocks is enhanced, and the compression rate is improved.
Smart Images

Figure CN119996664A_ABST
Abstract
Description
[0001] This application is a divisional application of an invention patent application with an application date of February 21, 2020, application number 202080015720.9, and invention name “Method and device for encoding / decoding video and recording medium for storing bit stream”. Technical Field
[0002] The present invention relates to an image encoding / decoding method and apparatus, and a recording medium for storing a bit stream. More particularly, the present invention relates to a method and apparatus for using candidate reconstruction in a process of encoding and decoding a subblock using a shared candidate. Background Art
[0003] Recently, in various applications, the demand for high-resolution and high-quality images (such as high-definition (HD) or ultra-high-definition (UHD) images) has increased. As the resolution and quality of images increase, the amount of data increases accordingly. This is one of the reasons for the increase in transmission cost and storage cost when image data is transmitted through existing transmission media (such as wired or wireless broadband channels) or when image data is stored. In order to solve these problems of high-resolution and high-quality image data, efficient image encoding / decoding technology is required.
[0004] There are various video compression techniques, such as inter-frame prediction techniques that predict the values of pixels within a current image from the values of pixels within a previous image or a subsequent image, intra-frame prediction techniques that predict the values of pixels within a region of the current image from the values of pixels within another region of the current image, transformation and quantization techniques for compressing the energy of residual signals, and entropy coding techniques that assign short codes to frequently occurring pixel values and long codes to less frequently occurring pixel values. Summary of the invention
[0005] Technical issues An object of the present invention is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0006] Another object of the present invention is to provide an image encoding / decoding method and apparatus with improved entropy encoding efficiency by selecting and using only valid candidates from shared motion candidates according to each block.
[0007] Another object of the present invention is to provide an image encoding / decoding method and apparatus with improved entropy coding efficiency by assigning priority to shared motion candidates suitable for each block and centrally indicating signals of candidates selected for motion prediction.
[0008] Another object of the present invention is to increase the selectivity of the Most Probable Mode (MPM) using a small number of intra prediction modes in blocks with small size.
[0009] Another object of the present invention is to provide an image encoding / decoding method and apparatus capable of reducing the amount of bits transmitted by signaling by reducing the number of bits representing an intra-frame prediction mode.
[0010] Another object of the present invention is to provide a recording medium for storing a bit stream generated by the image decoding method or apparatus according to the present invention.
[0011] Technical Solution The method for decoding an image according to an embodiment of the present invention includes: constructing a motion information candidate list of a current block; selecting a first motion information candidate for predicting a first subblock in the current block from the motion information candidate list; selecting a second motion information candidate for predicting a second subblock in the current block from the motion information candidate list; generating a prediction sample of the first subblock by performing inter-frame prediction on the first subblock based on the first motion information candidate; and generating a prediction sample of the second subblock by performing inter-frame prediction on the second subblock based on the second motion information candidate. The first motion information candidate is any one of the candidates in the motion information candidate list in a first prediction direction, and the second motion information candidate is any one of the candidates in the motion information candidate list in a second prediction direction.
[0012] In the image decoding method, the method may also include: obtaining a first index of a first subblock and a second index of a second subblock from a bit stream, the first index can be used to select a first motion information candidate from candidates in a first prediction direction, and the second index can be used to select a second motion information candidate from candidates in a second prediction direction.
[0013] In the image decoding method, the motion information candidate list may include at least one of the following: motion information of spatially adjacent blocks, motion information of temporally adjacent blocks, combined motion information, or zero motion information.
[0014] In the image decoding method, the first index and the second index may be different.
[0015] In the image decoding method, the first prediction direction may be determined based on the first index, and the second prediction direction may be determined based on the second index.
[0016] In the image decoding method, when the first index is an even number, the first prediction direction may be determined as the L0 direction, and when the second index is an even number, the second prediction direction may be determined as the L0 direction.
[0017] In the image decoding method, when the first index is an odd number, the first prediction direction may be determined as the L1 direction, and when the second index is an odd number, the second prediction direction may be determined as the L1 direction.
[0018] In the image decoding method, the method may further include: obtaining an index of a partition direction of the current block from a bitstream, and the number of partition directions may be 64.
[0019] In the image decoding method, the method may include predicting the current block by performing weighted summation of prediction samples of the first subblock and prediction samples of the second subblock at a boundary between the first subblock and the second subblock.
[0020] A method for encoding an image according to an embodiment of the present invention includes: constructing a motion information candidate list of a current block; selecting a first motion information candidate for predicting a first subblock in the current block from the motion information candidate list; and selecting a second motion information candidate for predicting a second subblock in the current block from the motion information candidate list. The first motion information candidate is any one of the candidates in the motion information candidate list in a first prediction direction, and the second motion information candidate is any one of the candidates in the motion information candidate list in a second prediction direction.
[0021] In the image encoding method, the method may also include: encoding a first index of a first subblock and a second index of a second subblock, the first index can be used to select a first motion information candidate from a motion information candidate list, and the second index can be used to select a second motion information candidate from the motion information candidate list.
[0022] In the image decoding method, the motion information candidate list may include at least one of the following: motion information of spatially adjacent blocks, motion information of temporally adjacent blocks, combined motion information, or zero motion information.
[0023] In the image decoding method, the first index and the second index may be different.
[0024] In the image decoding method, the first prediction direction may be determined based on the first index, and the second prediction direction may be determined based on the second index.
[0025] In the image decoding method, when the first index is an even number, the first prediction direction may be determined as the L0 direction, and when the second index is an even number, the second prediction direction may be determined as the L0 direction.
[0026] In the image decoding method, when the first index is an odd number, the first prediction direction may be determined as the L1 direction, and when the second index is an odd number, the second prediction direction may be determined as the L1 direction.
[0027] In the image decoding method, the method may further include: encoding an index of a partition direction of the current block, and the number of partition directions is 64.
[0028] In a non-transitory computer-readable recording medium for storing a bitstream generated by a method for encoding an image according to an embodiment of the present invention, the method includes: constructing a motion information candidate list of a current block; selecting a first motion information candidate for predicting a first subblock in the current block from the motion information candidate list; and selecting a second motion information candidate for predicting a second subblock in the current block from the motion information candidate list. The first motion information candidate is any one of the candidates in the motion information candidate list in a first prediction direction, and the second motion information candidate is any one of the candidates in the motion information candidate list in a second prediction direction.
[0029] Beneficial Effects According to the present invention, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0030] According to the present invention, an image encoding / decoding method and apparatus with improved entropy encoding efficiency can be provided by selecting and using only valid candidates from shared motion candidates according to each block.
[0031] According to the present invention, an image encoding / decoding method and apparatus with improved entropy encoding efficiency can be provided by giving priority to shared motion candidates suitable for each block and centrally indicating signals of candidates selected for motion prediction.
[0032] According to the present invention, selectivity of a most probable mode (MPM) using a small number of intra prediction modes in a block having a small size can be increased.
[0033] According to the present invention, since the amount of bits transmitted by signaling is reduced by reducing the number of bits representing an intra prediction mode, the compression rate of an image encoder / decoder can be increased.
[0034] According to the present invention, there can be provided a recording medium for storing a bit stream generated by the image encoding method or apparatus according to the present invention.
[0035] According to the present invention, there can be provided a recording medium for storing a bit stream received and decoded by the image decoding apparatus according to the present invention and used to reconstruct an image. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a block diagram showing a configuration of an encoding device according to an embodiment to which the present invention is applied.
[0037] Figure 2 is a block diagram showing a configuration of a decoding device according to an embodiment to which the present invention is applied.
[0038] Figure 3is a diagram schematically showing a partition structure of an image when the image is encoded and decoded.
[0039] Figure 4 is a diagram illustrating an intra prediction process.
[0040] Figure 5 is a diagram illustrating an embodiment of an inter-picture prediction process.
[0041] Figure 6 is a diagram illustrating transform and quantization processing.
[0042] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0043] Figure 8 : is a flowchart showing a case where a candidate reconstruction process is not included and a case where a candidate reconstruction process is included in encoding and decoding processes using a shared candidate according to an embodiment of the present invention.
[0044] Fig. 9 1 and 2 are diagrams of a case where a candidate reconstruction process is not included and a case where a candidate reconstruction process is included in encoding and decoding processes using a shared candidate according to an embodiment of the present invention.
[0045] Fig.10 is a diagram illustrating an embodiment of a method of constructing a sub-candidate list from a shared candidate list.
[0046] Fig.11 is a diagram illustrating an embodiment of a method of reconstructing a candidate code of each block for a candidate reconstruction process.
[0047] Fig.12 is a diagram illustrating a method of excluding reuse of a candidate according to an embodiment of the present invention.
[0048] Fig.13 is a diagram illustrating a method of determining a candidate when the validity of a sharing candidate varies according to a position of a block according to an embodiment of the present invention.
[0049] Fig.14 is a diagram illustrating a method of selecting a valid candidate in each block when candidates having the same motion information exist among shared candidates according to an embodiment of the present invention.
[0050] Fig.15 2 is a diagram illustrating a method of predicting a block partition by using candidates having the same motion information among shared candidates according to an exemplary embodiment.
[0051] Fig.16 is a diagram illustrating an image decoding method according to an embodiment of the present invention.
[0052] Fig.17 is a diagram illustrating an image encoding method according to an embodiment of the present invention.
[0053] Fig.18 is a diagram showing an embodiment of an intra prediction mode used in an image compression technique.
[0054] Fig.19 is a diagram illustrating an embodiment of a prediction method according to a directional intra prediction mode.
[0055] Fig. 20 is a diagram illustrating a method of reducing the number of intra prediction modes in intra prediction of a small block according to an embodiment of the present invention.
[0056] Fig.21 is a diagram illustrating a method of omitting cost derivation and comparison processes for an odd intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0057] Fig. 22 2 is a diagram illustrating a method of not adding an odd-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0058] Fig.23 2 is a diagram illustrating a method of correcting an odd intra prediction mode to an even intra prediction mode when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0059] Fig.24 is a diagram illustrating a method of adding an even-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0060] Fig.25 is a diagram illustrating a method of performing non-MPM encoding / decoding using only an even-numbered intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0061] Fig.26 is a diagram illustrating a method of omitting cost derivation and comparison processes for an even intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0062] Fig. 27 2 is a diagram illustrating a method of not adding an even-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0063] Fig.28 is a diagram illustrating a method of correcting an even intra prediction mode to an odd intra prediction mode when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0064] Fig.29 is a diagram illustrating a method of adding an odd-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0065] Fig.30 is a diagram illustrating a method of performing non-MPM encoding / decoding using only odd-numbered intra prediction modes when a current block is a small block according to an embodiment of the present invention.
[0066] Fig.31 is a diagram illustrating a method of omitting cost derivation and comparison processing for some intra prediction modes that are predetermined not to be used when a current block is a small block according to an embodiment of the present invention.
[0067] Fig.32 2 is a diagram illustrating a method of adding some intra prediction modes that are predetermined not to be used to an MPM when constructing the MPM when a current block is a small block according to an embodiment of the present invention.
[0068] Fig.33 2 is a diagram illustrating a method of correcting some intra prediction modes that are predetermined not to be used to other modes when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0069] Fig.34 2 is a diagram illustrating a method of adding intra prediction candidate modes other than intra prediction candidate modes predetermined not to be used when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0070] Fig.35 is a diagram illustrating a method of performing non-MPM encoding / decoding using only some intra prediction modes when a current block is a small block according to an embodiment of the present invention.
[0071] Fig.36 is a diagram showing an embodiment in which intra prediction mode numbers are allocated.
[0072] Fig.37 is a diagram illustrating a method of using an intra prediction mode number reallocated according to directionality when a current block is a small block according to an embodiment of the present invention.
[0073] Fig.38 2 is a diagram illustrating a method of constructing an MPM using candidates suitable for a small block when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0074] Fig.39 is a diagram illustrating a method of performing non-MPM encoding / decoding using intra prediction modes whose number is less than that of existing intra prediction modes when a current block is a small block according to an embodiment of the present invention.
[0075] Fig.40 is a diagram illustrating a configuration of an encoder / decoder using a reconstruction intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0076] Fig.41 is a diagram illustrating a structure in which an intra prediction mode reconstruction unit is applied to an intra prediction unit according to an embodiment of the present invention. DETAILED DESCRIPTION
[0077] Various modifications may be made to the present invention, and there are various embodiments of the present invention, wherein examples of various embodiments of the present invention will now be provided with reference to the accompanying drawings and described in detail. However, the present invention is not limited thereto, although the exemplary embodiments may be interpreted as including all modifications, equivalents or substitutions within the technical concept and technical scope of the present invention. In various aspects, similar figure numerals refer to the same or similar functions. In the accompanying drawings, the shapes and sizes of the elements may be exaggerated for clarity. In the following detailed description of the present invention, reference is made to the accompanying drawings, wherein the accompanying drawings illustrate specific embodiments in which the present invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to implement the present disclosure. It should be understood that the various embodiments of the present disclosure, although different, are not necessarily mutually exclusive. For example, without departing from the spirit and scope of the present disclosure, the specific features, structures and features described herein in conjunction with one embodiment may be implemented in other embodiments. In addition, it should be understood that the position or arrangement of each element within each disclosed embodiment may be modified without departing from the spirit and scope of the present disclosure. Therefore, the following detailed description should not be regarded as having a limiting meaning, and the scope of the present disclosure is limited only by the appended claims (with the full range of equivalents claimed by the claims, in the case of appropriate interpretation).
[0078] The terms "first", "second", etc. used in the specification may be used to describe various components, but the components should not be interpreted as being limited to these terms. These terms are only used to distinguish one component from other components. For example, without departing from the scope of the present invention, the "first" component may be named as the "second" component, and the "second" component may also be similarly named as the "first" component. The term "and / or" includes a combination of multiple items or any one of the multiple items.
[0079] It will be understood that in this specification, when an element is simply referred to as being “connected to” or “coupled to” another element rather than being “directly connected to” or “directly coupled to” another element, the element may be “directly connected to” or “directly coupled to” another element, or connected to or coupled to another element with other elements interposed therebetween. Conversely, it will be understood that when an element is referred to as being “directly coupled to” or “directly connected to” another element, there are no intervening elements.
[0080] In addition, the components shown in the embodiments of the present invention are shown independently to represent the characteristic functions that are different from each other. Therefore, this does not mean that each component is composed of a separate hardware or software component unit. In other words, for convenience, each component includes each of the listed components. Therefore, at least two components of each component can be combined to form a component, or a component can be partitioned into multiple components to perform each function. If it does not depart from the essence of the present invention, the embodiment in which each component is combined and the embodiment in which a component is partitioned are also included in the scope of the present invention.
[0081] The terms used in this specification are only used to describe specific embodiments and are not intended to limit the present invention. Unless there is a significantly different meaning in the context, the expression used in the singular includes the expression in the plural form. In this specification, it will be understood that terms such as "including", "having" etc. are intended to indicate the presence of features, numbers, steps, actions, elements, parts or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, elements, parts or combinations thereof may exist or may be added. In other words, when a particular element is referred to as "included", it does not exclude elements other than the corresponding elements, but may include additional elements in an embodiment of the present invention or in the scope of the present invention.
[0082] In addition, some components may not be indispensable components for performing the basic functions of the present invention, but rather selective components that only improve the performance thereof. The present invention may be implemented by including only indispensable components for realizing the essence of the present invention without including components for improving performance. Structures that include only indispensable components without including selective components that only improve performance are also included within the scope of the present invention.
[0083] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. When describing the exemplary embodiments of the present invention, well-known functions or configurations will not be described in detail because they may unnecessarily obscure the understanding of the present invention. The same constituent elements in the accompanying drawings are represented by the same reference numerals, and repeated descriptions of the same elements will be omitted.
[0084] Hereinafter, an image may refer to a picture constituting a video, or may refer to the video itself. For example, "encoding or decoding an image or both encoding and decoding" may refer to "encoding or decoding a moving picture or both encoding and decoding", and may refer to "encoding or decoding one of the images of the moving picture or both encoding and decoding".
[0085] Hereinafter, the terms "motion picture" and "video" may be used as the same meaning and may be replaced with each other.
[0086] Hereinafter, a target image may be an encoding target image as an encoding target and / or a decoding target image as a decoding target. In addition, a target image may be an input image input to an encoding device, and an input image input to a decoding device. Here, the target image may have the same meaning as the current picture.
[0087] Hereinafter, the terms "image", "picture", "frame" and "screen" may be used as the same meaning and may be replaced with each other.
[0088] Hereinafter, the target block may be an encoding target block as an encoding target and / or a decoding target block as a decoding target. In addition, the target block may be a current block as a target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used as the same meaning and may be replaced with each other.
[0089] Hereinafter, the terms "block" and "unit" may be used as the same meaning and may be replaced with each other. Alternatively, a "block" may refer to a specific unit.
[0090] In the following, the terms "region" and "segment" are used interchangeably.
[0091] Hereinafter, a specific signal may be a signal representing a specific block. For example, an original signal may be a signal representing a target block. A prediction signal may be a signal representing a prediction block. A residual signal may be a signal representing a residual block.
[0092] In an embodiment, each of the specific information, data, flags, indexes, elements, attributes, etc. may have a value. The value of the information, data, flags, indexes, elements, and attributes equal to "0" may represent a logical false or a first predefined value. In other words, the value "0", false, logical false, and the first predefined value may be replaced with each other. The value of the information, data, flags, indexes, elements, and attributes equal to "1" may represent a logical true or a second predefined value. In other words, the value "1", true, logical true, and the second predefined value may be replaced with each other.
[0093] When the variable i or j is used to represent a column, row, or index, the value of i may be an integer equal to or greater than 0, or an integer equal to or greater than 1. That is, the column, row, index, etc. may be counted from 0 or 1.
[0094] Terminology Description Encoder: This refers to the device that performs encoding. In other words, it refers to the encoding device.
[0095] Decoder: refers to a device that performs decoding. In other words, it refers to a decoding device.
[0096] Block: is an M×N array of samples. Here, M and N may represent positive integers, and a block may represent an array of samples in a two-dimensional form. A block may refer to a unit. A current block may represent an encoding target block that becomes a target when encoding, or a decoding target block that becomes a target when decoding. In addition, the current block may be at least one of a coding block, a prediction block, a residual block, and a transform block.
[0097] Sample: It is the basic unit of a block. According to the bit depth (Bd), a sample can be represented as a number from 0 to In the present invention, a sample point may be used as the meaning of a pixel. That is, a sample point, a pel, and a pixel may have the same meaning as each other.
[0098] Unit: may refer to a coding and decoding unit. When encoding and decoding an image, a unit may be a region generated by partitioning a single image. In addition, when a single image is partitioned into sub-partition units during encoding or decoding, a unit may represent a sub-partition unit. That is, an image may be partitioned into a plurality of units. When encoding and decoding an image, a predetermined process for each unit may be performed. A single unit may be partitioned into sub-units having a size smaller than that of the unit. Depending on the function, a unit may represent a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction unit, a prediction block, a residual unit, a residual block, a transform unit, a transform block, and the like. In addition, in order to distinguish a unit from a block, a unit may include a luminance component block, a chrominance component block associated with the luminance component block, and a syntax element for each color component block. A unit may have various sizes and shapes, and specifically, the shape of a unit may be a two-dimensional geometric figure such as a square, a rectangle, a trapezoid, a triangle, a pentagon, and the like. In addition, the unit information may include at least one of a unit type indicating a coding unit, a prediction unit, a transformation unit, etc., and a unit size, a unit depth, an order of encoding and decoding of the unit, and the like.
[0099] Coding tree unit: A single coding tree block configured with a luminance component Y and two coding tree blocks associated with chrominance components Cb and Cr. In addition, the coding tree unit may represent a syntax element including a block and each block. Each coding tree unit may be partitioned by using at least one of a quadtree partitioning method, a binary tree partitioning method, and a ternary tree partitioning method to configure a lower-level unit such as a coding unit, a prediction unit, a transform unit, etc. The coding tree unit may be used as a term for specifying a sample block that becomes a processing unit when encoding / decoding an image as an input image. Here, the quadtree may represent a quadtree.
[0100] When the size of the coding block is within a predetermined range, it can be partitioned using only quadtree partitioning. Here, the predetermined range may be defined as at least one of the maximum size and the minimum size of the coding block that can be partitioned using only quadtree partitioning. Information indicating the maximum / minimum size of the coding block that allows quadtree partitioning may be signaled through a bitstream, and the information may be signaled in at least one unit of a sequence, a picture parameter, a parallel block group, or a slice (fragment). Optionally, the maximum / minimum size of the coding block may be a fixed size predetermined in the encoder / decoder. For example, when the size of the coding block corresponds to 256×256 to 64×64, it is possible to partition using only quadtree partitioning. Optionally, when the size of the coding block is larger than the size of the maximum conversion block, it is possible to partition using only quadtree partitioning. Here, the block to be partitioned may be at least one of a coding block and a transform block. In this case, information indicating the partitioning of the coding block (e.g., split_flag) may be a flag indicating whether quadtree partitioning is performed. When the size of the coding block falls within a predetermined range, it is possible to partition using only binary or ternary tree partitioning. In this case, the above description of the quadtree partition may be applied to the binary tree partition or the ternary tree partition in the same manner.
[0101] Coding tree block: may be used as a term used to designate any one of a Y coding tree block, a Cb coding tree block, and a Cr coding tree block.
[0102] Neighboring block: may refer to a block adjacent to the current block. The block adjacent to the current block may refer to a block that touches the boundary of the current block or a block that is located within a predetermined distance from the current block. The neighboring block may refer to a block adjacent to a vertex of the current block. Here, the block adjacent to a vertex of the current block may refer to a block that is vertically adjacent to a neighboring block that is horizontally adjacent to the current block or a block that is horizontally adjacent to a neighboring block that is vertically adjacent to the current block.
[0103] Reconstructed neighboring block: may represent a neighboring block that is adjacent to the current block and has been encoded or decoded in space / time. Here, the reconstructed neighboring block may represent a reconstructed neighboring unit. The reconstructed spatial neighboring block may be a block that is within the current picture and has been reconstructed by encoding or decoding or both encoding and decoding. The reconstructed temporal neighboring block is a block at a position corresponding to the current block of the current picture within the reference picture or a neighboring block of the block.
[0104] Unit depth: can represent the degree of partitioning of a unit. In a tree structure, the highest node (root node) can correspond to the first unit that is not partitioned. In addition, the highest node can have a minimum depth value. In this case, the depth of the highest node can be level 0. A node with a depth of level 1 can represent a unit generated by first partitioning the first unit. A node with a depth of level 2 can represent a unit generated by partitioning the first unit twice. A node with a depth of level n can represent a unit generated by partitioning the first unit n times. A leaf node can be the lowest node and a node that cannot be further partitioned. The depth of a leaf node can be the maximum level. For example, the predefined value of the maximum level can be 3. The depth of the root node can be the lowest, and the depth of the leaf node can be the deepest. In addition, when a unit is represented as a tree structure, the level at which the unit exists can represent the unit depth.
[0105] Bitstream: can represent a stream of bits including coded image information.
[0106] Parameter set: corresponds to header information among the configurations in the bitstream. At least one of a video parameter set, a sequence parameter set, a picture parameter set, and an adaptation parameter set may be included in the parameter set. In addition, the parameter set may include a slice header, a parallel block group header, and parallel block header information. The term "parallel block group" means a group of parallel blocks and has the same meaning as a slice.
[0107] The adaptation parameter set may represent a parameter set that can be shared by being referenced in different pictures, sub-pictures, slices, tile groups, tiles, or partitions. In addition, information in the adaptation parameter set may be used by referencing different adaptation parameter sets for sub-pictures, slices, tile groups, tiles, or partitions within a picture.
[0108] In addition, regarding adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for a sub-picture, a slice, a tile group, a tile, or a partition within a picture.
[0109] In addition, regarding the adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for slices, tile groups, tiles, or partitions within a sub-picture.
[0110] In addition, regarding the adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for tiles or partitions within a slice.
[0111] In addition, with respect to adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for partitions within a tile.
[0112] Information about the adaptation parameter set identifier may be included in a parameter set or a header of a sub-picture, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the sub-picture.
[0113] Information about the adaptation parameter set identifier may be included in a parameter set or a header of the tile, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the tile.
[0114] Information about the adaptation parameter set identifier may be included in a header of the tile, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the tile.
[0115] A picture may be partitioned into one or more tile rows and one or more tile columns.
[0116] A sub-picture may be partitioned into one or more parallel block rows and one or more parallel block columns within a picture. A sub-picture may be an area having a rectangular / square form within a picture and may include one or more CTUs. In addition, at least one or more parallel blocks / blocks / strips may be included in one sub-picture.
[0117] A tile may be an area having a rectangular / square form within a picture and may include one or more CTUs. In addition, a tile may be partitioned into one or more partitions.
[0118] A partition may represent one or more CTU rows within a tile. A tile may be partitioned into one or more blocks, and each block may have at least one or more CTU rows. A tile that is not partitioned into two or more may represent a partition.
[0119] A slice may include one or more tiles within a picture, and may include one or more partitions within a tile.
[0120] Parsing: may mean determining the value of a syntax element by performing entropy decoding, or may mean the entropy decoding itself.
[0121] Symbol: At least one of a syntax element, a coding parameter, and a transform coefficient value that can represent a coding / decoding target unit. In addition, the symbol can represent an entropy coding target or an entropy decoding result.
[0122] Prediction mode: may be information indicating a mode for encoding / decoding using intra prediction or a mode for encoding / decoding using inter prediction.
[0123] Prediction unit: may represent a basic unit when performing prediction (such as inter prediction, intra prediction, inter compensation, intra compensation, and motion compensation). A single prediction unit may be partitioned into multiple partitions of smaller size, or may be partitioned into multiple prediction units of lower levels. Multiple partitions may be basic units when performing prediction or compensation. Partitions generated by partitioning a prediction unit may also be prediction units.
[0124] Prediction unit partition: may represent a shape obtained by partitioning a prediction unit.
[0125] A reference picture list may refer to a list including one or more reference pictures used for inter prediction or motion compensation. There are several types of reference picture lists available, including LC (List Combination), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3).
[0126] The inter prediction indicator may refer to the direction of inter prediction of the current block (unidirectional prediction, bidirectional prediction, etc.). Alternatively, the inter prediction indicator may refer to the number of reference pictures used to generate the prediction block of the current block. Alternatively, the inter prediction indicator may refer to the number of prediction blocks used when performing inter prediction or motion compensation on the current block.
[0127] The prediction list utilization flag indicates whether at least one reference picture in a specific reference picture list is used to generate a prediction block. The prediction list utilization flag may be used to derive the inter prediction indicator, and conversely, the inter prediction indicator may be used to derive the prediction list utilization flag. For example, when the prediction list utilization flag has a first value of zero (0), it indicates that the reference picture in the reference picture list is not used to generate the prediction block. On the other hand, when the prediction list utilization flag has a second value of one (1), it indicates that the reference picture list is used to generate the prediction block.
[0128] The reference picture index may refer to an index indicating a specific reference picture in a reference picture list.
[0129] A reference picture may refer to a reference picture referenced by a specific block for the purpose of inter-frame prediction or motion compensation of the specific block. Alternatively, a reference picture may be a picture including a reference block referenced by a current block for inter-frame prediction or motion compensation. Hereinafter, the terms "reference picture" and "reference picture" have the same meaning and may be interchangeable.
[0130] A motion vector may be a two-dimensional vector used for inter-frame prediction or motion compensation. A motion vector may represent an offset between a target block for encoding / decoding and a reference block. For example, (mvX, mvY) may represent a motion vector. Here, mvX may represent a horizontal component, and mvY may represent a vertical component.
[0131] The search range may be a two-dimensional area that is searched during inter prediction to retrieve a motion vector. For example, the size of the search range may be M×N. Here, M and N are both integers.
[0132] The motion vector candidate may refer to a prediction candidate block or a motion vector of a prediction candidate block when predicting a motion vector. In addition, the motion vector candidate may be included in a motion vector candidate list.
[0133] The motion vector candidate list may mean a list consisting of one or more motion vector candidates.
[0134] The motion vector candidate index may represent an indicator indicating a motion vector candidate in the motion vector candidate list. Alternatively, it may be an index of a motion vector predictor.
[0135] The motion information may represent information including at least one of a motion vector, a reference picture index, an inter prediction indicator, a prediction list utilization flag, a reference picture list information, a reference picture, a motion vector candidate, a motion vector candidate index, a merge candidate, and a merge index.
[0136] The merge candidate list may refer to a list consisting of one or more merge candidates.
[0137] The merge candidate may represent a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-prediction merge candidate, or a zero merge candidate. The merge candidate may include motion information such as an inter prediction indicator, a reference picture index for each list, a motion vector, a prediction list utilization flag, and an inter prediction indicator.
[0138] The merge index may represent an indicator indicating a merge candidate in the merge candidate list. Alternatively, the merge index may indicate a block in a reconstructed block that is spatially / temporally adjacent to the current block, from which the merge candidate has been derived. Alternatively, the merge index may indicate at least one piece of motion information of the merge candidate.
[0139] Transform unit: may represent a basic unit when encoding / decoding (such as transform, inverse transform, quantization, inverse quantization, transform coefficient encoding / decoding) is performed on a residual signal. A single transform unit may be partitioned into a plurality of lower-level transform units having a smaller size. Here, the transform / inverse transform may include at least one of a first transform / first inverse transform and a second transform / second inverse transform.
[0140] Scaling: may refer to the process of multiplying the level of quantization by a factor. Transform coefficients may be generated by scaling the level of quantization. Scaling may also be referred to as inverse quantization.
[0141] Quantization parameter: may represent a value used when a transform coefficient is used to generate a quantized level during quantization. The quantization parameter may also represent a value used when a transform coefficient is generated by scaling the quantized level during inverse quantization. The quantization parameter may be a value mapped on a quantization step size.
[0142] Delta quantization parameter: may represent the difference between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.
[0143] Scan: can refer to a method of ordering coefficients within a cell, block, or matrix. For example, changing a two-dimensional matrix of coefficients to a one-dimensional matrix can be called scanning, and changing a one-dimensional matrix of coefficients to a two-dimensional matrix can be called scanning or inverse scanning.
[0144] Transform coefficient: may refer to a coefficient value generated after performing a transform in an encoder. A transform coefficient may refer to a coefficient value generated after performing at least one of entropy decoding and inverse quantization in a decoder. A quantization level obtained by quantizing a transform coefficient or a residual signal or a quantized transform coefficient level may also fall within the meaning of a transform coefficient.
[0145] Quantization level: may represent a value generated by quantizing a transform coefficient or a residual signal in an encoder. Alternatively, the quantization level may represent a value that is a dequantization target subjected to dequantization in a decoder. Similarly, the quantized transform coefficient level as a result of transformation and quantization may also fall within the meaning of the quantization level.
[0146] Non-zero transform coefficient: may refer to a transform coefficient having a value other than zero, or a transform coefficient level or quantization level having a value other than zero.
[0147] Quantization matrix: may refer to a matrix used in a quantization process or an inverse quantization process performed to improve subjective image quality or objective image quality. The quantization matrix may also be referred to as a scaling list.
[0148] Quantization matrix coefficients: can represent each element in the quantization matrix. Quantization matrix coefficients can also be called matrix coefficients.
[0149] Default matrix: may represent a predetermined quantization matrix predefined in an encoder or a decoder.
[0150] Non-default matrix: may denote a quantization matrix that is not predefined in the encoder or decoder but is signaled by the user.
[0151] Statistical value: The statistical value for at least one of a variable, a coding parameter, a constant value, etc. having a calculable specific value can be one or more of the average value, summed value, weighted average value, weighted sum value, minimum value, maximum value, most frequently occurring value, median value, and interpolation value of the corresponding specific value.
[0152] Figure 1 is a block diagram showing a configuration of an encoding device according to an embodiment to which the present invention is applied.
[0153] The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. A video may include at least one image. The encoding device 100 may sequentially encode at least one image.
[0154] Reference Figure 1 , the encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180 and a reference picture buffer 190.
[0155] The encoding device 100 may perform encoding of an input image by using an intra mode or an inter mode or both an intra mode and an inter mode. In addition, the encoding device 100 may generate a bit stream including encoding information by encoding the input image, and output the generated bit stream. The generated bit stream may be stored in a computer-readable recording medium, or may be streamed through a wired / wireless transmission medium. When the intra mode is used as a prediction mode, the switch 115 may switch to the intra mode. Alternatively, when the inter mode is used as a prediction mode, the switch 115 may switch to the inter mode. Here, the intra mode may represent an intra prediction mode, and the inter mode may represent an inter prediction mode. The encoding device 100 may generate a prediction block for an input block of the input image. In addition, the encoding device 100 may encode the residual block using the residual of the input block and the prediction block after generating the prediction block. The input image may be referred to as the current picture as the current encoding target. The input block may be referred to as the current block as the current encoding target, or may be referred to as the encoding target block.
[0156] When the prediction mode is the intra mode, the intra prediction unit 120 may use samples of a block that has been encoded / decoded and is adjacent to the current block as reference samples. The intra prediction unit 120 may perform spatial prediction on the current block by using the reference samples, or may generate prediction samples of the input block by performing spatial prediction. Here, intra prediction may refer to prediction within a frame.
[0157] When the prediction mode is the inter-frame mode, the motion prediction unit 111 may retrieve the area that best matches the input block from the reference picture when performing motion prediction, and derive the motion vector by using the retrieved area. In this case, the search area may be used as the area. The reference picture may be stored in the reference picture buffer 190. Here, when encoding / decoding of the reference picture is performed, the reference picture may be stored in the reference picture buffer 190.
[0158] The motion compensation unit 112 may generate a prediction block by performing motion compensation on the current block using a motion vector. Here, inter prediction may refer to prediction or motion compensation between frames.
[0159] When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 may generate a prediction block by applying an interpolation filter to a partial area of a reference picture. In order to perform inter-picture prediction or motion compensation on a coding unit, it may be determined which mode among the skip mode, merge mode, advanced motion vector prediction (AMVP) mode, and current picture reference mode is used for motion prediction and motion compensation of a prediction unit included in the corresponding coding unit. Then, depending on the determined mode, inter-picture prediction or motion compensation may be performed differently.
[0160] The subtractor 125 may generate a residual block by using the difference between the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may represent the difference between the original signal and the prediction signal. In addition, the residual signal may be a signal generated by transforming or quantizing the difference between the original signal and the prediction signal, or by transforming and quantizing the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.
[0161] The transform unit 130 may generate a transform coefficient by performing a transform on the residual block and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit 130 may skip the transform on the residual block.
[0162] The level of quantization may be generated by applying quantization to a transform coefficient or to a residual signal. Hereinafter, the level of quantization may also be referred to as a transform coefficient in embodiments.
[0163] The quantization unit 140 may generate a quantization level by quantizing the transform coefficient or the residual signal according to the parameter and output the generated quantization level. Here, the quantization unit 140 may quantize the transform coefficient by using a quantization matrix.
[0164] The entropy encoding unit 150 may generate a bit stream by performing entropy encoding on the value calculated by the quantization unit 140 or the encoding parameter value calculated when encoding is performed according to the probability distribution, and output the generated bit stream. The entropy encoding unit 150 may perform entropy encoding on sample information of the image and information for decoding the image. For example, the information for decoding the image may include a syntax element.
[0165] When entropy coding is applied, symbols are represented so that a smaller number of bits are allocated to symbols with a high probability of generation, and a larger number of bits are allocated to symbols with a low probability of generation, and therefore, the size of the bit stream for the symbol to be encoded can be reduced. The entropy coding unit 150 may use a coding method for entropy coding such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. For example, the entropy coding unit 150 may perform entropy coding by using a variable length coding / code (VLC) table. In addition, the entropy coding unit 150 may derive a binarization method of a target symbol and a probability model of a target symbol / binary bit, and perform arithmetic coding by using the derived binarization method and context model.
[0166] In order to encode a transform coefficient level (quantized level), the entropy encoding unit 150 may change a coefficient in a two-dimensional block form into a one-dimensional vector form by using a transform coefficient scanning method.
[0167] The coding parameters may include information such as syntax elements (flags, indexes, etc.) that are encoded in the encoder and sent to the decoder with a signal, as well as information derived when performing encoding or decoding. The coding parameters may represent information required when encoding or decoding an image. For example, at least one value or combination of the following items may be included in the coding parameters: unit / block size, unit / block depth, unit / block partition information, unit / block shape, unit / block partition structure, whether to perform quadtree partitioning, whether to perform binary tree partitioning, binary tree partition direction (horizontal or vertical), binary tree partition form (symmetric partitioning or asymmetric partitioning), whether the current coding unit is partitioned by ternary tree partitioning, the direction of ternary tree partitioning (horizontal or vertical), the type of ternary tree partitioning (symmetric type or asymmetric type), whether the current coding unit is partitioned by multi-type tree partitioning, the direction of multi-type tree partitioning direction (horizontal or vertical), type of multi-type tree partition (symmetric or asymmetric), tree (binary tree or ternary tree) structure of multi-type tree partition, prediction mode (intra-frame prediction or inter-frame prediction), luminance intra-frame prediction mode / direction, chrominance intra-frame prediction mode / direction, intra-frame partition information, inter-frame partition information, coding block partition flag, prediction block partition flag, transform block partition flag, reference sample filtering method, reference sample filter taps, reference sample filter coefficients, prediction block filtering method, prediction block filter taps, prediction block filter coefficients, prediction block boundary filtering method, prediction block boundary filter taps, prediction block boundary filter coefficients, intra-frame prediction mode, Inter prediction mode, motion information, motion vector, motion vector difference, reference picture index, inter prediction angle, inter prediction indicator, prediction list utilization flag, reference picture list, reference picture, motion vector predictor index, motion vector predictor candidate, motion vector candidate list, whether to use merge mode, merge index, merge candidate, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter tap, interpolation filter coefficient, motion vector size, representation accuracy of motion vector, transform type, transform size, information on whether the primary (first) transform is used, information on whether the secondary transform is used, primary transform index, secondary transform index , information on whether a residual signal exists, coding block pattern, coding block flag (CBF), quantization parameter, quantization parameter residual, quantization matrix, whether to apply an intra-frame loop filter, intra-frame loop filter coefficients, intra-frame loop filter taps, intra-frame loop filter shape / form, whether to apply a deblocking filter, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape / form, whether to apply adaptive sample offset, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, whether to apply an adaptive loop filter, adaptive loop filter coefficients, adaptive loop filter taps, adaptive loop filter shape / form,Binarization / debinarization method, context model determination method, context model update method, whether to execute normal mode, whether to execute bypass mode, context binary bit, bypass binary bit, valid coefficient flag, last valid coefficient flag, encoding flag for unit of coefficient group, position of last valid coefficient, flag on whether the value of coefficient is greater than 1, flag on whether the value of coefficient is greater than 2, flag on whether the value of coefficient is greater than 3, information on remaining coefficient values, sign information, reconstructed luminance samples, reconstructed chrominance samples, residual luminance samples, residual chrominance samples, luminance transform coefficient, chrominance transform coefficient, quantized luminance level, quantized chrominance level, transform coefficient level scanning method, motion vector search area at decoder side size, shape of a motion vector search area at a decoder side, number of motion vector searches at a decoder side, information about a CTU size, information about a minimum block size, information about a maximum block size, information about a maximum block depth, information about a minimum block depth, image display / output order, slice identification information, slice type, slice partition information, tile identification information, tile type, tile partition information, tile group identification information, tile group type, tile group partition information, picture type, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients, bit depth of quantization levels, and information about a luminance signal or information about a chrominance signal.
[0168] Here, signaling a flag or an index may mean entropy encoding the corresponding flag or index by an encoder and including it in a bitstream, and may mean entropy decoding the corresponding flag or index from the bitstream by a decoder.
[0169] When the encoding apparatus 100 performs encoding by inter-frame prediction, the encoded current picture may be used as a reference picture for another image that is subsequently processed. Therefore, the encoding apparatus 100 may reconstruct or decode the encoded current picture, or store the reconstructed or decoded image as a reference picture in the reference picture buffer 190.
[0170] The quantized level may be dequantized in the dequantization unit 160 or may be inversely transformed in the inverse transform unit 170. The dequantized or inversely transformed coefficient or the dequantized and inversely transformed coefficient may be added to the prediction block by the adder 175. A reconstructed block may be generated by adding the dequantized or inversely transformed coefficient or the dequantized and inversely transformed coefficient to the prediction block. Here, the dequantized or inversely transformed coefficient or the dequantized and inversely transformed coefficient may mean a coefficient on which at least one of dequantization and inverse transformation is performed, and may mean a reconstructed residual block.
[0171] The reconstructed block may pass through the filter unit 180. The filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed sample, the reconstructed block, or the reconstructed image. The filter unit 180 may be referred to as an in-loop filter.
[0172] The deblocking filter can remove block distortion generated in the boundary between blocks. In order to determine whether to apply the deblocking filter, it can be determined whether to apply the deblocking filter to the current block based on the samples included in the number of rows or columns included in the block. When the deblocking filter is applied to the block, another filter can be applied according to the required deblocking filter strength.
[0173] In order to compensate for the coding error, a suitable offset value may be added to the sample value by using sample adaptive offset. Sample adaptive offset can correct the offset of the deblocked image from the original image in units of samples. A method of applying the offset in consideration of edge information about each sample may be used, or a method of partitioning the samples of the image into a predetermined number of regions, determining the region to which the offset is applied, and applying the offset to the determined region may be used.
[0174] The adaptive loop filter may perform filtering based on a comparison result of a filtered reconstructed image and an original image. Samples included in an image may be partitioned into predetermined groups, a filter to be applied to each group may be determined, and differential filtering may be performed on each group. Information on whether ALF is applied may be signaled by a coding unit (CU), and the form and coefficient of ALF to be applied to each block may vary.
[0175] The reconstructed block or the reconstructed image that has passed through the filter unit 180 may be stored in the reference picture buffer 190. The reconstructed block processed by the filter unit 180 may be a part of a reference picture. That is, the reference picture is a reconstructed image composed of the reconstructed blocks processed by the filter unit 180. The stored reference picture may be used later in inter-frame prediction or motion compensation.
[0176] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment and to which the present invention is applied.
[0177] The decoding device 200 may be a decoder, a video decoding device, or an image decoding device.
[0178] Reference Figure 2 , the decoding device 200 may include an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260 and a reference picture buffer 270.
[0179] The decoding device 200 may receive a bit stream output from the encoding device 100. The decoding device 200 may receive a bit stream stored in a computer-readable recording medium, or may receive a bit stream streamed through a wired / wireless transmission medium. The decoding device 200 may decode the bit stream by using an intra-frame mode or an inter-frame mode. In addition, the decoding device 200 may generate a reconstructed image or a decoded image generated by decoding, and output the reconstructed image or the decoded image.
[0180] When the prediction mode used in decoding is the intra mode, the switch may be switched to the intra mode. Alternatively, when the prediction mode used in decoding is the inter mode, the switch may be switched to the inter mode.
[0181] The decoding device 200 can obtain a reconstructed residual block by decoding the input bit stream and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 can generate a reconstructed block as a decoding target by adding the reconstructed residual block to the prediction block. The decoding target block may be referred to as a current block.
[0182] The entropy decoding unit 210 may generate symbols by entropy decoding the bit stream according to the probability distribution. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be an inverse process of the above entropy encoding method.
[0183] In order to decode the transform coefficient level (quantized level), the entropy decoding unit 210 may change the coefficient in the form of a one-way vector into a two-dimensional block form by using a transform coefficient scanning method.
[0184] The quantized level may be dequantized in the dequantization unit 220, or the quantized level may be inversely transformed in the inverse transform unit 230. The quantized level may be a result of dequantization or inverse transformation or both, and may be generated as a reconstructed residual block. Here, the dequantization unit 220 may apply a quantization matrix to the quantized level.
[0185] When the intra mode is used, the intra prediction unit 240 may generate a predicted block by performing spatial prediction on the current block, wherein the spatial prediction uses sample values of blocks that are adjacent to the decoding target block and have been decoded.
[0186] When the inter mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation on the current block, wherein the motion compensation uses a motion vector and a reference picture stored in the reference picture buffer 270 .
[0187] The adder 225 can generate a reconstructed block by adding the reconstructed residual block to the prediction block. The filter unit 260 can apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or the reconstructed image. The filter unit 260 can output the reconstructed image. The reconstructed block or the reconstructed image can be stored in the reference picture buffer 270 and used when performing inter-frame prediction. The reconstructed block processed by the filter unit 260 can be a part of a reference picture. That is, the reference picture is a reconstructed image composed of the reconstructed blocks processed by the filter unit 260. The stored reference picture can be used later in inter-frame prediction or motion compensation.
[0188] Figure 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded. Figure 3 An example of partitioning a single cell into a plurality of lower-level cells is schematically shown.
[0189] In order to efficiently partition an image, a coding unit (CU) may be used when encoding and decoding. A coding unit may be used as a basic unit when encoding / decoding an image. In addition, a coding unit may be used as a unit for distinguishing an intra prediction mode from an inter prediction mode when encoding / decoding an image. A coding unit may be a basic unit for prediction, transformation, quantization, inverse transformation, inverse quantization, or encoding / decoding processing of a transformation coefficient.
[0190] Reference Figure 3 , the image 300 is partitioned sequentially according to the maximum coding unit (LCU), and the LCU unit is determined as a partition structure. Here, the LCU may be used in the same meaning as the coding tree unit (CTU). Unit partitioning may mean partitioning a block associated with the unit. In the block partition information, information about the unit depth may be included. The depth information may indicate the number or degree of the unit being partitioned or both the number and degree of the unit being partitioned. A single unit may be partitioned into a plurality of lower-level units hierarchically associated with the depth information based on a tree structure. In other words, the unit and the lower-level units generated by partitioning the unit may correspond to a node and a child node of the node, respectively. Each of the partitioned lower-level units may have depth information. The depth information may be information indicating the size of a CU and may be stored in each CU. The unit depth indicates the number and / or degree associated with partitioning the unit. Therefore, the partition information of the lower-level unit may include information about the size of the lower-level unit.
[0191] The partition structure may represent the distribution of coding units (CUs) within the LCU 310. Such distribution may be determined according to whether a single CU is partitioned into a plurality of (positive integers equal to or greater than 2, including 2, 4, 8, 16, etc.) CUs. The horizontal size and vertical size of the CU generated by partitioning may be half of the horizontal size and vertical size of the CU before partitioning, respectively, or may have sizes smaller than the horizontal size and vertical size before partitioning according to the number of partitions. The CU may be recursively partitioned into a plurality of CUs. By recursive partitioning, at least one of the height and width of the CU after partitioning may be reduced compared to at least one of the height and width of the CU before partitioning. The partitioning of the CU may be recursively performed until a predetermined depth or a predetermined size. For example, the depth of the LCU may be 0, and the depth of the minimum coding unit (SCU) may be a predetermined maximum depth. Here, as described above, the LCU may be a coding unit having a maximum coding unit size, and the SCU may be a coding unit having a minimum coding unit size. Partitioning starts from the LCU 310, and when the horizontal size or vertical size or both the horizontal size and the vertical size of the CU are reduced by partitioning, the CU depth increases by 1. For example, for each depth, the size of the non-partitioned CU may be 2N×2N. Also, in the case of a partitioned CU, a CU of size 2N×2N may be partitioned into four CUs of size N×N. As the depth increases by 1, the size of N may be halved.
[0192] In addition, information on whether a CU is partitioned may be indicated by using the partition information of the CU. The partition information may be 1-bit information. All CUs except the SCU may include partition information. For example, when the value of the partition information is a first value, the CU may not be partitioned, and when the value of the partition information is a second value, the CU may be partitioned.
[0193] Reference Figure 3 , an LCU with a depth of 0 may be a block of 64×64. 0 may be the minimum depth. An SCU with a depth of 3 may be a block of 8×8. 3 may be the maximum depth. A CU of a block of 32×32 and a CU of a block of 16×16 may be represented as depth 1 and depth 2, respectively.
[0194] For example, when a single coding unit is partitioned into four coding units, the horizontal size and vertical size of the four coding units partitioned may be half the horizontal size and vertical size of the CU before being partitioned. In one embodiment, when a coding unit of size 32×32 is partitioned into four coding units, each of the four coding units partitioned may have a size of 16×16. When a single coding unit is partitioned into four coding units, it can be said that the coding unit can be partitioned into a quadtree form.
[0195] For example, when one coding unit is partitioned into two sub-coding units, the horizontal size or vertical size (width or height) of each of the two sub-coding units may be half of the horizontal size or vertical size of the original coding unit. For example, when a coding unit having a size of 32×32 is partitioned vertically into two sub-coding units, each of the two sub-coding units may have a size of 16×32. For example, when a coding unit having a size of 8×32 is partitioned horizontally into two sub-coding units, each of the two sub-coding units may have a size of 8×16. When one coding unit is partitioned into two sub-coding units, the coding unit may be said to be partitioned into two or partitioned by a binary tree partition structure.
[0196] For example, when one coding unit is partitioned into three sub-coding units, the horizontal size or the vertical size of the coding unit may be partitioned at a ratio of 1:2:1, thereby generating three sub-coding units having a ratio of the horizontal size or the vertical size of 1:2:1. For example, when a coding unit having a size of 16×32 is partitioned horizontally into three sub-coding units, the three sub-coding units may have sizes of 16×8, 16×16, and 16×8, respectively, in order from the uppermost sub-coding unit to the lowermost sub-coding unit. For example, when a coding unit having a size of 32×32 is partitioned vertically into three sub-coding units, the three sub-coding units may have sizes of 8×32, 16×32, and 8×32, respectively, in order from the left sub-coding unit to the right sub-coding unit. When one coding unit is partitioned into three sub-coding units, the coding unit may be said to be partitioned into three sub-coding units or partitioned according to a ternary tree partition structure.
[0197] exist Figure 3 , a coding tree unit (CTU) 320 is an example of a CTU to which a quadtree partition structure, a binary tree partition structure, and a ternary tree partition structure are all applied.
[0198] As described above, in order to partition a CTU, at least one of a quadtree partition structure, a binary tree partition structure, and a ternary tree partition structure may be applied. Various tree partition structures may be sequentially applied to a CTU according to a predetermined priority order. For example, a quadtree partition structure may be preferentially applied to a CTU. Coding units that can no longer be partitioned using a quadtree partition structure may correspond to leaf nodes of a quadtree. Coding units corresponding to leaf nodes of a quadtree may be used as root nodes of a binary and / or ternary tree partition structure. That is, coding units corresponding to leaf nodes of a quadtree may be further partitioned according to a binary tree partition structure or a ternary tree partition structure, or may not be further partitioned. Therefore, by preventing a coding block obtained from a binary tree partition or a ternary tree partition of a coding unit corresponding to a leaf node of a quadtree from undergoing further quadtree partitioning, a block partitioning operation and / or an operation of sending partition information with a signal may be effectively performed.
[0199] The fact that the coding unit corresponding to the node of the quadtree is partitioned may be signaled using the four partition information. The four partition information having a first value (e.g., "1") may indicate that the current coding unit is partitioned according to the quadtree partition structure. The four partition information having a second value (e.g., "0") may indicate that the current coding unit is not partitioned according to the quadtree partition structure. The four partition information may be a flag having a predetermined length (e.g., one bit).
[0200] There may be no priority between binary tree partitioning and ternary tree partitioning. That is, the coding unit corresponding to the leaf node of the quadtree may further undergo any partitioning of the binary tree partitioning and the ternary tree partitioning. In addition, the coding unit generated by the binary tree partitioning or the ternary tree partitioning may undergo further binary tree partitioning or further ternary tree partitioning, or may not be further partitioned.
[0201] A tree structure in which there is no priority between binary tree partitions and ternary tree partitions is called a multi-type tree structure. A coding unit corresponding to a leaf node of a quadtree may be used as a root node of a multi-type tree. At least one of multi-type tree partition indication information, partition direction information, and partition tree information may be used to signal whether to partition a coding unit corresponding to a node of a multi-type tree. In order to partition a coding unit corresponding to a node of a multi-type tree, multi-type tree partition indication information, partition direction information, and partition tree information may be sequentially signaled.
[0202] The multi-type tree partition indication information having a first value (eg, '1') may indicate that the current coding unit will undergo multi-type tree partitioning. The multi-type tree partition indication information having a second value (eg, '0') may indicate that the current coding unit will not undergo multi-type tree partitioning.
[0203] When a coding unit corresponding to a node of a multi-type tree is further partitioned according to a multi-type tree partition structure, the coding unit may include partition direction information. The partition direction information may indicate in which direction the current coding unit will be partitioned for the multi-type tree partition. The partition direction information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned vertically. The partition direction information having a second value (e.g., "0") may indicate that the current coding unit will be partitioned horizontally.
[0204] When a coding unit corresponding to a node of a multi-type tree is further partitioned according to a multi-type tree partition structure, the current coding unit may include partition tree information. The partition tree information may indicate a tree partition structure to be used to partition the nodes of the multi-type tree. The partition tree information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned according to a binary tree partition structure. The partition tree information having a second value (e.g., "0") may indicate that the current coding unit will be partitioned according to a ternary tree partition structure.
[0205] The partition indication information, the partition tree information and the partition direction information may all be flags having a predetermined length (eg, one bit).
[0206] At least any one of the quadtree partition indication information, the multi-type tree partition indication information, the partition direction information, and the partition tree information may be entropy encoded / decoded. In order to entropy encode / decode those types of information, information about neighboring coding units adjacent to the current coding unit may be used. For example, there is a high probability that the partition type (partitioned or not partitioned, partition tree, and / or partition direction) of the left neighboring coding unit and / or the upper neighboring coding unit of the current coding unit is similar to the partition type of the current coding unit. Therefore, context information for entropy encoding / decoding the information about the current coding unit may be derived from the information about the neighboring coding units. The information about the neighboring coding units may include at least any one of the quadtree partition information, the multi-type tree partition indication information, the partition direction information, and the partition tree information.
[0207] As another example, among binary tree partitioning and ternary tree partitioning, binary tree partitioning may be preferentially performed. That is, the current coding unit may first undergo binary tree partitioning, and then the coding unit corresponding to the leaf node of the binary tree may be set as the root node for the ternary tree partitioning. In this case, for the coding unit corresponding to the node of the ternary tree, neither quadtree partitioning nor binary tree partitioning may be performed.
[0208] A coding unit that cannot be partitioned according to a quadtree partition structure, a binary tree partition structure, and / or a ternary tree partition structure becomes a basic unit for encoding, prediction, and / or transformation. That is, the coding unit cannot be further partitioned for prediction and / or transformation. Therefore, partition structure information and partition information for partitioning a coding unit into a prediction unit and / or a transformation unit may not exist in the bitstream.
[0209] However, when the size of the coding unit (ie, the basic unit for partitioning) is larger than the size of the maximum transform block, the coding unit may be recursively partitioned until the size of the coding unit is reduced to be equal to or smaller than the size of the maximum transform block. For example, when the size of the coding unit is 64×64 and when the size of the maximum transform block is 32×32, the coding unit may be partitioned into four 32×32 blocks for transforming. For example, when the size of the coding unit is 32×64 and the size of the maximum transform block is 32×32, the coding unit may be partitioned into two 32×32 blocks for transforming. In this case, the partition of the coding unit for transforming is not separately signaled, and the partition of the coding unit for transforming may be determined by comparison between the horizontal size or vertical size of the coding unit and the horizontal size or vertical size of the maximum transform block. For example, when the horizontal size (width) of the coding unit is larger than the horizontal size (width) of the maximum transform block, the coding unit may be vertically divided into two equal parts. For example, when the vertical size (height) of the coding unit is larger than the vertical size (height) of the maximum transform block, the coding unit may be horizontally divided into two equal parts.
[0210] Information on the maximum and / or minimum size of a coding unit and information on the maximum and / or minimum size of a transform block may be signaled or determined at a higher level of the coding unit. The higher level may be, for example, a sequence level, a picture level, a slice level, a tile group level, a tile level, etc. For example, the minimum size of a coding unit may be determined as 4×4. For example, the maximum size of a transform block may be determined as 64×64. For example, the minimum size of a transform block may be determined as 4×4.
[0211] Information on the minimum size of the coding unit corresponding to the leaf node of the quadtree (quadtree minimum size) and / or information on the maximum depth from the root node of the multi-type tree to the leaf node (maximum tree depth of the multi-type tree) may be signaled or determined at a higher level of the coding unit. For example, the higher level may be a sequence level, a picture level, a slice level, a parallel block group level, a parallel block level, etc. Information on the minimum size of the quadtree and / or information on the maximum depth of the multi-type tree may be signaled or determined for each of the intra-picture slice and the inter-picture slice.
[0212] The difference information between the size of the CTU and the maximum size of the transform block may be signaled or determined at a higher level of the coding unit. For example, the higher level may be a sequence level, a picture level, a slice level, a parallel block group level, a parallel block level, etc. The information of the maximum size of the coding unit corresponding to each node of the binary tree (hereinafter referred to as the maximum size of the binary tree) may be determined based on the size of the coding tree unit and the difference information. The maximum size of the coding unit corresponding to each node of the ternary tree (hereinafter referred to as the maximum size of the ternary tree) may vary depending on the type of the slice. For example, for an intra-picture slice, the maximum size of the ternary tree may be 32×32. For example, for an inter-picture slice, the maximum size of the ternary tree may be 128×128. For example, the minimum size of the coding unit corresponding to each node of the binary tree (hereinafter referred to as the minimum size of the binary tree) and / or the minimum size of the coding unit corresponding to each node of the ternary tree (hereinafter referred to as the minimum size of the ternary tree) may be set to the minimum size of the coding block.
[0213] As another example, the maximum size of the binary tree and / or the maximum size of the ternary tree may be signaled or determined at the slice level. Alternatively, the minimum size of the binary tree and / or the minimum size of the ternary tree may be signaled or determined at the slice level.
[0214] Depending on the sizes and depth information of the above-mentioned various blocks, quad partition information, multi-type tree partition indication information, partition tree information and / or partition direction information may or may not be included in the bitstream.
[0215] For example, when the size of the coding unit is not greater than the minimum size of the quadtree, the coding unit does not include the quad partition information. Therefore, the quad partition information may be inferred from the second value.
[0216] For example, when the size (horizontal size and vertical size) of the coding unit corresponding to the node of the multi-type tree is greater than the maximum size (horizontal size and vertical size) of the binary tree and / or the maximum size (horizontal size and vertical size) of the ternary tree, the coding unit may not be partitioned by the binary tree or the ternary tree. Therefore, the multi-type tree partition indication information may not be signaled, but the multi-type tree partition indication information may be inferred from the second value.
[0217] Optionally, when the size (horizontal size and vertical size) of the coding unit corresponding to the node of the multi-type tree is the same as the maximum size (horizontal size and vertical size) of the binary tree and / or is twice as large as the maximum size (horizontal size and vertical size) of the ternary tree, the coding unit may not be further partitioned into two or three partitions. Therefore, the multi-type tree partition indication information may not be sent by a signal, but the multi-type tree partition indication information may be derived from the second value. This is because when the coding unit is partitioned by the binary tree partition structure and / or the ternary tree partition structure, a coding unit smaller than the minimum size of the binary tree and / or the minimum size of the ternary tree is generated.
[0218] Optionally, the binary tree partition or ternary tree partition may be limited based on the size of the virtual pipeline data unit (hereinafter, the pipeline buffer size). For example, when the coding unit is partitioned into sub-coding units that do not fit into the pipeline buffer size by the binary tree partition or ternary tree partition, the corresponding binary tree partition or ternary tree partition may be limited. The pipeline buffer size may be the size of the maximum transform block (eg, 64×64). For example, when the pipeline buffer size is 64×64, the following partition may be limited.
[0219] - N×M (N and / or M is 128) ternary tree partitions for coding units - 128×N (N<=64) binary tree partitions in the horizontal direction for coding units - N×128 (N<=64) binary tree partitions in the vertical direction for coding units Optionally, when the depth of the coding unit corresponding to the node of the multi-type tree is equal to the maximum depth of the multi-type tree, the coding unit may not be further partitioned into two and / or three partitions. Therefore, the multi-type tree partition indication information may not be sent by a signal, but the multi-type tree partition indication information may be inferred from the second value.
[0220] Optionally, only when at least one of vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning is possible for a coding unit corresponding to a node of a multi-type tree, a multi-type tree partition indication information may be signaled. Otherwise, the coding unit may not be partitioned into two and / or three partitions. Therefore, the multi-type tree partition indication information may not be signaled, but may be inferred from the second value.
[0221] Optionally, partition direction information may be signaled only when both vertical binary tree partitioning and horizontal binary tree partitioning or both vertical ternary tree partitioning and horizontal ternary tree partitioning are possible for a coding unit corresponding to a node of a multi-type tree. Otherwise, partition direction information may not be signaled, but may be derived from a value indicating a possible partition direction.
[0222] Optionally, the partition tree information may be signaled only when both vertical binary tree partitioning and vertical ternary tree partitioning or both horizontal binary tree partitioning and horizontal ternary tree partitioning are possible for a coding tree corresponding to a node of a multi-type tree. Otherwise, the partition tree information may not be signaled but derived from a value indicating a possible partition tree structure.
[0223] Figure 4 is a diagram illustrating an intra prediction process.
[0224] Figure 4 The arrows from the center to the outside in FIG. 1 represent the prediction direction of the intra prediction mode.
[0225] Intra-frame encoding and / or decoding may be performed by using reference samples of neighboring blocks of the current block. The neighboring blocks may be reconstructed neighboring blocks. For example, intra-frame encoding and / or decoding may be performed by using encoding parameters or values of reference samples included in the reconstructed neighboring blocks.
[0226] The prediction block may represent a block generated by performing intra prediction. The prediction block may correspond to at least one of a CU, a PU, and a TU. The unit of the prediction block may have a size of one of a CU, a PU, and a TU. The prediction block may be a square block of a size of 2×2, 4×4, 16×16, 32×32, or 64×64, etc., or may be a rectangular block of a size of 2×8, 4×8, 2×16, 4×16, and 8×16, etc.
[0227] Intra-prediction may be performed according to an intra-prediction mode for the current block. The number of intra-prediction modes that the current block may have may be a fixed value, and may be a value determined differently according to properties of the prediction block. For example, the properties of the prediction block may include the size of the prediction block, the shape of the prediction block, and the like.
[0228] Regardless of the block size, the number of intra-frame prediction modes can be fixed to N. Alternatively, the number of intra-frame prediction modes can be 3, 5, 9, 17, 34, 35, 36, 65 or 67, etc. Optionally, the number of intra-frame prediction modes can vary according to the block size or the color component type or both the block size and the color component type. For example, the number of intra-frame prediction modes can vary depending on whether the color component is a luminance signal or a chrominance signal. For example, as the block size becomes larger, the number of intra-frame prediction modes can increase. Optionally, the number of intra-frame prediction modes of the luminance component block can be greater than the number of intra-frame prediction modes of the chrominance component block.
[0229] The intra prediction mode may be a non-angle mode or an angle mode. The non-angle mode may be a DC mode or a planar mode, and the angle mode may be a prediction mode having a specific direction or angle. The intra prediction mode may be represented by at least one of a mode number, a mode value, a mode number, a mode angle, and a mode direction. The number of intra prediction modes may be M, which is greater than 1, including non-angle modes and angle modes. In order to perform intra prediction on the current block, a step of determining whether a sample included in a reconstructed neighboring block can be used as a reference sample of the current block may be performed. When there are samples that cannot be used as reference samples of the current block, a value obtained by copying or interpolating at least one sample value of the samples included in the reconstructed neighboring block, or performing both copying and interpolation, may be used to replace the unavailable sample value of the sample, so that the replaced sample value is used as the reference sample of the current block.
[0230] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0231] like Figure 7 As shown, at least one of the reference sample line 0 to the reference sample line 3 can be used for intra prediction of the current block. Figure 7 In the example, the samples of fragment A and fragment F may be filled with the samples of the closest fragment B and fragment E, respectively, instead of being retrieved from the reconstructed neighboring blocks. Index information indicating the reference sample line to be used for intra prediction of the current block may be signaled. When the upper boundary of the current block is the boundary of the CTU, only the reference sample line 0 may be available. Therefore, in this case, the index information may not be signaled. When a reference sample line other than the reference sample line 0 is used, filtering for the prediction block, which will be described later, may not be performed.
[0232] When intra prediction is performed, a filter may be applied to at least one of reference samples and prediction samples based on the intra prediction mode and the current block size / shape.
[0233] In the case of the planar mode, when generating a prediction block of the current block, according to the position of the prediction target sample in the prediction block, the sample value of the prediction target sample may be generated by using the weighted sum of the upper reference sample and the left reference sample of the current sample and the upper right reference sample and the lower left reference sample of the current block. In addition, in the case of the DC mode, when generating the prediction block of the current block, the average value of the upper reference sample and the left reference sample of the current block may be used. In addition, in the case of the angular mode, the prediction block may be generated by using the upper reference sample, the left reference sample, the upper right reference sample and / or the lower left reference sample of the current block. In order to generate the prediction sample value, interpolation of real number units may be performed.
[0234] In the case of intra prediction between color components, a prediction block of a current block of a second color component may be generated based on a corresponding reconstruction block of a first color component. For example, the first color component may be a luminance component, and the second color component may be a chrominance component. For intra prediction between color components, parameters of a linear model between the first color component and the second color component may be derived based on a template. The template may include upper and / or left neighboring samples of the current block and upper and / or left neighboring samples of a reconstruction block of the first color component corresponding thereto. For example, the sample value of the first color component having the maximum value among the samples in the template and the sample value of the second color component corresponding thereto, and the sample value of the first color component having the minimum value among the samples in the template and the sample value of the second color component corresponding thereto may be used to derive parameters of a linear model. When the parameters of the linear model are derived, the corresponding reconstruction block may be applied to the linear model to generate a prediction block of the current block. Depending on the video format, subsampling may be performed on the reconstruction block of the first color component and the neighboring samples of the corresponding reconstruction block. For example, when one sample of the second color component corresponds to four samples of the first color component, the four samples of the first color component may be subsampled to calculate one corresponding sample. In this case, parameter derivation of a linear model and intra prediction between color components may be performed based on the corresponding subsampled samples. Whether to perform intra prediction between color components and / or the range of a template may be signaled as an intra prediction mode.
[0235] The current block may be partitioned into two sub-blocks or four sub-blocks in the horizontal direction or the vertical direction. The partitioned sub-blocks may be reconstructed sequentially. That is, intra prediction may be performed on the sub-block to generate a sub-prediction block. In addition, inverse quantization and / or inverse transformation may be performed on the sub-block to generate a sub-residual block. The reconstructed sub-block may be generated by adding the sub-prediction block to the sub-residual block. The reconstructed sub-block may be used as a reference sample for intra prediction of the sub-sub-block. The sub-block may be a block including a predetermined number (e.g., 16) or more samples. Thus, for example, when the current block is an 8×4 block or a 4×8 block, the current block may be partitioned into two sub-blocks. In addition, when the current block is a 4×4 block, the current block may not be partitioned into sub-blocks. When the current block has other sizes, the current block may be partitioned into four sub-blocks. Information on whether intra prediction is performed based on sub-blocks and / or partition directions (horizontal or vertical) may be sent by signaling. It may be limited to performing sub-block-based intra prediction only when reference sample line 0 is used. When subblock-based intra prediction is performed, filtering for a prediction block, which will be described later, may not be performed.
[0236] The final prediction block can be generated by performing filtering on the prediction block predicted by the intra-frame. Filtering can be performed by applying predetermined weights to the filtering target samples, the left reference samples, the upper reference samples and / or the upper left reference samples. The weights and / or reference samples (range, position, etc.) used for filtering can be determined based on at least one of the block size, the intra-frame prediction mode and the position of the filtering target samples in the prediction block. Filtering can be performed only in the case of a predetermined intra-frame prediction mode (e.g., DC, plane, vertical, horizontal, diagonal and / or adjacent diagonal mode). The adjacent diagonal mode can be a mode in which k is added to the diagonal mode or k is subtracted from the diagonal mode. For example, k can be a positive integer of 8 or less.
[0237] The intra-frame prediction mode of the current block can be entropy encoded / decoded by predicting the intra-frame prediction mode of the block adjacent to the current block. In the case where the intra-frame prediction mode of the current block is the same as that of the neighboring block, the same information as that of the intra-frame prediction mode of the current block and the neighboring block can be sent by signaling using predetermined flag information. In addition, the indicator information of the intra-frame prediction mode that is the same as the intra-frame prediction mode of the current block among the intra-frame prediction modes of multiple neighboring blocks can be sent by signaling. In the case where the intra-frame prediction mode of the current block and the neighboring block is not the same, the intra-frame prediction mode information of the current block can be entropy encoded / decoded by performing entropy encoding / decoding based on the intra-frame prediction mode of the neighboring block.
[0238] Figure 5 is a diagram illustrating an embodiment of an inter-picture prediction process.
[0239] exist Figure 5 In , a rectangle can represent a picture. Figure 5 In FIG. 1 , the arrow indicates the prediction direction. According to the encoding type of the picture, the picture can be classified into an intra picture (I picture), a predicted picture (P picture) and a bi-predicted picture (B picture).
[0240] I pictures may be encoded by intra prediction without the need for inter-picture prediction. P pictures may be encoded by inter-picture prediction using reference pictures that exist in one direction (i.e., forward or backward) for the current block. B pictures may be encoded by inter-picture prediction using reference pictures that exist in two directions (i.e., forward and backward) for the current block. When inter-picture prediction is used, the encoder may perform inter-picture prediction or motion compensation, and the decoder may perform corresponding motion compensation.
[0241] Hereinafter, embodiments of inter prediction will be described in detail.
[0242] Reference pictures and motion information may be used to perform inter-picture prediction or motion compensation.
[0243] The motion information of the current block may be derived during inter-picture prediction by each of the encoding device 100 and the decoding device 200. The motion information of the current block may be derived by using the motion information of a reconstructed neighboring block, the motion information of a co-located block (also referred to as a col block or a co-located block), and / or the motion information of a block adjacent to the co-located block. The co-located block may represent a block in a previously reconstructed co-located picture (also referred to as a col picture or a co-located picture) that is spatially located at the same position as the current block. The co-located picture may be one of the one or more reference pictures included in the reference picture list.
[0244] The derivation method of motion information may be different depending on the prediction mode of the current block. For example, the prediction modes applied to inter prediction include AMVP mode, merge mode, skip mode, merge mode with motion vector difference, sub-block merge mode, triangle partition mode, inter-intra combined prediction mode, affine mode, etc. Here, the merge mode may be referred to as motion merge mode.
[0245] For example, when AMVP is used as a prediction mode, at least one of a motion vector of a reconstructed neighboring block, a motion vector of a co-located block, a motion vector of a block adjacent to the co-located block, and a (0,0) motion vector may be determined as a motion vector candidate for the current block, and a motion vector candidate list may be generated by using the motion vector candidate. The motion vector candidate of the current block may be derived by using the generated motion vector candidate list. The motion information of the current block may be determined based on the derived motion vector candidate. The motion vector of the co-located block or the motion vector of the block adjacent to the co-located block may be referred to as a temporal motion vector candidate, and the motion vector of the reconstructed neighboring block may be referred to as a spatial motion vector candidate.
[0246] The encoding device 100 may calculate a motion vector difference (MVD) between a motion vector of a current block and a motion vector candidate, and may perform entropy encoding on the motion vector difference (MVD). In addition, the encoding device 100 may perform entropy encoding on a motion vector candidate index and generate a bitstream. The motion vector candidate index may indicate the best motion vector candidate among the motion vector candidates included in the motion vector candidate list. The decoding device may perform entropy decoding on the motion vector candidate index included in the bitstream, and may select a motion vector candidate for a decoding target block from the motion vector candidates included in the motion vector candidate list by using the entropy-decoded motion vector candidate index. In addition, the decoding device 200 may add the entropy-decoded MVD to the motion vector candidate extracted by entropy decoding, thereby deriving the motion vector of the decoding target block.
[0247] In addition, the encoding apparatus 100 may perform entropy encoding on the resolution information of the calculated MVD. The decoding apparatus 200 may adjust the resolution of the entropy-decoded MVD using the MVD resolution information.
[0248] In addition, the encoding device 100 calculates a motion vector difference (MVD) between a motion vector in a current block and a motion vector candidate based on an affine model, and performs entropy encoding on the MVD. The decoding device 200 derives a motion vector based on each sub-block by deriving an affine controlled motion vector of a decoded target block through the sum of the entropy-decoded MVD and the affine controlled motion vector candidate.
[0249] The bitstream may include a reference picture index indicating a reference picture. The reference picture index may be entropy encoded by the encoding apparatus 100 and then signaled as a bitstream to the decoding apparatus 200. The decoding apparatus 200 may generate a prediction block of a decoding target block based on the derived motion vector and the reference picture index information.
[0250] Another example of a method of deriving motion information of a current block may be a merge mode. The merge mode may indicate a method of merging motions of a plurality of blocks. The merge mode may indicate a mode of deriving motion information of a current block from motion information of a neighboring block. When the merge mode is applied, a merge candidate list may be generated using motion information of reconstructed neighboring blocks and / or motion information of co-located blocks. The motion information may include at least one of a motion vector, a reference picture index, and an inter-picture prediction indicator. The prediction indicator may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).
[0251] The merge candidate list may be a list of stored motion information. The motion information included in the merge candidate list may be at least one of the following: motion information of a neighboring block adjacent to the current block (spatial merge candidate), motion information of a co-located block of the current block in a reference picture (temporal merge candidate), new motion information generated by a combination of motion information present in the merge candidate list, motion information of a block encoded / decoded before the current block (historical-based merge candidate), and a zero merge candidate.
[0252] The encoding device 100 may generate a bitstream by performing entropy encoding on at least one of a merge flag and a merge index, and may signal the bitstream to the decoding device 200. The merge flag may be information indicating whether a merge mode is performed for each block, and the merge index may be information indicating which neighboring block among neighboring blocks of the current block is a merge target block. For example, the neighboring blocks of the current block may include a left neighboring block located on the left side of the current block, an upper neighboring block arranged above the current block, and a temporal neighboring block temporally adjacent to the current block.
[0253] In addition, the encoding device 100 performs entropy encoding on the correction information for correcting the motion vector in the motion information of the merge candidate, and sends it to the decoding device 200 with a signal. 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 may include at least one of information on whether to perform correction, correction direction information, and correction size information. As described above, the prediction mode in which the motion vector of the merge candidate is corrected based on the correction information sent with the signal can be referred to as a merge mode with a motion vector difference.
[0254] The skip mode may be a mode in which the motion information of the neighboring blocks is applied to the current block as it is. When the skip mode is applied, the encoding apparatus 100 may perform entropy encoding on information of the fact of which block's motion information is to be used as the motion information of the current block to generate a bitstream, and may signal the bitstream to the decoding apparatus 200. The encoding apparatus 100 may not signal a syntax element regarding at least any one of the motion vector difference information, the coded block flag, and the transform coefficient level to the decoding apparatus 200.
[0255] The subblock merge mode may indicate a mode for deriving motion information in units of subblocks of a coding block (CU). When the subblock merge mode is applied, the subblock merge candidate list may be generated using motion information of a subblock co-located with the current subblock in a reference picture (subblock-based temporal merge candidates) and / or affine control point motion vector merge candidates.
[0256] The triangular partition mode may denote a mode of deriving motion information by partitioning the current block into diagonal directions, deriving each prediction sample using each of the derived motion information, and deriving the prediction sample of the current block by weighting each of the derived prediction samples.
[0257] The inter-intra combined prediction mode may mean a mode of deriving a prediction sample of a current block by weighting a prediction sample generated by inter prediction and a prediction sample generated by intra prediction.
[0258] The decoding apparatus 200 may correct the derived motion information by itself. The decoding apparatus 200 may search for a predetermined area based on a reference block indicated by the derived motion information, and derive motion information having a minimum SAD as corrected motion information.
[0259] The decoding apparatus 200 may compensate for prediction samples derived through inter-frame prediction using optical flow.
[0260] Figure 6 is a diagram illustrating transform and quantization processing.
[0261] like Figure 6As shown in , a transform process and / or a quantization process is performed on the residual signal to generate a quantized level signal. The residual signal is the difference between the original block and the prediction block (i.e., an intra-frame prediction block or an inter-frame prediction block). The prediction block is a block generated by intra-frame prediction or inter-frame prediction. The transform can be a primary transform, a secondary transform, or both a primary transform and a secondary transform. The primary transform of the residual signal generates transform coefficients, and the secondary transform of the transform coefficients generates secondary transform coefficients.
[0262] At least one scheme selected from various predefined transform schemes is used to perform the primary transform. For example, examples of the predetermined transform scheme include discrete cosine transform (DCT), discrete sine transform (DST) and Karhunen-Loève transform (KLT). The transform coefficients generated by the primary transform may undergo a secondary transform. The transform scheme for the primary transform and / or the secondary transform may be determined based on the coding parameters of the current block and / or the neighboring blocks of the current block. Optionally, transform information indicating the transform scheme may be sent by a signal. DCT-based transforms may include, for example, DCT-2, DCT-8, etc. DST-based transforms may include, for example, DST-7.
[0263] A quantized level signal (quantized coefficient) may be generated by performing quantization on a residual signal or a result of performing a primary transform and / or a secondary transform. Depending on the intra prediction mode of the block or the block size / shape, the quantized level signal may be scanned according to at least one of a diagonal upper right scan, a vertical scan, and a horizontal scan. For example, when scanning coefficients in a diagonal upper right scan, the coefficients in block form are changed to a one-dimensional vector form. In addition to the diagonal upper right scan, a horizontal scan that scans the coefficients in a two-dimensional block form horizontally or a vertical scan that scans the coefficients in a two-dimensional block form vertically may be used depending on the intra prediction mode and / or the size of the transform block. The scanned quantized level coefficients may be entropy encoded for insertion into a bitstream.
[0264] The decoder performs entropy decoding on the bit stream to obtain quantized level coefficients. The quantized level coefficients can be arranged in a two-dimensional block form by reverse scanning. For reverse scanning, at least one of diagonal upper right scanning, vertical scanning, and horizontal scanning can be used.
[0265] The quantized level coefficients may then be dequantized, then inversely transformed twice as needed, and finally inversely transformed once as needed to produce a reconstructed residual signal.
[0266] Inverse mapping in the dynamic range can be performed for the luminance component reconstructed by intra-frame prediction or inter-frame prediction before in-loop filtering. The dynamic range can be partitioned into 16 equal segments, and the mapping function of each segment can be sent with a signal. The mapping function can be sent with a signal at the slice level or the parallel block group level. The inverse mapping function for performing inverse mapping can be derived based on the mapping function. In-loop filtering, reference picture storage and motion compensation are performed in the inverse mapping area, and the prediction block generated by inter-frame prediction is converted to the mapping area via mapping using the mapping function, and then used to generate a reconstructed block. However, since intra-frame prediction is performed in the mapping area, the prediction block generated via intra-frame prediction can be used to generate a reconstructed block without mapping / inverse mapping.
[0267] When the current block is a residual block of a chroma component, the residual block can be converted to an inverse mapping area by performing scaling on the chroma component of the mapping area. The availability of scaling can be signaled at the slice level or the parallel block group level. Scaling can be applied only when the mapping of the luminance component is available and the partitions of the luminance component and the chroma component follow the same tree structure. Scaling can be performed based on the average value of the sample values of the luminance prediction block corresponding to the chroma block. In this case, when the current block uses inter-frame prediction, the luminance prediction block can represent the mapped luminance prediction block. The value required for scaling can be derived by using the index reference lookup table of the fragment to which the average value of the sample values of the luminance prediction block belongs. Finally, the residual block can be converted to an inverse mapping area by scaling the residual block using the derived value. Then, chroma component block recovery, intra-frame prediction, inter-frame prediction, in-loop filtering, and reference picture storage can be performed in the inverse mapping area.
[0268] Information indicating whether mapping / inverse mapping of luma components and chroma components is available may be signaled through a sequence parameter set.
[0269] The prediction block of the current block can be generated based on a block vector indicating the displacement between the current block and the reference block in the current picture. In this way, the prediction mode for generating the prediction block with reference to the current picture is called an intra-block copy (IBC) mode. The IBC mode can be applied to M×N (M<=64, N<=64) coding units. The IBC mode may include a skip mode, a merge mode, an AMVP mode, and the like. In the case of a skip mode or a merge mode, a merge candidate list is constructed, and a merge index is signaled so that a merge candidate can be specified. The block vector of the specified merge candidate can be used as the block vector of the current block. The merge candidate list may include at least one of a spatial candidate, a history-based candidate, a candidate based on the average of two candidates, and a zero merge candidate. In the case of the AMVP mode, a difference block vector may be signaled. In addition, a prediction block vector may be derived from the left neighboring block and the upper neighboring block of the current block. The index of the neighboring block to be used may be signaled. The prediction block in the IBC mode is included in the current CTU or the left CTU and is limited to blocks in the reconstructed area. For example, the value of the block vector can be limited so that the prediction block of the current block is located in the region of three 64×64 blocks before the 64×64 block to which the current block belongs in the encoding / decoding order. By limiting the value of the block vector in this way, the memory consumption and device complexity of the implementation scheme according to the IBC mode can be reduced.
[0270] In the following, reference will be made to Figures 8 to 41 An image encoding / decoding method according to an embodiment of the present invention is described.
[0271] Recently, since broadcast services with ultra-high definition (UHD) resolution (3840×216) have expanded not only domestically but also worldwide, many users are getting used to videos with ultra-high resolution and ultra-high definition. In addition, with the development of shooting and editing technology, various video services such as panoramic videos or 360-degree videos are provided, so the size of videos is gradually increasing. In line with this, many organizations are accelerating the development of next-generation video equipment.
[0272] MPEG (Moving Picture Experts Group) and VCEG (Video Coding Experts Group) jointly formed JCT-VC (Joint Collaboration Team on Video Coding) and completed the standardization of HEVC (High Efficiency Video Coding) / H.265 in 2010. HEVC is the next generation moving picture codec with twice the compression efficiency / performance of H.264 / AVC.
[0273] In addition, MPEG and VCEG jointly formed JVET (Joint Video Experts Group) and started standardization of VVC (Versatile Video Coding) / H.266 in April 2018, where VVC / H.266 is a next-generation video codec suitable for compressing various video images.
[0274] As a method of improving image coding efficiency, a method of removing intra-frame redundancy or inter-frame redundancy has been used. Prediction using information with similarity can be used to remove intra-frame redundancy or inter-frame redundancy. Inter-frame prediction can use the high similarity between the current picture and the reference picture. Through inter-frame prediction, motion information (such as pixel values and motion vectors of the current picture and reference picture index) can be predicted from the reference picture. At this time, only the difference in pixel values and motion information between the current picture to be encoded / decoded and the reference picture can be encoded / decoded. As the difference between the reference information used for prediction and the image information value of the current encoding / decoding area decreases, the prediction accuracy can be increased, and therefore the coding efficiency can be increased.
[0275] In the AMVP mode, the motion information of the current block may be encoded / decoded using the motion information of the neighboring blocks. Specifically, in the AMVP mode, the motion information of the current block may be encoded / decoded using the difference between the motion information of the candidate block and the motion information of the current block.
[0276] In merge mode, motion information of a neighboring block may be used to encode / decode motion information of a current block. Specifically, in merge mode, motion information of a candidate block may be used as motion information of a current block. Whether to use merge mode may be determined based on a merge mode indicator general_merge_flag.
[0277] Meanwhile, when the merge mode indicator has a first value (eg, '1' or 'true'), at least one of a regular merge mode indicator regular_merge_flag, an MMVD merge mode indicator mmvd_merge_flag, a subblock merge mode indicator merge_subblock_flag, or a CIIP (Combined Inter and Intra Prediction) mode indicator ciip_flag may be obtained from a bitstream.
[0278] The motion information may have the highest percentage of the coding mode. The motion information may include information about a motion vector, a reference picture index, and a reference direction, and may be transmitted in units of blocks.
[0279] Generally, images have information with high intra-frame redundancy, while videos have high inter-frame redundancy characteristics. Accordingly, when information about an image is represented by a distinguishable specific symbol, the frequency of occurrence of the symbol can be concentrated. Entropy coding is a video coding method that can improve coding efficiency by taking into account the frequency of occurrence of such symbols. Specifically, a symbol with a high frequency of occurrence is represented by a code with a small size, and a symbol with a low frequency of occurrence can be represented by a code with a large size.
[0280] For more efficient video encoding / decoding, each frame of the video can be partitioned in units of blocks. At this time, the block can represent a unit for performing prediction. Examples of block partitions include CU, PU, macroblock, sub-block, or each partition of triangle prediction mode (TPM) or multi-shape prediction (MSP). Inter-frame prediction can be performed in each partitioned block, and for more efficient inter-frame prediction, motion information prediction can be performed by referring to specific motion information. Examples of motion information prediction may include AMVP mode, merge mode, etc. Here, MSP mode may be used as the same meaning as GPM (geometric partition mode).
[0281] In MSP mode, a rectangular current block is partitioned into two blocks, and inter-frame prediction is performed on each sub-block. When inter-frame prediction is performed in MSP mode, unidirectional inter-frame prediction can be performed for each sub-block. At this time, one of 64 directions can be used to partition the current block.
[0282] In the MSP mode, the prediction samples of the current block may be generated by weighted summing of the prediction samples of each sub-block at the boundary of each sub-block.
[0283] The MSP mode may be executed only when certain conditions are met.
[0284] For example, the MSP mode may be performed only when a slice type of the current block is a bi-directional prediction type and a size of the current block is 8×8 or greater.
[0285] In addition, the MSP mode may be performed only when the merge mode indicator general_merge_flag is '1' (or 'true') and the regular merge mode indicator regular_merge_flag, the subblock merge mode indicator merge_subblock_flag, and the CIIP mode indicator ciip_flag are '0' (or 'false').
[0286] In addition, the MSP mode may be performed only when the width of the current block is less than eight times the height thereof or the height of the current block is less than eight times the width thereof.
[0287] When performing motion information prediction, multiple blocks may refer to the same motion information. The motion information referenced at this time may be referred to as a motion information candidate. Examples of multiple blocks referring to the same motion information include: a method of constructing a motion information candidate in a CU unit and sharing the motion information candidate in a PU unit or a sub-CU unit belonging to a CU, a method of constructing and sharing motion information candidates shared in an upper block unit before partitioning a block into a predetermined size or smaller size, and a method of constructing and sharing motion information candidates shared in an upper block unit before partitioning in a specific block partitioning form such as triangle prediction, MSP, etc.
[0288] For example, when the current block is partitioned into two blocks by the MSP mode, each sub-block may share a motion information candidate list constructed in a current block unit.
[0289] When multiple blocks share the same motion information candidate, each constructed motion information candidate may not be suitable for predicting the motion information of each block. According to the present invention, the encoding efficiency can be improved by selecting or preferentially using valid motion information candidates for each block from the shared motion information candidates. In addition, the computational complexity of encoding can be reduced by excluding candidates with low encoding efficiency for each block.
[0290] According to an embodiment of the present invention, a valid candidate may be selected from the shared motion candidates, or the priority of the shared motion candidates may be changed to improve the encoding efficiency. At this time, the process of selecting a valid candidate or changing the priority may be referred to as a candidate reconstruction process.
[0291] That is, a motion candidate to be used for prediction of each subblock may be selected from a plurality of motion information candidates included in a motion information candidate list shared by a plurality of subblocks.
[0292] For example, each subblock in the current block may selectively use any one of the L0 prediction direction motion information or the L1 prediction direction motion information candidates in the motion information candidate list constructed in the current block unit.
[0293] When motion prediction is performed using a motion candidate shared by a plurality of blocks, valid candidates may be different or appropriate candidate priorities may be different according to each block.
[0294] When valid candidates are selected only from the shared motion candidates and used according to each block, since the range of generation of the signal indicating the candidate selected for motion prediction is reduced, the entropy coding efficiency can be improved and the coding efficiency is improved. In addition, since the number of candidates actually used is reduced, the process of comparing the coding efficiency during encoding can be reduced, and the computational complexity for encoding can be reduced.
[0295] When priority is given to shared motion candidates to suit each block, since a signal indicating a candidate selected for motion prediction is concentrated, entropy encoding efficiency can be improved, and encoding efficiency can be improved.
[0296] The candidate reconstruction process according to an embodiment of the present invention may include at least one of the following methods: a method of excluding the reuse of candidates, a method of determining candidates considering the spatial positions of shared candidates, or a method of determining candidates considering the similarity of prediction information or motion information between shared candidates.
[0297] Figure 8: is a flowchart showing a case where a candidate reconstruction process is not included and a case where a candidate reconstruction process is included in encoding and decoding processes using a shared candidate according to an embodiment of the present invention.
[0298] like Figure 8 As shown in (a), when the partition block uses a shared candidate in the encoding / decoding process, each subblock can be predicted without a candidate reconstruction process. In the encoding / decoding process using the shared candidate, a "block partitioning" step (S801) of partitioning blocks in the region using the shared candidate can be performed.
[0299] In addition, a "shared candidate search" step (S802) of searching and reconstructing a shared candidate to be used in a sub-block may be performed. At this time, the shared candidate search step S802 may include a process of selecting a candidate to be used for predicting a block.
[0300] In addition, a "partition block prediction" step (S803) of referring to a shared candidate in the process of predicting a partition block may be performed. At this time, the partition block may refer to a block partitioned in the block partitioning step S801, and the shared candidate may refer to a candidate searched and constructed in the shared candidate search step S802. At this time, the subblock may be used in the same meaning as a partitioned block or a partition block.
[0301] In addition, when prediction is performed for all sub-blocks of the reference shared candidate (S804-true), the prediction process of the block currently using the shared candidate can be completed, and the next encoding / decoding process can be performed. In addition, when prediction is performed for some blocks of the reference shared candidate (S804-false), the "partition block prediction" step S803 of the reference shared candidate can be performed.
[0302] and Figure 8 Different from (a), the encoding / decoding process using the shared candidate according to another embodiment of the present invention may include a candidate reconstruction process.
[0303] like Figure 8 As shown in (b), when the partition block uses the shared candidate in the encoding / decoding process, each subblock can be predicted by the candidate reconstruction process. In the encoding / decoding process using the shared candidate, a "block partitioning" step (S811) of partitioning blocks in the region using the shared candidate can be performed.
[0304] For example, when the current block is in MSP mode, the current block may be partitioned into two sub-blocks. At this time, the direction in which the current block is partitioned may be determined by the signaled merge_gpm_partition_idx. Here, merge_gpm_partition_idx may have a value between 0 and 63. That is, merge_gpm_partition_idx may indicate a total of 64 block partition directions.
[0305] In addition, a "shared candidate search" step (S812) of searching and constructing shared candidates to be used in the sub-block may be performed. At this time, the shared candidate search step S812 may include a process of selecting a candidate to be used for prediction of the block.
[0306] Specifically, the shared candidate search step can be performed in units of blocks before partitioning. For example, when the current block is partitioned into sub-blocks, shared candidates can be derived in the current block unit. Here, the shared candidates can be represented by a motion information candidate list.
[0307] At this time, the motion information candidate list can be used in the same meaning as the merge candidate list. The motion information candidate list may include inter-frame prediction information of at least one of the motion information of the spatial neighboring blocks of the current block, the motion information of the temporal neighboring blocks, the combined motion information, or the buffer-based motion information.
[0308] That is, the motion information candidate list generated in the current block unit may be shared between sub-blocks.
[0309] In addition, a "partition block valid candidate determination" step (S813) of determining a more effective candidate for the current subblock among the shared candidates searched and constructed in the shared candidate search step S812 may be performed. At this time, information that can be used in the partition block valid candidate determination step S813 may be added explicitly or implicitly. In addition, the candidate search method or the candidate construction method may be changed in the shared candidate search step S812 so that the partition block valid candidate determination step S813 is appropriately performed.
[0310] In addition, a candidate reconstruction step (S814) may be performed. At this time, the candidate reconstruction step S814 may represent a step of reconstructing a candidate suitable for prediction of the current sub-block according to the validity determined in the partition block valid candidate determination step S813. The candidate reconstruction step S814 may include a process of selecting only candidates with high validity or changing the priority of the candidates.
[0311] Specifically, when the current block is in MSP mode, a candidate for predicting each subblock may be selected from shared candidates, and the shared candidates may be reconstructed. That is, a candidate for predicting each subblock may be selected and a motion information candidate list may be reconstructed.
[0312] For example, a motion information candidate for prediction of a first subblock may be selected from the shared motion information candidate list, and a motion information candidate for prediction of a second subblock may be selected from the shared motion information candidate list.
[0313] In another example, a motion information candidate in a first prediction direction may be selected from the shared motion information candidate list as a motion information candidate for prediction of the first sub-block, and motion information in a second prediction direction may be selected as a motion information candidate for prediction of the second sub-block, thereby reconstructing the shared motion information candidate list. Here, the first prediction direction and the second prediction direction may be predefined by the encoder / decoder, or may be determined by information sent by a signal.
[0314] In addition, a "partition block prediction" step (S815) may be performed with reference to a shared candidate reconstructed in the process of predicting the partition block. That is, inter-frame prediction may be performed for the subblock based on the reconstructed candidate. At this time, the partition block may refer to a block partitioned in the block partitioning step S811. The reconstructed candidate may refer to a candidate obtained by reconstructing the candidate searched and constructed in the shared candidate search step S812 in the candidate reconstruction step S814.
[0315] At the same time, index information indicating motion information for predicting a subblock in a reconstruction candidate list may be sent by signal. That is, index information indicating predicted motion information for a subblock in a reconstruction motion information candidate list may be sent by signal. Here, index information may be sent by signal for each subblock.
[0316] For example, the index information of the first sub-block may be represented by merge_gpm_idx0, and the index information of the second sub-block may be represented by merge_gpm_idx1.
[0317] Meanwhile, the index information can be used in the candidate reconstruction step.
[0318] For example, when the index information of the first subblock indicates an even value (including 0), the motion information candidate list may be reconstructed by selecting a motion information candidate from the shared motion information candidate list in the first prediction direction. Here, the first prediction direction may be the L0 direction.
[0319] In contrast, when the index information of the first subblock indicates an odd value, the motion information candidate list may be reconstructed by selecting a motion information candidate from the shared motion information candidate list in the second prediction direction. Here, the second prediction direction may be an L1 direction.
[0320] In addition, when prediction is performed for all sub-blocks of the reference shared candidate (S816-true), the prediction process of the block currently using the shared candidate can be completed, and the next encoding / decoding process can be performed. In addition, when prediction is performed for some blocks of the reference shared candidate (S816-false), the partition block valid candidate determination step S813 can be performed again for the next partition block.
[0321] at this time, Figure 8 (a) and Figure 8 The prediction process of (b) may include all prediction processes using the candidate. For example, Figure 8 (a) and Figure 8 The prediction process of (b) may include at least one of intra prediction or inter prediction.
[0322] Fig. 9 1 and 2 are diagrams of a case where a candidate reconstruction process is not included and a case where a candidate reconstruction process is included in encoding and decoding processes using a shared candidate according to an embodiment of the present invention.
[0323] When a partition block uses a shared candidate in an encoding / decoding process, each subblock can be predicted without a candidate reconstruction process.
[0324] Reference Fig. 9 (a), the encoder / decoder according to an embodiment of the present invention may include a block partitioning unit 902 , a shared candidate search unit 904 , and a predictor 905 .
[0325] In the block partitioning unit 902, the current block 901 (unpartitioned block) before partitioning may be partitioned, thereby generating a partitioned block 903. At this time, prediction using a shared candidate may be performed on the partitioned block 903.
[0326] In the shared candidate search unit 904 , shared candidates commonly referenced by the partition blocks 903 in the predictor 905 may be searched and reconstructed.
[0327] In the predictor 905, prediction for encoding / decoding the partition block 903 may be performed. At this time, the prediction may include all prediction processes using the candidate. For example, the prediction performed in the predictor 905 may include at least one of intra prediction or inter prediction. As a result of the prediction in the predictor 905, prediction information 906 that can be used in the encoding / decoding process may be output.
[0328] and Fig. 9 Different from (a), according to another embodiment of the present invention, the encoding / decoding process using the shared candidate may include a candidate reconstruction process.
[0329] For example, refer to Fig. 9(b), in addition to the block partitioning unit 912 , the shared candidate searching unit 914 and the predictor 917 , the encoder / decoder according to the embodiment of the present invention may further include a partition block valid candidate determining unit 915 and a candidate reconstructing unit 916 .
[0330] In the block partitioning unit 912, the current block 911 before partitioning (which is a non-partitioned block) may be partitioned, thereby generating a partitioned block 913. At this time, prediction using a shared candidate may be performed on the partitioned block 913.
[0331] In the shared candidate search unit 914, shared candidates that can be commonly referenced by the partition blocks 903 in the predictor 905 can be searched and constructed. At this time, partition information indicating how the current block 911 is partitioned before partitioning can be used. The partition information can be received from the block partition unit 912 or another signal. In addition, the shared candidate search unit 914 can include information that can be used in the partition block valid candidate determination unit 915 in the candidate search or construction result.
[0332] In the partition block valid candidate determination unit 915, candidates valid for the partition block 913 may be determined from the shared candidates searched and constructed in the shared candidate search unit 914. At this time, information about the current partition block may be received from another partition block, or information about the current partition block may be referenced in a predetermined order.
[0333] In the candidate reconstruction unit 916, candidates suitable for the current partition block may be reconstructed based on the validity of the shared candidates determined in the partition block valid candidate determination unit 915. For example, in the candidate reconstruction unit 916, more valid candidates may be selected, or the priority of the candidates may be reconstructed.
[0334] In the predictor 917, prediction for encoding / decoding the partition block 913 may be performed. At this time, the prediction may include all prediction processes using the candidate. For example, the prediction performed in the predictor 917 may include at least one of intra prediction or inter prediction. In addition, in the predictor 917, the candidate reconstructed in the candidate reconstruction unit 916 may be referenced in order to encode / decode the current partition block 913. As a result of the prediction in the predictor 917, prediction information 918 that can be used in the encoding / decoding process may be output.
[0335] Fig.10 is a diagram illustrating an embodiment of a method of constructing a sub-candidate list from a shared candidate list.
[0336] According to an embodiment of the present invention, while selectively using only the priorities of valid candidates or reconstruction candidates for each block, a sub-candidate list for each block reference may be constructed.
[0337] For example, refer to Fig.10 , the sub-candidate list of block 0 or block 1 can be constructed from a shared candidate list consisting of a total of five candidates of 0, 1, 2, 3, and 4. At this time, the candidates valid for block 0 may be 0, 1, and 4, and the candidates valid for block 1 may be 1, 2, and 3. Accordingly, in block 0, only candidates 0, 1, and 4 valid for block 0 may be selected to construct the sub-candidate list. In addition, in block 1, only candidates 1, 2, and 3 valid for block 1 may be selected to construct the sub-candidate list.
[0338] Fig.11 is a diagram illustrating an embodiment of a method of reconstructing a candidate code of each block for a candidate reconstruction process.
[0339] According to an embodiment of the present invention, while selectively using only valid candidates or priorities of reconstruction candidates for each block, a code of a candidate may be reconstructed for each block.
[0340] For example, refer to Fig.11 , each of block 0 and block 1 may selectively use only three valid candidates from a shared candidate list consisting of a total of five candidates of 0, 1, 2, 3, and 4. At this time, block 0 may use candidates 0, 1, and 4 from the shared candidates, and block 1 may use candidates 1, 2, and 3 from the shared candidates. Here, codes 0, 1, and 2 may be assigned to the candidates selected for each block and may be signaled. That is, in the case of block 0, codes 0, 1, and 2 may be assigned to valid candidates 0, 1, and 4, respectively, and may be encoded / decoded (1101). In addition, in the case of block 1, codes 0, 1, and 2 may correspond to valid candidates 1, 2, and 3, respectively, and may be encoded / decoded (1102).
[0341] The method of constructing the individual sub-candidate list of each block using the shared candidate and the method of reconstructing the code of the candidate of each block described above can be used simultaneously. At this time, when the same sub-candidate list is constructed in the encoder / decoder, the encoding / decoding process of the reconstructed code of the candidate can be omitted.
[0342] In the candidate reconstruction process according to the embodiment of the present invention, a method of excluding reused candidates may be performed.
[0343] When multiple blocks use a shared candidate, the blocks may have different prediction information or motion information. When the blocks are partitioned, signaling of a signal indicating whether partitioning is performed or the partitioning form and a signal for reconstructing the prediction information or motion information of each partitioned block may be required, respectively. Accordingly, in the case where the blocks have the same prediction information or motion information, the encoding efficiency may be higher when the blocks are not partitioned.
[0344] Depending on the block partitioning form or method, the block may have different prediction information or motion information, which means that the block may use different candidates for prediction.
[0345] Therefore, according to an embodiment of the present invention, a candidate used in one of the blocks using a shared candidate can be set not to be used in another block. In a block where prediction is performed while excluding candidates overlapping with other blocks, the range of candidate generation is reduced, and a code can be more efficiently signaled in entropy coding. At this time, the situation of excluding overlapping candidates can be limited according to the partition form of the block or the number of partitions.
[0346] Fig.12 is a diagram illustrating a method of excluding reuse of a candidate according to an embodiment of the present invention.
[0347] Fig.12 (a) shows the case where two blocks (block 0 and block 1) refer to a shared candidate. Fig.12 12(b), 12(c) and 12(d) show the case where four blocks (block 0, block 1, block 2 and block 3) refer to the shared candidate. Fig.12 Decoding is performed on candidate 0 in block 1 in the description.
[0348] Reference Fig.12 (a), in block 1, a reference candidate may be selected from candidates other than candidate 0 referenced in block 0. At this time, the range of candidate generation may be reduced, thereby improving encoding efficiency and reducing encoding complexity.
[0349] exist Fig.12 (b) Fig.12 (c) and Fig.12 In (d), since the four blocks are adjacent to each other, all blocks may not refer to different candidates. Fig.12 Compared with (a), the candidates referenced in each block are less likely to be different from each other. At this time, considering the partition form of the block and the number of partitions, overlapping candidates can be excluded.
[0350] For example, refer to Fig.12 (b), among blocks 1 and 2 that are more likely to be similar to block 0 in consideration of the partition form or the number of partitions of the block, the reference candidate may be selected by referring to all candidates including candidate 0 that is similar to block 0. However, since block 3 has a relatively low possibility of referring to the same candidate as block 0, the reference candidate may be selected from candidates other than candidate 0. At this time, the range of candidate generation may be reduced, thereby improving encoding efficiency or encoding complexity.
[0351] In addition, refer to Fig.12(c) , only when the candidates referenced in blocks 0 , 1 , and 2 are all the same, candidates other than the candidates referenced in blocks 0 , 1 , and 2 may be referenced in block 3 .
[0352] In addition, if Fig.12 As shown in (d), in certain cases, considering the partition form or the number of partitions of the block, the reuse of candidates may not be excluded. That is, in block 1, block 2, and block 3, all reference candidates including candidate 0 may be selected.
[0353] In the candidate reconstruction process according to the embodiment of the present invention, a method of determining a candidate in consideration of a spatial position of a shared candidate may be performed.
[0354] Blocks with shared candidates have different spatial positions. Accordingly, the relative positions between blocks and candidates can be different. That is, the effectiveness of each candidate can be relatively high or relatively low according to the positional relationship between blocks and candidates. Accordingly, according to the positional relationship between blocks and candidates, candidates with high effectiveness can be selectively used, or candidates with high effectiveness can be preferentially referenced, thereby improving coding efficiency or reducing coding complexity.
[0355] Fig.13 is a diagram illustrating a method of determining a candidate when the validity of a sharing candidate varies according to a position of a block according to an embodiment of the present invention.
[0356] Fig.13 (a) and Fig.13 (b) shows a case where each block is partitioned in a triangular shape when performing triangular partition prediction. In addition, Fig.13 (c) and Fig.13 (d) shows the case where each block is partitioned into a rectangular shape. Fig.13 In the description of , candidate 0, candidate 1, candidate 2, candidate 3, and candidate 4 indicate spatial candidates, and candidate 5 and candidate 6 indicate temporal candidates.
[0357] Fig.13 (a) Fig.13 (b) and Fig.13 (c) shows a case where a shared candidate is referenced in two blocks (block A and block B).
[0358] Reference Fig.13 In (a), block A is adjacent to all spatial candidates 0, 1, 2, 3, and 4, and block B is not adjacent to spatial candidate 4. At this time, candidate 4 may have lower prediction accuracy and lower candidate validity than other spatial candidates in block 4. Therefore, when prediction is performed in block B, candidate 4 may not be referenced, or the priority of candidate 4 may be set to low.
[0359] When candidate 4 is not referenced, the range of selectable candidates in block B is reduced by 1, thereby improving the efficiency of signaling. When the process of checking and comparing the prediction efficiency of candidate 4 during encoding can be omitted, the encoding complexity is reduced. In addition, when the priority of candidate 4 is set to low and the candidate number is set to increase, candidates with higher likelihood can be assigned candidate numbers with higher priorities, thereby improving the efficiency of signaling.
[0360] Fig.13 (b) shows the Fig.13 (a) Examples of blocks partitioned along different diagonals. Fig.13 In (b), block A is adjacent to candidates 0, 3, and 4 located on the left, and block B is adjacent to spatial candidates 1, 2, and 4 located above. That is, compared with other spatial candidates, candidates 0, 3, and 4 are more likely to be referenced in block A, and candidates 1, 2, and 4 are more likely to be referenced in block B. Accordingly, in block A, only candidates 0, 3, and 4 among the spatial candidates may be used, or the priority of candidates 0, 3, and 4 may be set higher than the priority of other spatial candidates. In addition, in block B, only candidates 1, 2, and 4 among the spatial candidates may be used, or the priority of candidates 1, 2, and 4 may be set higher than the priority of other spatial candidates.
[0361] Reference Fig.13 In (c), block A is adjacent to candidates 0, 3, and 4 located on the left, and block B is adjacent to spatial candidates 1 and 2 and temporal candidates 5 and 6 located above. Accordingly, in block A, only candidates 0, 3, and 4 may be used, or the priority of candidates 0, 3, and 4 may be set higher than the priority of other spatial candidates. In addition, in block B, only candidates 1, 2, 5, and 6 may be used, or the priority of candidates 1, 2, 5, and 6 may be set higher than the priority of other candidates.
[0362] Fig.13 (d) shows a case where a shared candidate is referenced in three blocks (block A, block B, and block C).
[0363] Reference Fig.13 In (d), block A is adjacent to spatial candidates 1, 2, and 4 located above, block B is adjacent to spatial candidates 0 and 3 and temporal candidate 6 located on the lower left side, and block C is adjacent to temporal candidate 5 located on the lower right side and temporal candidate 6 in the center. Therefore, in block A, only candidates 1, 2, and 4 may be used, or the priority of candidates 1, 2, and 4 may be set high, and in block B, only candidates 0, 3, and 6 may be used, or the priority of candidates 0, 3, and 6 may be set high.
[0364] At this time, block C may have only candidates 5 and 6 as adjacent candidates, but the temporal candidate may have a lower prediction efficiency than the spatial candidate. Therefore, in block C, all candidates may be referenced. Optionally, in block C, relatively adjacent spatial candidates (such as candidates 0 and 1) may be partially and selectively referenced compared to other spatial candidates, and their priority may be set to high.
[0365] In the candidate reconstruction process according to an embodiment of the present invention, the candidates may be determined in consideration of similarity of prediction information or motion information between shared candidates.
[0366] Among the shared candidates, there are identical or similar candidates. At this time, as an example of determining similar candidates, there is a method of determining similar candidates when the difference between motion vectors is within a predetermined threshold. Here, the threshold may be a value preset in the encoder / decoder, or may be information determined by the encoder and sent to the decoder with a signal. When there are identical or similar candidates among the shared candidates, a valid candidate may be selected or the priority of the candidate may be set by considering the position and distribution of the candidate together with the position of the current partition block.
[0367] Fig.14 is a diagram illustrating a method of selecting a valid candidate in each block when candidates having the same motion information exist among shared candidates according to an embodiment of the present invention.
[0368] Fig.14 A case is shown where a block is partitioned into four blocks (block A, block B, block C, and block D) and each partitioned block has a shared candidate.
[0369] Reference Fig.14 (a), candidates 0, 3, and 4 may have the same prediction information or motion information. At this time, candidates 0, 3, and 4 may be combined into one candidate. Candidates 0, 3, and 4 having the same prediction information or motion information may indicate that the same motion occurs over a relatively wide area in an area adjacent to the left side of the current block. In addition, blocks located on the left side of each partition block (e.g., blocks A and C) may have the same prediction information or motion information as candidates 0, 3, and 4. Accordingly, in blocks A and C, candidates 0, 3, and 4 may be determined as valid candidates and may be used preferentially.
[0370] At this time, since blocks B and D may have different motions from blocks A and C, candidates 0, 3, and 4 may be determined as invalid candidates in blocks B and D, or the priorities of candidates 0, 3, and 4 may be set to low.
[0371] Reference Fig.14(b), candidates 1 and 4 may have the same prediction information or motion information. At this time, candidates 1 and 4 may be combined into one candidate. Candidates 1 and 4 having the same prediction information or motion information may indicate that the same motion occurs over a relatively wide area in an area adjacent to the top of the current block. In addition, blocks located above each partition block (e.g., block A and block B) may have the same prediction information or motion information as candidates 1 and 4. Accordingly, in blocks A and B, candidates 1 and 4 may be determined as valid candidates and used preferentially.
[0372] At this time, since blocks C and D may have different motions from blocks A and B, candidates 1 and 4 may be determined as invalid candidates in blocks C and D, and the priorities of candidates 1 and 4 may be set to low.
[0373] Reference Fig.14 (c), candidates 0, 1, 3, and 4 may have the same prediction information or motion information. At this time, candidates 0, 1, 3, and 4 may be combined into one candidate. Candidates 0, 1, 3, and 4 having the same prediction information or motion information may indicate that blocks A, B, and C may have the same motion and have the same motion as candidates 0, 1, 3, and 4. Accordingly, among blocks A, B, and C, candidates 0, 1, 3, and 4 may be determined as valid candidates and used preferentially.
[0374] At this time, since block D may have a motion different from those of blocks A, B, and C, in block D, candidates 0, 1, 3, and 4 may be determined as invalid candidates, or the priorities of candidates 0, 1, 3, and 4 may be set to low.
[0375] Reference Fig.14 (d), candidates 0, 1, 2, and 3 may have the same prediction information or motion information. At this time, candidates 0, 1, 2, and 3 may be combined into one candidate. Candidates 0, 1, 2, and 3 having the same prediction information or motion information may indicate that block B and block C may have the same motion and may have the same motion as candidates 0, 1, 2, and 3. Accordingly, in blocks B and C, candidates 0, 1, 2, and 3 may be determined as valid candidates and used preferentially.
[0376] At this time, since blocks A and D may have different motions from blocks B and C, in blocks A and B, candidates 0, 1, 2, and 3 may be determined as invalid candidates, or the priorities of candidates 0, 1, 2, and 3 may be set low.
[0377] In the encoding / decoding process using the shared candidate, the partition form or the number of partitions of the block having the shared candidate can be predicted by the positional relationship between the candidates having the same prediction information or motion information in the prediction information or motion information of the shared candidate. When the partition form or the number of partitions of the block is predicted by the positional relationship between the candidates having the same prediction information or motion information in the shared candidate, the process of searching for the best encoding can be shortened by preferentially checking the partition of the prediction block before another partition form, or the encoding efficiency can be improved by the code of the prediction block partition form.
[0378] Fig.15 2 is a diagram illustrating a method of predicting a block partition by using candidates having the same motion information among shared candidates according to an exemplary embodiment.
[0379] Reference Fig.15 (a), candidates 0, 3, and 4 may have the same prediction information or motion information. In this case, candidates 0, 3, and 4 may be combined into one candidate. Candidates 0, 3, and 4 having the same prediction information or motion information may indicate that the same motion occurs over a relatively wide area in an area adjacent to the left side of the current block. In addition, a block located to the left of each partition block may have the same prediction information or motion information as candidates 0, 3, and 4.
[0380] Accordingly, since it is easy to have different motion information in the left and right regions of the block before partitioning, and the left region may have the same motion information, the block may be partitioned into the left and right regions.
[0381] Reference Fig.15 (b), candidates 1 and 4 may have the same prediction information or motion information. In this case, candidates 1 and 4 may be combined into one candidate. Candidates 1 and 4 having the same prediction information or motion information may indicate that the same motion occurs over a relatively wide area in an area adjacent to the top of the current block. In addition, a block located above each partition block may have the same prediction information or motion information as candidates 1 and 4.
[0382] Accordingly, since it is easy to have different motion information in the upper and lower regions of the block before partitioning, and the upper region may have the same motion information, the block may be partitioned into the upper and lower regions.
[0383] Reference Fig.15(c), candidates 0, 1, 3, and 4 may have the same prediction information or motion information. At this time, candidates 0, 1, 3, and 4 may be combined into one candidate. Candidates 0, 1, 3, and 4 having the same prediction information or motion information may indicate that the same motion occurs over a relatively wide area in the area adjacent to the top and left of the current block. In addition, blocks located above and to the left of each partition block may have the same prediction information or motion information as candidates 0, 1, 3, and 4.
[0384] Accordingly, since it is easy for the upper and left areas and the right and lower areas of the block to have different motion information before partitioning, and the upper and left areas may have the same motion information, the block may be partitioned into the lower right area and other areas.
[0385] Reference Fig.15 (d), candidates 0, 1, and 4 may have the same prediction information or motion information. At this time, candidates 0, 1, and 4 may be combined into one candidate. Candidates 0, 1, and 4 having the same prediction information or motion information may indicate that the same motion occurs over a relatively wide area in the area adjacent to the top and left of the current block. In addition, blocks located above and to the left of each partition block may have the same prediction information or motion information as candidates 0, 1, and 4.
[0386] Accordingly, it is easy to have different motion information in the upper and left areas and the right and lower areas of the block before partitioning. Fig.15 As shown in (d), since the upper area and the left area may have the same motion information, the block may be partitioned diagonally into an upper left area and a lower right area.
[0387] According to an embodiment of the present invention, whether to use a shared candidate reconstruction method may be signaled in each unit or some units. At this time, when whether to use a shared candidate reconstruction method is predefined or derived from other information, signaling may be omitted.
[0388] When the shared candidate reconstruction method is used, a signal of a reference reconstruction candidate may be transmitted and received. The signal of the reference reconstruction candidate may be included in the signal of the reference existing shared candidate, or may replace the signal of the reference existing shared candidate.
[0389] Table 1, Table 2, and Table 3 show embodiments of a method of signaling whether to use shared candidate reconstruction.
[0390] Table 1 shows an example of a case where whether to use shared candidate reconstruction is determined in units of sequence parameter sets (SPS).
[0391] [Table 1]
[0392] Table 2 shows an example of a case where whether to use shared candidate reconstruction is determined in units of picture parameter sets (PPS).
[0393] [Table 2]
[0394] Table 3 shows an example of a case where it is determined in units of parallel block group headers whether to use shared candidate reconstruction.
[0395] [Table 3]
[0396] In Tables 1 to 3, SHARED_CANDIDATE_ENABLE indicates whether a sharing candidate is available and may have a specific value. For example, a sharing candidate may be available when SHARED_CANDIDATE_ENABLE is "1" (or "true"), and may be unavailable when SHARED_CANDIDATE_ENABLE is "0" (or "false"). However, the present invention is not limited to this, and "0" may represent "true" and "1" may represent "false". SHARED_CANDIDATE_ENABLE may be explicitly signaled, or may be used without separate signaling according to a predefined usage method. In addition, when SHARED_CANDIDATE_ENABLE always has the same value, the conditional statement for checking the value of SHARED_CANDIDATE_ENABLE may be omitted.
[0397] At this time, when at least one of all modes uses a shared candidate in a prediction mode such as triangle partition prediction or MSP, SHARED_CANDIDATE_ENABLE may be 'true'.
[0398] When SHARED_CANDIDATE_ENABLE is "true", the shared_candidate_restructure_enable_flag may be signaled. Conversely, when SHARED_CANDIDATE_ENABLE is "false", the shared_candidate_restructure_enable_flag may be defined as being signaled.
[0399] shared_candidate_restructure_enable_flag may be information for determining whether to use a method of reconstructing a shared candidate in a transmission unit (eg, SPS, PPS, tile group header, etc.).
[0400] shared_candidate_restructure_enable_flag may have a specific value. For example, shared_candidate_restructure_enable_flag may have a value of "1" (or "true") or a value of "0" (or "false"). However, the present invention is not limited thereto, and "0" may represent "true" and "1" may represent "false". At this time, when shared_candidate_restructure_enable_flag is "true", a method of reconstructing a shared candidate may be used in a corresponding unit, and when shared_candidate_restructure_enable_flag is "false", a method of reconstructing a shared candidate may not be used in a corresponding unit.
[0401] In addition, when whether to use a method of reconstructing a shared candidate is determined in advance, signaling of shared_candidate_restructure_enable_flag may be omitted.
[0402] Table 4 shows an example of a case where signaling of whether to reconstruct a shared candidate in a coding unit syntax unit is used.
[0403] [Table 4]
[0404] Referring to Table 4, cu_shared_candidate_restructure_enable_flag may be information for determining whether to use reconstruction of a shared candidate in each CU. At this time, when shared_candidate_restructure_enable_flag indicating whether to use reconstruction of a shared candidate in a higher unit is 'true', cu_shared_candidate_restructure_enable_flag may be signaled.
[0405] Conversely, when shared_candidate_restructure_enable_flag is false, cu_shared_candidate_restructure_enable_flag may be signaled.
[0406] If the value of shared_candidate_restructure_enable_flag does not exist because whether to use the reconstruction of the shared candidate is predetermined, cu_shared_candidate_restructure_enable_flag may be signaled depending on whether to use the reconstruction of the shared candidate in a predetermined high unit.
[0407] In the coding unit syntax, when a shared candidate is used in the current CU, cu_shared_candidate_restructure_enable_flag may be signaled. At this time, isInshareRegion may be information indicating whether the current CU uses a shared candidate. That is, when isInShareRegion is "true", cu_shared_candidate_restructure_enable_flag may be signaled.
[0408] However, even when isInShareRegion is 'false', candidates shared by triangle partition prediction and MSP may be used.
[0409] For example, when a specific mode (e.g., triangle partition prediction, MSP, etc.) uses a shared candidate and encoding / decoding is performed in one or more corresponding modes in the current CU, the value of USE_SHARED_CANDIDATE_MODE may be "true". At this time, when USE_SHARED_CANDIDATE_MODE is "true", cu_shared_candidate_restructure_enable_flag may be signaled even if isInShareRegion is "false".
[0410] On the contrary, when the current CU does not use the mode of using shared candidates, the value of USE_SHARED_CANDIDATE_MODE may be “false.” At this time, when both USE_SHARED_CANDIDATE_MODE and isInShareRegion are “false,” cu_shared_candidate_restructure_enable_flag may not be signaled.
[0411] When cu_shared_candidate_restructure_enable_flag is "true", a signal indicating the reference prediction candidate may be signaled. At this time, the signal indicating the reference prediction candidate may be a signal that the reconstruction candidate structure is changed.
[0412] When whether to use the reconstruction of the shared candidate is equally specified in advance in the encoder / decoder or not to use the reconstruction of the shared candidate in a specific mode, the signaling of cu_shared_candidate_restructure_enable_flag may be omitted.
[0413] Fig.16 is a diagram illustrating an image decoding method according to an embodiment of the present invention.
[0414] Reference Fig.16 , the image decoder may construct a motion information candidate list for the current block ( S1601 ).
[0415] The motion information candidate list may include at least one of motion information of spatially neighboring blocks, motion information of temporally neighboring blocks, combined motion information, or zero motion information.
[0416] In addition, a first motion information candidate for predicting a first subblock in the current block may be selected from the motion information candidate list ( S1602 ).
[0417] The first motion information candidate may be any one of the candidates in the motion information candidate list in the first prediction direction.
[0418] In addition, a second motion information candidate for predicting a second subblock in the current block may be selected from the motion information candidate list ( S1603 ).
[0419] The second motion information candidate may be any one of the candidates in the second prediction direction in the motion information candidate list.
[0420] In addition, a prediction sample of the first subblock may be generated by performing inter prediction on the first subblock based on the first motion information candidate ( S1604 ).
[0421] In addition, prediction samples of the second subblock may be generated by performing inter prediction on the second subblock based on the second motion information candidate ( S1605 ).
[0422] The image decoder may obtain a first index of the first sub-block and a second index of the second sub-block from the bitstream.
[0423] The first index may be used to select a first motion information candidate from among candidates in a first prediction direction.
[0424] In addition, the second index may be used to select a second motion information candidate from among candidates in a second prediction direction.
[0425] The first index and the second index may be different.
[0426] The first prediction direction may be determined based on the first index.
[0427] Additionally, a second prediction direction may be determined based on the second index.
[0428] When the first index is an even number, the first prediction direction may be determined as the L0 direction.
[0429] In addition, when the second index is an even number, the second prediction direction may be determined as the L0 direction.
[0430] When the first index is an odd number, the first prediction direction may be determined as an L1 direction.
[0431] In addition, when the second index is an odd number, the second prediction direction may be determined as the L1 direction.
[0432] The image decoder can obtain the index of the partition direction of the current block from the bitstream.
[0433] The number of partition directions of the current block may be 64.
[0434] The current block may be predicted by performing a weighted summation on the prediction samples of the first sub-block and the prediction samples of the second sub-block based on the boundary between the first sub-block and the second sub-block.
[0435] Fig.17 is a diagram illustrating an image encoding method according to an embodiment of the present invention.
[0436] Reference Fig.17 , the image encoder may construct a motion information candidate list for the current block ( S1701 ).
[0437] The motion information candidate list may include at least one of motion information of spatially neighboring blocks, motion information of temporally neighboring blocks, combined motion information, or zero motion information.
[0438] In addition, a first motion information candidate for predicting a first subblock in the current block may be selected from the motion information candidate list ( S1702 ).
[0439] The first motion information candidate may be any one of the candidates in the first prediction direction in the motion information candidate list.
[0440] In addition, a second motion information candidate for predicting a second subblock in the current block may be selected from the motion information candidate list ( S1703 ).
[0441] The second motion information candidate may be any one of the candidates in the second prediction direction in the motion information candidate list.
[0442] The image encoder may encode a first index of the first sub-block and a second index of the second sub-block.
[0443] The first index may be used to select a first motion information candidate from among candidates in a first prediction direction.
[0444] In addition, the second index may be used to select a second motion information candidate from among candidates in a second prediction direction.
[0445] The first index and the second index may be different.
[0446] The first prediction direction may be determined based on the first index.
[0447] Additionally, a second prediction direction may be determined based on the second index.
[0448] When the first index is an even number, the first prediction direction may be determined as the L0 direction.
[0449] In addition, when the second index is an even number, the second prediction direction may be determined as the L0 direction.
[0450] When the first index is an odd number, the first prediction direction may be determined as an L1 direction.
[0451] In addition, when the second index is an odd number, the second prediction direction may be determined as the L1 direction.
[0452] The image encoder may encode the index of the partition direction of the current block.
[0453] The number of partition directions of the current block may be 64.
[0454] A bit stream generated by the image encoding method of the present invention may be temporarily stored in a non-transitory computer-readable recording medium, and may be encoded by the above-mentioned image encoding method.
[0455] Specifically, in a non-transitory computer-readable recording medium for storing a bitstream generated by a method for encoding an image, the method includes: constructing a motion information candidate list of a current block, selecting a first motion information candidate for prediction of a first subblock in the current block from the motion information candidate list, and selecting a second motion information candidate for prediction of a second subblock in the current block from the motion information candidate list. The first motion information candidate is any one of the candidates in a first prediction direction in the motion information candidate list, and the second motion information candidate is any one of the candidates in a second prediction direction in the motion information candidate list.
[0456] In image compression technology, encoding is performed in consideration of the statistical characteristics of the input image. Image compression technology may include predictive coding technology for removing temporal redundancy and spatial redundancy, transform coding technology based on cognitive vision, quantization technology, entropy coding technology, and filtering technology for improving prediction efficiency. At this time, predictive coding technology may include intra-frame prediction and inter-frame prediction. Image compression technology uses the principle of reducing the size of image data by removing overlapping signals from image signals.
[0457] The encoder can receive information in picture units from the original video image for encoding. At this time, the received original video image can be called an encoded picture.
[0458] Intra-frame prediction refers to a technique for predicting information using spatial similarities between internal pixels of a coding picture. In intra-frame prediction, overlapping information in an image frame can be used for prediction of an image signal in order to remove image signals that overlap in space.
[0459] Inter-frame prediction refers to a technique for predicting information using temporal similarity between a coded picture and a reference picture previously decoded at a time prior to the current time. In inter-frame prediction, information overlapping between image frames can be used for prediction of image signals in order to remove image signals overlapping in time.
[0460] In image compression, for error robustness and efficient memory usage, prediction is performed by partitioning the image screen in block units of a predetermined size. At this time, the block currently being predicted in the video compression and reconstruction process is referred to as the current block. In the prediction of the image signal in the image compression technology, the pixels of the block adjacent to the image signal of the current block or the image signal decoded before the encoding / decoding of the current block are used so that the pixels of the current block are predicted by various methods. In the image compression process, since there may not be an area with an image signal that is exactly the same as the current block in time and space, a residual signal corresponding to the prediction error may appear in the image signal prediction. The encoder sends the prediction information of the most effective prediction method and the residual signal generated after the prediction to the decoder, and the decoder receives the prediction method and the residual signal from the encoder and performs decoding of the image signal. Accordingly, in terms of image compression efficiency, it is advantageous to minimize the information about the residual signal sent to the decoder and the prediction information sent to the decoder in the compression process of the image signal.
[0461] Fig.18 is a diagram showing an embodiment of an intra prediction mode used in an image compression technique.
[0462] Fig.19 is a diagram illustrating an embodiment of a prediction method according to a directional intra prediction mode.
[0463] In intra-frame prediction of image compression technology, pixels of neighboring blocks adjacent to the current block can be used to perform prediction of image signals of pixels of the current block. The encoder can try many prediction methods of pixels from neighboring blocks to calculate the coding efficiency and select the coding method with the best coding efficiency in order to minimize the residual signal in intra-frame prediction.
[0464] In intra-frame prediction of image compression technology, such as Fig.18 As shown, DC prediction, plane prediction and directional intra prediction can be used. Fig.19 As shown, the image signals of the pixels of the current block can be predicted from the pixels of the neighboring blocks.
[0465] In the case of DC prediction, the average value of the neighboring pixels of the current block can be used. In addition, in the case of planar prediction, a series of calculations can be performed on the neighboring pixel values of the current block to predict the image signal of the pixels of the current block.
[0466] about Fig.18 The information of the intra-frame prediction mode can be sent from the encoder to the decoder so that the decoder can perform decoding according to the prediction method determined by the encoder. Since the information about the intra-frame prediction mode sent from the encoder to the decoder is included in the image compression data, it is important to reduce the size of the information about the intra-frame prediction mode sent from the encoder to the decoder in image compression.
[0467] Accordingly, the following embodiments of the present invention relate to a method for improving image compression efficiency by reducing the size of intra-frame prediction mode information.
[0468] When intra prediction is performed in image compression, an image signal obtained by compressing a residual signal and an intra prediction mode as a prediction error of intra prediction can be sent from an encoder to a decoder. Since the intra prediction mode has a finer directionality, intra prediction can be performed more accurately, thereby reducing the residual signal. However, since the intra prediction mode has a finer directionality, the number of types of intra prediction modes increases, thereby increasing the amount of data used to represent the intra prediction mode. Accordingly, in image compression, the number of intra prediction modes that has the best efficiency experimentally is used in the trade-off relationship between the amount of data of the residual signal and the amount of data used to represent the intra prediction mode.
[0469] To represent N values in image compression, we need bits or more digital signal. Here, Can represent greater than or equal to The smallest integer among the integers. For example, if N is 64, at least 6 bits of digital signal are required to represent 64 values. In addition, if N is 30, at least 5 bits of digital signal are required to represent 30 values.
[0470] As a method of reducing the amount of data used to represent an intra-frame prediction mode in intra-frame prediction of image compression, an MPM (most probable mode) candidate composed of intra-frame prediction modes of blocks located around the current block can be constructed. At this time, when the same intra-frame prediction mode as the current block exists in the constructed MPM candidate, the corresponding mode can be sent by index.
[0471] The MPM candidate can be constructed by a series of calculations of the intra prediction mode of the neighboring blocks from the current block. In addition, when there is no intra prediction mode of the available neighboring blocks, the MPM candidate can be constructed in a predetermined intra prediction mode. Typically, the number of candidates of the MPM candidate list is constructed to be less than the number of types of intra prediction modes, because fewer representation bits are required than the data used to represent the number of types, and thus high compression efficiency can be demonstrated.
[0472] When a mode that is the same as the intra prediction mode of the current block other than the intra prediction mode exists among the MPM candidates, the MPM index may be transmitted to the decoder.
[0473] However, when there is no mode identical to the intra prediction mode of the current block in the MPM candidates, the intra prediction mode of the current block can be classified as a non-MPM intra prediction mode. At this time, the intra prediction mode can be compressed using FLC (fixed length coding), truncated coding, etc. Generally, the compression technology used for the non-MPM intra prediction mode has a lower compression efficiency than the method of sending the MPM index. Accordingly, as the MPM selectivity increases, the image compression efficiency can be increased.
[0474] When the intra prediction mode is subdivided, the types of intra prediction modes can be diversified. Accordingly, when the intra prediction mode is subdivided, the probability that the intra prediction mode of the current block and the intra prediction mode of the neighboring block are the same can be reduced. In image compression technology, since the length of the MPM list is less than the number of types of intra prediction modes, and the MPM is constructed by a length determined between the encoder and the decoder, the possibility that there is a prediction mode that is the same as the prediction mode of the current block in the MPM candidate is smaller due to the diversification of intra prediction modes. That is, when the intra prediction mode is subdivided, the MPM selectivity may be reduced.
[0475] As the size of the current block decreases, the residual signal generated due to the error of the intra-frame prediction can be reduced. This means that the compression efficiency that can be obtained by reducing the data used to represent the intra-frame prediction mode due to the less subdivided intra-frame prediction mode may be higher than the compression efficiency caused by the reduction of the residual signal due to the increase in the accuracy of the intra-frame prediction mode caused by the subdivided intra-frame prediction mode. As the number of types of intra-frame prediction modes decreases, the accuracy of intra-frame prediction decreases, and the residual signal may increase relatively. On the contrary, as the number of types of intra-frame predictions decreases, the size of the data required to represent the intra-frame prediction may decrease. In addition, as the number of types of intra-frame prediction modes decreases, the MPM selectivity may increase and the amount of data required for non-MPM compression may be reduced, thereby greatly reducing the amount of data used to represent the intra-frame prediction mode. That is, in small blocks, as the number of types of intra-frame prediction modes decreases, the compression efficiency may increase.
[0476] The small blocks described in this specification may represent blocks that do not exceed a threshold value of the width and / or height of a block predefined in the encoder / decoder. In addition, the threshold value may be dynamically changed according to the size of the image or the size and partition depth of the largest block in the encoder / decoder.
[0477] For example, the small blocks described in this specification may be square blocks with the same width and height, wherein each ordered pair of the width and height of the square block is (2,2), (4,4), (8,8), or (16,16). In addition, the small blocks described in this specification may be non-square blocks with different widths and heights, wherein each ordered pair of the width and height of the square block is (2,4), (2,8), (2,16), (4,8), (4,16), (8,16), (4,2), (8,2), (16,2), (8,4), (16,4), or (16,8). In addition, the small blocks described in this specification may be non-square blocks, wherein the width and height of the non-square blocks have a multiple or divisor relationship with each other.
[0478] Fig. 20 is a diagram illustrating a method of reducing the number of intra prediction modes in intra prediction of a small block according to an embodiment of the present invention.
[0479] like Fig. 20 As shown in (a) of , when the block in the encoder / decoder is not a small block, N1 intra prediction modes can be used. In addition, as Fig. 20 As shown in (b), when the block in the encoder / decoder is a small block, N2 intra prediction modes can be used. At this time, N1 and N2 can be integers greater than or equal to 0, respectively, and N2 can be an integer less than N1. That is, in a small block, a smaller number of intra prediction modes can be used compared to the case where the block is not a small block.
[0480] According to the present invention, examples of methods for reducing the number of types of intra prediction modes include a method of using only even prediction modes, a method of using only odd prediction modes, and a method of using only some prediction mode numbers or reallocating prediction mode numbers. At least two of the method of using only even prediction modes, the method of using only odd prediction modes, and the method of using only some prediction mode numbers or reallocating prediction mode numbers may be combined to reduce the number of types of intra prediction modes.
[0481] In the image encoding / decoding method according to an embodiment of the present invention, when the current block is a small block, only the even-numbered intra prediction mode may be used. That is, when the current block is a small block, the intra prediction mode corresponding to the odd number may not be used. At this time, among the intra prediction modes corresponding to the odd numbers, some odd-numbered modes such as the DC_IDX(1) mode may be used.
[0482] For example, when the current block is a small block, the following methods can be used: a method of omitting cost derivation and comparison processing for the odd intra-frame prediction mode, a method of not adding the odd intra-frame prediction mode to the MPM when constructing the MPM, a method of correcting the odd intra-frame prediction mode to the even intra-frame prediction mode when constructing the MPM, a method of adding the even intra-frame prediction mode to the MPM when constructing the MPM, and a method of using only the even intra-frame prediction mode when using non-MPM intra-frame prediction.
[0483] Fig.21 is a diagram illustrating a method of omitting cost derivation and comparison processing for an odd-numbered intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0484] Reference Fig.21 , when the current block is a small block (S2101-"true"), it can be determined whether the intra-frame prediction candidate mode has an odd number (S2102). When the current block is not a small block (S2101-"false"), or when the current block is a small block and the intra-frame prediction candidate mode does not have an odd number (S2102-"false"), the process of performing intra-frame prediction for the intra-frame prediction candidate mode and the cost derivation and comparison process (S2103) can be performed. That is, when the current block is a small block and the intra-frame prediction candidate mode has an odd number, the cost derivation and comparison process for the intra-frame prediction candidate mode can be omitted. Fig.21 As shown, if some processing is omitted for intra prediction candidate modes, the computational complexity of the encoder can be reduced.
[0485] at this time, Fig.21The start and end shown may represent the start and end of the intra-frame prediction process and the cost derivation and comparison process performed in the encoder for one intra-frame prediction candidate mode. However, this may not represent the start and end of the entire image encoding process or the start and end of the cost derivation / comparison process for all modes.
[0486] Fig. 22 2 is a diagram illustrating a method of not adding an odd-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0487] In the case where the current block is a small block, odd intra prediction modes may be excluded from MPM candidates when constructing the MPM in the encoder / decoder.
[0488] Reference Fig. 22 , when the current block is a small block (S2201-"true"), it may be determined whether the intra prediction mode of the MPM candidate has an odd number (S2202). When the current block is not a small block (S2201-"false"), or when the current block is a small block and the intra prediction mode of the MPM candidate does not have an odd number (S2202-"false"), the intra prediction mode of the MPM candidate may be added to the MPM (S2203). That is, when the current block is not a small block, or when the current block is a small block and the intra prediction mode of the MPM candidate has an even number, the intra prediction mode of the MPM candidate may be added to the MPM.
[0489] at this time, Fig. 22 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig. 22 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0490] Fig.23 2 is a diagram illustrating a method of correcting an odd intra prediction mode to an even intra prediction mode when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0491] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, the odd intra-frame prediction mode can be corrected to an even intra-frame prediction mode through a series of calculations. For example, when the intra-frame prediction mode M1 added to the MPM has an odd number, the odd number can be corrected to an even number through a series of calculations (such as M1+1, M1-1, or (M1>>1)<<1), and the intra-frame prediction mode with an even number can be added to the MPM. Alternatively, when M1 has an odd number, the odd number can be corrected to an even number through a series of calculations (such as M1+j or M1-j (at this time, j is an odd number)), and the intra-frame prediction mode with an even number can be added to the MPM.
[0492] Reference Fig.23 , when the current block is a small block (S2301-"true"), it can be determined whether the intra-frame prediction mode of the MPM candidate has an odd number (S2302). In addition, when the intra-frame prediction mode of the MPM candidate has an odd number (S2302-"true"), the odd number can be corrected to an even number through a series of calculations, and the intra-frame prediction mode with an even number can be added to the MPM (S2303). When the current block is not a small block (S2301-"false"), or when the current block is a small block and the intra-frame prediction mode of the MPM candidate does not have an odd number (S2302-"false"), the intra-frame prediction mode of the MPM candidate can be added to the MPM (S2304). That is, when the current block is not a small block, or when the current block is a small block and the intra-frame prediction mode of the MPM candidate has an even number, the intra-frame prediction mode of the MPM candidate can be added to the MPM.
[0493] at this time, Fig.23 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.23 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0494] Fig.24 is a diagram illustrating a method of adding an even-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0495] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, only the even-numbered intra prediction modes may be added to the MPM. Fig.23 The embodiment described in the embodiment is different from the present embodiment in that Fig.23In the embodiment, the intra prediction mode of the existing MPM candidate can be corrected to the even intra prediction mode, and the even intra prediction mode can be added to the MPM. However, in the present embodiment, in the case where there is a calculation capable of deriving an odd candidate in the existing MPM construction method, another method for deriving the even intra prediction mode can be used to replace the corresponding calculation.
[0496] For example, for M1, which is one of the intra prediction modes with an even number of neighboring blocks, when the existing MPM construction is a method of adding M1+1 and M1-1 to the MPM, M1+1 and M1-1 become odd intra prediction modes. At this time, according to the present embodiment, other calculations such as M1+2 and M1-2 may be used to add the even intra prediction mode to the MPM. Alternatively, calculations such as M1+i and M1-i (at this time, i is an even number) may be used to add the even intra prediction mode to the MPM.
[0497] Additionally, the even intra prediction mode may be immediately added to the MPM without performing a series of calculations.
[0498] Reference Fig.24 When the current block is a small block (S2401-"true"), the even intra prediction mode can be added to the MPM (S2402). When the current block is not a small block (S2401-"false"), the MPM candidate can be added to the MPM according to the existing MPM construction method (S2403).
[0499] at this time, Fig.24 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.24 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0500] Fig.25 is a diagram illustrating a method of performing non-MPM encoding / decoding using only an even-numbered intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0501] Reference Fig.25, when the current block is a small block (S2501-"true"), the non-MPM encoding / decoding method (S2502) can be performed using only even-numbered intra-prediction modes. When the current block is not a small block (S2501-"false"), the existing non-MPM encoding / decoding method (S2503) can be performed. The existing non-MPM encoding / decoding method may refer to a method of performing non-MPM encoding / decoding regardless of whether the intra-prediction mode has an even number or an odd number when performing encoding / decoding. At this time, the non-MPM intra-prediction may refer to intra-prediction without using MPM. Here, since only even-numbered intra-prediction modes are used, the intra-prediction modes can be halved, and a method of allocating fewer bits can be used in encoding / decoding.
[0502] at this time, Fig.25 The start and end shown may represent the start and end of the non-MPM encoding / decoding process in the encoder / decoder. However, this may not represent the entire image encoding process.
[0503] In the image encoding / decoding method according to an embodiment of the present invention, when the current block is a small block, only the odd-numbered intra prediction mode may be used. That is, when the current block is a small block, the intra prediction mode corresponding to the even number may not be used. At this time, among the intra prediction modes corresponding to the even number, some even-numbered modes such as the plane (0) mode may be used.
[0504] For example, when the current block is a small block, the following methods can be used: a method of omitting cost derivation and comparison processing for the even intra-frame prediction mode, a method of not adding the even intra-frame prediction mode to the MPM when constructing the MPM, a method of correcting the even intra-frame prediction mode to the odd intra-frame prediction mode when constructing the MPM, a method of adding the odd intra-frame prediction mode to the MPM when constructing the MPM, and a method of using only the odd intra-frame prediction mode when using non-MPM intra-frame prediction.
[0505] Fig.26 is a diagram illustrating a method of omitting cost derivation and comparison processing for an even intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0506] Reference Fig.26 , when the current block is a small block (S2601-"true"), it can be determined whether the intra-frame prediction candidate mode has an even number (S2602). When the current block is not a small block (S2601-"false"), or when the current block is a small block and the intra-frame prediction candidate mode does not have an even number (S2602-"false"), the process of performing intra-frame prediction for the intra-frame prediction candidate mode and the cost derivation and comparison process (S2603) can be performed. That is, when the current block is a small block and the intra-frame prediction candidate mode has an even number, the cost derivation and comparison process for the intra-frame prediction candidate mode can be omitted. Fig.26 As shown, if some processing is omitted for intra prediction candidate modes, the computational complexity of the encoder can be reduced.
[0507] at this time, Fig.26 The start and end shown may represent the start and end of the intra-frame prediction process and the cost derivation and comparison process performed in the encoder for one intra-frame prediction candidate mode. However, this may not represent the start and end of the entire image encoding process or the start and end of the cost derivation / comparison process for all modes.
[0508] Fig. 27 2 is a diagram illustrating a method of not adding an even-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0509] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, the even-numbered intra prediction modes may be excluded from the MPM candidates.
[0510] Reference Fig. 27 , when the current block is a small block (S2701-"true"), it may be determined whether the intra prediction mode of the MPM candidate has an even number (S2702). When the current block is not a small block (S2701-"false"), or when the current block is a small block and the intra prediction mode of the MPM candidate does not have an even number (S2702-"false"), the intra prediction mode of the MPM candidate may be added to the MPM (S2703). That is, when the current block is not a small block, or when the current block is a small block and the intra prediction mode of the MPM candidate has an odd number, the intra prediction mode of the MPM candidate may be added to the MPM.
[0511] at this time, Fig. 27 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig. 27 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0512] Fig.28 is a diagram illustrating a method of correcting an even intra prediction mode to an odd intra prediction mode when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0513] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, the even intra-frame prediction mode can be corrected to an odd intra-frame prediction mode through a series of calculations. For example, when the intra-frame prediction mode M1 added to the MPM has an even number, the even number can be corrected to an odd number through a series of calculations (such as M1+1 and M1-1), and the intra-frame prediction mode with an odd number can be added to the MPM. Alternatively, when M1 has an even number, the even number can be corrected to an odd number through a series of calculations (such as M1+j or M1-j (at this time, j is an odd number)), and the intra-frame prediction mode with an odd number can be added to the MPM.
[0514] Reference Fig.28 , when the current block is a small block (S2801-"true"), it can be determined whether the intra-frame prediction mode of the MPM candidate has an even number (S2802). In addition, when the intra-frame prediction mode of the MPM candidate has an even number (S2802-"true"), the even number can be corrected to an odd number through a series of calculations, and the intra-frame prediction mode with an odd number can be added to the MPM (S2803). When the current block is not a small block (S2801-"false"), or when the current block is a small block and the intra-frame prediction mode of the MPM candidate does not have an even number (S2802-"false"), the intra-frame prediction mode of the MPM candidate can be added to the MPM (S2804). That is, when the current block is not a small block, or when the current block is a small block and the intra-frame prediction mode of the MPM candidate has an odd number, the intra-frame prediction mode of the MPM candidate can be added to the MPM.
[0515] at this time, Fig.28 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.28 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0516] Fig.29 is a diagram illustrating a method of adding an odd-numbered intra prediction mode to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0517] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, only the odd intra prediction modes may be added to the MPM. Fig.28 The embodiment described in the embodiment is different from the present embodiment in that Fig.28In the embodiment, the intra prediction mode of the existing MPM candidate can be corrected to the odd intra prediction mode, and the odd intra prediction mode can be added to the MPM. However, in the present embodiment, in the case where there is a calculation capable of deriving the even candidate in the existing MPM construction method, another method for deriving the odd intra prediction mode can be used to replace the corresponding calculation.
[0518] For example, for M1, which is one of the intra prediction modes with odd neighboring blocks, when the existing MPM construction is a method of adding M1+1 and M1-1 to the MPM, M1+1 and M1-1 become even intra prediction modes. At this time, according to the present embodiment, other calculations such as M1+2 and M1-2 can be used to add the odd intra prediction mode to the MPM. Alternatively, calculations such as M1+i and M1-i (at this time, i is an even number) can be used to add the odd intra prediction mode to the MPM.
[0519] Additionally, odd intra prediction modes can be immediately added to the MPM without performing a series of calculations.
[0520] Reference Fig.29 , when the current block is a small block (S2901-"true"), the odd intra prediction mode can be added to the MPM (S2902). When the current block is not a small block (S2901-"false"), the MPM candidate can be added to the MPM according to the existing MPM construction method (S2903).
[0521] at this time, Fig.29 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.29 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0522] Fig.30 is a diagram illustrating a method of performing non-MPM encoding / decoding using only odd-numbered intra prediction modes when a current block is a small block according to an embodiment of the present invention.
[0523] Reference Fig.30, when the current block is a small block (S3001-"true"), the non-MPM encoding / decoding method (S3002) can be performed using only odd-numbered intra-prediction modes. When the current block is not a small block (S3001-"false"), the existing non-MPM encoding / decoding method (S3003) can be performed. The existing non-MPM encoding / decoding method may refer to a method of performing non-MPM encoding / decoding regardless of whether the intra-prediction mode has an even number or an odd number when performing encoding / decoding. At this time, the non-MPM intra-prediction may refer to intra-prediction without using MPM. Here, since only odd-numbered intra-prediction modes are used, the intra-prediction modes can be halved, and a method of allocating fewer bits can be used in encoding / decoding.
[0524] at this time, Fig.30 The start and end shown may represent the start and end of the non-MPM encoding / decoding process in the encoder / decoder. However, this may not represent the entire image encoding process.
[0525] In the image encoding / decoding method according to an embodiment of the present invention, when the current block is a small block, some intra prediction modes may not be used. That is, when the current block is a small block, some intra prediction modes that are not predetermined to be used may not be used. At this time, some intra prediction modes that are not predetermined to be used are not limited to intra prediction modes with even or odd numbers, and may be partial intra prediction modes that are not partitioned into odd and even numbers. In addition, these may be intra prediction modes that are statistically not well used in small blocks.
[0526] For example, when the current block is a small block, the following methods may be used: a method of omitting cost derivation and comparison processing for some intra-frame prediction modes that are predetermined not to be used, a method of not adding some intra-frame prediction modes that are predetermined not to be used to the MPM when constructing the MPM, a method of correcting some intra-frame prediction modes that are predetermined not to be used to other modes when constructing the MPM, a method of adding intra-frame prediction mode candidates other than some intra-frame prediction modes that are predetermined not to be used to the MPM when constructing the MPM, and a method of using only some intra-frame prediction modes when using non-MPM intra-frame prediction.
[0527] Fig.31 is a diagram illustrating a method of omitting cost derivation and comparison processing for some intra prediction modes that are predetermined not to be used when a current block is a small block according to an embodiment of the present invention.
[0528] Reference Fig.31, when the current block is a small block (S3101-"true"), it can be determined whether the intra-frame prediction candidate mode is a mode that is not predetermined to be used (S3102). When the current block is not a small block (S3101-"false"), or when the current block is a small block and the intra-frame prediction candidate mode is not a mode that is not predetermined to be used (S3102-"false"), the processing of performing intra-frame prediction and the cost derivation and comparison processing for the intra-frame prediction candidate mode can be performed (S3103). That is, when the current block is a small block and the intra-frame prediction candidate mode is a mode that is not predetermined to be used, the cost derivation and comparison processing of the intra-frame prediction candidate mode can be omitted. Fig.31 As shown, if some processing is omitted for intra prediction candidate modes, the computational complexity of the encoder can be reduced.
[0529] at this time, Fig.31 The start and end shown may represent the start and end of the intra-frame prediction process and the cost derivation and comparison process performed in the encoder for one intra-frame prediction candidate mode. However, this may not represent the start and end of the entire image encoding process or the start and end of the cost derivation / comparison process for all modes.
[0530] Fig.32 2 is a diagram illustrating a method of not adding some intra prediction modes predetermined not to be used to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0531] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, some intra prediction modes that are predetermined not to be used may be excluded from MPM candidates.
[0532] Reference Fig.32 , when the current block is a small block (S3101-"true"), whether the intra-frame prediction mode of the MPM candidate is some intra-frame prediction mode that is not predetermined to be used (S3202). When the current block is not a small block (S3201-"false"), or when the current block is a small block and the intra-frame prediction mode of the MPM candidate is not some intra-frame prediction mode that is not predetermined to be used (S3202-"false"), the intra-frame prediction mode of the MPM candidate can be added to the MPM (S3203). That is, when the current block is not a small block, or when the current block is a small block and the intra-frame prediction mode of the MPM candidate is not some intra-frame prediction mode that is not predetermined to be used, the intra-frame prediction mode of the MPM candidate can be added to the MPM.
[0533] at this time, Fig.32 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.32 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0534] Fig.33 2 is a diagram illustrating a method of correcting some intra prediction modes that are not predetermined to be used to other modes when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0535] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, some intra prediction modes that are predetermined not to be used may be corrected to other modes through a series of calculations.
[0536] Reference Fig.33 , when the current block is a small block (S3301-"true"), whether the intra-frame prediction mode of the MPM candidate is some intra-frame prediction mode that is predetermined not to be used in the small block (S3302). In addition, when the intra-frame prediction mode of the MPM candidate is some intra-frame prediction mode that is predetermined not to be used in the small block (S3302-"true"), the corresponding MPM mode can be corrected to a mode other than some intra-frame prediction modes that are predetermined not to be used in the small block through a series of calculations, and the corrected mode can be added to the MPM (S3303). When the current block is not a small block (S3301-"false"), or when the current block is a small block and is not an intra-frame prediction mode that is predetermined not to be used in the small block (S3302-"false"), the intra-frame prediction mode of the MPM candidate can be added to the MPM (S3304).
[0537] at this time, Fig.33 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.33 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0538] Fig.34 2 is a diagram illustrating a method of adding intra prediction candidate modes other than predetermined unused intra prediction candidate modes to an MPM when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0539] In the case where the current block is a small block, when constructing the MPM in the encoder / decoder, the intra-frame prediction candidate mode other than the intra-frame prediction candidate mode that is not predetermined to be used in the small block can be added to the MPM. In addition, the intra-frame prediction candidate mode other than the intra-frame prediction candidate mode that is not predetermined to be used in the small block can be immediately added to the MPM without performing a series of calculations.
[0540] Reference Fig.34 When the current block is a small block (S3401-“true”), intra prediction candidate modes other than the intra prediction candidate modes not predetermined to be used in the small block may be added to the MPM (S3402). When the current block is not a small block (S3401-“false”), MPM candidates may be added to the MPM according to the existing MPM construction method (S3403).
[0541] at this time, Fig.34 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.34 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0542] Fig.35 is a diagram illustrating a method of performing non-MPM encoding / decoding using only some intra prediction modes when a current block is a small block according to an embodiment of the present invention.
[0543] Reference Fig.35 , when the current block is a small block (S3501-"true"), a non-MPM encoding / decoding method (S3502) may be performed using only some intra prediction modes. When the current block is not a small block (S3501-"false"), an existing non-MPM encoding / decoding method (S3503) may be performed. The existing non-MPM encoding / decoding method may refer to a method that is capable of using all intra prediction modes when performing encoding / decoding. At this time, non-MPM intra prediction may refer to intra prediction without using MPM. Here, since only some intra prediction modes are used, the intra prediction modes may be halved, and a method that allocates fewer bits may be used in encoding / decoding.
[0544] at this time, Fig.35 The start and end shown may represent the start and end of the non-MPM encoding / decoding process in the encoder / decoder. However, this may not represent the entire image encoding process.
[0545] In the image encoding / decoding method according to the embodiment of the present invention, when the current block is a small block, the intra prediction mode number may be reallocated according to directionality.
[0546] Fig.36 is a diagram showing an embodiment in which intra prediction mode numbers are allocated.
[0547] In the encoder / decoder, such as Fig.36 As shown in (a) of FIG. 1 , an intra-frame prediction mode number can be assigned. At this time, when the current block is a small block, as shown in FIG. Fig.36 As shown in (b), the intra prediction mode numbers can be reallocated.
[0548] Fig.37 2 is a diagram illustrating a method of using an intra prediction mode number reallocated according to directionality when a current block is a small block according to an embodiment of the present invention.
[0549] Reference Fig.37 , when the current block is a small block (S3701-"true"), the intra prediction mode used in the small block may be used to perform intra prediction (S3702). For example, when the current block is a small block, the intra prediction mode reallocated according to the directionality may be used to perform intra prediction. When the current block is not a small block (S3701-"false"), the existing intra prediction mode may be used to perform intra prediction (S3703).
[0550] Fig.38 2 is a diagram illustrating a method of constructing an MPM using candidates suitable for a small block when constructing an MPM when a current block is a small block according to an embodiment of the present invention.
[0551] Reference Fig.38 When the current block is a small block (S3801-"true"), a process of constructing an MPM using a candidate suitable for a small block can be performed (S3802). When the current block is not a small block (S3801-"false"), an MPM candidate can be constructed according to an existing MPM construction method (S3803).
[0552] at this time, Fig.38 The start and end shown may indicate the start and end of the process of adding the intra prediction mode of an MPM candidate to the MPM in the encoder / decoder. However, this may not indicate the start and end of the entire image encoding process or the start and end of the entire MPM construction. In addition, Fig.38 The intra prediction modes of the MPM candidates described in may represent all intra prediction modes that may be constructed in the MPM through a series of calculations or intra prediction modes of neighboring blocks of the current block.
[0553] Fig.39is a diagram illustrating a method of performing non-MPM encoding / decoding using intra prediction modes whose number is less than that of existing intra prediction modes when a current block is a small block according to an embodiment of the present invention.
[0554] Reference Fig.39 , when the current block is a small block (S3901-"true"), non-MPM encoding / decoding may be performed using intra prediction modes whose number is less than the number of existing intra prediction modes (S3902). When the current block is not a small block (S3901-"false"), an existing non-MPM encoding / decoding method may be performed (S3903). At this time, non-MPM intra prediction may mean intra prediction without using MPM. Here, in a small block, since only intra prediction modes whose number is less than the number of existing intra prediction modes are used, a method of allocating fewer bits during encoding / decoding may be used.
[0555] at this time, Fig.39 The start and end shown may represent the start and end of the non-MPM encoding / decoding process in the encoder / decoder. However, this may not represent the start / end of the entire image encoding process.
[0556] Fig.40 is a diagram illustrating a configuration of an encoder / decoder using a reconstruction intra prediction mode when a current block is a small block according to an embodiment of the present invention.
[0557] Reference Fig.40 , when the current block is a small block, in the intra prediction unit 4010 of the encoder, the intra prediction mode reconstructed in the intra prediction mode reconstruction unit 4020 may be used to perform intra prediction. In addition, when the current block is a small block, in the intra prediction unit 4030 of the decoder, the intra prediction mode reconstructed in the intra prediction mode reconstruction unit 4040 may be used to perform intra prediction.
[0558] At this time, in the intra-frame prediction mode reconstruction unit 4020 and the intra-frame prediction mode reconstruction unit 4040, at least one of the methods of using restricted intra-frame prediction modes (such as a method of using only even prediction modes in a small block, a method of using only odd prediction modes, a method of using only some prediction mode numbers and a method of reallocating prediction mode numbers or a method of using reconstructed intra-frame prediction modes) can be used.
[0559] Fig.41 is a diagram illustrating a structure in which an intra prediction mode reconstruction unit is applied to an intra prediction unit according to an embodiment of the present invention.
[0560] Reference Fig.41 , the intra-frame prediction unit 4110 can be Fig.40The intra-frame prediction unit 4010 corresponds to the intra-frame prediction unit 4030, and the intra-frame prediction mode reconstruction unit 4120 can be connected to Fig.40 The intra-frame prediction mode reconstruction unit 4020 corresponds to the intra-frame prediction mode reconstruction unit 4040.
[0561] The intra prediction unit 4110 according to an embodiment of the present invention may include an intra prediction mode reconstruction unit 4120 , an intra prediction mode encoding / decoding unit 4130 , and an intra prediction execution unit 4140 .
[0562] In addition, the intra prediction mode reconstruction unit 4120 may include a current block size checker 4121 , an MPM candidate construction unit 4122 , an MPM candidate reconstruction unit 4123 , an MPM list construction unit 4124 , and a non-MPM prediction candidate construction unit 4125 .
[0563] The intra prediction mode reconstruction unit 4120 may reconstruct the intra prediction mode through the information about the current block. At this time, the information about the current block may include information indicating whether the current block is a small block.
[0564] The current block size checker 4121 may determine whether to reconstruct the intra prediction mode according to the size of the current block. In addition, the current block size checker 4121 may check the size of the current block to change the reconstruction method of the intra prediction mode and determine whether to perform a candidate reconstruction or a candidate reconstruction method.
[0565] The MPM candidate construction unit 4122 can determine the MPM candidate to be used preferentially according to the intra prediction mode of the neighboring block and the predefined MPM construction method. At this time, the MPM candidate reconstruction unit 4123 can determine whether to perform candidate reconstruction or the candidate reconstruction method to reconstruct the candidate determined by the MPM candidate construction unit 4122 according to the current block size checker 4121.
[0566] For example, when the current block size checker 4121 determines that the current block is a small block and determines that the MPM candidate is reconstructed, the MPM candidate reconstruction unit 4123 may reconstruct the MPM candidate determined by the MPM candidate construction unit 4122. At this time, the method of reconstructing the MPM candidate may include at least one of a method of restricting intra prediction modes (such as a method of using only even prediction modes in small blocks, a method of using only odd prediction modes, a method of using only some prediction mode numbers, and a method of reallocating prediction mode numbers or a method of using a reconstructed intra prediction mode).
[0567] The MPM list construction unit 4124 may construct an MPM list for encoding / decoding of the intra prediction mode from the finally determined MPM candidates. At this time, when it is determined that the MPM candidate is reconstructed by the current block size checker 4121, the MPM candidate reconstructed from the MPM candidate reconstruction unit 4123 may be used to construct the MPM list. On the contrary, when it is determined that the MPM candidate is not reconstructed by the current block size checker 4121, the MPM candidate constructed by the MPM candidate construction unit 4122 may be used to construct the MPM list.
[0568] At this time, the MPM candidate construction unit 4122, the MPM candidate reconstruction unit 4123 and the MPM list construction unit 4124 may be combined or omitted in whole or in part.
[0569] The non-MPM prediction candidate construction unit 4125 can construct a non-MPM prediction candidate using a candidate that does not belong to the MPM list, and use the non-MPM prediction candidate during encoding / decoding of the intra prediction mode. At this time, when the current block size checker 4121 determines whether the intra prediction mode is reconstructed or the intra prediction mode reconstruction method, the method of determining the non-MPM prediction candidate or the priority of the non-MPM prediction candidate can be changed.
[0570] For example, when the current block is a small block, as a method for determining a non-MPM prediction candidate, at least one of the methods of restricted intra-frame prediction modes (such as a method of using only even-numbered prediction modes in a small block, a method of using only odd-numbered prediction modes, a method of using only some prediction mode numbers, a method of reallocating prediction mode numbers, or a method of using a reconstructed intra-frame prediction mode) can be used.
[0571] The intra prediction mode encoding / decoding unit 4130 may determine and encode the prediction mode to be performed in the current block in consideration of the MPM list and the non-MPM prediction candidates, or decode the prediction mode to be performed in the encoded current block in consideration of the MPM list and the non-MPM prediction candidates. At this time, in the intra prediction mode encoding / decoding unit 4130, it may be determined by the intra prediction mode reconstruction unit 4120 whether to reconstruct the intra prediction mode, thereby changing the encoding / decoding process.
[0572] The intra prediction performing unit 4140 may perform intra prediction according to the prediction mode of the current block determined by the intra prediction mode encoding / decoding unit 4130 .
[0573] The above embodiments may be performed in the same way in an encoder and a decoder.
[0574] At least one or a combination of the above embodiments may be used to encode / decode a video.
[0575] The order applied to the above embodiments may be different between the encoder and the decoder, or the order applied to the above embodiments may be the same in the encoder and the decoder.
[0576] The above embodiments may be performed on each of the luminance signal and the chrominance signal, or may be performed identically on the luminance and chrominance signals.
[0577] The block form to which the above embodiment of the present invention is applied may have a square form or a non-square form.
[0578] The above embodiments of the present invention may be applied according to the size of at least one of a coding block, a prediction block, a transform block, a block, a current block, a coding unit, a prediction unit, a transform unit, a unit, and a current unit. Here, the size may be defined as a minimum size or a maximum size or both a minimum size and a maximum size, so that the above embodiments are applied, or may be defined as a fixed size to which the above embodiments are applied. In addition, in the above embodiments, the first embodiment may be applied to a first size, and the second embodiment may be applied to a second size. In other words, the above embodiments may be applied according to size combinations. In addition, the above embodiments may be applied when the size is equal to or greater than the minimum size and equal to or less than the maximum size. In other words, the above embodiments may be applied when the block size is included in a specific range.
[0579] For example, when the size of the current block is 8×8 or larger, the above embodiment may be applied. For example, when the size of the current block is only 4×4, the above embodiment may be applied. For example, when the size of the current block is 16×16 or smaller, the above embodiment may be applied. For example, when the size of the current block is equal to or larger than 16×16 and equal to or smaller than 64×64, the above embodiment may be applied.
[0580] The above embodiments of the present invention may be applied in accordance with time layers. In order to identify the time layers to which the above embodiments may be applied, a corresponding identifier may be signaled, and the above embodiments may be applied to the specified time layers identified by the corresponding identifiers. Here, the identifier may be defined as the lowest layer or the highest layer or both the lowest layer and the highest layer to which the above embodiments may be applied, or may be defined as a specific layer indicating the application of the embodiments. In addition, a fixed time layer to which the embodiments may be applied may be defined.
[0581] For example, when the temporal layer of the current image is the lowest layer, the above embodiment can be applied. For example, when the temporal layer identifier of the current image is 1, the above embodiment can be applied. For example, when the temporal layer of the current image is the highest layer, the above embodiment can be applied.
[0582] A slice type or a tile group type to which the above embodiments of the present invention are applied may be defined, and the above embodiments may be applied depending on the corresponding slice type or tile group type.
[0583] In the above embodiments, the method is described based on a flowchart having a series of steps or units, but the present invention is not limited to the order of the steps, but some steps can be performed simultaneously with other steps or in a different order. In addition, it should be understood by those skilled in the art that the steps in the flowchart are not mutually exclusive, and other steps can be added to the flowchart, or some steps can be deleted from the flowchart without affecting the scope of the present invention.
[0584] The embodiments include various aspects of the examples. All possible combinations for various aspects may not be described, but those skilled in the art will be able to recognize different combinations. Therefore, the present invention may include all substitutions, modifications and changes within the scope of the claims.
[0585] The embodiments of the present invention may be implemented in the form of program instructions that can be executed by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include independent program instructions, data files, data structures, etc. or a combination of program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present invention, or known to ordinary technicians in the field of computer software technology. Examples of computer-readable recording media include: magnetic recording media (such as hard disks, floppy disks, and tapes); optical data storage media (such as CD-ROMs or DVD-ROMs); magnetically optimized media (such as optical floppy disks); and hardware devices (such as read-only memory (ROM), random access memory (RAM), flash memory, etc.) that are specially constructed to store and implement program instructions. Examples of program instructions include not only machine language codes formatted by a compiler, but also high-level language codes that can be implemented by a computer using an interpreter. The hardware device may be configured to be operated by one or more software modules to perform processing according to the present invention, or vice versa.
[0586] Although the present invention has been described according to specific items such as detailed elements and limited embodiments and drawings, they are only provided to help a more comprehensive understanding of the present invention, and the present invention is not limited to the above embodiments. It should be understood by those skilled in the art that various modifications and changes can be made based on the above description.
[0587] Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the full scope of the appended claims and their equivalents will fall within the scope and spirit of the present invention.
[0588] Industrial Applicability The present invention can be used to encode or decode images.
Claims
1. A method for decoding an image, the method comprising: Determine whether to divide the current block into a first partition and a second partition; Constructing a motion information candidate list of the current block, wherein the motion information candidate list includes a plurality of motion information candidates; selecting, from a motion information candidate list, a first motion information candidate for a first partition in a current block based on first index information explicitly signaled via a bitstream; selecting, from the motion information candidate list, a second motion information candidate for a second partition in the current block based on second index information explicitly signaled via the bitstream; generating a first prediction sample based on first motion information derived from the first motion information candidate; and generating a second prediction sample based on second motion information derived from the second motion information candidate, The multiple motion information candidates include at least one spatial motion information candidate derived from at least one spatial neighboring block of the current block, wherein the at least one spatial neighboring block includes at least one of an upper neighboring block, a left neighboring block, an upper right neighboring block, a lower left neighboring block, or an upper left neighboring block, The first index information indicates one motion information candidate among the plurality of motion information candidates included in the motion information candidate list, and The second index information indicates one motion information candidate among the remaining motion information candidates in the motion information candidate list except the first motion information candidate indicated by the first index information.
2. The method according to claim 1, in, deriving the first motion information from one of the L0 motion information and the L1 motion information of the first motion information candidate based on the first index information, and The second motion information is derived from one of the L0 motion information and the L1 motion information of the second motion information candidate based on the second index information.
3. The method of claim 2, wherein: The second index information indicates a rearranged index of the second motion information candidate, and The rearranged index of the second motion information candidate is determined according to the ascending order of the indices of the remaining motion information candidates.
4. The method according to claim 2, in, When the index of the first motion information candidate specified by the first index information is an even number, deriving the first motion information from the L0 motion information of the first motion information candidate, and When the index of the first motion information candidate specified by the first index information is an odd number, the first motion information is derived from the L1 motion information of the first motion information candidate.
5. The method according to claim 2, in, When the index of the second motion information candidate specified by the second index information is an even number, deriving the second motion information from the L0 motion information of the second motion information candidate, and When the index of the second motion information candidate specified by the second index information is an odd number, the second motion information is derived from the L1 motion information of the second motion information candidate.
6. The method of claim 1, further comprising: Get the index of the partition direction of the current block from the bitstream, Among them, the number of partition directions is 64.
7. The method of claim 1, further comprising: The current block is predicted by performing a weighted summation of the first prediction sample and the second prediction sample.
8. A method for encoding an image, the method comprising: Determine whether to divide the current block into a first partition and a second partition; Constructing a motion information candidate list of the current block, wherein the motion information candidate list includes a plurality of motion information candidates; selecting a first motion information candidate for a first partition in the current block from the motion information candidate list; and Selecting a second motion information candidate for a second partition in the current block from the motion information candidate list, The multiple motion information candidates include at least one spatial motion information candidate derived from at least one spatial neighboring block of the current block, wherein the at least one spatial neighboring block includes at least one of an upper neighboring block, a left neighboring block, an upper right neighboring block, a lower left neighboring block, or an upper left neighboring block, wherein the first index information is explicitly encoded into the bitstream, wherein the first index information indicates a first motion information candidate among the plurality of motion information candidates, and The second index information is explicitly encoded into the bitstream, wherein the second index information indicates the second motion information candidate among the remaining motion information candidates except the first motion information candidate in the motion information candidate list.
9. A non-transitory computer-readable recording medium for storing program instructions, wherein the program instructions, when executed, cause a computer to perform the method of claim 8.