Method and apparatus for encoding / decoding an image by using boundary processing, and recording medium for storing a bit stream
Through a flexible block partitioning method, the problem of low image encoding/decoding efficiency in the prior art is solved, and a variety of partitioning methods are adopted to adapt to the aspect ratio of different block shapes, which improves image data processing efficiency and reduces data transmission and storage costs.
Patent Information
- Application Number
- CN201980061686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-19
- Filing Date
- 2019-09-19
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2039-09-24
AI Technical Summary
Existing image encoding/decoding technologies are inefficient in high resolution and high-quality video processing, especially when using block structures in the form of quad-tree, it is difficult to effectively improve encoding efficiency.
The block partitioning method is adopted to determine whether the current block includes a predetermined boundary to determine its partitioning method. It supports various partitioning methods such as quad-tree, horizontal binary tree, vertical binary tree, horizontal triple tree and vertical triple tree, and adapts to the aspect ratio of different block shapes and the boundaries of picture/sub-screen/stripe/parallel block/blocks.
The image encoding/decoding efficiency is improved, and the data transmission and storage costs are optimized through flexible block partitioning methods, adapting to block shapes of various aspect ratios, and improving the efficiency of image data processing.
Smart Images

Figure CN112771862B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and apparatus for encoding / decoding an image, and a recording medium for storing a bit stream. More particularly, the present invention relates to a method and apparatus for encoding / decoding an image based on a block structure, and a recording medium for storing a bit stream. Background Art
[0002] Recently, in various application fields, the demand for high-resolution and high-quality videos (such as high-definition (HD) and ultra-high-definition (UHD) videos) has increased. Since video data has higher resolution and higher quality, the amount of data has increased more than that of existing video data. Therefore, when using media (such as existing wired broadband lines and wireless broadband lines) to transmit video data or storing video data in existing storage media, transmission costs and storage costs increase. In order to solve these problems that arise as the resolution and quality of image data increase, efficient image encoding / decoding technology is required for higher resolution and higher quality images.
[0003] Image compression technology includes various technologies, including: inter-frame prediction technology, which predicts pixel values included in the current picture from a previous picture or a subsequent picture of the current picture; intra-frame prediction technology, which predicts pixel values included in the current picture by using pixel information in the current picture; transform and quantization technology for compressing the energy of a residual signal; entropy coding technology, which assigns short codes to values with high frequency of occurrence and long codes to values with low frequency of occurrence; etc. Image data can be effectively compressed by using such image compression technology and can be transmitted or stored.
[0004] In conventional image encoding / decoding, only a block structure in the form of a quadtree is used, and thus there is a limitation in improving encoding efficiency. Summary of the Invention
[0005] Technical issues
[0006] An object of the present invention is to provide an image encoding / decoding method and apparatus for improving image encoding / decoding efficiency.
[0007] In addition, another object of the present invention is to provide a method and apparatus for improving image encoding / decoding efficiency by using block shapes with various aspect ratios or efficiently performing block partitioning on the boundaries of pictures / sub-pictures / slices / tiles / blocks, etc.
[0008] In addition, another object of the present invention is to provide a recording medium storing a bit stream generated by the image encoding / decoding method and apparatus of the present invention.
[0009] Technical Solution
[0010] According to the present invention, a method for decoding an image is provided, the method comprising: decoding information about block partitions of a current block included in a current picture from a bitstream; determining a partitioning method of the current block based on the information; and partitioning the current block by using the determined partitioning method, wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.
[0011] According to one embodiment, the information on block partitioning includes at least one of information on a size of a current block, information on a depth of the current block, and information on whether partitioning is performed.
[0012] According to one embodiment, the partitioning method includes at least one of the following partitioning methods: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.
[0013] According to one embodiment, the predetermined boundary includes at least one of the following boundaries: a right boundary, a bottom boundary, a left boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a tile, and a partition to which the current block belongs.
[0014] According to one embodiment, when the current block includes the right boundary and the lower boundary of the current picture and the width of the current block is greater than the size of the minimum quadtree block, the partitioning method is determined to be quadtree partitioning.
[0015] According to one embodiment, when the current block includes a right boundary of the current picture and the height of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be partitioning other than vertical binary tree partitioning.
[0016] According to one embodiment, when the current block includes a lower boundary of the current picture and the width of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be partitioning other than horizontal binary tree partitioning.
[0017] According to one embodiment, when the width of the current block is equal to or smaller than the size of the maximum transform block and the height of the current block is larger than the size of the maximum transform block, the partitioning method is determined to be partitioning other than vertical binary tree partitioning.
[0018] According to one embodiment, when the height of the current block is equal to or smaller than the size of the maximum transform block and the width of the current block is larger than the size of the maximum transform block, the partitioning method is determined to be partitioning other than horizontal binary tree partitioning.
[0019] According to one embodiment, the maximum transform block size may be a value signaled from the encoder to the decoder.
[0020] In addition, according to the present invention, there is provided a method for encoding an image, the method comprising: determining a partitioning method of a current block included in a current picture; partitioning the current block by using the determined partitioning method; and encoding information on block partitioning of the partitioning method, wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.
[0021] According to one embodiment, the information on block partitioning includes at least one of information on a size of a current block, information on a depth of the current block, and information on whether partitioning is performed.
[0022] According to one embodiment, the partitioning method includes at least one of the following partitioning methods: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.
[0023] According to one embodiment, the predetermined boundary includes at least one of the following boundaries: a right boundary, a bottom boundary, a left boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a tile, and a partition to which the current block belongs.
[0024] According to one embodiment, when the current block includes the right boundary and the lower boundary of the current picture and the width of the current block is greater than the size of the minimum quadtree block, the partitioning method is determined to be quadtree partitioning.
[0025] According to one embodiment, when the current block includes a right boundary of the current picture and the height of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be partitioning other than vertical binary tree partitioning.
[0026] According to one embodiment, when the current block includes a lower boundary of the current picture and the width of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be partitioning other than horizontal binary tree partitioning.
[0027] According to one embodiment, when the width of the current block is equal to or smaller than the size of the maximum transform block and the height of the current block is larger than the size of the maximum transform block, the partitioning method is determined to be partitioning other than vertical binary tree partitioning.
[0028] According to one embodiment, when the height of the current block is equal to or smaller than the size of the maximum transform block and the width of the current block is larger than the size of the maximum transform block, the partitioning method is determined to be partitioning other than horizontal binary tree partitioning.
[0029] According to one embodiment, the maximum transform block size may be a value signaled from the encoder to the decoder.
[0030] In addition, according to the present invention, there is provided a computer-readable non-volatile recording medium storing image data for an image decoding method, wherein the image data includes information about block partitions of a current block included in a current picture, and in the image decoding method, the information about the block partitions is used to determine a partition method of the current block, the determined partition method is used to partition the current block, and the partition method is determined based on whether the current block includes a predetermined boundary.
[0031] Beneficial effects
[0032] In order to improve image encoding / decoding efficiency, a method and apparatus for performing at least one of using block shapes with various aspect ratios and efficiently performing block partitioning on the boundaries of pictures / sub-pictures / slices / tiles / blocks, etc., and a recording medium for storing a bitstream are provided.
[0033] According to the present invention, there are provided an image encoding / decoding method and apparatus for improving image encoding / decoding efficiency.
[0034] In addition, according to the present invention, a method and apparatus are provided for improving image encoding / decoding efficiency by using block shapes having various aspect ratios or effectively performing block partitioning on the boundaries of pictures / sub-pictures / slices / tiles / blocks, etc.
[0035] In addition, according to the present invention, there is provided a recording medium storing a bit stream generated by the image encoding / decoding method and apparatus of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a block diagram showing the configuration of an embodiment of an encoding device to which the present invention is applied.
[0037] Figure 2 is a block diagram of an embodiment of a decoding device to which the present invention is applied.
[0038] Figure 3 is a diagram schematically showing a partition structure when encoding and decoding an image.
[0039] Figure 4 is a diagram illustrating an example of intra prediction.
[0040] Figure 5 is a diagram illustrating an example of inter-frame prediction.
[0041] Figure 6 is a diagram illustrating transformation and quantization.
[0042] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0043] Figure 8is a diagram illustrating boundaries of pictures / sub-pictures / slices / tiles / partitions, etc. according to an embodiment of the present invention.
[0044] Figure 9 is a diagram illustrating a partitioning method of an embodiment of a block according to the present invention.
[0045] Figure 10 It is a diagram showing that at least one of the width and height of the area to be encoded / decoded of the current block according to an embodiment of the present invention is not a power of 2 (2 N ) is an illustration of the situation.
[0046] Figure 11 is a diagram illustrating a flowchart of a method of decoding an image according to an embodiment of the present invention.
[0047] Figure 12 is a diagram illustrating a flowchart of an image encoding method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention may be modified in various ways, and there are various embodiments of the present invention, of which examples of various embodiments 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 alternatives within the technical concept and technical scope of the present invention. In various aspects, similar reference numerals refer to the same or similar functions. In the drawings, the shapes and sizes of elements may be exaggerated for clarity. In the following detailed description of the present invention, reference is made to the accompanying drawings, which 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, specific features, structures, and characteristics described herein in connection with one embodiment may be implemented in other embodiments without departing from the spirit and scope of the present disclosure. In addition, it should be understood that the position or arrangement of the various elements 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 taken in a limiting sense, and the scope of the present disclosure is defined solely by the appended claims (and, where properly interpreted, together with the full scope of equivalents claimed by the claims).
[0049] The terms "first," "second," and the like used in this specification may be used to describe various components, but the components should not be construed as being limited to these terms. These terms are used only to distinguish one component from other components. For example, a "first" component may be named a "second" component, and a "second" component may be similarly named a "first" component without departing from the scope of the present invention. The term "and / or" includes a combination of multiple items or any one of the multiple items.
[0050] 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 intervening 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.
[0051] In addition, the components shown in the embodiments of the present invention are shown independently to represent different characteristic functions from each other. Therefore, this does not mean that each component is composed of a separate hardware or software component. 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.
[0052] 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 expressions used in the singular include the expressions 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 be present or may be added. In other words, when a particular element is referred to as "comprising", it does not exclude elements other than the corresponding elements, but may include additional elements in an embodiment of the present invention or within the scope of the present invention.
[0053] In addition, some components may not be essential components for performing the basic functions of the present invention, but may be optional components that only improve its performance. The present invention can be implemented by including only the essential components for achieving the essence of the present invention without including components that improve performance. Structures that include only the essential components without including optional components that only improve performance are also included in the scope of the present invention.
[0054] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. When describing 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.
[0055] Hereinafter, an image may refer to a frame constituting a video, or may refer to the video itself. For example, "encoding or decoding an image, or both encoding and decoding the image" may refer to "encoding or decoding a moving picture, or both encoding and decoding the image," and may refer to "encoding or decoding one of the images in the moving picture, or both encoding and decoding the image."
[0056] Hereinafter, the terms "moving picture" and "video" may be used as the same meaning and may be replaced with each other.
[0057] Hereinafter, a target image may be an encoding target image and / or a decoding target image. Furthermore, a target image may be an input image to an encoding device or an input image to a decoding device. Here, the target image may have the same meaning as the current picture.
[0058] Hereinafter, the terms "image," "picture," "frame," and "screen" may be used as the same meaning and may be replaced with each other.
[0059] Hereinafter, a target block may be an encoding target block as an encoding target and / or a decoding target block as a decoding target. In addition, a 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 having the same meaning and may be used interchangeably.
[0060] Hereinafter, the terms "block" and "unit" may be used as the same meaning and may be replaced with each other. Alternatively, "block" may refer to a specific unit.
[0061] Hereinafter, the terms "region" and "segment" may be used interchangeably.
[0062] 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.
[0063] In an embodiment, each of the specific information, data, flags, indexes, elements, and attributes may have a value. A value of "0" for the information, data, flags, indexes, elements, and attributes may represent a logical false value or a first predefined value. In other words, the values "0," false, logical false, and the first predefined value may be interchangeable. A value of "1" for the information, data, flags, indexes, elements, and attributes may represent a logical true value or a second predefined value. In other words, the values "1," true, logical true, and the second predefined value may be interchangeable.
[0064] When the variable i or j is used to represent a column, row, or index, the value of i can 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. can be counted from 0 or 1.
[0065] Terminology Description
[0066] Encoder: This refers to the device that performs encoding. In other words, it refers to the encoding device.
[0067] Decoder: This refers to a device that performs decoding. In other words, it refers to a decoding device.
[0068] Block: An M×N array of samples. Here, M and N may represent positive integers, and a block may represent a two-dimensional array of samples. A block may refer to a unit. The current block may refer to an encoding target block that is targeted during encoding, or a decoding target block that is targeted during decoding. Furthermore, the current block may be at least one of a coding block, a prediction block, a residual block, and a transform block.
[0069] Sample: It is the basic unit of a block. According to the bit depth (Bd), the sample can be represented from 0 to 2 Bd In the present invention, the term "sample" may be used to mean a pixel. That is, "sample", "pel", and "pixel" may have the same meaning as each other.
[0070] Unit: This refers to an encoding and decoding unit. When encoding and decoding an image, a unit can be a region created by partitioning a single image. Furthermore, when a single image is partitioned into sub-partition units during encoding or decoding, a unit can represent a sub-partition unit. That is, an image can be partitioned into multiple units. When encoding and decoding an image, predetermined processing can be performed on each unit. A single unit can be partitioned into sub-units smaller than the unit. Depending on its function, a unit can represent a block, macroblock, coding tree unit, coding tree block, coding unit, coding block, prediction unit, prediction block, residual unit, residual block, transform unit, transform block, and so on. Furthermore, to distinguish a unit from a block, a unit can include a luma component block, chroma component blocks associated with the luma component block, and syntax elements for each color component block. A unit can have various sizes and shapes. Specifically, the shape of a unit can be a two-dimensional geometric figure such as a square, rectangle, trapezoid, triangle, pentagon, and so on. 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, etc.
[0071] Coding tree unit: A single coding tree block configured with the luma component Y and two coding tree blocks associated with the chroma 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 lower-level units such as coding units, prediction units, and transform units. 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, quadtree may represent a quadtree.
[0072] When the size of a coding block is within a predetermined range, it can be partitioned using only quadtree partitioning. Here, the predetermined range can be defined as at least one of the maximum and minimum sizes of a coding block that can be partitioned using only quadtree partitioning. Information indicating the maximum / minimum sizes of a coding block that allow quadtree partitioning can be signaled via the bitstream and can be signaled in at least one of a sequence, a picture parameter, a tile group, or a slice (segment). Alternatively, the maximum / minimum sizes of a coding block can be fixed sizes predetermined in the encoder / decoder. For example, when the size of a coding block corresponds to 256×256 to 64×64, it is possible to partition using only quadtree partitioning. Alternatively, when the size of a coding block is larger than the size of the largest transform block, it is possible to partition using only quadtree partitioning. Here, the block to be partitioned can be at least one of a coding block and a transform block. In this case, the information indicating the partitioning of the coding block (e.g., split_flag) can be a flag indicating whether quadtree partitioning is performed. When the size of a coding block falls within a predetermined range, it is possible to partition using only binary or ternary tree partitioning. In this case, the above description of the quadtree partition can be applied to the binary tree partition or the ternary tree partition in the same manner.
[0073] Coding tree block: may be used as a term for designating any one of a Y coding tree block, a Cb coding tree block, and a Cr coding tree block.
[0074] Neighboring blocks: These may represent blocks adjacent to the current block. These blocks may be blocks that touch the boundary of the current block or are located within a predetermined distance from the current block. These blocks may be blocks adjacent to vertices of the current block. Here, blocks adjacent to vertices of the current block may be blocks that are vertically adjacent to a neighboring block horizontally adjacent to the current block, or blocks that are horizontally adjacent to a neighboring block vertically adjacent to the current block.
[0075] Reconstructed Neighboring Block: This refers to a neighboring block that is adjacent to the current block and has been spatially / temporally encoded or decoded. Here, a reconstructed neighboring block may refer to a reconstructed neighboring unit. A reconstructed spatial neighboring block may be a block within the current picture that has been reconstructed through encoding or decoding, or both encoding and decoding. A reconstructed temporal neighboring block is a block within a reference picture that is located at a position corresponding to the current block in the current picture, or a neighboring block of the current block.
[0076] Unit depth: may represent the degree of partitioning of a unit. In a tree structure, the highest node (root node) may correspond to the first unit that has not been partitioned. In addition, the highest node may have the smallest depth value. In this case, the depth of the highest node may be level 0. A node with a depth of level 1 may represent a unit generated by partitioning the first unit for the first time. A node with a depth of level 2 may represent a unit generated by partitioning the first unit twice. A node with a depth of level n may represent a unit generated by partitioning the first unit n times. A leaf node may be the lowest node and a node that cannot be partitioned further. The depth of a leaf node may be the maximum level. For example, the predefined value of the maximum level may be 3. The depth of the root node may be the lowest, and the depth of the leaf node may be the deepest. In addition, when a unit is represented as a tree structure, the level at which the unit exists may represent the unit depth.
[0077] Bitstream: can represent a bit stream containing coded image information.
[0078] Parameter set: Corresponds to header information within the configuration within the bitstream. A parameter set may include at least one of a video parameter set, a sequence parameter set, a picture parameter set, and an adaptation parameter set. Furthermore, a parameter set may include a slice header, a tile group header, and tile header information. The term "tile group" refers to a group of tiles and has the same meaning as a slice.
[0079] An adaptation parameter set is a parameter set that can be shared and referenced by different pictures, sub-pictures, slices, tile groups, tiles, or partitions. Furthermore, each sub-picture, slice, tile group, tile, or partition within a picture can refer to different adaptation parameter sets to use information from different adaptation parameter sets.
[0080] Regarding adaptation parameter sets, a sub-picture, a slice, a tile group, a tile, or a partition in a picture can refer to different adaptation parameter sets by using identifiers of the corresponding adaptation parameter sets.
[0081] Regarding the adaptation parameter sets, a slice, a tile group, a tile, or a partition in a sub-picture can refer to different adaptation parameter sets by using identifiers of the corresponding adaptation parameter sets.
[0082] Regarding the adaptation parameter set, a tile or partition in a slice can refer to a different adaptation parameter set by using the identifier of the corresponding adaptation parameter set.
[0083] Regarding the adaptation parameter sets, the partitions in a parallel block can refer to different adaptation parameter sets by using the identifiers of the corresponding adaptation parameter sets.
[0084] The parameter set or header of the sub-picture may include information about the adaptation parameter set identifier. Therefore, the adaptation parameter set corresponding to the adaptation parameter set identifier can be used in the sub-picture.
[0085] The parameter set or header of the tile may include an adaptation parameter set identifier so that the adaptation parameter set corresponding to the adaptation parameter set identifier may be used in the tile.
[0086] The header of the tile may include information about the adaptation parameter set identifier so that the adaptation parameter set corresponding to the adaptation parameter set identifier can be used in the tile.
[0087] A picture may be partitioned into one or more tile rows and one or more tile columns.
[0088] A sub-picture may be partitioned into one or more tile rows and one or more tile columns within a picture. A sub-picture may be a rectangular / square area within a picture and may include one or more CTUs. In addition, at least one or more tiles / blocks / slices may be included in a sub-picture.
[0089] 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.
[0090] A partition can represent one or more CTU rows within a tile. A tile can be partitioned into one or more blocks, and each block can have at least one or more CTU rows. A tile that cannot be partitioned into two or more partitions can represent a partition.
[0091] A slice may include one or more tiles within a picture, and may include one or more partitions within a tile.
[0092] Parsing: may refer to determining the value of a syntax element by performing entropy decoding, or may refer to the entropy decoding itself.
[0093] Symbol: can represent at least one of the syntax elements, coding parameters, and transform coefficient values of the encoding / decoding target unit. In addition, the symbol can represent the entropy encoding target or the entropy decoding result.
[0094] Prediction mode: may be information indicating a mode for encoding / decoding using intra-frame prediction or a mode for encoding / decoding using inter-frame prediction.
[0095] Prediction unit: This refers to the basic unit used when performing predictions such as inter-frame prediction, intra-frame prediction, inter-frame compensation, intra-frame compensation, and motion compensation. A single prediction unit can be partitioned into multiple partitions of smaller sizes, or into multiple prediction units of lower levels. Multiple partitions can be the basic unit used when performing prediction or compensation. Partitions generated by partitioning a prediction unit can also be prediction units.
[0096] Prediction unit partition: may represent a shape obtained by partitioning a prediction unit.
[0097] 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), and L3 (List 3).
[0098] The inter-frame prediction indicator may indicate the direction of inter-frame prediction for the current block (unidirectional prediction, bidirectional prediction, etc.). Alternatively, the inter-frame prediction indicator may indicate the number of reference pictures used to generate the prediction block for the current block. Alternatively, the inter-frame prediction indicator may indicate the number of prediction blocks used when performing inter-frame prediction or motion compensation on the current block.
[0099] The prediction list utilization flag indicates whether at least one reference picture in a particular reference picture list is used to generate a prediction block. The prediction list utilization flag can be used to derive the inter prediction indicator, and conversely, the inter prediction indicator can 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 pictures in the reference picture list are 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.
[0100] The reference picture index may refer to an index indicating a specific reference picture in a reference picture list.
[0101] 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 are interchangeable.
[0102] A motion vector can be a two-dimensional vector used for inter-frame prediction or motion compensation. A motion vector can represent the offset between the encoding / decoding target block and the reference block. For example, (mvX, mvY) can represent a motion vector. Here, mvX can represent the horizontal component, and mvY can represent the vertical component.
[0103] The search range may be a two-dimensional area that is searched during inter-frame 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.
[0104] 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.
[0105] The motion vector candidate list may mean a list consisting of one or more motion vector candidates.
[0106] 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.
[0107] 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, reference picture list information, a reference picture, a motion vector candidate, a motion vector candidate index, a merge candidate, and a merge index.
[0108] A merge candidate list may refer to a list consisting of one or more merge candidates.
[0109] The merge candidate may represent a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-predictive 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.
[0110] 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.
[0111] Transform unit: This may represent a basic unit when performing encoding / decoding (such as transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding / decoding) on a residual signal. A single transform unit may be partitioned into multiple lower-level transform units of smaller sizes. Here, the transform / inverse transform may include at least one of a first transform / first inverse transform and a second transform / second inverse transform.
[0112] Scaling: This refers to the process of multiplying the quantization level by a factor. Transform coefficients can be generated by scaling the quantization level. Scaling can also be called inverse quantization.
[0113] Quantization parameter: This may indicate the value used when generating the quantization level using the transform coefficient during quantization. It may also indicate the value used when generating the transform coefficient by scaling the quantization level during inverse quantization. The quantization parameter may be a value mapped to the quantization step size.
[0114] Delta quantization parameter: may represent the difference between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.
[0115] Scan: This refers to a method of sorting coefficients within a cell, block, or matrix. For example, changing a two-dimensional matrix of coefficients to a one-dimensional matrix can be called a scan, and changing a one-dimensional matrix of coefficients to a two-dimensional matrix can be called a scan or an inverse scan.
[0116] Transform coefficient: This term may refer to a coefficient value generated after a transform is performed in an encoder. A transform coefficient may refer to a coefficient value generated after at least one of entropy decoding and inverse quantization is performed in a decoder. A transform coefficient also includes a quantization level obtained by quantizing a transform coefficient or a residual signal, or a quantized transform coefficient level.
[0117] Quantization level: This refers to the value generated by quantizing a transform coefficient or residual signal in an encoder. Alternatively, the quantization level may refer to a value that is a target for inverse quantization in a decoder. Similarly, the level of quantized transform coefficients, which are the result of transformation and quantization, also falls within the meaning of the quantization level.
[0118] 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.
[0119] Quantization Matrix: This refers to a matrix used in a quantization process or an inverse quantization process performed to improve subjective or objective image quality. The quantization matrix may also be referred to as a scaling list.
[0120] Quantization matrix coefficients: These represent each element in the quantization matrix. Quantization matrix coefficients are also called matrix coefficients.
[0121] Default matrix: may represent a predetermined quantization matrix predefined in an encoder or decoder.
[0122] Non-default matrix: may represent a quantization matrix that is not pre-defined in the encoder or decoder but is signaled by the user.
[0123] Statistical value: The statistical value for at least one of a variable, coding parameter, constant value, etc. having a calculable specific value can be one or more of the average value, sum 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.
[0124] Figure 1 is a block diagram showing a configuration of an encoding device according to an embodiment to which the present invention is applied.
[0125] 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.
[0126] 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.
[0127] The encoding device 100 can perform encoding of an input image by using intra mode or inter mode or both intra mode and inter mode. In addition, the encoding device 100 can generate a bit stream including encoding information by encoding the input image and output the generated bit stream. The generated bit stream can be stored in a computer-readable recording medium or can be streamed via a wired / wireless transmission medium. When intra mode is used as the prediction mode, the switch 115 can switch to intra mode. Alternatively, when inter mode is used as the prediction mode, the switch 115 can switch to inter mode. Here, intra mode may refer to intra prediction mode and inter mode may refer to inter prediction mode. The encoding device 100 can generate a prediction block for an input block of the input image. In addition, after generating the prediction block, the encoding device 100 can encode a residual block using the residual of the input block and the prediction block. The input image can be referred to as a current picture that is the current encoding target. The input block can be referred to as a current block that is the current encoding target, or as an encoding target block.
[0128] When the prediction mode is 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 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.
[0129] When the prediction mode is inter 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 the reference picture, the reference picture may be stored in the reference picture buffer 190.
[0130] 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.
[0131] 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. To perform inter-picture prediction or motion compensation on a coding unit, it may be determined which mode among skip mode, merge mode, advanced motion vector prediction (AMVP) mode, and current picture reference mode is used for motion prediction and motion compensation of the prediction unit included in the corresponding coding unit. Then, depending on the determined mode, inter-picture prediction or motion compensation may be performed differently.
[0132] 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, or 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.
[0133] 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 transforming the residual block.
[0134] The quantization level may be generated by applying quantization to the transform coefficients or to the residual signal. Hereinafter, the quantization level may also be referred to as the transform coefficient in the embodiments.
[0135] 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.
[0136] The entropy coding unit 150 may generate a bitstream by performing entropy coding on the value calculated by the quantization unit 140 or the encoding parameter value calculated when performing encoding according to the probability distribution, and output the generated bitstream. The entropy coding unit 150 may perform entropy coding on sample information of an image and information for decoding the image. For example, the information for decoding the image may include syntax elements.
[0137] 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, thereby reducing the size of the bit stream for the symbols to be encoded. 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 the target symbol and a probability model of the target symbol / binary bit, and perform arithmetic coding by using the derived binarization method and context model.
[0138] In order to encode transform coefficient levels (quantized levels), the entropy encoding unit 150 may change coefficients in a two-dimensional block form into a one-dimensional vector form by using a transform coefficient scanning method.
[0139] The coding parameters may include information such as syntax elements (flags, indexes, etc.) that are encoded in the encoder and sent to the decoder using 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 quadtree partitioning is performed, whether binary tree partitioning is performed, 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 taps, interpolation filter coefficients, motion vector size, representation accuracy of motion vector, transform type, transform size, information on whether the first (first) transform is used, information on whether the second transform is used, first transform index, second 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 updating 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 on the decoder side, number of motion vector searches on the decoder side, information on a CTU size, information on a minimum block size, information on a maximum block size, information on a maximum block depth, information on a minimum block depth, image display / output order, slice identification information, slice type, slice partition information, tile identification information, tile type, tile partition information, tile group identification information, tile group type, tile group partition information, picture type, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients, bit depth of quantization levels, and information on a luminance signal or information on a chrominance signal.
[0140] 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.
[0141] When the encoding apparatus 100 performs encoding by inter-frame prediction, the current picture being encoded can be used as a reference picture for another picture to be processed subsequently. Therefore, the encoding apparatus 100 can reconstruct or decode the current picture being encoded, or store the reconstructed or decoded picture as a reference picture in the reference picture buffer 190.
[0142] The quantization level may be inversely quantized in the inverse quantization unit 160 or inversely transformed in the inverse transform unit 170. The inversely quantized or inversely transformed coefficient or the inversely quantized and inversely transformed coefficient may be added to the prediction block by the adder 175. By adding the inversely quantized or inversely transformed coefficient or the inversely quantized and inversely transformed coefficient to the prediction block, a reconstructed block may be generated. Here, the inversely quantized or inversely transformed coefficient or the inversely quantized and inversely transformed coefficient may mean a coefficient on which at least one of inverse quantization and inverse transformation has been performed, and may mean a reconstructed residual block.
[0143] 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 samples, the reconstructed block, or the reconstructed image. The filter unit 180 may be referred to as an in-loop filter.
[0144] A deblocking filter can remove block distortion generated at the boundaries between blocks. To determine whether to apply the deblocking filter, the determination can be made based on the samples included in a 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 desired deblocking filter strength.
[0145] To compensate for coding errors, sample adaptive offset can be used to add an appropriate offset value to the sample value. Sample adaptive offset can correct the offset between the deblocked image and the original image on a sample-by-sample basis. A method can be used to apply the offset by considering edge information about each sample, or a method can be used in which the samples of the image are partitioned into a predetermined number of regions, the regions to which the offset is applied are determined, and the offset is applied to the determined regions.
[0146] The adaptive loop filter can perform filtering based on the comparison result of the filtered reconstructed image and the original image. The samples included in the image can be partitioned into predetermined groups, the filter to be applied to each group can be determined, and differential filtering can be performed on each group. Information on whether to apply ALF can be signaled by the coding unit (CU), and the form and coefficient of the ALF to be applied to each block can be varied.
[0147] The reconstructed block or 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 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.
[0148] 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.
[0149] The decoding device 200 may be a decoder, a video decoding device, or an image decoding device.
[0150] Reference Figure 2 , the decoding apparatus 200 may include an entropy decoding unit 210 , an inverse quantization unit 220 , an inverse transform unit 230 , an intra prediction unit 240 , a motion compensation unit 250 , an adder 255 , a filter unit 260 , and a reference picture buffer 270 .
[0151] The decoding device 200 may receive the bitstream output from the encoding device 100. The decoding device 200 may receive the bitstream stored in a computer-readable recording medium, or may receive the bitstream streamed via a wired / wireless transmission medium. The decoding device 200 may decode the bitstream 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.
[0152] When the prediction mode used at the time of decoding is the intra mode, the switch may be switched to the intra mode. Alternatively, when the prediction mode used at the time of decoding is the inter mode, the switch may be switched to the inter mode.
[0153] 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.
[0154] The entropy decoding unit 210 may generate symbols by performing entropy decoding on 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-mentioned entropy encoding method.
[0155] In order to decode transform coefficient levels (quantized levels), the entropy decoding unit 210 may change coefficients in a unidirectional vector form into a two-dimensional block form by using a transform coefficient scanning method.
[0156] The quantized levels may be inversely quantized in the inverse quantization unit 220, or inversely transformed in the inverse transform unit 230. The quantized levels may be the result of inverse quantization or inverse transformation, or both, and may be generated as a reconstructed residual block. Here, the inverse quantization unit 220 may apply a quantization matrix to the quantized levels.
[0157] 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 already been decoded.
[0158] 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 .
[0159] 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 reconstructed image. The filter unit 260 can output the reconstructed image. The reconstructed block or 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 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.
[0160] Figure 3 is a diagram schematically illustrating a partition structure of an image when encoding and decoding the image. Figure 3 An example of partitioning a single cell into multiple lower-level cells is schematically shown.
[0161] 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 between an intra-frame prediction mode and an inter-frame 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 transform coefficient.
[0162] Reference Figure 3 , the image 300 is sequentially partitioned according to the largest coding unit (LCU), and the LCU unit is determined as a partition structure. Here, LCU can be used with the same meaning as coding tree unit (CTU). Unit partitioning may mean partitioning the block associated with the unit. In the block partition information, unit depth information may be included. The depth information may indicate the number or degree of partitioning of the unit or both the number and degree of partitioning of the unit. A single unit may be partitioned into multiple lower-level units hierarchically associated with 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.
[0163] The partition structure may indicate the distribution of coding units (CUs) within the LCU 310. This distribution may be determined based on whether a single CU is partitioned into multiple CUs (a positive integer equal to or greater than 2, including 2, 4, 8, 16, etc.). The horizontal and vertical sizes of the CUs generated by partitioning may be half the horizontal and vertical sizes of the CU before partitioning, respectively, or may be smaller than the horizontal and vertical sizes before partitioning, depending on the number of partitions. A CU may be recursively partitioned into multiple CUs. Through 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. CU partitioning may be recursively performed until a predefined depth or a predefined size is reached. For example, the depth of the LCU may be 0, and the depth of the smallest coding unit (SCU) may be a predefined maximum depth. Here, as described above, the LCU may be the coding unit with the largest coding unit size, and the SCU may be the coding unit with the smallest coding unit size. Partitioning starts with the LCU 310. When the horizontal or vertical size, or both the horizontal and vertical sizes of the CU are reduced by partitioning, the CU depth increases by 1. For example, for each depth, the size of a non-partitioned CU can be 2N×2N. In addition, in the case of a partitioned CU, a CU of size 2N×2N can be partitioned into four CUs of size N×N. As the depth increases by 1, the size of N can be halved.
[0164] In addition, information about whether a CU is partitioned can be indicated by using its partition information. The partition information can be 1-bit information. All CUs except the SCU can include partition information. For example, when the partition information value is a first value, the CU may not be partitioned, and when the partition information value is a second value, the CU may be partitioned.
[0165] For example, a CTU may have a size with the same height and width (such as 64×64, 128×128, 256×256, 512×512, etc.). Here, the height or width of the CTU may be at least one of positive integers that are multiples of 2, 4, or 8. In addition, for example, a CTU may have a size with a different height and width (such as 128×64, 64×128, 256×64, 64×256, 512×64, 64×512, 256×128, 128×256, etc.). Similarly, here, the height or width of the CTU may be at least one of positive integers that are multiples of 2, 4, or 8.
[0166] For example, the CU may have the same size as the height and width (such as 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, 256×256, 512×512, etc.) Here, the height or width of the CU may be at least one of a positive integer that is a multiple of 2, 4, or 8. In addition, for example, a CU may have a size whose height and width are different from each other, such as 4×8, 8×4, 4×16, 16×4, 4×32, 32×4, 4×64, 64×4, 8×16, 16×8, 8×32, 32×8, 8×64, 64×8, 16×32, 32×16, 16×64, 64×16, 16×128, 128×16, 32×64, 64×32, 32×128, 128×32, 128×64, 64×128, 256×64, 64×256, 512×64, 64×512, 256×128, 128×256, etc. Similarly, here, the height or width of the CU may be at least one of a positive integer that is a multiple of 2, 4, or 8.
[0167] For example, the SCU may have a size with the same height as width (such as 2×2, 4×4, 8×8, 16×16, 32×32, 64×64, 64×64, 128×128, 256×256, 512×512, etc.) Here, the height or width of the CTU may be at least one of a positive integer that is a multiple of 2, 4, or 8. In addition, for example, a CTU may have a size whose height and width are different from each other (such as 2×4, 4×2, 2×8, 8×2, 2×16, 16×2, 2×32, 32×2, 4×8, 8×4, 4×16, 16×4, 4×32, 32×4, 4×64, 64×4, 8×16, 16×8, 8×32, 32×8, 8×64, 64×8, 16×32, 32×16, 16×64, 64×16, 16×128, 128×16, 32×64, 64×32, 32×128, 128×32, 128×64, 64×128, 256×64, 64×256, 512×64, 64×512, 256×128, 128×256, etc.). Similarly, here, the height or width of the CTU may be at least one of a positive integer that is a multiple of 2, 4, or 8.
[0168] At least one of a CTU, a CU, an SCU, and a sub-CU may have a width-to-height ratio or a height-to-width ratio of at least one of N:N, 1.5×N:N, 2×N:N, 2.5×N:N, 3×N:N, 3.5×N:N, 4×N:N, 4.5×N:N, 5×N:N, 5.5×N:N, 6×N:N, N:1.5×N, N:2×N, N:2.5×N, N:3×N, N:3.5×N, N:4×N, N:4.5×N, N:5×N, N:5.5×N, and N:6×N. Here, N may be a positive integer such as 2, 4, 6, or 8. In addition, here, a sub-CU may refer to a unit obtained by at least first partitioning a CU when encoding / decoding the CU, rather than a unit obtained from a block partition structure.
[0169] Reference Figure 3 , an LCU with a depth of 0 may be a 64×64 block. 0 may be the minimum depth. An SCU with a depth of 3 may be an 8×8 block. 3 may be the maximum depth. CUs with a 32×32 block and a 16×16 block may be denoted as depth 1 and depth 2, respectively.
[0170] For example, when a single coding unit is partitioned into four coding units, the horizontal and vertical sizes of the four partitioned coding units may be half the horizontal and vertical sizes of the CU before partitioning. In one embodiment, when a coding unit of size 32×32 is partitioned into four coding units, each of the four partitioned coding units 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.
[0171] 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 the horizontal size or vertical size of the original coding unit. For example, when a coding unit having a size of 32×32 is vertically partitioned 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 horizontally partitioned 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.
[0172] For example, when one coding unit (CU) is partitioned into two sub-CUs, the two sub-CUs may have a width or height having a ratio of 1 / K:(K-1) / K or (K-1) / K:1 / K compared to the width or height of the CU, respectively. Here, K may be a positive integer such as 2, 3, 4, 5, 6, 7, 8, 16, 32, etc.
[0173] In an example, when a CU having a size of 32x32 is vertically partitioned into two sub-CUs having a ratio of 1:3, the two sub-CUs may have sizes of 8x32 and 24x32, respectively.
[0174] In another example, when a CU having a size of 8×32 is horizontally partitioned into two sub-CUs having a ratio of 1:3, the two sub-CUs may have sizes of 8×8 and 8×24, respectively.
[0175] For example, when one coding unit is partitioned into three sub-coding units, the horizontal size or vertical size of the coding unit may be partitioned in a ratio of 1:2:1, thereby generating three sub-coding units having a ratio of 1:2:1 in terms of the horizontal size or vertical size. 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 or partitioned according to a ternary tree partition structure.
[0176] For example, when a CU is partitioned into three sub-CUs, the three sub-CUs can be obtained by partitioning the width or height of the CU according to a K:L:M ratio (such as 1:2:1, 2:1:1, 1:1:2, 1:4:1, 4:1:1, 1:1:4, 1:3:2, 2:3:1, 1:6:1, 6:1:1, 1:1:6, 1:5:2, 2:5:1, etc.).
[0177] In an example, when a CU having a size of 16×32 is horizontally partitioned into three sub-CUs having a ratio of 1:6:1, the three sub-CUs may have sizes of 16×4, 16×24, and 16×4, respectively, from above.
[0178] In another example, a CU having a size of 32x32 is vertically partitioned into three sub-CUs with a ratio of 6:1:1, and the three sub-CUs may have sizes of 24x32, 4x32, and 4x32 from the left, respectively.
[0179] For example, when the size of a CU is not a multiple of the sum of K, L, and M (i.e., K+L+M), the CU may be partitioned according to a preset rule. In this example, when M has the maximum value among K:L:M, a positive integer n may be added to M so that the size of the CU becomes a multiple of (K+1+M+n). In other words, the CU may be partitioned according to the ratio of K:L:(M+n).
[0180] exist Figure 3 , a coding tree unit (CTU) 320 is an example of a CTU to which a quadtree partition structure, a binary tree partition structure, and a ternary tree partition structure are all applied.
[0181] As described above, 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. The various tree partition structures may be sequentially applied to the CTU according to a predetermined priority order. For example, the quadtree partition structure may be preferentially applied to the CTU. Coding units that can no longer be partitioned using the quadtree partition structure may correspond to leaf nodes of the quadtree. Coding units corresponding to leaf nodes of the quadtree may serve as root nodes of the binary and / or ternary tree partition structures. That is, coding units corresponding to leaf nodes of the quadtree may be further partitioned according to the binary or ternary tree partition structure, or may not be further partitioned. Therefore, by preventing coding blocks resulting from binary or ternary tree partitioning of coding units corresponding to leaf nodes of the quadtree from undergoing further quadtree partitioning, block partitioning operations and / or operations for signaling partition information may be efficiently performed.
[0182] For example, binary tree partitioning may be preferentially applied to a CTU. A CU that cannot be subjected to binary tree partitioning may also correspond to a leaf node of the binary tree. The CU corresponding to the leaf node of the binary tree may become the root node of the quadtree and / or ternary tree. In other words, the CU corresponding to the leaf node of the binary tree may be partitioned according to the quadtree or ternary tree, or the CU corresponding to the leaf node of the binary tree may not be further partitioned. Here, binary tree partitioning is not further performed on the CU generated by performing quadtree partitioning or ternary tree partitioning on the CU corresponding to the leaf node of the binary tree, and thus signaling block partitioning and / or partition information may be performed efficiently.
[0183] For example, ternary tree partitioning can be preferentially applied to CTUs. CUs for which ternary tree partitioning cannot be performed may also correspond to leaf nodes of the ternary tree. CUs corresponding to leaf nodes of the ternary tree may become root nodes of a quadtree and / or binary tree. In other words, CUs corresponding to leaf nodes of the ternary tree may be partitioned according to a quadtree or binary tree, or CUs corresponding to leaf nodes of the ternary tree may not be further partitioned. Here, ternary tree partitioning is not further performed on CUs generated by performing quadtree partitioning or binary tree partitioning on CUs corresponding to leaf nodes of the ternary tree, and thus, signaling of block partitioning and / or partition information can be performed efficiently.
[0184] For example, for a CTU, quadtree partitioning, ternary tree partitioning, and binary tree partitioning may be sequentially applied.
[0185] For example, for a CTU, ternary tree partitioning, binary tree partitioning, and quadtree partitioning may be sequentially applied.
[0186] For example, for a CTU, in quadtree partitioning, binary tree partitioning, and ternary tree partitioning, partitioning of height or width according to a symmetric ratio may be performed, and then partitioning according to an asymmetric ratio may be performed.
[0187] For example, when binary tree partitioning is performed on a CTU, partition priority may vary depending on whether a symmetric ratio or an asymmetric ratio is applied to the height or width.
[0188] For example, when ternary tree partitioning is performed on a CTU, partition priority may vary depending on whether a symmetric ratio or an asymmetric ratio is applied to the height or width, or depending on whether a symmetric ratio or an asymmetric ratio is applied to at least two of three sub-CTUs.
[0189] The fact that the coding unit corresponding to the node of the quadtree is partitioned can be signaled using quadtree partition information. Quadtree partition information having a first value (e.g., '1') may indicate that the current coding unit is partitioned according to the quadtree partition structure. Quadtree 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 quadtree partition information may be a flag having a predetermined length (e.g., one bit).
[0190] There may be no priority between binary tree partitioning and ternary tree partitioning. That is, a coding unit corresponding to a leaf node of a quadtree may be further partitioned by either binary tree partitioning or ternary tree partitioning. In addition, a coding unit generated by binary tree partitioning or ternary tree partitioning may be further partitioned by either binary tree partitioning or ternary tree partitioning, or may not be further partitioned.
[0191] There may be no partition priority between quadtree partitioning and ternary tree partitioning. In other words, quadtree partitioning or ternary tree partitioning may be performed on a CU corresponding to a leaf node of a binary tree. In addition, a CU generated by quadtree partitioning or ternary tree partitioning may be partitioned again based on the quadtree or ternary tree, or may not be further partitioned.
[0192] There may be no partition priority between quadtree partitioning and binary tree partitioning. In other words, quadtree partitioning or binary tree partitioning may be performed on a CU corresponding to a leaf node of a ternary tree. In addition, a CU generated by quadtree partitioning or binary tree partitioning may be partitioned again based on the quadtree or binary tree, or may not be further partitioned.
[0193] In the case of binary tree partitioning or ternary tree partitioning, there may be no partition priority between partition trees depending on whether a symmetric ratio or an asymmetric ratio is applied to the height or width.
[0194] A tree structure in which there is no priority between binary tree partitioning and ternary tree partitioning is called a multi-type tree structure. The coding units corresponding to the leaf nodes of the quadtree can be used as the root nodes of the multi-type tree. Whether to partition the coding units corresponding to the nodes of the multi-type tree can be signaled using at least one of the multi-type tree partition indication information, partition direction information, and partition tree information. In order to partition the coding units corresponding to the nodes of the multi-type tree, the multi-type tree partition indication information, partition direction information, and partition tree information can be signaled sequentially.
[0195] The signaled order may be a value preset in the encoder / decoder, or may be a value signaled from the encoder to the decoder.
[0196] The multi-type tree partition indication information having a first value (e.g., '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 (e.g., '0') may indicate that the current coding unit will not undergo multi-type tree partitioning.
[0197] 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. Partition direction information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned vertically. Partition direction information having a second value (e.g., "0") may indicate that the current coding unit will be partitioned horizontally.
[0198] When the coding unit corresponding to the node of the multi-type tree is further partitioned according to the multi-type tree partition structure, the current coding unit may include partition tree information. The partition tree information may indicate the tree partition structure to be used to partition the node of the multi-type tree. The partition tree information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned according to the 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 the ternary tree partition structure.
[0199] The partition indication information, the partition tree information, and the partition direction information may all be flags having a predetermined length (eg, one bit).
[0200] Partitioning of a CU corresponding to each node of a multi-type tree may be signaled using at least one of information on whether to perform multi-type tree partitioning, information on a partitioning direction, information on a partitioning ratio, and information on a partitioning tree. In order to perform partitioning on a CU corresponding to each node of a multi-type tree, information on whether to perform partitioning, information on a partitioning direction, information on a partitioning ratio, and information on a partitioning tree may be sequentially signaled.
[0201] In addition, in order to perform partitioning on a CU corresponding to each node of the multi-type tree, information on whether to perform partitioning, information on a partitioning direction, information on a partitioning tree, and information on a partitioning ratio may be sequentially signaled.
[0202] In addition, in order to perform partitioning on a CU corresponding to each node of the multi-type tree, information on whether to perform partitioning, information on a partition ratio, information on a partition direction, and information on a partition tree may be sequentially signaled.
[0203] When partitioning is performed on a CU corresponding to each node of a multi-type tree, the CU may further include information about a partition ratio. The information about the partition may indicate a ratio for performing multi-type tree partitioning.
[0204] Hereinafter, an example in which the partition ratio indicates information about the partition ratio when performing binary tree partitioning is shown.
[0205] In an example, the information about the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a ratio of 1:1.
[0206] In another example, the information about the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a ratio of 1:3.
[0207] In another example, the information about the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a ratio of 1:7.
[0208] In another example, the information about the partition ratio having the fourth value may indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a ratio of 1:15.
[0209] Hereinafter, an example in which the partition ratio indicates information about the partition ratio when performing binary tree partitioning is shown.
[0210] In an example, the information about the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a ratio of 1:1.
[0211] In another example, the information about the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a ratio of 3:1.
[0212] In another example, the information about the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a ratio of 1:3.
[0213] Hereinafter, an example in which the partition ratio indicates information about a partition ratio when performing ternary-tree partitioning is shown.
[0214] In an example, the information about the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:2:1.
[0215] In another example, the information about the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:4:1.
[0216] In an example, the information about the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:6:1.
[0217] In another example, the information about the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:8:1.
[0218] Hereinafter, an example in which the partition ratio indicates information about a partition ratio when performing ternary-tree partitioning is shown.
[0219] In an example, the information about the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:2:1.
[0220] In another example, the information about the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 2:1:1.
[0221] In an example, the information about the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:1:2.
[0222] In another example, the information about the partition ratio having the fourth value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to a ratio of 1: 3. In other words, the information about the partition ratio of the binary tree partition may be indicated by using the information about the partition ratio of the ternary tree partition.
[0223] The information about the partition ratio may be a flag or an index having a predetermined length (eg, 1 bit), or may be an index having a variable length.
[0224] The value of the information about the partition ratio and the relationship with the partition ratio are not limited to the above examples in each case. When the information about the partition has a specific value, it can indicate that binary tree partitioning or ternary tree partitioning is performed with a partition ratio of n:m or n:m:r, and the relationship of the ratio associated with each value can be variably set. Here, n, m, and r can all be integers greater than zero.
[0225] Partitioning for a case where there is no priority between quadtree partitioning and ternary tree partitioning may be referred to as multi-type tree partitioning. In other words, the CU corresponding to the leaf node of the binary tree may become the root node of the multi-type tree. The partitioning of the CU corresponding to each node of the multi-type tree may be signaled using at least one of information on whether to perform multi-type tree partitioning, information on the partition direction, information on the partition ratio, and information on the partition tree.
[0226] Partitioning for a case where there is no priority between quadtree partitioning and binary tree partitioning may be referred to as multi-type tree partitioning. In other words, the CU corresponding to the leaf node of the binary tree may become the root node of the multi-type tree. The partitioning of the CU corresponding to each node of the multi-type tree may be signaled using at least one of information on whether to perform multi-type tree partitioning, information on the partition direction, information on the partition ratio, and information on the partition tree.
[0227] At least any one of quadtree partition indication information, multi-type tree partition indication information, partition direction information, and partition tree information may be entropy coded / decoded. To entropy code / 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, partition ratio, 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 coding / 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 quadtree partition information, binary tree partition information, ternary tree partition information, multi-type tree partition indication information, partition direction information, partition ratio information, and partition tree information.
[0228] As another example, between binary tree partitioning and ternary tree partitioning, binary tree partitioning may be performed preferentially. 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.
[0229] 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 prediction units and / or transformation units may not exist in the bitstream.
[0230] In a CU, a CU that is partitioned M times further according to quadtree partitioning, binary tree partitioning, and / or ternary tree partitioning can become a unit for coding, prediction, and / or transformation. In other words, a CU can be partitioned M times further for prediction and / or transformation. Here, when encoding / decoding is performed on an image, the CU that is partitioned M times further can be used in the form of the resulting unit, and the resulting unit may not be partitioned in a block structure. Therefore, the partition structure, partition information, etc. for additionally performing partitioning of the CU into prediction units and / or transformation units may not be present in the bitstream. Here, M can be, for example, 1 or a positive integer.
[0231] For example, a CU may be partitioned M times and N times, respectively, to perform prediction and / or transformation. M and N may be different positive integers.
[0232] However, when the size of a coding unit (i.e., a basic unit for partitioning) is larger than the size of a 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. At least one of the size of the CU and the size of the maximum transform may represent at least one of width, height, and area. Alternatively, at least one of the size of the CU and the size of the maximum transform block may represent depth information specifying the size of the CU or block. Alternatively, the size may represent a ratio between width and height. 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 transform. 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 transform. In this case, the partition of the coding unit for transform is not separately signaled, and the partition of the coding unit for transform may be determined by comparing the horizontal size or vertical size of the coding unit with 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 divided into two equal parts vertically. 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 divided into two equal parts horizontally.
[0233] In addition, when the size of a CU is larger than the size of the maximum transform block, a coded block flag (CBF) for the corresponding CU may be determined to be a first value based on at least one of a slice type and partition information. Here, the first value may represent 0, where 0 indicates that a transform coefficient or quantization level does not exist in the corresponding CU. Here, the slice type may be a P slice or a B slice. Here, the partition information may represent 0, where 0 is the first value indicating that the CU is not partitioned.
[0234] In an example, when the current slice is a B slice, the size of the CU is 128×128, the size of the maximum transform block is 64×64, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.
[0235] In another example, when the current slice is an I slice, the size of the CU is 128×128, the size of the maximum transform block is 64×64, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.
[0236] In another example, when the current slice is a P slice, the size of the CU is 64×128, the size of the maximum transform block is 64×64, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.
[0237] In another example, when the current slice is a P slice, the size of the CU is 64×32, the size of the maximum transform block is 32×16, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.
[0238] In another example, when the current slice is a B slice, the size of the CU is 128×128, the size of the maximum transform block is 32×32, and the partition information is 0, the size / partition information about the CU may be additionally entropy encoded / decoded. When the size / partition information about the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128×128 and the value of the coded block flag of the CU may be determined to be 0. In addition, when the size / partition information about the CU is 1 (where 1 is a second value), the CU having a size of 128×128 is partitioned into four CUs of a size of 64×64 based on a quadtree, and the value of the coded block flag of the CU may be determined to be 0. In other words, when the width or height of the CU is four times larger than the width or height of the maximum transform block, the size / partition information about the CU may be additionally entropy encoded / decoded, and the size of the CU having a value of the coded block flag of 0 may be determined.
[0239] In another example, when the current slice is a B slice, the size of the CU is 128×64, the size of the largest transform block is 32×16, and the partition information is 0, the size / partition information about the CU may be entropy encoded / decoded. When the size / partition information about the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128×64 and the value of the coding block flag of the CU may be determined to be 0. In addition, when the size / partition information about the CU is 1 (where 1 is a second value), the CU having a size of 128×64 is partitioned into four CUs of a size of 64×32 based on a quadtree, and the value of the coding block flag of the CU may be determined to be 0.
[0240] In addition, when the size of a CU is larger than the size of a maximum transform block, the mode of the corresponding CU may be determined as a skip mode or as an AMVP mode according to a slice type, wherein in the AMVP mode, the coding block flag has a first value and a difference value representing a motion vector is signaled. Here, the slice type may be a P slice or a B slice.
[0241] In an example, when a current slice is a B slice, a size of a CU is 128×128, a size of a maximum transform block is 64×64, and partition information is 0, a mode of the CU may be determined as a skip mode.
[0242] In another example, when the current slice is a P slice, the size of the CU is 64×128, the size of the maximum transform block is 64×64, and the partition information is 0, the mode of the CU can be determined as the AMVP mode, where in the AMVP mode, the value of the coding block flag is 0.
[0243] In another example, when the current slice is a B slice, the size of the CU is 128×128, the size of the largest transform block is 32×32, and the partition information is 0, the size / partition information about the CU may be entropy encoded / decoded. When the size / partition information about the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128×128 and the mode of the CU may be determined to be skip mode. In addition, when the size / partition information about the CU is 1 (where 1 is a second value), the CU having a size of 128×128 is partitioned into four CUs of a size of 64×64 based on a quadtree, and the mode of the CU may be determined to be skip mode.
[0244] In another example, when the current slice is a P slice, the size of the CU is 128×64, the size of the maximum transform block is 32×16, and the partition information is 0, the size / partition information about the CU may be entropy encoded / decoded. When the size / partition information about the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128×64 and the mode of the CU may be determined to be the AMVP mode, wherein the value of the coding block flag is 0 in the AMVP mode. In addition, when the size / partition information about the CU is 1 (where 1 is a second value), the CU having a size of 128×64 is partitioned into four CUs of a size of 64×32 based on a quadtree, and the mode of the CU may be determined to be the AMVP mode, wherein the value of the coding block flag is 0 in the AMVP mode.
[0245] In the above example, at least one of the size of the CU and the size of the maximum transform block may represent at least one of width, height, and area.
[0246] At least one of the size of the CU and the size of the maximum transform block may be a value preset in the encoder / decoder, or may be a value signaled from the encoder to the decoder.
[0247] In addition, when the depth of the CU is 0 and the partition information is 0, the value of the coding block flag (CBF) of the corresponding CU may be determined to be the first value.
[0248] In addition, when the depth of the CU is 0 and the partition information is 0, the mode of the corresponding CU may be determined as the skip mode or the AMVP mode, wherein the coding block flag has a first value and a difference value of a motion vector is signaled.
[0249] In the above example, the coded block flag may include at least one of a coded block flag of a luminance signal and a coded block flag of a chrominance signal.
[0250] The information on the maximum and / or minimum size of the coding unit and the information on the maximum and / or minimum size of the 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 sub-picture level, a picture level, a tile level, a tile group level, a slice level, a partition level, etc. For example, the minimum size of the coding unit may be determined as 4×4. For example, the maximum size of the transform block may be determined as 64×64. For example, the minimum size of the transform block may be determined as 4×4. Here, the information on the minimum and / or maximum size of the CU and the information on the minimum and / or maximum size of the transform block may be signaled for each slice and for each inter-slice, or may be determined as a value signaled from the encoder to the decoder regardless of the slice type.
[0251] Information about the minimum and / or maximum size of a CU may be signaled for the partition type of the current block. For example, when the partition type of the current CU is one of quadtree, binary tree, and ternary tree, information about the minimum and / or maximum size that a CU of the corresponding type may have may be signaled.
[0252] In addition, information about the minimum and / or maximum size of a CU of a specific partition type may be signaled according to information about the minimum and / or maximum size of a general CU.
[0253] Additionally, information about the minimum and / or maximum size of a CU of a specific type may be signaled according to information about the minimum and / or maximum size of a CU of a specific partition type.
[0254] In addition, information about the minimum and / or maximum size of a CU of a particular partition type may be signaled in the form of a logarithmic value. In an example, the exponent of the logarithm may be 2.
[0255] In addition, information about the minimum and / or maximum size of the CU of each partition type may be signaled based on a luma signal or a chroma signal. Hereinafter, a value represented by Y or luma and information represented by C or chroma may represent information about a luma unit and a chroma unit, respectively.
[0256] In an example, the difference between the minimum size of the CU after quadtree partitioning and the minimum size of the general CU may be signaled. For example, the difference between the minimum size of the CU after quadtree partitioning and the minimum size of the general CU may be signaled by slice_log2_diff_min_qt_min_cb_luma or slice_log2_diff_min_qt_min_cb_chroma. The decoder may derive the minimum size (MinQtSizeY or MinQtSizeC) of the CU after quadtree partitioning by using slice_log2_diff_min_qt_min_cb_luma or slice_log2_diff_min_qt_min_cb_chroma) and the minimum size (MinCbLog2SizeY) of the general CU. Hereinafter, when the CU after quadtree partitioning has a minimum size, it may correspond to the case where the CU after quadtree partitioning corresponds to a leaf node of the quadtree partition.
[0257] In another example, the difference between the maximum size of the CU after binary tree partitioning and the minimum size of the CU after quadtree partitioning can be signaled. For example, the difference between the maximum size of the CU after binary tree partitioning and the minimum size of the CU after quadtree partitioning can be signaled by slice_log2_diff_max_bt_min_qt_luma or slice_log2_diff_max_bt_min_qt_chroma. The decoder can derive the maximum size (MaxBtSizeY or MaxBtSizeC) of the CU after binary tree partitioning by using slice_log2_diff_max_bt_min_qt_luma or slice_log2_diff_max_bt_min_qt_chromal and the minimum size of the CU after quadtree partitioning (MinQtLog2SizeY or MinQtLog2SizeC). In addition, the decoder can derive the minimum size (MinBtSizeY or MinBtSizeC) of the CU after binary tree partitioning by using the minimum size (MinCbLog2SizeY) of the general CU.
[0258] In another example, the difference between the maximum size of the CU after ternary tree partitioning and the minimum size of the CU after quadtree partitioning can be signaled. For example, the difference between the maximum size of the CU after ternary tree partitioning and the minimum size of the CU after quadtree partitioning can be signaled by slice_log2_diff_max_tt_min_qt_luma or slice_log2_diff_max_tt_min_qt_chroma. The decoder can derive the maximum size (MaxTtSizeY or MaxTtSizeC) of the CU after ternary tree partitioning by using slice_log2_diff_max_tt_min_qt_luma or slice_log2_diff_max_tt_min_qt_chroma and the minimum size of the CU after quadtree partitioning (MinQtLog2SizeY or MinQtLog2SizeC). Additionally, the decoder may derive the minimum size of a CU (MinTtSizeY or MinTtSizeC) by using the minimum size of a general CU (MinCbLog2SizeY) after ternary tree partitioning.
[0259] Information about the minimum size of a coding unit corresponding to a leaf node of a quadtree (quadtree minimum size) and / or information about the maximum depth from the root node to a leaf node of a multi-type tree (multi-type tree maximum tree depth) 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 sub-picture level, a slice level, a tile group level, a tile level, a partition level, or the like. Information about the minimum size of the quadtree and / or information about the maximum depth of the multi-type tree may be signaled for each intra-picture slice and inter-picture slice, or may be determined as a value signaled from the encoder to the decoder regardless of the slice type. Here, information about the maximum depth of the multi-type tree may be signaled or determined at the parent level of the CU by partitioning the information about the maximum depth of the multi-type tree into information about the maximum depth of the binary tree and information about the maximum depth of the ternary tree.
[0260] Information about the maximum depth of the multi-type tree may be signaled according to information about the minimum size and / or maximum size of a general CU.
[0261] In addition, the information about the maximum depth of the multi-type tree can be signaled in the form of a logarithmic value. In an example, the exponent of the logarithm can be 2.
[0262] In addition, information about the maximum depth of the multi-type tree may be signaled based on a luma or chroma signal. Hereinafter, a value represented by Y or luma and information represented by C or chroma may represent information about a luma unit and a chroma unit, respectively.
[0263] For example, information about the maximum depth of a multi-type tree can be signaled. For example, information about the maximum depth of a multi-type tree can be signaled via slice_max_mtt_hierarchy_depth_luma or slice_max_mtt_hierarchy_depth_chroma. In an example, slice_max_mtt_hierarchy_depth_luma or slice_max_mtt_hierarchy_depth_chroma can have a value from 0 to CtbLog2SizeY-MinCbLog2SizeY. The decoder can derive the maximum depth (MaxMttDepthY or MaxMttDepthC) of the multi-type tree by using slice_max_mtt_hierarchy_depth_luma or slice_max_mtt_hierarchy_depth_chroma.
[0264] The difference between the size of a CTU and the maximum size of a transform block may be signaled or determined at a higher level within the coding unit. For example, the higher level may be the sequence level, picture level, sub-picture level, slice level, tile group level, tile level, partition level, etc. Information regarding the maximum size of a coding unit corresponding to each node of a 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 a coding unit corresponding to each node of a ternary tree (hereinafter referred to as the maximum size of the ternary tree) may vary depending on the slice type. For example, for an intra-slice, the maximum size of the ternary tree may be 32×32. For example, for an inter-slice, the maximum size of the ternary tree may be 128×128. Similarly, the maximum size of a CU corresponding to each node of the binary tree (the maximum size of the binary tree) may have different values depending on the slice type. For example, for an intra-slice, the maximum size of the binary tree may be 32×32. Alternatively, for an inter-slice, the maximum size of the binary tree may be 128×128. Information about the maximum size of the CU corresponding to each node of the ternary tree (the maximum size of the ternary tree) may be determined based on the size of the coding tree unit and the difference information. 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 as the minimum size of the coding block.
[0265] 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.
[0266] In 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 sequence level, picture level, sub-picture level, slice level, tile group level, tile block level, partition level, etc. Additionally, the minimum size of the binary tree and / or the minimum size of the ternary tree may be signaled or determined at the sequence level, picture level, sub-picture level, slice level, tile group level, tile block level, block level, etc.
[0267] In another example, the maximum depth of the binary tree and / or the maximum depth of the ternary tree may be signaled or determined at the sequence level, picture level, sub-picture level, slice level, tile group level, tile block level, partition level, etc. Additionally, the minimum depth of the binary tree and / or the minimum depth of the ternary tree may be signaled or determined at the sequence level, picture level, sub-picture level, slice level, tile group level, tile block level, partition level, etc.
[0268] Depending on the size and depth information of the various blocks described above, quadtree partition information, multi-type tree partition indication information, partition tree information, partition ratio level and / or partition direction information may or may not be included in the bitstream.
[0269] 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 quadtree partition information. Therefore, the quadtree partition information can be derived from the second value.
[0270] For example, when the size (horizontal size and vertical size) of the coding unit corresponding to the node of the multi-type tree is larger 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 may be inferred from the second value.
[0271] Alternatively, when the size (horizontal and vertical) of a coding unit corresponding to a node of a multi-type tree is the same as the maximum size (horizontal and vertical) of a binary tree and / or twice the maximum size (horizontal and vertical) of a ternary tree, the coding unit may not be further partitioned into a binary tree or a ternary tree. Therefore, the multi-type tree partition indication information may not be signaled, but may be derived from the second value. This is because when a coding unit is partitioned using a binary tree partition structure and / or a 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.
[0272] Optionally, binary tree partitioning or ternary tree partitioning can be limited based on the size of the virtual pipeline data unit (hereinafter, pipeline buffer size). For example, when a coding unit is partitioned into sub-coding units that do not fit in the pipeline buffer size by binary tree partitioning or ternary tree partitioning, the corresponding binary tree partitioning or ternary tree partitioning may be limited. The pipeline buffer size may be the size of the largest transform block (e.g., 64×64). For example, when the pipeline buffer size is 64×64, the following partitioning may be limited.
[0273] - N×M (N and / or M is 128) ternary tree partitions for coding units
[0274] - 128×N (N<=64) binary tree partitions in the horizontal direction for coding units
[0275] - N×128 (N<=64) binary tree partitions in the vertical direction for the coding unit
[0276] 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 binary tree partitioned and / or ternary tree partitioned. Therefore, the multi-type tree partition indication information may not be signaled, but may be inferred from the second value.
[0277] Optionally, multi-type tree partition indication information may be signaled 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 the coding unit corresponding to the node of the multi-type tree. Otherwise, the coding unit may not be partitioned by the binary tree and / or the ternary tree. Therefore, the multi-type tree partition indication information may not be signaled, but may be derived from the second value.
[0278] 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.
[0279] Optionally, 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, partition tree information may not be signaled but may be derived from a value indicating a possible partition tree structure.
[0280] When at least one of the width and height of a cell or block is not a power of 2 (2 N ), the corresponding block can be encoded / decoded in a form in which no residual signal exists.
[0281] In an example, a coded block flag (CBF) of a unit or block may not be entropy encoded / decoded, or may be estimated (inferred) to be 0.
[0282] In another example, a skip mode flag of a coding mode for a unit or a block may not be entropy encoded / decoded and estimated as a skip mode.
[0283] Therefore, if at least one of the width and height is not a power of 2 (2 N ), the transformation / inverse transformation may not be performed on the block. In other words, at least one of the transformation matrix and the inverse transformation matrix that does not have a power-of-2 form may not be necessary.
[0284] Figure 4 is a diagram illustrating an intra prediction process.
[0285] Figure 4 The arrows from the center to the outside in FIG. 1 represent the prediction direction of the intra prediction mode.
[0286] Intra-frame encoding and / or decoding may be performed by using reference samples of a neighboring block of the current block. The neighboring block may be a reconstructed neighboring block. 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 block.
[0287] A prediction block may represent a block generated by performing intra prediction. A prediction block may correspond to at least one of a CU, a PU, and a TU. A unit of a prediction block may have the size of one of a CU, a PU, and a TU. A prediction block may be a square block of a size of 2×2, 4×4, 16×16, 32×32, or 64×64, or a rectangular block of a size of 2×8, 4×8, 2×16, 4×16, or 8×16, etc.
[0288] Intra-frame prediction may be performed based on an intra-frame prediction mode for the current block. The number of intra-frame prediction modes that the current block may have may be a fixed value or may be a value determined differently depending on the properties of the prediction block. For example, the properties of the prediction block may include the size and shape of the prediction block.
[0289] 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. Alternatively, the number of intra-frame prediction modes can vary depending on the block size or the color component type, or both. 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 increases, the number of intra-frame prediction modes can increase. Alternatively, the number of intra-frame prediction modes for a luminance component block can be greater than the number of intra-frame prediction modes for a chrominance component block.
[0290] 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 for the current block may be performed. When there are samples that cannot be used as reference samples for 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 for the current block.
[0291] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0292] 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 fragments A and F can be filled with the samples of the closest fragments B and E, respectively, instead of retrieving them from the reconstructed neighboring blocks. Index information indicating the reference sample line to be used for intra prediction of the current block can be signaled. When the upper boundary of the current block is the boundary of a CTU, only reference sample line 0 may be available. Therefore, in this case, index information may not be signaled. When a reference sample line other than reference sample line 0 is used, filtering for the predicted block, which will be described later, may not be performed.
[0293] 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.
[0294] In the case of planar mode, when generating a prediction block for the current block, the sample value of the prediction target sample may be generated by using a weighted sum of the upper and left reference samples of the current sample, as well as the upper right and lower left reference samples of the current block, depending on the position of the prediction target sample within the prediction block. Alternatively, in the case of DC mode, when generating a prediction block for the current block, the average of the upper and left reference samples of the current block may be used. Alternatively, in the case of angular mode, the prediction block may be generated by using the upper, left, upper right, and / or lower left reference samples of the current block. To generate the prediction sample values, interpolation of real units may be performed.
[0295] In the case of intra-frame prediction between color components, a prediction block for the current block of the second color component can be generated based on the corresponding reconstructed block of the first color component. For example, the first color component can be a luma component, and the second color component can be a chroma component. For intra-frame prediction between color components, parameters of a linear model between the first and second color components can be derived based on a template. The template can include the upper and / or left neighboring samples of the current block and the upper and / or left neighboring samples of the corresponding reconstructed block of the first color component. For example, the parameters of the linear model can be derived using the sample value of the first color component with the maximum value and the corresponding sample value of the second color component among the samples in the template, as well as the sample value of the first color component with the minimum value and the corresponding sample value of the second color component among the samples in the template. Once the parameters of the linear model are derived, the corresponding reconstructed block can be applied to the linear model to generate a prediction block for the current block. Depending on the video format, the reconstructed block of the first color component and the neighboring samples of the corresponding reconstructed block can be sub-sampled. 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 the template may be signaled as an intra prediction mode.
[0296] The current block may be partitioned into two subblocks or four subblocks in the horizontal or vertical direction. The partitioned subblocks may be reconstructed sequentially. That is, intra prediction may be performed on the subblocks to generate subprediction blocks. In addition, inverse quantization and / or inverse transformation may be performed on the subblocks to generate subresidual blocks. Reconstructed subblocks may be generated by adding the subprediction blocks to the subresidual blocks. The reconstructed subblocks may be used as reference samples for intra prediction of the subblocks. A subblock 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 subblocks. Furthermore, when the current block is a 4×4 block, the current block may not be partitioned into subblocks. When the current block has other sizes, the current block may be partitioned into four subblocks. Information regarding whether intra prediction is performed based on subblocks and / or partition direction (horizontal or vertical) may be signaled. Intra prediction based on subblocks may be limited to only when reference sample line 0 is used. When subblock-based intra prediction is performed, filtering for the prediction block, which will be described later, may not be performed.
[0297] The final prediction block can be generated by performing filtering on the prediction block predicted by the intra-frame. The 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. The 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 subtracted from the diagonal mode. For example, k can be a positive integer of 8 or less.
[0298] The intra-frame prediction mode of the current block can be entropy encoded / decoded by predicting the intra-frame prediction mode of a block adjacent to the current block. When the intra-frame prediction mode of the current block is the same as that of the neighboring block, information indicating that the intra-frame prediction mode of the current block and the neighboring block is the same can be signaled using predetermined flag information. In addition, indicator information of an 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 signaled. When the intra-frame prediction mode of the current block is different from that of the neighboring block, the intra-frame prediction mode information of the current block can be entropy encoded / decoded by performing entropy encoding / decoding based on the intra-frame prediction mode of the neighboring block.
[0299] Figure 5 is a diagram illustrating an embodiment of an inter-picture prediction process.
[0300] exist Figure 5 In , a rectangle can represent a picture. Figure 5In FIG, the arrow indicates the prediction direction. According to the encoding type of a picture, the picture can be classified into an intra picture (I picture), a predicted picture (P picture), and a bi-predictive picture (B picture).
[0301] I-pictures can be encoded using intra-frame prediction without requiring inter-picture prediction. P-pictures can be encoded using inter-picture prediction using reference pictures in one direction (i.e., forward or backward) relative to the current block. B-pictures can be encoded using inter-picture prediction using reference pictures in two directions (i.e., forward and backward) relative to the current block. When using inter-picture prediction, the encoder can perform inter-picture prediction or motion compensation, and the decoder can perform corresponding motion compensation.
[0302] Hereinafter, embodiments of inter-picture prediction will be described in detail.
[0303] Reference pictures and motion information may be used to perform inter-picture prediction or motion compensation.
[0304] Motion information of the current block may be derived during inter-picture prediction by each of the encoding apparatus 100 and the decoding apparatus 200. The motion information of the current block may be derived by using motion information of a reconstructed neighboring block, motion information of a co-located block (also referred to as a col block or co-located block), and / or motion information of a block adjacent to the co-located block. The co-located block may refer to a block in a previously reconstructed co-located picture (also referred to as a col picture or co-located picture) that is spatially co-located with the current block. The co-located picture may be one of one or more reference pictures included in a reference picture list.
[0305] The method of deriving motion information may vary depending on the prediction mode of the current block. For example, prediction modes applied to inter-frame 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, merge mode may be referred to as motion merge mode.
[0306] For example, when AMVP is used as a prediction mode, at least one of a motion vector of a reconstructed neighboring block, a motion vector of a co-located block, a motion vector of a block adjacent to the co-located block, and a (0,0) motion vector may be determined as a motion vector candidate for the current block, and a motion vector candidate list may be generated by using the motion vector candidates. A motion vector candidate for the current block may be derived by using the generated motion vector candidate list. 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.
[0307] The encoding device 100 may calculate a motion vector difference (MVD) between the motion vector of the current block and the 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 the 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 the 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.
[0308] In addition, the encoding apparatus 100 may perform entropy encoding on the calculated resolution information of the MVD. The decoding apparatus 200 may adjust the resolution of the entropy-decoded MVD using the MVD resolution information.
[0309] 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 subblock by deriving an affine controlled motion vector of a decoded target block by summing the entropy-decoded MVD and the affine controlled motion vector candidate.
[0310] 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.
[0311] Another example of a method for deriving motion information for a current block may be a merge mode. Merge mode may indicate a method for merging the motion of multiple blocks. Merge mode may indicate a mode for deriving motion information for a current block from motion information for neighboring blocks. When merge mode is applied, reconstructed motion information for neighboring blocks and / or motion information for co-located blocks may be used to generate a merge candidate list. The motion information may include at least one of a motion vector, a reference picture index, and an inter-picture prediction indicator. The prediction indicator may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).
[0312] The merge candidate list may be a list of stored motion information. The motion information included in the merge candidate list may be at least one of the following: motion information of a neighboring block adjacent to the current block (spatial merge candidate), motion information of a co-located block of the current block in a reference picture (temporal merge candidate), new motion information generated by combining motion information present in the merge candidate list, motion information of a block encoded / decoded before the current block (history-based merge candidate), and a zero merge candidate.
[0313] 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 transmit the bitstream to the decoding device 200 using a signal. 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 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 to the left of the current block, an upper neighboring block arranged above the current block, and a temporal neighboring block temporally adjacent to the current block.
[0314] In addition, the encoding device 100 performs entropy encoding on correction information for correcting the motion vector in the motion information of the merge candidate and transmits the correction information to the decoding device 200 using a signal. The decoding device 200 may correct the motion vector of the merge candidate selected according to the merge index based on the correction information. Here, the correction information may include at least one of information on whether correction is performed, correction direction information, and correction size information. As described above, the prediction mode in which the motion vector of the merge candidate is corrected based on the correction information transmitted using the signal may be referred to as a merge mode with a motion vector difference.
[0315] 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 device 100 may perform entropy encoding on information indicating 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 device 200. The encoding device 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 device 200.
[0316] 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.
[0317] 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.
[0318] The inter-intra combined prediction mode may indicate a mode of deriving prediction samples of a current block by weighting prediction samples generated by inter prediction and prediction samples generated by intra prediction.
[0319] The decoding apparatus 200 may correct the derived motion information by itself. The decoding apparatus 200 may search for a predetermined area based on a reference block indicated by the derived motion information, and derive motion information having a minimum SAD as the corrected motion information.
[0320] The decoding apparatus 200 may compensate for prediction samples derived through inter-frame prediction using optical flow.
[0321] Figure 6 is a diagram illustrating transform and quantization processing.
[0322] like Figure 6 As 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 predicted block (i.e., an intra-frame predicted block or an inter-frame predicted block). The predicted block is a block generated by intra-frame prediction or inter-frame prediction. The transform may 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.
[0323] At least one scheme selected from various predefined transform schemes is used to perform the first transform. For example, examples of the predefined transform schemes include discrete cosine transform (DCT), discrete sine transform (DST), and Karhunen-Loève transform (KLT). The transform coefficients generated by the first transform may undergo a second transform. The transform scheme used for the first transform and / or the second transform may be determined based on coding parameters of the current block and / or neighboring blocks of the current block. Optionally, transform information indicating the transform scheme may be signaled. DCT-based transforms may include, for example, DCT-2, DCT-8, etc. DST-based transforms may include, for example, DST-7.
[0324] A quantized level signal (quantized coefficient) can be generated by performing quantization on a residual signal or a result of performing a first transform and / or a second transform. Depending on the intra prediction mode or block size / shape of the block, the quantized level signal can be scanned according to at least one of diagonal upper right scanning, vertical scanning, and horizontal scanning. 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, horizontal scanning for horizontally scanning coefficients in a two-dimensional block form or vertical scanning for vertically scanning coefficients in a two-dimensional block form can be used depending on the intra prediction mode and / or the size of the transform block. The scanned quantized level coefficients can be entropy coded to be inserted into the bitstream.
[0325] The decoder performs entropy decoding on the bitstream to obtain quantized level coefficients. The quantized level coefficients can be arranged in a two-dimensional block form by reverse scanning. For the reverse scanning, at least one of diagonal upper right scanning, vertical scanning, and horizontal scanning can be used.
[0326] The quantized level coefficients may then be dequantized, then inversely transformed twice as needed, and finally inversely transformed once more as needed to produce a reconstructed residual signal.
[0327] Inverse mapping in the dynamic range can be performed for the luminance component reconstructed by intra prediction or inter prediction before in-loop filtering. The dynamic range can be divided 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 prediction is converted to the mapping area via mapping using the mapping function, and then used to generate a reconstructed block. However, since intra prediction is performed in the mapping area, the prediction block generated by intra prediction can be used to generate a reconstructed block without mapping / inverse mapping.
[0328] 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 only be applied when the mapping of the luminance component is available and the partitioning of the luminance component and the partitioning of 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 referencing a lookup table using the index of the segment to which the average value of the sample values of the luminance prediction block belongs. Finally, the residual block can be converted to the 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.
[0329] Information indicating whether mapping / inverse mapping of luma components and chroma components is available may be signaled through a sequence parameter set.
[0330] 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 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 skip mode, merge mode, AMVP mode, etc. In the case of skip mode or 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 AMVP mode, a difference block vector may be signaled. In addition, the 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 IBC mode is included in the current CTU or the left CTU and is limited to blocks in the already 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 area 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, memory consumption and device complexity of the implementation according to the IBC mode can be reduced.
[0331] Figure 8 is a diagram illustrating boundaries of pictures / sub-pictures / slices / tiles / partitions, etc. according to an embodiment of the present invention.
[0332] Figure 8(a) is a diagram illustrating an example in which the current block includes both a right boundary and a lower boundary.
[0333] Figure 8 (b) is a diagram illustrating an example in which the current block includes a lower boundary. Figure 8 (c) is a diagram illustrating an example in which the current block includes a right side boundary.
[0334] When the current block includes a right boundary, it may mean that a horizontal coordinate of at least one sample included in the current block is greater than a horizontal coordinate of a sample adjacent to a picture / sub-picture / slice / tile / partition and included in the picture / sub-picture / slice / tile / partition, etc.
[0335] For example, when the current block includes a right boundary, it may mean that a horizontal coordinate position obtained by adding the width of the current block in the horizontal direction and the coordinates (x, y) corresponding to the (0, 0) position of the current block (the upper left position of the current block) is greater than the horizontal coordinate of the boundary of the picture / sub-picture / strip / parallel block / block.
[0336] In addition, when the current block includes a lower boundary, it may mean that the vertical coordinate of at least one sample included in the current block is greater than the vertical coordinate of a sample adjacent to a picture / sub-picture / slice / tile / partition and included in the picture / sub-picture / slice / tile / partition, etc.
[0337] For example, when the current block includes a lower boundary, it may mean that the vertical coordinate position obtained by adding the height of the current block in the vertical direction and the coordinates (x, y) corresponding to the (0, 0) position of the current block (the upper left position of the current block) is greater than the vertical coordinate of the boundary of the picture / sub-picture / strip / parallel block / block.
[0338] Figure 9 is a diagram illustrating a partitioning method of an embodiment of a block according to the present invention.
[0339] Figure 9 (a) is a diagram illustrating an example of vertical binary tree partitioning. Figure 9 (b) is a diagram illustrating an example of horizontal binary tree partitioning. Figure 9 (c) is a diagram illustrating an example of vertical ternary tree partitioning. Figure 9 (d) is a diagram illustrating an example of horizontal ternary tree partitioning.
[0340] When the current block includes a boundary of a picture / sub-picture / slice / parallel block / block, etc., partitioning of the current block may be performed implicitly. In the following, the boundary may represent at least one boundary of the picture / sub-picture / slice / parallel block / block, etc. Here, each boundary of the picture / sub-picture / slice / parallel block / block may represent at least one of a right boundary, a bottom boundary, a left boundary, and an upper boundary. Here, implicit partitioning may represent a case where the corresponding block is partitioned by using a specific partitioning method without using a coding parameter that is additionally signaled. Alternatively, implicit partitioning may represent a case where the corresponding block is partitioned by using a specific partitioning method when a predetermined condition is satisfied regardless of whether there is a coding parameter that is additionally signaled.
[0341] At least one of the right boundary and the left boundary may represent a vertical boundary, and at least one of the upper boundary and the lower boundary may represent a horizontal boundary.
[0342] When the boundary is a vertical boundary or a horizontal boundary, vertical partitioning or horizontal partitioning may be available on the current block. In addition, partitioning may be implicitly performed on the current block according to the size of the current block.
[0343] In addition, when partitioning the current block, a specific partitioning method may be performed, and information about the specific partitioning method may be encoded / decoded. Here, the specific partitioning method may be determined based on whether the boundary is a vertical boundary or a horizontal boundary, and may be at least one of quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning.
[0344] In an example, when the current block includes a vertical boundary, at least one of quadtree partitioning, vertical binary tree partitioning, and vertical ternary tree partitioning may be performed so that blocks obtained by partitioning the current block do not exceed the vertical boundary.
[0345] In another example, when the current block includes a horizontal boundary, at least one of quadtree partitioning, horizontal binary tree partitioning, and horizontal ternary tree partitioning may be performed so that blocks obtained by partitioning the current block do not exceed the horizontal boundary.
[0346] In another example, when the current block includes a right boundary, partitioning of the current block may be limited so that only vertical binary tree partitioning is performed on the current block. Vertical binary tree partitioning may be implicitly performed on the current block. In addition, information about the vertical binary tree partitioning of the current block may be entropy encoded / decoded. Here, information about partitions other than the vertical binary tree partitioning may not be entropy encoded / decoded.
[0347] In detail, when the current block includes a right boundary and the height of the current block exceeds the size of the maximum transform block, the current block may be restricted such that vertical binary tree partitioning performed on the current block is unavailable.
[0348] For example, when the current block includes a right boundary and the height of the current block exceeds the size 64 of the maximum transform block, the current block may be restricted such that vertical binary tree partitioning is unavailable for the current block.
[0349] In addition, when the current block includes a right boundary but the current block does not include a lower boundary, the current block may be restricted such that performing horizontal binary tree partitioning on the current block is unavailable.
[0350] In another example, when the current block includes a lower boundary, partitioning of the current block may be limited so that only horizontal binary tree partitioning is performed on the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Furthermore, information about the horizontal binary tree partitions of the current block may be entropy encoded / decoded. Information about partitions other than the horizontal binary tree partitions may not be entropy encoded / decoded.
[0351] In detail, when the current block includes a lower boundary, the current block may be restricted such that vertical binary tree partitioning performed on the current block is unavailable.
[0352] In addition, when the current block includes a lower boundary and the width of the current block exceeds the size of the maximum transform block, the current block may be restricted such that performing horizontal binary tree partitioning on the current block is unavailable.
[0353] In another example, when the current block includes a right boundary, partitioning of the current block may be limited so that only vertical ternary tree partitioning is performed on the current block. Vertical ternary tree partitioning may be implicitly performed on the current block. In addition, information about the vertical ternary tree partitioning of the current block may be entropy encoded / decoded. Here, information about partitions other than the vertical ternary tree partitioning may not be entropy encoded / decoded.
[0354] In another example, when the current block includes a right boundary, partitioning of the current block may be limited so that only vertical binary tree partitioning is performed on the current block. Vertical binary tree partitioning may be implicitly performed on the current block. In addition, information about the vertical binary tree partitioning of the current block may be entropy encoded / decoded. Here, information about partitions other than the vertical binary tree partitioning may not be entropy encoded / decoded.
[0355] In another example, when the current block includes a lower boundary, partitioning of the current block may be limited so that only horizontal binary tree partitioning is performed on the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Furthermore, information about the horizontal binary tree partitions of the current block may be entropy encoded / decoded. Information about partitions other than the horizontal binary tree partitions may not be entropy encoded / decoded.
[0356] In another example, when the current block includes a lower boundary, partitioning of the current block may be limited so that only horizontal ternary tree partitioning is performed on the current block. Horizontal ternary tree partitioning may be implicitly performed on the current block. Furthermore, information about the horizontal ternary tree partitions of the current block may be entropy encoded / decoded. Information about partitions other than the horizontal ternary tree partitions may not be entropy encoded / decoded.
[0357] In another example, when the current block includes at least one of a right boundary and an upper boundary, the current block may be restricted so that performing ternary tree partitioning on the current block is unavailable.
[0358] In another example, when the current block includes both a right boundary and a lower boundary, the partitioning of the current block may be limited so that only quadtree partitioning is performed on the current block. Quadtree partitioning may be implicitly performed on the current block. In addition, information about the quadtree partitions of the current block may be entropy encoded / decoded. Herein, information about partitions other than the quadtree partitions may not be entropy encoded / decoded.
[0359] In another example, when the current block includes a right boundary and the height of the current block is greater than the size of the maximum transform block, the current block may be restricted so that vertical binary tree partitioning is unavailable for the current block. Here, quadtree partitioning may be performed on the current block. Quadtree partitioning may be implicitly performed on the current block without entropy encoding / decoding information about the partitioning.
[0360] In another example, when the current block includes a lower boundary and the width of the current block is larger than the size of the maximum transform block, the current block may be restricted so that horizontal binary tree partitioning is unavailable for the current block. Here, quadtree partitioning may be performed on the current block. Quadtree partitioning may be implicitly performed on the current block without entropy encoding / decoding information about the partitioning.
[0361] In another example, when the current block includes a right boundary, the height of the current block is greater than the size of the maximum transform block, and the partitioning of the current block is vertical binary tree partitioning, the current block may be restricted so that binary tree partitioning is not possible. Here, quadtree partitioning may be performed on the current block. Quadtree partitioning may be implicitly performed on the current block without performing entropy encoding / decoding on information about the partitioning.
[0362] In another example, when the current block includes a lower boundary, the width of the current block is greater than the size of the maximum transform block, and the partitioning of the current block is horizontal binary tree partitioning, the current block may be restricted so that binary tree partitioning is not possible. Here, quadtree partitioning may be performed on the current block. Quadtree partitioning may be implicitly performed on the current block without entropy encoding / decoding information about the partitioning.
[0363] In order to determine the partition structure of the current block, the following syntax can be defined.
[0364] In an example, qtbtt_dual_tree_intra_flag may indicate that, for an I slice, each CTU is partitioned based on 64×64 coding units, and the 64×64 coding units are used as root nodes of luma and chroma components.
[0365] For example, when qtbtt_dual_tree_intra_flag has a first value (e.g., 0), it may indicate that each CTU may be partitioned based on a 64×64 coding unit and that the 64×64 coding unit is not used as a root node for the luminance component and the chrominance component, and when qtbtt_dual_tree_intra_flag has a second value (e.g., 1), it may indicate that each CTU may be partitioned based on a 64×64 coding unit and that the 64×64 coding unit is used as a root node for the luminance component and the chrominance component.
[0366] When qtbtt_dual_tree_intra_flag has the first value (e.g., 0), the partition structure of the luma component can be the same as the partition structure of the chroma component. However, the block size of the luma component and the block size of the chroma component can be different from each other depending on the type of the chroma component. In the above case, reference can be made to using a single tree structure. A single tree type can be identified as SINGLE_TREE.
[0367] When the slice type is I slice and qtbtt_dual_tree_intra_flag has a second value (e.g., 1), the block partition structure of the luma component and the block partition structure of the chroma component from the 64×64 coding unit may be different from each other. In this case, reference may be made to using a dual tree structure. The tree type of the luma component in the dual tree structure may be identified as DUAL_TREE_LUMA, and the tree type of the chroma component in the dual tree structure may be identified as DUAL_TREE_CHROMA.
[0368] In the case of a single tree structure, the minimum block of the chroma component can be set to a 2×2 block. Here, blocks smaller than a 2×2 block may not be used for the chroma component. In other words, for blocks with a block size equal to or larger than a 2×2 block, partitioning based on the block size of the 2×2 block may not be available.
[0369] In addition, in the case of a single tree structure, the minimum block of the chroma component can be set to a 4×4 block. Here, 2×2 blocks, 2×4 blocks, and 4×2 blocks may not be used for chroma components. In other words, for blocks with a block size equal to or larger than at least one of 2×2 blocks, 2×4 blocks, and 4×2 blocks, partitioning based on at least one of 2×2 blocks, 2×4 blocks, and 4×2 blocks may not be available.
[0370] In addition, in the case of a dual-tree structure, the minimum block of the chroma component can be set to a 4×4 block. Here, 2×2 blocks, 2×4 blocks, and 4×2 blocks may not be used for chroma components. In other words, for blocks with a block size equal to or larger than at least one of 2×2 blocks, 2×4 blocks, and 4×2 blocks, partitioning based on at least one of 2×2 blocks, 2×4 blocks, and 4×2 blocks may not be available.
[0371] When the current block satisfies at least one of the following conditions, the current block may be restricted so that quadtree partitioning is unavailable for the current block.
[0372] - The tree type to which the current block belongs is SINGLE_TREE or DUAL_TREE_LUMA, and the width or height of the current block is equal to or smaller than MinQtSizeY, which represents the minimum quadtree size of the luma component.
[0373] - A case where the tree type to which the current block belongs is DUAL_TREE_CHROMA, and a value obtained by dividing the width or height of the current block by SubWidthC, which is a subsampling factor of the chroma signal in the horizontal direction, is equal to or smaller than MinQtSizeC, which represents the minimum quadtree size of the luma component. (Here, the SubWidthC value, which is a subsampling factor of the chroma signal in the horizontal direction, may be used as the width of the current block, and the SubHeightC value, which is a subsampling factor of the chroma signal in the vertical direction, may be used as the height of the current block. In addition, a larger value between the SubWidthC value, which is a subsampling factor of the chroma signal in the horizontal direction, and the SubHeightC value, which is a subsampling factor of the chroma signal in the vertical direction, may be used as the width or height of the current block.)
[0374] - The depth of the binary tree partition and ternary tree partition of the current block (the depth of the multi-type tree) is not 0.
[0375] - A case where the tree type to which the current block belongs is DUAL_TREE_CHROMA, and a value obtained by dividing the width or height of the current block by SubWidthC, which is a subsampling factor of the chroma signal in the horizontal direction, is equal to or smaller than 4. (Here, the SubWidthC value, which is a subsampling factor of the chroma signal in the horizontal direction, may be used for the width of the current block, and the SubHeightC value, which is a subsampling factor of the chroma signal in the vertical direction, may be used for the height of the current block. In addition, a larger value between the SubWidthC value, which is a subsampling factor of the chroma signal in the horizontal direction, and the SubHeightC value, which is a subsampling factor of the chroma signal in the vertical direction, may be used as the width or height of the current block.)
[0376] - A case where the tree type to which the current block belongs is DUAL_TREE_CHROMA, and the mode type of the current block is at least one of an intra prediction mode, an intra block copy (IBC) mode, and a palette coding mode.
[0377] In addition, depending on the width and / or height of the current block (CU), execution of binary tree partitioning may be restricted and / or ternary tree partitioning may be unavailable.
[0378] In an example, when the width and / or height of the current block is L, it may be possible to restrict the execution of ternary tree partitioning from being available. Here, L may be 128.
[0379] In another example, when N is less than 64 in the current block of M×N size (M is width and N is height), horizontal binary tree partitioning may be restricted from being available. Here, M may be 128.
[0380] In another example, when M is less than 64 in the current block of M×N size (M is width and N is height), vertical binary tree partitioning may be restricted from being available. Here, N may be 128.
[0381] In another example, when the width of the current block is equal to or smaller than the size of the maximum transform block and the height of the current block is larger than the size of the maximum transform block, the current block may be restricted so that vertical binary tree partitioning is unavailable for the current block. For example, when the width of the current block is equal to or smaller than 64 or 32, which is the maximum transform block size, and the height of the current block is larger than 64 or 32, which is the maximum transform block size, the current block may be restricted so that vertical binary tree partitioning is unavailable for the current block.
[0382] In another example, when the height of the current block is equal to or smaller than the size of the maximum transform block and the width of the current block is larger than the size of the maximum transform block, the current block may be restricted so that horizontal binary tree partitioning is unavailable for the current block. For example, when the width of the current block is larger than 64 or 32, which is the maximum transform block size, and the height of the current block is equal to or smaller than 64 or 32, which is the maximum transform block size, the current block may be restricted so that horizontal binary tree partitioning is unavailable for the current block.
[0383] In another example, when the width or height of the current block is equal to or smaller than the minimum binary tree size of the luma component, the current block may be restricted such that performing binary tree partitioning on the current block is unavailable.
[0384] In another example, when the width of the current block is greater than the size of the maximum binary tree, the current block may be restricted such that performing binary tree partitioning on the current block is unavailable.
[0385] In another example, when the height of the current block is greater than the size of the maximum binary tree, the current block may be restricted such that performing binary tree partitioning on the current block is unavailable.
[0386] In another example, when the depth of the binary tree partition and the ternary tree partition of the current block (the depth of the multi-type tree) is equal to or greater than the maximum depth of the binary tree partition and the ternary tree partition (the maximum depth of the multi-type tree), the current block may be restricted so that binary tree partitioning is unavailable for the current block.
[0387] In another example, when the tree type to which the current block belongs is DUAL_TREE_CHROMA, and the product of a value obtained by dividing the width of the current block by a SubWidthC value that is a subsampling factor of a chroma signal in a horizontal direction and a value obtained by dividing the height of the current block by a SubHeightC value that is a subsampling factor of a chroma signal in a vertical direction is equal to or less than 16, the current block may be restricted so that binary tree partitioning is unavailable for the current block.
[0388] In another example, when the tree type to which the current block belongs is DUAL_TREE_CHROMA and the mode type of the current block is at least one of the intra prediction mode, the intra block copy (IBC) mode, and the palette coding mode, the current block may be restricted so that binary tree partitioning of the current block is unavailable.
[0389] In another example, when the width or height of the current block is greater than the size of the maximum transform block, the current block may be restricted such that performing ternary-tree partitioning on the current block is unavailable.
[0390] In another example, when the width or height of the current block is greater than the size of the maximum transform block and greater than a minimum value of the maximum ternary tree size, the current block may be restricted such that ternary tree partitioning is unavailable for the current block.
[0391] In another example, when the width or height of the current block is equal to or less than twice the minimum ternary tree size, the current block may be restricted such that performing ternary tree partitioning on the current block is unavailable.
[0392] In another example, when the depth of the binary tree partition and the ternary tree partition of the current block (the depth of the multi-type tree) is equal to or greater than the maximum depth of the binary tree partition and the ternary tree partition (the maximum depth of the multi-type tree), the current block may be restricted so that performing ternary tree partition on the current block is unavailable.
[0393] In another example, when the tree type to which the current block belongs is DUAL_TREE_CHROMA, and the product of a value obtained by dividing the width of the current block by a SubWidthC value that is a subsampling factor of a chroma signal in a horizontal direction and a value obtained by dividing the height of the current block by a SubHeightC value that is a subsampling factor of a chroma signal in a vertical direction is equal to or less than 32, the current block may be restricted so that ternary tree partitioning is unavailable for the current block.
[0394] In another example, when the tree type to which the current block belongs is DUAL_TREE_CHROMA and the mode type of the current block is at least one of the intra prediction mode, the intra block copy (IBC) mode, and the palette coding mode, the current block may be restricted so that ternary tree partitioning of the current block is unavailable.
[0395] Here, the maximum transform block size may be 64 or 32, and is indicated by a flag signaled from the encoder to the decoder. For example, when the signaled flag has a first value, the maximum transform block size may be 64. Alternatively, when the signaled flag has a second value, the maximum transform block size may be 32.
[0396] In another example, the current block may be restricted so that ternary tree partitioning is allowed in a current block of 128×128 size, vertical binary tree partitioning is allowed in a current block of 128×64 size, and horizontal binary tree partitioning is allowed in a current block of 64×128 size. In addition, the current block may be restricted so that ternary tree partitioning is not allowed in current blocks of 128×64 size and 64×128 size.
[0397] When partitioning the current block, the resulting subblocks may be constrained so that their (width:height) ratio does not become a specific ratio. In other words, the current block may be constrained so that it is partitioned into subblocks having a specific (width:height) ratio that is equal to or less than a specific ratio. For example, the (width:height) ratio may be 1:N, and the (height:width) ratio may be N:1. Here, N may be a positive integer such as 2, 3, 4, 5, 6, 7, 8, etc. In addition, N may be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate blocks. In addition, N may be a value preset in the encoder / decoder, or may be a value signaled from the encoder to the decoder.
[0398] When the ratio of the resultant subblock obtained by partitioning the current block becomes greater than the above ratio, the information partition of the resultant subblock may not be entropy encoded / decoded.
[0399] As a first example of partitioning the current block, when the current block includes a boundary of a picture / sub-picture / slice / tile / partition, etc., the following process may be performed.
[0400] 1) The current block includes both the right and bottom boundaries
[0401] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0402] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. Binary tree partitioning may be implicitly performed on the current block.
[0403] 2) The current block includes the lower boundary
[0404] 2-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0405] 2-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0406] 2-3) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block can be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block.
[0407] 3) The current block includes the right boundary
[0408] 3-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0409] 3-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or vertical binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0410] 3-3) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the minimum quadtree block), the partitioning of the current block can be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block.
[0411] As a second example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0412] 1) The current block includes both the right and bottom boundaries
[0413] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the largest binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0414] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. Binary tree partitioning may be implicitly performed on the current block.
[0415] 2) The current block includes the lower boundary
[0416] 2-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0417] 2-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0418] 2-3) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block can be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block.
[0419] 3) The current block includes the right boundary
[0420] 3-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0421] 3-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or vertical binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0422] 3-3) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the minimum quadtree block), the partitioning of the current block can be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block.
[0423] As a third example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0424] 1) The current block includes both the right and bottom boundaries
[0425] 1-1) When the size of the current block is larger than the size of the largest quadtree block, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. Binary tree partitioning may be implicitly performed on the current block.
[0426] 1-2) In addition, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0427] 2) The current block includes the lower boundary
[0428] 2-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0429] 2-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0430] 2-3) Alternatively, (when the current block is a binary or ternary tree block, or when the current block size is smaller than the minimum quadtree block size), partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available on the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0431] 3) The current block includes the right boundary
[0432] 3-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0433] 3-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or vertical binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0434] 3-3) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the minimum quadtree block), the partitioning of the current block can be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block.
[0435] As a fourth example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0436] 1) The current block includes both the right and bottom boundaries
[0437] 1-1) When the size of the current block is larger than the size of the minimum binary tree block, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available on the current block. Binary tree partitioning may be implicitly performed on the current block.
[0438] 1-2) In addition, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0439] 2) The current block includes the lower boundary
[0440] 2-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0441] 2-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0442] 2-3) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block can be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block.
[0443] 3) The current block includes the right boundary
[0444] 3-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0445] 3-2) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and equal to or smaller than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information regarding whether quadtree partitioning or vertical binary tree partitioning is performed on the current block may be entropy encoded / decoded.
[0446] 3-3) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the minimum quadtree block), the partitioning of the current block can be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block.
[0447] As a fifth example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0448] 1) The current block includes both the right and bottom boundaries
[0449] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0450] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. In other words, binary tree partitioning may be implicitly performed on the current block.
[0451] 2) The current block includes the lower boundary
[0452] 2-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0453] 2-2) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block can be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block.
[0454] 3) The current block includes the right boundary
[0455] 3-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0456] 3-2) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is equal to or smaller than the size of the minimum quadtree block), partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block.
[0457] As a sixth example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0458] 1) The current block includes both the right and bottom boundaries
[0459] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0460] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. In other words, binary tree partitioning may be implicitly performed on the current block.
[0461] 2) The current block includes the lower boundary
[0462] 2-1) When the size of the current block is larger than the size of the minimum quadtree block, only quadtree partitioning may be limited to the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0463] 2-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0464] 3) The current block includes the right boundary
[0465] 3-1) When the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0466] 3-2) In addition, the partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block.
[0467] As a seventh example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0468] 1) The current block includes both the right and bottom boundaries
[0469] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0470] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. In other words, binary tree partitioning may be implicitly performed on the current block.
[0471] 2) The current block includes the lower boundary
[0472] 2-1) When the size of the current block is larger than the size of the minimum binary tree block, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0473] 2-2) In addition, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0474] 3) The current block includes the right boundary
[0475] 3-1) When the size of the current block is larger than the size of the minimum binary tree block, the partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block.
[0476] 3-2) In addition, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0477] As an eighth example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0478] 1) The current block includes both the right and bottom boundaries
[0479] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0480] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. In other words, binary tree partitioning may be implicitly performed on the current block.
[0481] 2) The current block includes the lower boundary
[0482] 2-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0483] 2-2) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is equal to or smaller than the size of the minimum quadtree block or equal to or smaller than the size of the maximum binary tree block), partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0484] 3) The current block includes the right boundary
[0485] 3-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block and larger than the size of the maximum binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0486] 3-2) In addition, (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is equal to or smaller than the size of the minimum quadtree block or equal to or smaller than the size of the maximum binary tree block), partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block.
[0487] As a ninth example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0488] 1) The current block includes both the right and bottom boundaries
[0489] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0490] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. In other words, binary tree partitioning may be implicitly performed on the current block.
[0491] 2) The current block includes the lower boundary
[0492] 2-1) When the size of the current block is larger than the size of the largest binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0493] 2-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0494] 3) The current block includes the right boundary
[0495] 3-1) When the size of the current block is larger than the size of the largest binary tree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0496] 3-2) In addition, the partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block.
[0497] As a tenth example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0498] 1) The current block includes both the right and bottom boundaries
[0499] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0500] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. In other words, binary tree partitioning may be implicitly performed on the current block.
[0501] 2) The current block includes the lower boundary
[0502] 2-1) When the size of the current block is larger than the size of the maximum quadtree block, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0503] 2-2) In addition, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0504] 3) The current block includes the right boundary
[0505] 3-1) When the size of the current block is larger than the size of the maximum quadtree block, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block.
[0506] 3-2) In addition, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0507] As an eleventh example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0508] 1) The current block includes both the right and bottom boundaries
[0509] 1-1) When the current block is a quadtree block and the size of the current block is larger than the size of the minimum quadtree block, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0510] 1-2) In addition, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block. Alternatively, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block. Vertical binary tree partitioning may be implicitly performed on the current block. Therefore, partitioning of the current block may be restricted so that only binary tree partitioning is available for the current block. In other words, binary tree partitioning may be implicitly performed on the current block.
[0511] 2) When the current block includes a lower boundary, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0512] 3) When the current block includes a right boundary, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block.Vertical binary tree partitioning may be implicitly performed on the current block.
[0513] As a twelfth example of partitioning the current block, when the current block includes boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., in order to efficiently perform block partitioning in the boundaries of pictures / sub-pictures / slices / parallel blocks / blocks, etc., the following processing can be performed.
[0514] 1) When the current block includes both a right boundary and a lower boundary, partitioning of the current block may be limited so that only quadtree partitioning is available for the current block. Quadtree partitioning may be implicitly performed on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning may not be performed on the current block.
[0515] 2) When the current block includes a lower boundary, partitioning of the current block may be restricted so that only horizontal binary tree partitioning is available for the current block. Horizontal binary tree partitioning may be implicitly performed on the current block.
[0516] 3) When the current block includes a right boundary, partitioning of the current block may be restricted so that only vertical binary tree partitioning is available for the current block.Vertical binary tree partitioning may be implicitly performed on the current block.
[0517] When the current block includes a boundary of a picture / sub-picture / slice / tile / partition, etc., encoding / decoding may not be performed on an area exceeding the boundary of the picture / sub-picture / slice / tile / partition, etc. within the current block, and thus at least one of the width and height of the area to be encoded / decoded within the current block may not be a power of 2 (2 N ).
[0518] For a region to be encoded / decoded where at least one of the width and height is not a power of 2 (2 N ), encoding / decoding can be performed in the form of a residual signal in which there is no area to be encoded / decoded.
[0519] When the current block includes at least one of the right boundary and the lower boundary, when the current block includes the right boundary and when the current block includes the lower boundary, at least one of the width and height of the area to be encoded / decoded may not be a power of 2 (2 N ) block information is entropy encoded / decoded.
[0520] Figure 10 It is a diagram showing that at least one of the width and height of the area to be encoded / decoded of the current block according to an embodiment of the present invention is not a power of 2 (2 N ) is an illustration of the situation. Figure 10 (a) is a diagram illustrating an example in which the current block includes both a right boundary and a lower boundary. Figure 10 (b) is a diagram illustrating an example in which the current block includes a lower boundary. Figure 10 (c) is a diagram illustrating an example in which the current block includes a right side boundary.
[0521] For the case where the current block includes at least one of the right boundary and the lower boundary, the current block includes at least one of the right boundary and the lower boundary, as shown in FIG. Figure 10 As shown, whether at least one of the width and height of the area to be encoded / decoded of the current block is not a power of 2 (2 N ) in the form of , or whether to perform encoding / decoding in at least one of the first example to the twelfth example can be encoded / decoded.
[0522] In other words, the boundary processing information can be entropy encoded / decoded in the form of a flag. In addition, the boundary processing information can indicate the following two situations.
[0523] When the boundary processing information has the first value, at least one of the width and height of the area to be encoded / decoded using the current block is not a power of 2 (2 N ) in the form of .
[0524] When the boundary processing information has the second value, at least one of the first to twelfth examples is used.
[0525] When the boundary processing information has the first value, encoding / decoding may be performed on a remaining area other than an area beyond the boundary within the current block.
[0526] In addition, when the boundary processing information has the second value, the current block can be implicitly partitioned by using at least one of the first to twelfth examples, or encoding / decoding of the current block can be performed by entropy encoding / decoding information about the partition.
[0527] In other words, the boundary processing information can be entropy encoded / decoded in index form. Furthermore, the boundary processing information can indicate the following N situations. Here, N can be determined based on at least one encoding parameter of the current block. Furthermore, N can be a value preset in the encoder / decoder, or a value signaled from the encoder to the decoder.
[0528] When the boundary processing information has the first value, at least one of the width and height of the area to be encoded / decoded using the current block is not a power of 2 (2 N ) in the form of .
[0529] When the boundary processing information has the second value, at least one of the first to twelfth examples is used.
[0530] When the boundary processing information has the third value, at least one of the first to twelfth examples other than the example for the case where the boundary processing information has the second value is used.
[0531] When the boundary processing information has an Nth value, at least one of the first to twelfth examples except for the example for the case where the boundary processing information has the second to N-1th values is used.
[0532] When the boundary processing information has the Mth value, an example combining at least two of the first to twelfth examples is used.
[0533] When the boundary processing information has the first value, encoding / decoding may be performed on a remaining area other than an area beyond the boundary within the current block.
[0534] In addition, when the boundary processing information does not have the first value, the current block can be implicitly partitioned by using at least one of the first to twelfth examples, or encoding / decoding of the current block can be performed by entropy encoding / decoding information about the partition.
[0535] By using at least one of the above examples of performing block partitioning on the boundaries of pictures / sub-pictures / strips / parallel blocks / tiles, etc., block partitioning can be effectively performed in a form that minimizes the determination of various complex conditions, thereby reducing the complexity of performing block partitioning.
[0536] In addition, the size of the minimum quadtree block may indicate the minimum size of the quadtree. In addition, the size of the maximum quadtree block may indicate the maximum size of the quadtree. In addition, the size of the minimum binary tree block may indicate the minimum size of the binary tree. In addition, the size of the maximum binary tree block may indicate the maximum size of the binary tree.
[0537] At least one of the minimum size of the quadtree block, the maximum size of the quadtree block, the minimum size of the binary tree block, and the maximum size of the binary tree block may be determined based on at least one encoding parameter of the current block. Furthermore, at least one of the minimum size of the quadtree block, the maximum size of the quadtree block, the minimum size of the binary tree block, and the maximum size of the binary tree block may be a value preset in the encoder / decoder or a value signaled from the encoder to the decoder.
[0538] At least one encoding parameter of a neighboring block in the block partition structure may be used as at least one encoding parameter of the current block.
[0539] For example, at least one of the information about unit partitioning, whether partitioning is performed in a quadtree form, whether partitioning is performed in a binary tree form, a partition direction (horizontal or vertical) in a binary tree form, a partition form (symmetric partitioning or asymmetric partitioning) in a binary tree form, a partition ratio in a binary tree form, whether partitioning is performed in a ternary tree form, a partition direction (horizontal or vertical) in a ternary tree form, a partition form (symmetric partitioning or asymmetric partitioning) in a ternary tree form, and a partition ratio in a ternary tree form of a neighboring block may be used as at least one of the information about unit partitioning, whether partitioning is performed in a quadtree form, whether partitioning is performed in a binary tree form, a partition direction in a binary tree form, a partition form in a binary tree form, a partition ratio in a binary tree form, whether partitioning is performed in a ternary tree form, a partition direction in a ternary tree form, a partition form in a ternary tree form, and a partition ratio in a ternary tree form of a current block.
[0540] At least one coding parameter of a neighboring block in the block partition structure may be used to derive at least one coding parameter of the current block.
[0541] For example, at least one of the information about unit partitioning, whether quadtree partitioning is performed, whether binary tree partitioning is performed, binary tree partitioning direction, binary tree partitioning form, binary tree partitioning ratio, whether ternary tree partitioning is performed, ternary tree partitioning direction, ternary tree partitioning form, and ternary tree partitioning ratio of the neighboring block can be used to derive at least one of the information about unit partitioning, whether quadtree partitioning is performed, whether binary tree partitioning is performed, binary tree partitioning direction, binary tree partitioning form, binary tree partitioning ratio, whether ternary tree partitioning is performed, ternary tree partitioning direction, ternary tree partitioning form, and ternary tree partitioning ratio of the current block.
[0542] Here, deriving at least one encoding parameter of the current block using at least one encoding parameter of the neighboring block may mean determining at least one encoding parameter of the current block by using at least one encoding parameter of the neighboring block.
[0543] At least one coding parameter of a neighboring block in the block partition structure may be used to derive at least one coding parameter of another block.
[0544] For example, at least one of the information about unit partitioning, whether quadtree partitioning is performed, whether binary tree partitioning is performed, binary tree partitioning direction, binary tree partitioning form, binary tree partitioning ratio, whether ternary tree partitioning is performed, ternary tree partitioning direction, ternary tree partitioning form, and ternary tree partitioning ratio of a neighboring block can be used to derive at least one of the information about unit partitioning, whether quadtree partitioning is performed, whether binary tree partitioning is performed, binary tree partitioning direction, binary tree partitioning form, binary tree partitioning ratio, whether ternary tree partitioning is performed, ternary tree partitioning direction, ternary tree partitioning form, and ternary tree partitioning ratio of another block.
[0545] Here, deriving at least one encoding parameter of another block using at least one encoding parameter of a neighboring block may mean determining at least one encoding parameter of another block by using at least one encoding parameter of the neighboring block.
[0546] At least one coding parameter of a neighboring block in the block partition structure may be used for intra prediction of the current block.
[0547] For example, at least one of the intra prediction mode, intra prediction direction, reference sample filtering method, prediction block filtering method, prediction block filter taps, and prediction block filter coefficients of a neighboring block may be used for intra prediction of the current block.
[0548] At least one coding parameter of a neighboring block in the block partition structure may be used for inter-frame prediction or motion compensation of the current block.
[0549] For example, at least one of the inter-frame prediction mode, motion information, motion vector, reference image index, inter-frame prediction direction, inter-frame prediction indicator, reference image list, motion vector predictor, motion vector candidate list, whether to use merge mode, merge candidate, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter taps, interpolation filter coefficients, the size of the motion vector of the neighboring block and the accuracy of the motion vector representation can be used for inter-frame prediction or motion compensation of the current block.
[0550] At least one coding parameter of a neighboring block in the block partition structure can be used for transformation, inverse transformation, quantization or inverse quantization of the current block. Here, transformation and inverse transformation can include at least one of primary transformation, secondary transformation, primary inverse transformation and secondary inverse transformation.
[0551] For example, at least one of the transform type, transform size, information on whether to use the first transform, information on whether to use the second transform, the first transform index, the second transform index, information on whether there is a residual signal, the coding block mode, the coding block flag, the quantization parameter, and the quantization matrix of the neighboring block can be used for the transform, inverse transform, quantization, or inverse quantization of the current block.
[0552] At least one coding parameter of a neighboring block in the block partition structure may be used for entropy encoding / decoding of the current block.
[0553] For example, at least one of the information about unit partitioning, whether quadtree partitioning is performed, whether binary tree partitioning is performed, a binary tree partition direction, a binary tree partition type, a binary tree partition ratio, whether ternary tree partitioning is performed, a ternary tree partition direction, a ternary tree partition type, and a ternary tree partition ratio of a neighboring block may be used to entropy encode / decode at least one of the information about unit partitioning, whether quadtree partitioning is performed, whether binary tree partitioning is performed, a binary tree partition direction, a binary tree partition type, a binary tree partition ratio, whether ternary tree partitioning is performed, a ternary tree partition direction, a ternary tree partition type, and a ternary tree partition ratio of a current block. Here, the entropy encoding / decoding may include determining a binarization / debinarization method, determining a context model, updating the context model, executing a normal mode, executing a bypass mode, and the like.
[0554] At least one encoding parameter of a neighboring block in the block partition structure may be used in a filtering method (such as an in-loop filter, a deblocking filter, an adaptive sample offset, an adaptive in-loop filter, etc.) performed on the current block.
[0555] For example, whether an in-loop filter is applied to a neighboring block, the in-loop filter coefficients, in-loop filter taps, in-loop filter shape, in-loop filter form, whether a deblocking filter is applied, the deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape, deblocking filter form, whether an adaptive sample offset is applied, an adaptive sample offset value, an adaptive sample offset category, an adaptive sample offset type, whether an adaptive in-loop filter is applied, the adaptive in-loop filter coefficients, the adaptive in-loop filter taps, the adaptive in-loop filter shape and the adaptive in-loop filter form can be used as at least one of the method of performing filtering on the current block (such as a deblocking filter, an adaptive sample offset, an adaptive in-loop filter, etc.).
[0556] At least one coding parameter of a neighboring block in the block partition structure can be used for intra-frame prediction, inter-frame prediction or motion compensation, entropy encoding / decoding, and filtering methods (such as in-loop filter, deblocking filter, adaptive sample offset, adaptive in-loop filter, etc.) of another neighboring block.
[0557] At least one coding parameter of a luma signal block in a block partition structure may be used as at least one coding parameter of a chroma signal block. Furthermore, at least one coding parameter of a luma signal block in a block partition structure may be used to derive at least one coding parameter of a chroma signal block. Furthermore, at least one coding parameter of a luma signal block in a block partition structure may be used for at least one of intra-frame prediction, inter-frame prediction, motion compensation, transform, inverse transform, quantization, inverse quantization, entropy coding / decoding, in-loop filtering, deblocking filtering, adaptive sample offset, and adaptive in-loop filtering of the chroma signal block.
[0558] At least one coding parameter of a Cb / Cr signal block in a block partition structure may be used as at least one coding parameter of a Cb / Cr signal block. Furthermore, at least one coding parameter of a Cb / Cr signal block in a block partition structure may be used to derive at least one coding parameter of a Cb / Cr block signal. Furthermore, at least one coding parameter of a Cb / Cr signal block in a block partition structure may be used for at least one of intra-frame prediction, inter-frame prediction, motion compensation, transform, inverse transform, quantization, inverse quantization, entropy coding / decoding, in-loop filter, deblocking filter, adaptive sample offset, and adaptive in-loop filter of the Cr / Cb signal block.
[0559] For each result block obtained by using the above block partition structure, at least one encoding parameter and information described below may be entropy encoded / decoded. In addition, the method indicated by the following information may be performed based on at least one of the block size and block shape of the at least one piece of entropy encoding / decoding information.
[0560] The motion information may include at least one of the following: a motion vector, a reference image index, an inter-frame prediction indicator, information about whether to use the skip mode (skip_flag), information about whether to use the merge mode (merge_flag), merge index information (merge_index), information about the motion vector resolution, information about overlapped block motion compensation, information about local illumination compensation, information about affine motion compensation, information about decoder-side motion vector derivation, and information about bidirectional optical flow.
[0561] The information about the motion vector resolution may be information indicating whether at least one of the motion vector and the difference between the motion vectors uses a specific resolution. Here, the resolution may indicate accuracy. In addition, the specific resolution may be set in at least one of integer pixel (integer pel) units, 1 / 2 pixel (1 / 2 pel) units, 1 / 4 pixel (1 / 4 pel) units, 1 / 8 pixel (1 / 8 pel) units, 1 / 16 pixel (1 / 16 pel) units, 1 / 32 pixel (1 / 32 pel) units, and 1 / 64 pixel (1 / 64 pel) units.
[0562] The information about overlapped block motion compensation may indicate whether to additionally use a motion vector of a neighboring block spatially adjacent to the current block in order to calculate a weighted sum of prediction blocks of the current block when performing motion compensation on the current block.
[0563] The information about local illumination compensation may be information indicating whether at least one of a weighting factor and an offset value is applied when generating a prediction block of the current block. Here, the weighting factor and the offset value may be values calculated based on a reference block.
[0564] The information about affine motion compensation may be information indicating whether an affine motion model is used when performing motion compensation on the current block. Herein, the affine motion model may be a model calculated by partitioning a block into sub-blocks using multiple parameters and calculating motion vectors of the sub-blocks using representative motion vectors.
[0565] The information about decoder-side motion vector derivation may be information indicating whether the motion vector required for motion compensation has been derived and used in the decoder. The information about the motion vector may not be entropy encoded or decoded based on the information about decoder-side motion vector derivation. Furthermore, when the information about decoder-side motion vector derivation indicates that the motion vector has been derived and used in the decoder, the information about the merge mode may be entropy encoded or decoded. In other words, the information about decoder-side motion vector derivation may indicate whether the merge mode is used in the decoder.
[0566] The information about the bidirectional optical flow may be information indicating whether motion compensation is performed by correcting the motion vector based on a pixel or sub-block basis. Entropy encoding / decoding of the pixel or sub-block based motion vector may not be performed based on the information about the bidirectional optical flow. Here, correcting the motion vector may be replacing the block-based motion vector with a pixel or sub-block based motion vector value.
[0567] Figure 11 is a diagram illustrating a flowchart of a method of decoding an image according to an embodiment of the present invention.
[0568] In S1101 , information about block partitions of a current block included in a current picture may be decoded from a bitstream.
[0569] Here, the information about the block partition may include at least one of information about the current block size, information about the current block depth, and information about whether partitioning is performed.
[0570] At S1102 , a partitioning method of the current block may be determined based on information about block partitioning.
[0571] Here, the partitioning method may include at least one of quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.
[0572] At S1103 , the current block may be partitioned by using the determined partitioning method.
[0573] Here, the partitioning method may be determined based on whether the current block includes a predetermined boundary.
[0574] Here, the predetermined boundary may include at least one of a right boundary, a lower boundary, a left boundary, and an upper boundary of a picture, a sub-picture, a slice, a tile, and a partition to which the current block belongs.
[0575] In addition, when the current block includes the right boundary and the lower boundary of the current picture and the width of the current block is greater than the size of the minimum quadtree block, the partitioning method may be determined as quadtree partitioning.
[0576] In addition, when the current block includes the right boundary of the current picture and the height of the current block is greater than the size of the maximum transform block, the partitioning method may be determined as partitioning other than the vertical binary tree partitioning.
[0577] In addition, when the current block includes a lower boundary of the current picture and the width of the current block is greater than the size of the maximum transform block, the partitioning method may be determined as partitioning other than the horizontal binary tree partitioning.
[0578] In addition, when the width of the current block is equal to or smaller than the size of the maximum transform block and the height of the current block is larger than the size of the maximum transform block, the partitioning method may be determined as partitioning other than vertical binary tree partitioning.
[0579] In addition, when the height of the current block is equal to or smaller than the size of the maximum transform block and the width of the current block is larger than the size of the maximum transform block, the partitioning method may be determined as partitioning other than the horizontal binary tree partitioning.
[0580] Here, the maximum transform block size may be a value signaled from the encoder to the decoder.
[0581] Figure 12 is a diagram illustrating a flowchart of an image encoding method according to an embodiment of the present invention.
[0582] In S1201 , a partitioning method of a current block included in a current picture may be determined.
[0583] At S1202 , the current block may be partitioned by using a determined partitioning method.
[0584] Here, the partitioning method may include at least one of quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.
[0585] Here, the partitioning method may be determined based on whether the current block includes a predetermined boundary.
[0586] Here, the predetermined boundary may include at least one of a right boundary, a lower boundary, a left boundary, and an upper boundary of a picture, a sub-picture, a slice, a tile, and a partition to which the current block belongs.
[0587] In addition, when the current block includes the right boundary and the lower boundary of the current picture and the width of the current block is greater than the size of the minimum quadtree block, the partitioning method may be determined as quadtree partitioning.
[0588] In addition, when the current block includes the right boundary of the current picture and the height of the current block is greater than the size of the maximum transform block, the partitioning method may be determined as partitioning other than the vertical binary tree partitioning.
[0589] In addition, when the current block includes a lower boundary of the current picture and the width of the current block is greater than the size of the maximum transform block, the partitioning method may be determined as partitioning other than the horizontal binary tree partitioning.
[0590] In addition, when the width of the current block is equal to or smaller than the size of the maximum transform block and the height of the current block is larger than the size of the maximum transform block, the partitioning method may be determined as partitioning other than vertical binary tree partitioning.
[0591] In addition, when the height of the current block is equal to or smaller than the size of the maximum transform block and the width of the current block is larger than the size of the maximum transform block, the partitioning method may be determined as partitioning other than the horizontal binary tree partitioning.
[0592] Here, the maximum transform block size may be a value signaled from the encoder to the decoder.
[0593] At S1203 , information on block partitioning of the above partitioning method may be encoded.
[0594] Here, the information about the block partition may include at least one of information about the current block size, information about the current block depth, and information about whether partitioning is performed.
[0595] When an image is partitioned based on at least one of a prediction unit (PU), a transform unit (TU), a prediction block (PB), and a transform block (TB), at least one of the above examples of the coding unit may be used.
[0596] The above examples of the present invention can be applied based on at least one size of a coding block, prediction block, block, and unit. Here, the size can be defined as a minimum size and / or a maximum size so that the above examples are applied, or it can be defined as a fixed size to which the above examples are applied. In addition, in the above examples, the first example can be applied to the first size, and the second example can be applied to the second size. In other words, the above examples can be combined based on size. In addition, the above examples of the present invention can 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 examples can be applied when the block size is included in a specific range.
[0597] In addition, the above examples of the present invention can be applied when the size is equal to or greater than the minimum size and equal to or less than the maximum size. Here, the minimum size and maximum size can be one size of a coding block, a prediction block, a block, and a unit, respectively. In other words, the minimum size of a block and the maximum size of a block can be different from each other. For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than the minimum size of a prediction block and equal to or less than the maximum size of a coding block.
[0598] For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than 8×8. For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than 16×16. For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than 32×32. For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than 64×64. For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than 128×128. For example, the above examples of the present invention can be applied when the size of the current block is 4×4. For example, the above examples of the present invention can be applied when the size of the current block is equal to or less than 8×8. For example, the above examples of the present invention can be applied when the size of the current block is equal to or less than 16×16. For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than 8×8 and equal to or less than 16×16. For example, the above examples of the present invention can be applied when the size of the current block is equal to or greater than 16×16 and equal to or less than 64×64.
[0599] The above examples of the present invention can be applied according to the time layer. A separate identifier for identifying the time layer to which the above examples may be applied can be signaled, and the above examples can be applied to the time layer specified by the corresponding identifier. Here, the identifier can be defined as the minimum layer and / or maximum layer to which the above examples may be applied, or can be defined as indicating a specific time layer to which the above examples may be applied.
[0600] For example, the above example can be applied only when the temporal layer of the current picture is the lowest layer. For example, the above example can be applied only when the identifier of the temporal layer of the current picture is zero. For example, the above example can be applied only when the identifier of the temporal layer of the current picture is 1. For example, the above example can be applied only when the temporal layer of the current picture is the highest layer.
[0601] As described in the above examples of the present invention, a reference picture set used when generating a reference picture list (reference picture list construction) and modifying a reference picture list may use at least one of reference picture lists L0, L1, L2, and L3.
[0602] According to the above example of the present invention, when calculating the boundary strength in the deblocking filter, at least 1 to at most N motion vectors of the current block can be used. Here, N can represent a positive integer equal to or greater than 1 (such as 2, 3, 4, etc.).
[0603] The above example of the present invention can be applied when the motion vector has at least one of a 16-pixel (16pel) unit, an 8-pixel (8pel) unit, a 4-pixel (4pel) unit, an integer-pixel (integer-pel) unit, a 1 / 2-pixel (1 / 2pel) unit, a 1 / 4-pixel (1 / 4pel) unit, a 1 / 8-pixel (1 / 8pel) unit, a 1 / 16-pixel (1 / 16pel) unit, a 1 / 32-pixel (1 / 32pel) unit, and a 1 / 64-pixel (1 / 64pel) unit. In addition, when encoding / decoding the current block, the motion vector can be selectively used for each pixel unit.
[0604] A stripe type to which the above examples of the present invention may be applied may be defined, and the above examples of the present invention may be applied according to the stripe type.
[0605] The block shapes of the above examples to which the present invention may be applied may be square or non-square.
[0606] The above examples can be performed in the same manner in the encoder and the decoder.
[0607] An image may be encoded / decoded by using at least one of the above examples or by combining at least two of the above examples.
[0608] The order in which the above examples are applied in the encoder and decoder may be different, or the order in which the examples are applied in the encoder and decoder may be the same.
[0609] The above examples may be performed for each of the luminance signal and the chrominance signal, or may be performed for the luminance signal and the chrominance signal in the same manner.
[0610] At least one of the syntax elements (such as flags, indices, etc.) entropy-encoded in the encoder and entropy-decoded in the decoder may use at least one of the following: binarization, debinarization, and entropy encoding / decoding methods. Here, the binarization, debinarization, and entropy encoding / decoding methods may include at least one of the following: a binarization / debinarization method of a signed 0th-order exp_Golomb (se(v)), a binarization / debinarization method of a signed kth-order exp_Golomb (sek(v)), a binarization / debinarization method of an unsigned positive integer 0th-order exp_Golomb (ue(v)), a binarization / debinarization method of an unsigned positive integer kth-order exp_Golomb (uek(v)). ), fixed-length binarization / debinarization method (f(n)), truncated Rice binarization / debinarization method or truncated unary binarization / debinarization method (tu(v)), truncated binary binarization / debinarization method (tb(v)), context-based adaptive arithmetic coding / decoding method (ae(v)), byte-by-byte bit string (b(8)), signed integer binarization / debinarization method (i(n)), unsigned integer binarization / debinarization method (u(n)), and unary binarization / debinarization method.
[0611] Encoding / decoding of the current block is not limited to any one of the above examples, and specific examples of the above examples or a combination thereof may be applied to encoding / decoding of the current block.
[0612] 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, and 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.
[0613] The embodiments include various aspects of the examples. It is not possible to describe all possible combinations for each aspect, but those skilled in the art will be able to recognize different combinations. Therefore, the present invention includes all replacements, modifications and changes within the scope of the claims.
[0614] The embodiments of the present invention can 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 they may be well known to those skilled in the art in the field of computer software technology. Examples of computer-readable recording media include: magnetic recording media (such as hard disks, floppy disks, and magnetic 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 configured 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 can be configured to be operated by one or more software modules to perform the processing according to the present invention, or vice versa.
[0615] Although the present invention has been described based on 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.
[0616] 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 should fall within the scope and spirit of the present invention.
[0617] Industrial Applicability
[0618] The present invention can be used to encode or decode images.
Claims
1. A method for decoding an image, the method comprising: decoding information about block partitions of a current block included in a current picture from a bitstream; determining a partitioning method for the current block based on the information; as well as By using the determined partitioning method to partition the current block, The partitioning method includes at least one of quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning and vertical ternary tree partitioning. The partitioning method is determined based on whether the current block includes a predetermined boundary. wherein, in response to the current block including a right boundary of the current picture and a height of the current block being greater than a size of a maximum transform block, the partitioning method is determined to be a partitioning method other than a vertical binary tree partitioning method, wherein, in response to the current block including a lower boundary of the current picture and the width of the current block being greater than the size of the maximum transform block, the partitioning method is determined to be a partitioning method other than a horizontal binary tree partitioning method, and The size of the maximum transform block is 64.
2. The method according to claim 1, wherein The information about block partitioning includes at least one of information about a size of a current block, information about a depth of the current block, and information about whether partitioning is performed.
3. The method according to claim 1, wherein The predetermined boundary includes at least one of the following boundaries: a right boundary, a lower boundary, a left boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a tile, and a partition to which the current block belongs.
4. A method for encoding an image, the method comprising: Determining a partitioning method for a current block included in a current picture; Partition the current block by using a determined partitioning method; as well as encodes information about the block partitioning method, The partitioning method includes at least one of quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning and vertical ternary tree partitioning. The partitioning method is determined based on whether the current block includes a predetermined boundary. wherein, in response to the current block including a right boundary of the current picture and a height of the current block being greater than a size of a maximum transform block, the partitioning method is determined to be a partitioning method other than a vertical binary tree partitioning method, wherein, in response to the current block including a lower boundary of the current picture and the width of the current block being greater than the size of the maximum transform block, the partitioning method is determined to be a partitioning method other than a horizontal binary tree partitioning method, and The size of the maximum transform block is 64.
5. The method according to claim 4, wherein: The information about block partitioning includes at least one of information about a size of a current block, information about a depth of the current block, and information about whether partitioning is performed.
6. The method of claim 4, wherein: The predetermined boundary includes at least one of the following boundaries: a right boundary, a lower boundary, a left boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a tile, and a partition to which the current block belongs.
7. A non-transitory computer-readable medium storing a bitstream generated by an encoding device through an encoding method, the method comprising: Determining a partitioning method for a current block included in a current picture; Partition the current block by using a determined partitioning method; as well as encodes information about the block partitioning method, The partitioning method includes at least one of quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning, wherein the partitioning method is determined based on whether the current block includes a predetermined boundary, wherein, in response to the current block including a right boundary of the current picture and a height of the current block being greater than a size of a maximum transform block, the partitioning method is determined to be a partitioning method other than a vertical binary tree partitioning method, wherein, in response to the current block including a lower boundary of the current picture and the width of the current block being greater than the size of the maximum transform block, the partitioning method is determined to be a partitioning method other than a horizontal binary tree partitioning method, and The size of the maximum transform block is 64.
Citation Information
Patent Citations
Method and device for encoding or decoding encoding unit of picture outline
WO2018070550A1