Method and apparatus for encoding / decoding image

By employing a flexible block partitioning method and utilizing block shapes and boundaries of various aspect ratios, the problem of low image encoding/decoding efficiency in existing technologies is solved, achieving efficient image encoding/decoding and bitstream storage.

CN120956891APending Publication Date: 2025-11-14ELECTRONICS & TELECOMM RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511124180.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2018-09-19
Filing Date
2019-09-19
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing image encoding/decoding technologies are inefficient in high-resolution and high-quality video transmission and storage, especially when using a block structure in the form of a quadtree, which cannot effectively utilize block shapes of various aspect ratios and the boundaries of frames/subframes/strips/parallel blocks/blocks for block partitioning.

Method used

It adopts a block-based partitioning method, which determines the partitioning method by whether the current block includes a predetermined boundary. It supports quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning, thereby improving encoding/decoding efficiency.

Benefits of technology

It improves image encoding/decoding efficiency and reduces transmission and storage costs through flexible block partitioning methods and boundary utilization, making it suitable for encoding/decoding high-resolution and high-quality video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956891A_ABST
    Figure CN120956891A_ABST
Patent Text Reader

Abstract

A method and apparatus for encoding / decoding an image are provided. The method for decoding an image comprises the steps of: decoding information on a block partition 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, where the partitioning method is determined based on whether the current block includes a predetermined boundary.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application filed on September 19, 2019, with application number "201980061686.6" and titled "Method and apparatus for encoding / decoding images by using boundary processing and recording medium for storing bit streams". Technical Field

[0002] This invention relates to a method and apparatus for encoding / decoding images, and a recording medium for storing bitstreams. More specifically, this invention relates to a method and apparatus for encoding / decoding images based on a block structure, and a recording medium for storing bitstreams. Background Technology

[0003] Recently, the demand for high-resolution and high-quality video (such as high-definition (HD) and ultra-high-definition (UHD) video) has increased across various application areas. Due to the higher resolution and quality of video data, the data volume increases significantly relative to existing video data. Therefore, transmission and storage costs increase when using media (such as existing wired and wireless broadband lines) to transmit video data or storing video data in existing storage media. To address these issues arising from the increasing resolution and quality of image data, efficient image encoding / decoding technologies are needed for higher resolution and higher quality images.

[0004] Image compression techniques encompass various methods, including: inter-frame prediction, which predicts pixel values ​​included in the current frame from previous or subsequent frames; intra-frame prediction, which predicts pixel values ​​included in the current frame using pixel information from the current frame; transform and quantization techniques for compressing the energy of residual signals; entropy coding, which assigns short codes to values ​​with high frequency of occurrence and long codes to values ​​with low frequency of occurrence; and so on. Image data can be efficiently compressed using such image compression techniques and can then be transmitted or stored.

[0005] Traditional image encoding / decoding uses only a block structure in the form of a quadtree, which limits its ability to improve encoding efficiency. Summary of the Invention

[0006] Technical issues

[0007] The purpose of this invention is to provide an image encoding / decoding method and device for improving image encoding / decoding efficiency.

[0008] 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 by effectively performing block partitioning at the boundaries of frames / sub-frames / strips / parallel blocks / blocks, etc.

[0009] Another object of the present invention is to provide a recording medium for storing bitstreams generated by the image encoding / decoding method and apparatus of the present invention.

[0010] Technical solution

[0011] According to the present invention, a method for decoding an image is provided, the method comprising: decoding from a bitstream information about block partitioning of a current block included in a current frame; determining a partitioning method for the current block based on the information; and partitioning the current block using the determined partitioning method, wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.

[0012] According to one embodiment, the information regarding block partitioning includes at least one of the following: information about the size of the current block, information about the depth of the current block, and information about whether partitioning is performed.

[0013] According to one embodiment, the partitioning method includes at least one of the following partitions: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.

[0014] According to one embodiment, the predetermined boundary includes at least one of the following boundaries: the right boundary, bottom boundary, left boundary, and top boundary of at least one of the following: the screen to which the current block belongs, the sub-screen, the strip, the parallel block, and the block.

[0015] According to one embodiment, when the current block includes the right and bottom boundaries of the current screen and the width of the current block is greater than the size of the smallest quadtree block, the partitioning method is determined to be quadtree partitioning.

[0016] According to one embodiment, when the current block includes the right boundary of the current frame and the height of the current block is greater than the size of the largest transform block, the partitioning method is determined to be a partition other than the vertical binary tree partitioning.

[0017] According to one embodiment, when the current block includes the lower boundary of the current frame and the width of the current block is greater than the size of the largest transform block, the partitioning method is determined to be a partition other than the horizontal binary tree partitioning.

[0018] According to one embodiment, when the width of the current block is equal to or less than the size of the maximum transform block and the height of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be a partition other than the vertical binary tree partition.

[0019] According to one embodiment, when the height of the current block is equal to or less than the size of the maximum transform block and the width of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be a partition other than the horizontal binary tree partition.

[0020] According to one embodiment, the size of the maximum transform block can be a value sent from the encoder to the decoder by a signal.

[0021] Furthermore, according to the present invention, a method for encoding an image is provided, the method comprising: determining a partitioning method for a current block included in a current frame; partitioning the current block using the determined partitioning method; and encoding information about the block partitioning of the partitioning method, wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.

[0022] According to one embodiment, the information regarding block partitioning includes at least one of the following: information about the size of the current block, information about the depth of the current block, and information about whether partitioning is performed.

[0023] According to one embodiment, the partitioning method includes at least one of the following partitions: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.

[0024] According to one embodiment, the predetermined boundary includes at least one of the following boundaries: the right boundary, bottom boundary, left boundary, and top boundary of at least one of the following: the screen to which the current block belongs, the sub-screen, the strip, the parallel block, and the block.

[0025] According to one embodiment, when the current block includes the right and bottom boundaries of the current screen and the width of the current block is greater than the size of the smallest quadtree block, the partitioning method is determined to be quadtree partitioning.

[0026] According to one embodiment, when the current block includes the right boundary of the current frame and the height of the current block is greater than the size of the largest transform block, the partitioning method is determined to be a partition other than the vertical binary tree partitioning.

[0027] According to one embodiment, when the current block includes the lower boundary of the current frame and the width of the current block is greater than the size of the largest transform block, the partitioning method is determined to be a partition other than the horizontal binary tree partitioning.

[0028] According to one embodiment, when the width of the current block is equal to or less than the size of the maximum transform block and the height of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be a partition other than the vertical binary tree partition.

[0029] According to one embodiment, when the height of the current block is equal to or less than the size of the maximum transform block and the width of the current block is greater than the size of the maximum transform block, the partitioning method is determined to be a partition other than the horizontal binary tree partition.

[0030] According to one embodiment, the size of the maximum transform block can be a value sent from the encoder to the decoder by a signal.

[0031] Furthermore, according to the present invention, a computer-readable non-volatile recording medium for storing image data for an image decoding method is provided, wherein the image data includes information about block partitioning of a current block included in the current frame, and in the image decoding method, the information about block partitioning is used to determine a partitioning method for the current block, the determined partitioning method is used to partition the current block, and the partitioning method is determined based on whether the current block includes a predetermined boundary.

[0032] Beneficial effects

[0033] To improve image encoding / decoding efficiency, a method and apparatus are provided for performing at least one of block partitioning using block shapes with various aspect ratios and at the boundaries of picture / subpicture / strip / parallel block / block, etc., as well as a recording medium for storing bit streams.

[0034] According to the present invention, an image encoding / decoding method and apparatus for improving image encoding / decoding efficiency are provided.

[0035] In addition, according to the present invention, a method and apparatus are provided for improving image encoding / decoding efficiency by using block shapes with various aspect ratios or by effectively performing block partitioning at the boundaries of frames / sub-frames / strips / parallel blocks / blocks, etc.

[0036] In addition, according to the present invention, a recording medium is provided for storing bitstreams generated by the image encoding / decoding method and apparatus of the present invention. Attached Figure Description

[0037] Figure 1 This is a block diagram illustrating the configuration of an embodiment of an encoding device to which the present invention is applied.

[0038] Figure 2 This is a block diagram of an embodiment of the decoding device using the present invention.

[0039] Figure 3 It is a schematic diagram illustrating the partition structure when an image is encoded and decoded.

[0040] Figure 4 This is a diagram illustrating an example of intra-frame prediction.

[0041] Figure 5This is a diagram illustrating an example of inter-frame prediction.

[0042] Figure 6 It is a diagram showing the transformation and quantization.

[0043] Figure 7 This is a diagram showing reference samples that can be used for intra-frame prediction.

[0044] Figure 8 This is a diagram illustrating the boundaries of a screen / sub-screen / strip / parallel block / block, etc., according to an embodiment of the present invention.

[0045] Figure 9 This is a diagram illustrating a partitioning method according to an embodiment of a block based on the present invention.

[0046] Figure 10 It is shown that at least one of the width and height of the region to be encoded / decoded in the current block according to an embodiment of the present invention is not a power of 2 (2^N). N A diagram illustrating the situation.

[0047] Figure 11 This is a flowchart illustrating a method for decoding an image according to an embodiment of the present invention.

[0048] Figure 12 This is a flowchart illustrating an image encoding method according to an embodiment of the present invention. Detailed Implementation

[0049] Various modifications can be made to this invention, and various embodiments of the invention exist, wherein examples of various embodiments of the invention will now be provided and described in detail with reference to the accompanying drawings. However, the invention is not limited thereto, although exemplary embodiments may be interpreted as including all modifications, equivalents, or substitutions within the technical concept and scope of the invention. In various respects, similar reference numerals refer to the same or similar functions. In the drawings, the shape and size of elements may be exaggerated for clarity. In the following detailed description of the invention, reference is made to the accompanying drawings, which illustrate specific embodiments in which the invention may be practiced. These embodiments have been described in sufficient detail to enable those skilled in the art to practice this disclosure. It should be understood that the various embodiments of this disclosure, though different, are not necessarily mutually exclusive. For example, specific features, structures, and characteristics described herein in conjunction with one embodiment may be implemented in other embodiments without departing from the spirit and scope of this disclosure. Furthermore, it should be understood that the position or arrangement of various elements within each disclosed embodiment may be modified without departing from the spirit and scope of this disclosure. Therefore, the following detailed description should not be considered limiting, and the scope of this disclosure is defined only by the appended claims (and, where appropriate, the full scope of the equivalents claimed in the claims).

[0050] The terms “first,” “second,” etc., used in this document may be used to describe various components, but the components should not be construed as limited to these terms. These terms are used only to distinguish one component from other components. For example, without departing from the scope of the invention, a “first” component may be named a “second” component, and a “second” component may similarly be named a “first” component. The term “and / or” includes a combination of multiple items or any one of multiple items.

[0051] It will be understood that in this specification, when an element is simply referred to as "connected to" or "coupled to" another element rather than "directly connected to" or "directly coupled to" another element, the element may be "directly connected to" or "directly coupled to" another element, or may be connected to or coupled to another element in the presence of other elements between the element and the other element. Conversely, it should be understood that when an element is referred to as "directly coupled to" or "directly connected to" another element, there are no intermediate elements.

[0052] Furthermore, the constituent parts shown in the embodiments of the present invention are illustrated independently to represent different functional characteristics. Therefore, this does not mean that each constituent part is constructed as a separate hardware or software unit. In other words, for convenience, each constituent part includes each of the listed constituent parts. Thus, at least two constituent parts of each constituent part can be combined to form one constituent part, or a constituent part can be partitioned into multiple constituent parts to perform each function. Embodiments in which each constituent part is combined and embodiments in which each constituent part is partitioned are also included within the scope of the present invention without departing from its spirit.

[0053] The terminology used in this specification is for describing particular embodiments only and is not intended to limit the invention. Unless the context clearly distinguishes them, expressions used in the singular include those used in the plural. In this specification, it will be understood that terms such as “comprising,” “having,” etc., are intended to indicate the presence of the features, numbers, steps, actions, elements, components, 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, components, or combinations thereof may be present or added. In other words, when a particular element is referred to as “comprising,” it does not exclude elements other than the corresponding element, but rather includes additional elements that may be included within the embodiments of the invention or within the scope of the invention.

[0054] Furthermore, some components may not be essential for performing the basic functions of the invention, but rather selective components that only improve its performance. The invention can be implemented by including only the essential components necessary for achieving the essence of the invention, excluding components used to improve performance. Structures that include only the essential components and exclude selective components used only to improve performance are also included within the scope of the invention.

[0055] In the following, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing exemplary embodiments of the invention, well-known functions or structures will not be described in detail, as they may unnecessarily obscure the understanding of the invention. Like constituent elements in the drawings are indicated by like reference numerals, and repeated descriptions of like elements will be omitted.

[0056] In the following text, an image may refer to a frame that constitutes a video, or it may refer to the video itself. For example, "encoding or decoding an image or both" may refer to "encoding or decoding a moving image or both," and may also refer to "encoding or decoding an image within an image of a moving image or both."

[0057] In the following text, the terms "moving images" and "video" are used to mean the same thing and are interchangeable.

[0058] In the following text, the target image can be an encoded target image that serves as an encoding target and / or a decoded target image that serves as a decoding target. Additionally, the target image can be an input image input to an encoding device and an input image input to a decoding device. Here, the target image may have the same meaning as the current frame.

[0059] In the following text, the terms “image,” “picture,” “frame,” and “screen” may be used as having the same meaning and may be used interchangeably with each other.

[0060] In the following text, a target block can be an encoded target block that serves as the encoding target and / or a decoded target block that serves as the decoding target. Additionally, a target block can be the current block that serves as the target of the current encoding and / or decoding. For example, the terms "target block" and "current block" can be used to mean the same thing and can be used interchangeably.

[0061] In the following text, the terms "block" and "unit" may be used to mean the same thing and may be used interchangeably. Alternatively, "block" may refer to a specific unit.

[0062] In the following text, the terms “region” and “fragment” are used interchangeably.

[0063] In the following text, a specific signal can be a signal representing a specific block. For example, the original signal can be a signal representing the target block. The prediction signal can be a signal representing the prediction block. The residual signal can be a signal representing the residual block.

[0064] In this embodiment, each of the following can have a value: information, data, flags, indexes, elements, and attributes. A value of "0" for information, data, flags, indexes, elements, and attributes can represent logical false or a first predefined value. In other words, the values ​​"0", false, logical false, and the first predefined value can be interchanged. A value of "1" for information, data, flags, indexes, elements, and attributes can represent logical true or a second predefined value. In other words, the values ​​"1", true, logical true, and the second predefined value can be interchanged.

[0065] When variables i or j are used to represent columns, rows, or indices, 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, columns, rows, indices, etc., can be counted starting from 0, or they can be counted starting from 1.

[0066] Terminology Description

[0067] Encoder: Represents the device that performs encoding. That is, it represents the encoding device.

[0068] Decoder: Represents the device that performs decoding. That is, it represents the decoding device.

[0069] A block is an M×N sample array. Here, M and N can represent positive integers, and a block can represent a two-dimensional sample array. A block can refer to a unit. The current block can represent a coding target block that becomes the target during encoding, or a decoding target block that becomes the target during decoding. In addition, the current block can be at least one of a coding block, a prediction block, a residual block, and a transform block.

[0070] Samples are the basic units that make up a block. Based on the bit depth (Bd), samples can be represented as numbers from 0 to 2. Bd The value is -1. In this invention, a sample point can be used to represent a pixel. That is, a sample point, pel, and pixel can have the same meaning.

[0071] Unit: 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. Alternatively, a unit can represent a sub-partition unit when a single image is partitioned into sub-partition units during encoding or decoding. That is, an image can be partitioned into multiple units. When encoding and decoding an image, predetermined processing can be performed for each unit. A single unit can be partitioned into sub-units smaller than the unit's size. Depending on the 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, etc. Furthermore, to distinguish a unit from a block, a unit can include a luma component block, a chroma component block associated with the luma component block, and syntax elements for each chroma component block. Units can have various sizes and shapes; specifically, the shape of a unit can be a two-dimensional geometric shape, such as a square, rectangle, trapezoid, triangle, pentagon, etc. In addition, the cell information may include at least one of the following: cell type indicating coding cell, prediction cell, transformation cell, etc., cell size, cell depth, and the order of encoding and decoding of the cell.

[0072] A coding tree unit is a single coding tree block configured with the luminance component Y and two coding tree blocks associated with the chrominance components Cb and Cr. Additionally, a coding tree unit can represent a block and the syntax elements for each block. Each coding tree unit can be partitioned using at least one of quadtree partitioning, binary tree partitioning, and ternary tree partitioning methods to configure lower-level units such as coding units, prediction units, transform units, etc. A coding tree unit can be used as a term to specify a sample block that becomes a processing unit when encoding / decoding an image as an input image. Here, quadtree can represent a quadtree.

[0073] When the size of the coded block is within a predetermined range, partitioning can be performed using only quadtree partitioning. Here, the predetermined range can be defined as at least one of the maximum and minimum sizes of the coded block that can be partitioned using only quadtree partitioning. Information indicating the maximum / minimum size of the coded block that allows quadtree partitioning can be transmitted via a signal in the bitstream, and said information can be transmitted via a signal in at least one unit of sequence, frame parameters, parallel block groups, or stripes (fragments). Optionally, the maximum / minimum size of the coded block can be a predetermined fixed size in the encoder / decoder. For example, when the size of the coded block corresponds to 256×256 to 64×64, partitioning using only quadtree partitioning is possible. Optionally, when the size of the coded block is greater than the size of the maximum transform block, partitioning using only quadtree partitioning is possible. Here, the block to be partitioned can be at least one of a coded block and a transform block. In this case, information indicating the partitioning of the coded block (e.g., split_flag) can be a flag indicating whether quadtree partitioning is performed. When the size of the coded block falls within a predetermined range, partitioning using only binary or ternary tree partitioning is possible. In this case, the above description of quadtree partitioning can be applied in the same way to binary tree partitioning or ternary tree partitioning.

[0074] Encoding block: Can be used as a term to specify any one of the Y encoding block, Cb encoding block, and Cr encoding block.

[0075] Neighboring blocks: These can represent blocks adjacent to the current block. A block adjacent to the current block can be a block that touches the boundary of the current block, or a block located within a predetermined distance from the current block. A neighboring block can also represent a block adjacent to a vertex of the current block. Here, a block adjacent to a vertex of the current block can be a block that is vertically adjacent to a block horizontally adjacent to the current block, or a block that is horizontally adjacent to a block vertically adjacent to the current block.

[0076] Reconstructing a neighboring block: This can represent a neighboring block that is adjacent to the current block and has already been spatially / temporally encoded or decoded. Here, reconstructing a neighboring block can represent reconstructing a neighboring unit. A reconstructed spatial neighboring block can be a block within the current frame that has already been reconstructed through encoding or decoding, or both. A reconstructed temporal neighboring block is a block within a reference frame that is located at the position corresponding to the current block in the current frame, or a neighboring block of that block.

[0077] Cell depth: Represents the degree of cell partitioning. In a tree structure, the highest node (root node) corresponds to the first unpartitioned cell. Additionally, the highest node can have the minimum depth value. In this case, the depth of the highest node can be level 0. A node with a depth of level 1 represents a cell created by partitioning the first cell for the first time. A node with a depth of level 2 represents a cell created by partitioning the first cell twice. A node with a depth of level n represents a cell created by partitioning the first cell n times. Leaf nodes can be the lowest-level nodes and cannot be further partitioned. The depth of a leaf node can be the highest level. For example, the predefined value for the highest level could be 3. The root node can have the lowest depth, and the leaf nodes can have the deepest depth. Furthermore, when cells are represented as a tree structure, the level in which the cell exists can represent the cell depth.

[0078] Bitstream: A bitstream that can represent encoded image information.

[0079] Parameter set: Corresponds to the header information in the configuration within the bitstream. At least one of the video parameter set, sequence parameter set, frame parameter set, and adaptive parameter set may be included in the parameter set. Furthermore, the parameter set may include a slice header, a tile group header, and tile header information. The term "tile group" refers to a set of parallel tiles and has the same meaning as a slice.

[0080] An adaptive parameter set refers to a set of parameters that can be shared and referenced by different frames, sub-frames, stripes, parallel block groups, parallel blocks, or blocks. Furthermore, sub-frames, stripes, parallel block groups, parallel blocks, or blocks within a frame can refer to different adaptive parameter sets to utilize information from those sets.

[0081] Regarding adaptive parameter sets, sub-pictures, stripes, parallel block groups, parallel blocks, or segments in a frame can be identified by using the identifier of the corresponding adaptive parameter set.

[0082] Regarding adaptive parameter sets, stripes, parallel block groups, parallel blocks, or segments in a sub-screen can be identified by using the identifier of the corresponding adaptive parameter set.

[0083] Regarding adaptive parameter sets, parallel blocks or segments within a strip can be identified by using the identifier of the corresponding adaptive parameter set.

[0084] Regarding adaptive parameter sets, blocks within a parallel block can be identified by using the identifier of the corresponding adaptive parameter set.

[0085] The parameter set or header of a sub-screen can include information about an adaptive parameter set identifier. Therefore, an adaptive parameter set corresponding to the adaptive parameter set identifier can be used in a sub-screen.

[0086] The parameter set or header of a parallel block may include an adaptive parameter set identifier, allowing the use of an adaptive parameter set corresponding to the adaptive parameter set identifier within the parallel block.

[0087] The header of a block can include information about an adaptive parameter set identifier, allowing the use of an adaptive parameter set corresponding to the adaptive parameter set identifier within the block.

[0088] The screen can be divided into one or more parallel block rows and one or more parallel block columns.

[0089] A sub-screen can be divided into one or more parallel block rows and one or more parallel block columns within the screen. A sub-screen can be a rectangular / square region within the screen and may include one or more CTUs. Additionally, at least one or more parallel blocks / strips / strips may be included within a sub-screen.

[0090] A parallel block can be a rectangular / square region within the frame and may include one or more CTUs. Additionally, a parallel block can be divided into one or more sub-blocks.

[0091] A block can represent one or more CTU lines within a parallel block. A parallel block can be partitioned into one or more blocks, and each block can have at least one or more CTU lines. A parallel block that cannot be partitioned into two or more blocks can be represented as a block.

[0092] A strip may include one or more parallel blocks within a frame, and may include one or more sub-blocks within a parallel block.

[0093] Explanation: This could mean determining the value of a syntax element by performing entropy decoding, or it could mean entropy decoding itself.

[0094] Symbols: can represent at least one of the syntax elements, encoding parameters, and transform coefficient values ​​of the encoding / decoding target unit. Additionally, symbols can represent entropy encoding targets or entropy decoding results.

[0095] Prediction mode: This can be information indicating the mode that is encoded / decoded using intra-frame prediction or the mode that is encoded / decoded using inter-frame prediction.

[0096] Prediction Unit: A basic unit that can be represented when performing prediction (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 with smaller sizes, or it can be partitioned into multiple lower-level prediction units. Multiple partitions can be the basic units when performing prediction or compensation. Partitions generated by partitioning prediction units can also be prediction units.

[0097] Prediction cell partitioning: can represent the shape obtained by partitioning prediction cells.

[0098] A reference frame list can refer to a list of one or more reference frames used for inter-frame prediction or motion compensation. Several types of reference frame lists are available, including LC (list combination), L0 (list 0), L1 (list 1), L2 (list 2), and L3 (list 3).

[0099] The inter-frame prediction indicator can indicate the direction of inter-frame prediction for the current block (unidirectional prediction, bidirectional prediction, etc.). Optionally, the inter-frame prediction indicator can indicate the number of reference frames used to generate the prediction blocks for the current block. Optionally, the inter-frame prediction indicator can indicate the number of prediction blocks used when performing inter-frame prediction or motion compensation for the current block.

[0100] The prediction list utilization flag indicates whether at least one reference frame from a specific reference frame list is used to generate a prediction block. The prediction list utilization flag can be used to derive an inter-frame prediction indicator, and conversely, the inter-frame 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 a reference frame from the reference frame list is not used to generate a prediction block. On the other hand, when the prediction list utilization flag has a second value of one (1), it indicates that the reference frame list is used to generate a prediction block.

[0101] The reference screen index can refer to the index of a specific reference screen in the reference screen list.

[0102] A reference frame can refer to a frame referenced by a specific block for the purpose of inter-frame prediction or motion compensation for that specific block. Alternatively, a reference frame can be a frame that includes a reference block referenced by the current block for inter-frame prediction or motion compensation. In the following text, the terms "reference frame" and "reference picture" have the same meaning and can be used interchangeably.

[0103] Motion vectors can be two-dimensional vectors used for inter-frame prediction or motion compensation. A motion vector can represent the offset between the encoded / decoded 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.

[0104] The search range can be a two-dimensional region searched during inter-frame prediction to retrieve motion vectors. For example, the size of the search range can be M×N. Here, M and N are both integers.

[0105] Motion vector candidates can refer to a block of prediction candidates or the motion vectors within a block of prediction candidates when making predictions about motion vectors. Additionally, motion vector candidates can be included in a list of motion vector candidates.

[0106] A motion vector candidate list can represent a list consisting of one or more motion vector candidates.

[0107] A motion vector candidate index can represent an indicator that points to a motion vector candidate in the motion vector candidate list. Alternatively, it can be an index of a motion vector predictor.

[0108] Motion information may include at least one of the following: motion vector, reference frame index, inter-frame prediction indicator, prediction list utilization flag, reference frame list information, reference frame, motion vector candidate, motion vector candidate index, merge candidate, and merge index.

[0109] A merge candidate list can represent a list consisting of one or more merge candidates.

[0110] Merge candidates can represent spatial merge candidates, temporal merge candidates, combined merge candidates, combined double prediction merge candidates, or zero merge candidates. Merge candidates may include motion information such as inter-frame prediction indicators, reference frame indices for each list, motion vectors, prediction list utilization flags, and inter-frame prediction indicators.

[0111] The merge index can represent an indicator pointing to a merge candidate in the merge candidate list. Optionally, the merge index can indicate a block in a reconstructed block that is spatially / temporally adjacent to the current block, from which merge candidates have been derived. Optionally, the merge index can indicate at least one piece of motion information for a merge candidate.

[0112] Transform unit: This can represent the basic unit used when performing encoding / decoding (such as transform, inverse transform, quantization, dequantization, transform coefficient encoding / decoding) on ​​the residual signal. A single transform unit can be partitioned into multiple lower-level transform units with smaller sizes. Here, the transform / inverse transform may include at least one of first transform / first inverse transform and second transform / second inverse transform.

[0113] 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.

[0114] Quantization parameters: These represent values ​​used when transform coefficients are used to generate quantization levels during quantization. Quantization parameters can also represent values ​​used when transform coefficients are generated by scaling the quantization levels during dequantization. Quantization parameters can be values ​​mapped to the quantization step size.

[0115] Incremental quantization parameter: can represent the difference between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.

[0116] Scan: This can refer to a method of sorting coefficients within a cell, block, or matrix. For example, changing a two-dimensional matrix of coefficients into a one-dimensional matrix can be called a scan, and changing a one-dimensional matrix of coefficients into a two-dimensional matrix can be called a scan or inverse scan.

[0117] Transform coefficients: These represent the coefficient values ​​produced after a transform is performed in the encoder. Transform coefficients can also represent the coefficient values ​​produced after at least one of entropy decoding and dequantization is performed in the decoder. The quantization level, or the level of the quantized transform coefficients, obtained by quantizing the transform coefficients or residual signal, can also fall within the meaning of transform coefficients.

[0118] Quantization level: This can represent the value produced in the encoder by quantizing the transform coefficients or residual signal. Optionally, the quantization level can represent the value of the dequantization target that undergoes dequantization in the decoder. Similarly, the transform coefficient level, as a result of transform and quantization, can also fall within the meaning of quantization level.

[0119] Non-zero transform coefficients: can represent transform coefficients with values ​​other than zero, or transform coefficient levels or quantization levels with values ​​other than zero.

[0120] Quantization matrix: A matrix used in quantization or dequantization processes performed to improve subjective or objective image quality. The quantization matrix can also be referred to as a scaling list.

[0121] Quantization matrix coefficients: These represent each element within the quantization matrix. Quantization matrix coefficients can also be called matrix coefficients.

[0122] Default matrix: can represent a predefined quantization matrix in the encoder or decoder.

[0123] Non-default matrix: can represent a quantization matrix that is not predefined in the encoder or decoder but is sent by the user via signal.

[0124] Statistical value: For at least one of the following variables, coding parameters, constant values, etc., that have a computable specific value, a statistical value can be one or more of the following: mean, summation, weighted average, weighted sum, minimum, maximum, most frequent value, median, interpolation.

[0125] Figure 1 This is a block diagram illustrating the configuration of an encoding device according to an embodiment of the present invention.

[0126] Encoding device 100 may be an encoder, a video encoding device, or an image encoding device. The video may include at least one image. Encoding device 100 may encode at least one image sequentially.

[0127] 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 switcher 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy coding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference frame buffer 190.

[0128] Encoding device 100 can encode the input image using intra-frame mode, inter-frame mode, or both. Furthermore, encoding device 100 can generate a bitstream including encoded information by encoding the input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or streamed via a wired / wireless transmission medium. When intra-frame mode is used as the prediction mode, switcher 115 can switch to intra-frame mode. Optionally, when inter-frame mode is used as the prediction mode, switcher 115 can switch to inter-frame mode. Here, intra-frame mode can refer to intra-frame prediction mode, and inter-frame mode can refer to inter-frame prediction mode. Encoding device 100 can generate prediction blocks for input blocks of the input image. Furthermore, encoding device 100 can encode residual blocks using the residual between the input block and the prediction block after generating the prediction blocks. The input image can be referred to as the current frame as the current encoding target. The input block can be referred to as the current block as the current encoding target, or as the encoding target block.

[0129] When the prediction mode is intra-frame mode, the intra-frame prediction unit 120 can use samples from blocks that have been encoded / decoded and are adjacent to the current block as reference samples. The intra-frame prediction unit 120 can perform spatial prediction on the current block using the reference samples, or generate prediction samples for the input block by performing spatial prediction. Here, intra-frame prediction can refer to prediction within a frame.

[0130] When the prediction mode is inter-frame mode, the motion prediction unit 111 can retrieve the region that best matches the input block from the reference frame during motion prediction and derive the motion vector using the retrieved region. In this case, the search region can be used as the region. The reference frame can be stored in the reference frame buffer 190. Here, the reference frame can be stored in the reference frame buffer 190 when encoding / decoding the reference frame is performed.

[0131] The motion compensation unit 112 can generate a prediction block by performing motion compensation on the current block using motion vectors. Here, inter-frame prediction can refer to prediction or motion compensation between frames.

[0132] When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 can generate prediction blocks by applying an interpolation filter to a portion of the reference frame. To perform inter-frame prediction or motion compensation on the coding unit, it can be determined which of the following modes—skip mode, merge mode, Advanced Motion Vector Prediction (AMVP) mode, and current frame reference mode—is used for motion prediction and motion compensation on the prediction unit included in the corresponding coding unit. Then, depending on the determined mode, inter-frame prediction or motion compensation can be performed differently.

[0133] Subtractor 125 can generate a residual block by using the difference between the input block and the prediction block. The residual block can be referred to as a residual signal. The residual signal can represent the difference between the original signal and the prediction signal. Furthermore, the residual signal can 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 can be the residual signal of a block cell.

[0134] Transform unit 130 can generate transform coefficients by performing a transform on the residual block and output the generated transform coefficients. Here, the transform coefficients can be coefficient values ​​generated by performing a transform on the residual block. When a transform skip mode is applied, transform unit 130 can skip the transform on the residual block.

[0135] The level of quantization can be generated by applying quantization to the transform coefficients or to the residual signal. In the following examples, the level of quantization may also be referred to as the transform coefficients.

[0136] The quantization unit 140 can generate a quantization level by quantizing the transform coefficients or residual signal according to parameters, and output the generated quantization level. Here, the quantization unit 140 can quantize the transform coefficients using a quantization matrix.

[0137] The entropy coding unit 150 can generate a bitstream by performing entropy coding on the values ​​calculated by the quantization unit 140 according to a probability distribution or on the coding parameter values ​​calculated during encoding, and output the generated bitstream. The entropy coding unit 150 can perform entropy coding on sample information of the image and information used for decoding the image. For example, the information used for decoding the image may include syntax elements.

[0138] When entropy coding is applied, symbols are represented such that fewer bits are allocated to symbols with a high probability of generation, and more bits are allocated to symbols with a low probability of generation. Therefore, the size of the bitstream used to encode the symbols can be reduced. The entropy coding unit 150 can use coding methods for entropy coding, such as Exponential Golomb, Context Adaptive Variable Length Coding (CAVLC), and Context Adaptive Binary Arithmetic Coding (CABAC). For example, the entropy coding unit 150 can perform entropy coding by using a variable-length code (VLC) table. Furthermore, the entropy coding unit 150 can derive a binarization method for the target symbol and a probability model for the target symbol / binary bit, and perform arithmetic coding by using the derived binarization method and context model.

[0139] In order to encode the transform coefficient levels (quantization levels), the entropy coding unit 150 can convert the coefficients in two-dimensional block form into one-dimensional vector form by using a transform coefficient scanning method.

[0140] Encoding parameters may include information such as syntax elements (flags, indexes, etc.) encoded in the encoder and signaled to the decoder, as well as information deduced during encoding or decoding. Encoding parameters can represent the information required when encoding or decoding an image. For example, at least one value or combination of the following may be included in the encoding parameters: cell / block size, cell / block depth, cell / block partitioning information, cell / block shape, cell / block partitioning structure, whether quadtree partitioning is performed, whether binary tree partitioning is performed, binary tree partitioning direction (horizontal or vertical), binary tree partitioning type (symmetric or asymmetric), whether the current encoding unit is partitioned via ternary tree partitioning, the direction of ternary tree partitioning (horizontal or vertical), the type of ternary tree partitioning (symmetric or asymmetric), whether the current encoding unit is partitioned via multi-type tree partitioning, and the direction of multi-type tree partitioning. Direction (horizontal or vertical), type of multi-type tree partition (symmetric or asymmetric), tree structure of multi-type tree partition (binary or ternary), prediction mode (intra-frame prediction or inter-frame prediction), intra-frame prediction mode / direction for luma, intra-frame prediction mode / direction for chroma, intra-frame partition information, inter-frame partition information, coded 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-frame prediction mode, motion information, motion vector, motion vector difference, reference frame index, inter-frame prediction angle, inter-frame prediction indicator, prediction list utilization flag, reference frame list, reference frame, 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, motion vector representation accuracy, 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 the presence of residual signals, code block style, code block flag (CBF), quantization parameters, quantization parameter residuals, quantization matrix, whether an intra-loop filter is applied, intra-loop filter coefficients, intra-loop filter taps, intra-loop filter shape / form, whether a deblocking filter is applied, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape / form, whether adaptive sample offset is applied, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, whether an adaptive loop filter is applied, adaptive loop filter coefficients, adaptive loop filter taps, adaptive loop filter shape / form.Binarization / inverse binarization method, context model determination method, context model update method, whether 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 the unit of the coefficient group, position of the last valid coefficient, flag indicating whether the coefficient value is greater than 1, flag indicating whether the coefficient value is greater than 2, flag indicating whether the coefficient value is greater than 3, information about the remaining coefficient values, symbol information, reconstructed luminance sample, reconstructed chrominance sample, residual luminance sample, residual chrominance sample, luminance transformation coefficient, chrominance transformation coefficient, quantized luminance level, quantized chrominance level, transformation coefficient level scanning method, motion vector search area on the decoder side. The dimensions of the CTU, the shape of the motion vector search area on the decoder side, the number of motion vector searches on the decoder side, information about the CTU size, information about the minimum block size, information about the maximum block size, information about the maximum block depth, information about the minimum block depth, image display / output order, strip identification information, strip type, strip partition information, parallel block identification information, parallel block type, parallel block partition information, parallel block group identification information, parallel block group type, parallel block group partition information, image type, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients, bit depth of quantization levels, and information about the luminance signal or information about the chrominance signal.

[0141] Here, sending a flag or index with a signal can represent the encoder entropy encoding the corresponding flag or index and including it in the bitstream, and can also represent the decoder entropy decoding the corresponding flag or index from the bitstream.

[0142] When the encoding device 100 performs encoding via inter-frame prediction, the encoded current frame can be used as a reference frame for another image to be processed subsequently. Therefore, the encoding device 100 can reconstruct or decode the encoded current frame, or store the reconstructed or decoded image as a reference frame in the reference frame buffer 190.

[0143] The quantization level can be dequantized in dequantization unit 160 or inverse transformed in inverse transform unit 170. The coefficients that have undergone dequantization or inverse transform, or both, can be added to the prediction block by adder 175. A reconstructed block can be generated by adding the coefficients that have undergone dequantization or inverse transform, or both, to the prediction block. Here, the coefficients that have undergone dequantization or inverse transform, or both, can represent coefficients for which at least one of dequantization and inverse transform has been performed, and can represent the reconstructed residual block.

[0144] The reconstructed block can be passed through filter unit 180. Filter unit 180 can apply at least one of deblocking filter, sample adaptive offset (SAO), and adaptive loop filter (ALF) to the reconstructed sample, reconstructed block, or reconstructed image. Filter unit 180 may be referred to as an in-loop filter.

[0145] Deblocking filters remove block distortion that occurs at the boundaries between blocks. To determine whether to apply a deblocking filter, the number of samples included in several rows or columns within the block can be used. When a deblocking filter is applied to a block, another filter can be applied based on the desired deblocking intensity.

[0146] To compensate for coding errors, a suitable offset value can be added to the sample value using a sample-adaptive offset. The sample-adaptive offset corrects the offset between the deblocked image and the original image on a sample-by-sample basis. This can be achieved by considering edge information about each sample point when applying the offset, or by dividing the image's samples into a predetermined number of regions, determining the regions where the offset will be applied, and then applying the offset to those regions.

[0147] An adaptive loop filter (ALF) can perform filtering based on a comparison between the filtered reconstructed image and the original image. 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 regarding whether to apply the ALF can be transmitted via a signal through the coding unit (CU), and the form and coefficients of the ALF to be applied to each block can vary.

[0148] The reconstructed blocks or reconstructed image that have passed through filter unit 180 can be stored in reference frame buffer 190. The reconstructed blocks processed by filter unit 180 can be part of the reference frame. That is, the reference frame is a reconstructed image composed of the reconstructed blocks processed by filter unit 180. The stored reference frame can be used later in inter-frame prediction or motion compensation.

[0149] Figure 2 This is a block diagram illustrating the configuration of a decoding device according to an embodiment and to which the present invention is applied.

[0150] Decoding device 200 can be a decoder, video decoding device, or image decoding device.

[0151] Reference Figure 2 The decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra-frame prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260, and a reference frame buffer 270.

[0152] Decoding device 200 can receive bitstreams output from encoding device 100. Decoding device 200 can receive bitstreams stored on a computer-readable recording medium, or bitstreams streamed via wired / wireless transmission media. Decoding device 200 can decode the bitstreams using intra-frame mode or inter-frame mode. Furthermore, decoding device 200 can generate and output reconstructed or decoded images produced by decoding.

[0153] When the prediction mode used during decoding is intra-frame mode, the switcher can be switched to intra-frame mode. Optionally, when the prediction mode used during decoding is inter-frame mode, the switcher can be switched to inter-frame mode.

[0154] Decoding device 200 obtains a reconstructed residual block and generates a prediction block by decoding the input bitstream. Once the reconstructed residual block and prediction block are obtained, decoding device 200 generates a reconstructed block as the decoding target by adding the reconstructed residual block and the prediction block. The decoding target block may be referred to as the current block.

[0155] The entropy decoding unit 210 can generate symbols by performing entropy decoding on the bitstream according to a probability distribution. The generated symbols may include symbols in quantized hierarchical form. Here, the entropy decoding method can be the inverse process of the entropy encoding method described above.

[0156] In order to decode the transform coefficient levels (quantization levels), the entropy decoding unit 210 can change the coefficients in unidirectional vector form into two-dimensional block form by using a transform coefficient scanning method.

[0157] The quantization level can be dequantized in the dequantization unit 220, or the quantization level can be inversely transformed in the inverse transform unit 230. The quantization level can be the result of dequantization or inverse transform, or both, and can be generated as a reconstruction residual block. Here, the dequantization unit 220 can apply the quantization matrix to the quantization level.

[0158] When using intra-frame mode, intra-frame prediction unit 240 can generate a prediction block by performing spatial prediction on the current block, wherein the spatial prediction uses sample values ​​of blocks that are adjacent to the target block and have already been decoded.

[0159] When using inter-frame mode, motion compensation unit 250 can generate a prediction block by performing motion compensation on the current block, wherein the motion compensation uses motion vectors and reference frames stored in reference frame buffer 270.

[0160] Adder 225 generates a reconstructed block by adding the reconstructed residual block to the prediction block. 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. Filter unit 260 can output a reconstructed image. The reconstructed block or reconstructed image can be stored in a reference frame buffer 270 and used when performing inter-frame prediction. The reconstructed block processed by filter unit 260 can be part of a reference frame. That is, the reference frame is a reconstructed image composed of the reconstructed blocks processed by filter unit 260. The stored reference frame can be used later in inter-frame prediction or motion compensation.

[0161] Figure 3 It is a schematic diagram illustrating the partitioning structure of an image when it is encoded and decoded. Figure 3 An example of partitioning a single cell into multiple lower-level cells is illustrated.

[0162] To effectively partition an image, coding units (CUs) are used during encoding and decoding. A coding unit can serve as the basic unit when encoding / decoding an image. Furthermore, a coding unit can be used to distinguish between intra-frame prediction modes and inter-frame prediction modes during image encoding / decoding. A coding unit can be the basic unit used for prediction, transform, quantization, inverse transform, inverse quantization, or encoding / decoding processing of transform coefficients.

[0163] Reference Figure 3 Image 300 is partitioned sequentially according to the Largest Coding Unit (LCU), and the LCU unit is determined as the partitioning structure. Here, LCU can be used with the same meaning as Coding Tree Unit (CTU). Unit partitioning can represent partitioning of the block associated with that unit. The block partitioning information may include information about the unit depth. The depth information may represent the number or degree to which the unit is partitioned, or both the number and degree to which the unit is partitioned. A single unit can be partitioned into multiple lower-level units hierarchically associated with the depth information based on a tree structure. In other words, the unit and the lower-level units generated by partitioning that unit may correspond to a node and the child nodes of that node, respectively. Each of the partitioned lower-level units may have depth information. The depth information may be information representing the size of the CU and may be stored in each CU. The unit depth represents the number and / or degree associated with partitioning the unit. Therefore, the partitioning information of the lower-level units may include information about the size of the lower-level units.

[0164] The partitioning structure represents the distribution of coding units (CUs) within the LCU 310. This distribution can be determined by whether a single CU is partitioned into multiple CUs (positive integers equal to or greater than 2, including 2, 4, 8, 16, etc.). The horizontal and vertical dimensions of the CUs resulting from partitioning can be half the horizontal and vertical dimensions of the CUs before partitioning, or they can have dimensions smaller than the horizontal and vertical dimensions before partitioning based on the number of partitions. CUs can be recursively partitioned into multiple CUs. Through recursive partitioning, at least one of the height and width of the CU after partitioning can be reduced compared to at least one of the height and width of the CU before partitioning. CU partitioning can be performed recursively until a predefined depth or a predefined size is reached. For example, the depth of the LCU can be 0, and the depth of the minimum coding unit (SCU) can be a predefined maximum depth. Here, as mentioned above, the LCU can be a coding unit with the maximum coding unit size, and the SCU can be a coding unit with the minimum coding unit size. Partitioning begins at LCU 310. The CU depth increases by 1 when the horizontal or vertical dimension of a CU, or both, are reduced through partitioning. For example, for each depth, the size of an unpartitioned CU can be 2N × 2N. Furthermore, in the case of partitioned CUs, a CU of size 2N × 2N can be partitioned into four CUs of size N × N. As the depth increases by 1, the size N can be halved.

[0165] Additionally, partition information of a CU can be used to indicate whether a CU is partitioned. Partition information can be 1 bit. All CUs except SCUs can include partition information. For example, when the partition information value is the first value, the CU may not be partitioned; when the partition information value is the second value, the CU may be partitioned.

[0166] For example, a CTU may have dimensions where the height and width are the same (such as 64×64, 128×128, 256×256, 512×512, etc.). Here, the height or width of the CTU can be at least one positive integer that is a multiple of 2, 4, or 8. Alternatively, for example, a CTU may have dimensions where the height and width are different from each other (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 can be at least one positive integer that is a multiple of 2, 4, or 8.

[0167] For example, a CU can be a size where the height and width are the same (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 can be at least one of a positive integer that is a multiple of 2, 4, or 8. Additionally, for example, the CU can have dimensions where the height and width differ 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 can be at least one positive integer that is a multiple of 2, 4, or 8.

[0168] For example, an SCU can have dimensions where the height and width are the same (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 can be at least one of positive integers that are multiples of 2, 4, or 8. Additionally, CTUs can have different dimensions in terms of height and width (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 can be at least one of a positive integer that is a multiple of 2, 4, or 8.

[0169] At least one of CTU, CU, SCU, and sub-CU may have a width-to-height ratio or a height-to-width ratio of at least one of the following: 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 can be a positive integer such as 2, 4, 6, 8, etc. Additionally, here, a sub-CU may represent a unit obtained by partitioning the CU at least once during encoding / decoding of the CU, rather than a unit obtained from a block partitioning structure.

[0170] Reference Figure 3 An LCU with depth 0 can be a 64×64 block. 0 can be the minimum depth. An SCU with depth 3 can be an 8×8 block. 3 can be the maximum depth. CUs with 32×32 blocks and 16×16 blocks can be represented as depth 1 and depth 2, respectively.

[0171] For example, when a single coding unit is partitioned into four coding units, the horizontal and vertical dimensions of the four partitioned coding units can be half the size of the CU before partitioning. In one embodiment, when a 32×32 coding unit is partitioned into four coding units, each of the four partitioned coding units can have a size of 16×16. When a single coding unit is partitioned into four coding units, the coding unit can be said to be partitioned into a quadtree form.

[0172] For example, when a coding unit is partitioned into two sub-coding units, the horizontal or vertical dimension (width or height) of each sub-coding unit can be half the horizontal or vertical dimension of the original coding unit. For example, when a coding unit with a size of 32×32 is vertically partitioned into two sub-coding units, each of the two sub-coding units can have a size of 16×32. For example, when a coding unit with a size of 8×32 is horizontally partitioned into two sub-coding units, each of the two sub-coding units can have a size of 8×16. When a coding unit is partitioned into two sub-coding units, it can be said that the coding unit is binary partitioned or partitioned using a binary tree partitioning structure.

[0173] For example, when a coding unit (CU) is partitioned into two sub-CUs, the two sub-CUs may each have a width or height that is 1 / K:(K-1) / K or (K-1) / K:1 / K compared to the width or height of the CU. Here, K can be a positive integer such as 2, 3, 4, 5, 6, 7, 8, 16, 32, etc.

[0174] In the example, when a CU with a size of 32×32 is vertically divided into two sub-CUs with a ratio of 1:3, the two sub-CUs can have sizes of 8×32 and 24×32, respectively.

[0175] In another example, when a CU with a size of 8×32 is horizontally divided into two sub-CUs with a ratio of 1:3, the two sub-CUs can have sizes of 8×8 and 8×24, respectively.

[0176] For example, when a coding unit is divided into three sub-coding units, the horizontal or vertical dimensions of the coding unit can be divided in a 1:2:1 ratio, resulting in three sub-coding units with a horizontal or vertical dimension ratio of 1:2:1. For instance, when a 16×32 coding unit is horizontally divided into three sub-coding units, these three sub-coding units, in order from the top to the bottom, can have dimensions of 16×8, 16×16, and 16×8, respectively. Similarly, when a 32×32 coding unit is vertically divided into three sub-coding units, these three sub-coding units, in order from the left to the right, can have dimensions of 8×32, 16×32, and 8×32, respectively. When a coding unit is divided into three sub-coding units, it can be said that the coding unit is tri-partitioned or partitioned according to a ternary tree partitioning structure.

[0177] For example, when a CU is divided into three sub-CUs, the three sub-CUs can be obtained by partitioning the width or height of the CU according to the 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.).

[0178] In the example, when a CU with a size of 16×32 is horizontally divided into three sub-CUs with a ratio of 1:6:1, the three sub-CUs can have sizes of 16×4, 16×24 and 16×4 respectively from above.

[0179] In another example, a CU with a size of 32×32 is vertically divided into three sub-CUs with a ratio of 6:1:1, and the three sub-CUs can have sizes of 24×32, 4×32 and 4×32 respectively from the left.

[0180] For example, when the size of the CU is not a multiple of the sum of K, L, and M (i.e., K+L+M), the CU can be partitioned according to a preset rule. In the example, when M has the maximum value in K:L:M, a positive integer n can be added to M, making the size of the CU a multiple of (K+1+M+n). In other words, the CU can be partitioned according to the ratio of K:L:(M+n).

[0181] exist Figure 3 In this context, the coding tree unit (CTU) 320 is an example of a CTU in which quadtree partitioning, binary tree partitioning, and ternary tree partitioning structures are all applied.

[0182] As described above, to partition the CTU, at least one of a quadtree partitioning structure, a binary tree partitioning structure, and a ternary tree partitioning structure can be applied. Various tree partitioning structures can be applied sequentially to the CTU according to a predetermined priority order. For example, a quadtree partitioning structure can be preferentially applied to the CTU. Encoding units that cannot be further partitioned using a quadtree partitioning structure can correspond to leaf nodes of a quadtree. Encoding units corresponding to leaf nodes of a quadtree can be used as root nodes of binary and / or ternary tree partitioning structures. That is, encoding units corresponding to leaf nodes of a quadtree can be further partitioned according to a binary or ternary tree partitioning structure, or they can be left unpartitioned. Therefore, by preventing the encoded blocks obtained from binary or ternary tree partitioning of encoding units corresponding to leaf nodes of a quadtree from undergoing further quadtree partitioning, block partitioning operations and / or the operation of signaling partitioning information can be effectively performed.

[0183] For example, binary tree partitioning can be preferentially applied to CTUs. CUs that cannot be partitioned by binary tree can also correspond to leaf nodes of a binary tree. CUs corresponding to leaf nodes of a binary tree can become root nodes of quadtrees and / or ternary trees. In other words, CUs corresponding to leaf nodes of a binary tree can be partitioned according to a quadtree or ternary tree, or the CUs corresponding to leaf nodes of a binary tree can be left unpartitioned. Here, CUs resulting from quadtree or ternary tree partitioning of CUs corresponding to leaf nodes of a binary tree are not further partitioned by binary tree, and thus, block partitioning and / or partitioning information can be effectively performed using signal transmission.

[0184] For example, ternary tree partitioning can be preferentially applied to CTUs. CUs that cannot undergo ternary tree partitioning can also correspond to leaf nodes of a ternary tree. CUs corresponding to leaf nodes of a ternary tree can become root nodes of quadtrees and / or binary trees. In other words, CUs corresponding to leaf nodes of a ternary tree can be partitioned according to a quadtree or binary tree, or the CUs corresponding to leaf nodes of a ternary tree may not be further partitioned. Here, CUs resulting from performing quadtree or binary tree partitioning on CUs corresponding to leaf nodes of a ternary tree are not further subjected to ternary tree partitioning, and therefore, block partitioning and / or partitioning information can be effectively performed using signal transmission.

[0185] For example, for CTU, quadtree partitioning, ternary tree partitioning, and binary tree partitioning can be applied sequentially.

[0186] For example, for CTU, ternary tree partitioning, binary tree partitioning, and quadtree partitioning can be applied sequentially.

[0187] For example, in CTU, partitioning based on a symmetric ratio for height or width can be performed in quadtree partitioning, binary tree partitioning, and ternary tree partitioning, and then partitioning based on an asymmetric ratio can be performed.

[0188] For example, when performing binary tree partitioning on a CTU, the partition priority can vary depending on whether a symmetric or asymmetric ratio is applied to the height or width.

[0189] For example, when performing ternary partitioning on a CTU, the partition priority can vary depending on whether a symmetric or asymmetric ratio is applied to the height or width, or whether a symmetric or asymmetric ratio is applied to at least two of the three sub-CTUs.

[0190] Quadtree partitioning information can be used to signal the fact that the coding unit corresponding to a node of the quadtree has been partitioned. Quadtree partitioning information with a first value (e.g., "1") indicates that the current coding unit has been partitioned according to the quadtree partitioning structure. Quadtree partitioning information with a second value (e.g., "0") indicates that the current coding unit has not been partitioned according to the quadtree partitioning structure. The quadtree partitioning information can be a flag with a predetermined length (e.g., one bit).

[0191] There may be no priority between binary tree partitions and ternary tree partitions. That is, the coding unit corresponding to the leaf node of the quadtree can further undergo any partition in either binary tree partitions or ternary tree partitions. In addition, the coding unit generated by binary tree partitions or ternary tree partitions may undergo further binary tree partitions or further ternary tree partitions, or it may not be further partitioned.

[0192] There may be no partition priority between quadtree partitioning and ternary tree partitioning. In other words, quadtree partitioning or ternary tree partitioning can be performed on CUs corresponding to the leaf nodes of a binary tree. In addition, CUs generated by quadtree partitioning or ternary tree partitioning can be further partitioned based on the quadtree or ternary tree, or they may not be further partitioned.

[0193] There may be no partition priority between quadtree partitioning and binary tree partitioning. In other words, quadtree partitioning or binary tree partitioning can be performed on CUs corresponding to the leaf nodes of a ternary tree. In addition, CUs generated by quadtree partitioning or binary tree partitioning can be further partitioned based on the quadtree or binary tree, or they may not be further partitioned.

[0194] In the case of binary or ternary tree partitioning, depending on whether a symmetric or asymmetric ratio is applied to the height or width, there may be no partition priority between partitioned trees.

[0195] A tree structure in which there is no priority between binary tree partitions and ternary tree partitions is called a multi-type tree structure. The coding unit corresponding to the leaf node of a quadtree can be used as the root node of a multi-type tree. At least one of multi-type tree partition indication information, partition direction information, and partition tree information can be used to signal whether to partition the coding unit corresponding to a node in the multi-type tree. To partition the coding unit corresponding to a node in the multi-type tree, the multi-type tree partition indication information, partition direction information, and partition tree information can be signaled sequentially.

[0196] The order in which signals are sent can be preset values ​​in the encoder / decoder, or values ​​sent from the encoder to the decoder via signals.

[0197] A multi-type tree partitioning indication with a first value (e.g., "1") indicates that the current coding unit will undergo a multi-type tree partition. A multi-type tree partitioning indication with a second value (e.g., "0") indicates that the current coding unit will not undergo a multi-type tree partition.

[0198] When the coding unit corresponding to a node of a multi-type tree is further partitioned according to the multi-type tree partitioning structure, the coding unit may include partitioning direction information. The partitioning direction information may indicate in which direction the current coding unit will be partitioned for the multi-type tree partition. Partitioning direction information with a first value (e.g., "1") may indicate that the current coding unit will be vertically partitioned. Partitioning direction information with a second value (e.g., "0") may indicate that the current coding unit will be horizontally partitioned.

[0199] When the coding unit corresponding to a node of a multi-type tree is further partitioned according to the multi-type tree partitioning structure, the current coding unit may include partitioning tree information. The partitioning tree information may indicate the tree partitioning structure that will be used to partition the nodes of the multi-type tree. Partitioning tree information with a first value (e.g., "1") may indicate that the current coding unit will be partitioned according to a binary tree partitioning structure. Partitioning tree information with a second value (e.g., "0") may indicate that the current coding unit will be partitioned according to a ternary tree partitioning structure.

[0200] Partition indication information, partition tree information, and partition direction information can all be flags with a predetermined length (e.g., one bit).

[0201] Partitioning of a CU corresponding to each node of a multi-type tree can be signaled using at least one of the following: information about whether multi-type tree partitioning is performed, information about the partitioning direction, information about the partitioning ratio, and information about the partitioning tree. To perform partitioning on a CU corresponding to each node of a multi-type tree, information about whether partitioning is performed, information about the partitioning direction, information about the partitioning ratio, and information about the partitioning tree can be signaled sequentially.

[0202] In addition, in order to perform partitioning on the CU corresponding to each node of the multi-type tree, information about whether partitioning is performed, information about the partitioning direction, information about the partitioning tree, and information about the partitioning ratio can be sent sequentially by signals.

[0203] In addition, in order to perform partitioning on the CU corresponding to each node of the multi-type tree, information about whether partitioning is performed, information about the partition ratio, information about the partition direction, and information about the partition tree can be sent sequentially by signals.

[0204] When partitioning is performed on the CU corresponding to each node of the multi-type tree, the CU may also include information about the partitioning ratio. The partitioning information indicates the ratio used to perform the multi-type tree partitioning.

[0205] The following section shows an example of a partition ratio indicator that provides information about the partition ratio when performing binary tree partitioning.

[0206] In the example, information about the partition ratio with a first value can indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a 1:1 ratio.

[0207] In another example, information about the partition ratio with a second value can indicate partitioning the width or height of the corresponding CU based on a binary tree according to a 1:3 ratio.

[0208] In another example, information about the partition ratio with a third value can indicate partitioning the width or height of the corresponding CU based on a binary tree according to a ratio of 1:7.

[0209] In another example, information about the partition ratio with a fourth value can indicate partitioning the width or height of the corresponding CU based on a binary tree at a ratio of 1:15.

[0210] The following section shows an example of a partition ratio indicator that provides information about the partition ratio when performing binary tree partitioning.

[0211] In the example, information about the partition ratio with a first value can indicate that the width or height of the corresponding CU is partitioned based on a binary tree according to a 1:1 ratio.

[0212] In another example, information about the partition ratio with a second value can indicate partitioning the width or height of the corresponding CU based on a binary tree according to a 3:1 ratio.

[0213] In another example, information about the partition ratio with a third value can indicate partitioning the width or height of the corresponding CU based on a binary tree according to a 1:3 ratio.

[0214] The following section shows an example of a partition ratio indicator that provides information about the partition ratio when performing ternary tree partitioning.

[0215] In the example, information about the partition ratio with a first value can indicate partitioning the width or height of the corresponding CU based on a ternary tree according to a ratio of 1:2:1.

[0216] In another example, information about the partition ratio with a second value can indicate partitioning the width or height of the corresponding CU based on a ternary tree according to a ratio of 1:4:1.

[0217] In the example, information about the partition ratio with a third value can indicate partitioning the width or height of the corresponding CU based on a ternary tree according to a ratio of 1:6:1.

[0218] In another example, information about the partition ratio with a third value can indicate partitioning the width or height of the corresponding CU based on a ternary tree according to a ratio of 1:8:1.

[0219] The following section shows an example of a partition ratio indicator that provides information about the partition ratio when performing ternary tree partitioning.

[0220] In the example, information about the partition ratio with a first value can indicate partitioning the width or height of the corresponding CU based on a ternary tree according to a ratio of 1:2:1.

[0221] In another example, information about the partition ratio with a second value can indicate partitioning the width or height of the corresponding CU based on a ternary tree according to a 2:1:1 ratio.

[0222] In the example, information about the partition ratio with a third value can indicate partitioning the width or height of the corresponding CU based on a ternary tree according to a ratio of 1:1:2.

[0223] In another example, information about the partition ratio with a fourth value can indicate partitioning the width or height of the corresponding CU based on a binary tree according to a 1:3 ratio. In other words, information about the partition ratio of a binary tree partition can be indicated by using information about the partition ratio of a ternary tree partition.

[0224] Information about the partition ratio can be a flag or index with a predetermined length (e.g., 1 bit), or it can be an index with a variable length.

[0225] The values ​​of the partition ratio information and their relationships to the partition ratio are not limited to the examples above in each case. When the partition information has a specific value, it can indicate whether to perform binary or ternary partitioning 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.

[0226] A partition used when there is no priority between quadtree and ternary tree partitions can be called a multi-type tree partition. In other words, a CU corresponding to a leaf node of a binary tree can become the root node of a multi-type tree. Partitioning of the CU corresponding to each node of the multi-type tree can be signaled using at least one of the following: information about whether multi-type tree partitioning is performed, information about the partitioning direction, information about the partitioning ratio, and information about the partitioning tree.

[0227] A partition used when there is no priority between quadtree partitioning and binary tree partitioning can be called a multi-type tree partitioning. In other words, the CU corresponding to the leaf node of the binary tree can become the root node of the multi-type tree. Partitioning of the CU corresponding to each node of the multi-type tree can be signaled using at least one of the following: information about whether multi-type tree partitioning is performed, information about the partitioning direction, information about the partitioning ratio, and information about the partitioning tree.

[0228] At least one of quadtree partitioning information, multi-type tree partitioning information, partitioning direction information, and partitioning tree information can be entropy encoded / decoded. To entropy encode / decode those types of information, information about neighboring coding units adjacent to the current coding unit can be used. For example, the partitioning type (partitioned or unpartitioned, partitioning tree, partitioning ratio, and / or partitioning direction) of the left-hand and / or upper-hand neighboring coding units of the current coding unit is highly likely to be similar to the partitioning type of the current coding unit. Therefore, contextual information for entropy encoding / decoding of information about the current coding unit can be derived from the information about neighboring coding units. Information about neighboring coding units may include at least one of quadtree partitioning information, binary tree partitioning information, ternary tree partitioning information, multi-type tree partitioning information, partitioning direction information, partitioning ratio information, and partitioning tree information.

[0229] As another example, in binary tree partitioning and ternary tree partitioning, binary tree partitioning can be performed first. That is, the current coding unit can first undergo binary tree partitioning, and then the coding unit corresponding to the leaf node of the binary tree can be set as the root node for 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 can be performed.

[0230] Encoding units that cannot be partitioned according to quadtree, binary tree, and / or ternary tree partitioning structures become the basic units for encoding, prediction, and / or transformation. That is, the encoding units cannot be further partitioned for prediction and / or transformation. Therefore, partitioning structure information and partitioning information for dividing encoding units into prediction and / or transformation units may not exist in the bitstream.

[0231] In a CU, a CU that has been further partitioned M times according to quadtree partitioning, binary tree partitioning, and / or ternary tree partitioning can serve as a unit for encoding, prediction, and / or transformation. In other words, a CU can be further partitioned M times for prediction and / or transformation. Here, when encoding / decoding an image, the CU that has been further partitioned M times can be used in the form of the resulting units, and the resulting units do not need to be partitioned in a block structure. Therefore, the partitioning structure, partitioning information, etc., used to further partition the CU into prediction units and / or transformation units may not exist in the bitstream. Here, M can be, for example, 1 or a positive integer.

[0232] For example, the CU can be partitioned M times and N times respectively to perform prediction and / or transformation. M and N can be different positive integers.

[0233] However, when the size of the encoding unit (i.e., the basic unit used for partitioning) is larger than the size of the maximum transform block, the encoding unit can be partitioned recursively until the size of the encoding 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 block can represent at least one of width, height, and area. Optionally, at least one of the size of the CU and the size of the maximum transform block can represent depth information specifying the size of the CU or block. Optionally, the size can represent the ratio between width and height. For example, when the size of the encoding unit is 64×64 and the size of the maximum transform block is 32×32, the encoding unit can be partitioned into four 32×32 blocks for transformation. For example, when the size of the encoding unit is 32×64 and the size of the maximum transform block is 32×32, the encoding unit can be partitioned into two 32×32 blocks for transformation. In this case, the partitioning of the encoding unit for transformation is not sent separately by signal, and the partitioning of the encoding unit for transformation can be determined by comparing the horizontal or vertical size of the encoding unit with the horizontal or vertical size of the maximum transform block. For example, when the horizontal dimension (width) of the coding unit is greater than the horizontal dimension (width) of the maximum transform block, the coding unit can be vertically bisected. Similarly, when the vertical dimension (height) of the coding unit is greater than the vertical dimension (height) of the maximum transform block, the coding unit can be horizontally bisected.

[0234] Additionally, when the size of the CU is larger than the size of the largest transform block, the Code Block Flag (CBF) for the corresponding CU can be determined as a first value based on at least one of the stripe type and partition information. Here, the first value can represent 0, where 0 indicates that the transform coefficients or quantization levels are not present in the corresponding CU. Here, the stripe type can be a P-strip or a B-strip. Here, the partition information can represent 0, where 0 is a first value indicating that the CU has not been partitioned.

[0235] In the example, when the current stripe is a B stripe, the size of the CU is 128×128, the size of the largest transform block is 64×64, and the partition information is 0, the value of the CU's coding block flag can be determined to be 0.

[0236] In another example, when the current stripe is an I stripe, the size of the CU is 128×128, the size of the largest transform block is 64×64, and the partition information is 0, the value of the CU's coding block flag can be determined to be 0.

[0237] In another example, when the current stripe is a P stripe, the size of the CU is 64×128, the size of the largest transform block is 64×64, and the partition information is 0, the value of the CU's coding block flag can be determined to be 0.

[0238] In another example, when the current stripe is a P stripe, the size of the CU is 64×32, the size of the largest transform block is 32×16, and the partition information is 0, the value of the CU's coding block flag can be determined to be 0.

[0239] In another example, when the current stripe is a B stripe, the CU size is 128×128, the maximum transform block size is 32×32, and the partition information is 0, entropy encoding / decoding can be performed on the CU size / partition information. When the CU size / partition information is 0 (where 0 is the first value), the CU size can be determined to be 128×128 and the value of the CU's coding block flag can be determined to be 0. Alternatively, when the CU size / partition information is 1 (where 1 is the second value), the CU with a size of 128×128 is partitioned into four CUs of size 64×64 based on a quadtree, and the value of the CU's coding block flag can 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, entropy encoding / decoding can be performed on the CU size / partition information, and the size of the CU with a coding block flag value of 0 can be determined.

[0240] In another example, when the current stripe is a B stripe, the CU size is 128×64, the maximum transform block size is 32×16, and the partition information is 0, entropy encoding / decoding can be performed on the CU size / partition information. When the CU size / partition information is 0 (where 0 is the first value), the CU size can be determined to be 128×64 and the value of the CU's coding block flag can be determined to be 0. Alternatively, when the CU size / partition information is 1 (where 1 is the second value), the CU with a size of 128×64 is partitioned into four CUs of size 64×32 based on a quadtree, and the value of the CU's coding block flag can be determined to be 0.

[0241] Additionally, when the size of the CU is larger than the size of the maximum transform block, the mode of the corresponding CU can be determined as either skip mode or AMVP mode, depending on the stripe type. In AMVP mode, the coded block flag has a first value and the difference in motion vectors is represented by a signal transmission. Here, the stripe type can be a P-strip or a B-strip.

[0242] In the example, when the current stripe is a B stripe, the CU size is 128×128, the maximum transform block size is 64×64, and the partition information is 0, the CU mode can be determined as skip mode.

[0243] In another example, when the current stripe is a P stripe, the CU size is 64×128, the maximum transform block size is 64×64, and the partition information is 0, the CU mode can be determined as AMVP mode, where the value of the coding block flag is 0.

[0244] In another example, when the current stripe is a B stripe, the CU size is 128×128, the maximum transform block size is 32×32, and the partition information is 0, entropy encoding / decoding can be performed on the CU size / partition information. When the CU size / partition information is 0 (where 0 is the first value), the CU size can be determined as 128×128 and the CU mode can be determined as skip mode. Alternatively, when the CU size / partition information is 1 (where 1 is the second value), the CU with a size of 128×128 is partitioned into four CUs of size 64×64 based on a quadtree, and the CU mode can be determined as skip mode.

[0245] In another example, when the current stripe is a P-strip, the CU size is 128×64, the maximum transform block size is 32×16, and the partition information is 0, entropy encoding / decoding can be performed on the CU size / partition information. When the CU size / partition information is 0 (where 0 is the first value), the CU size can be determined to be 128×64 and the CU mode can be determined to be AMVP mode, where the value of the coding block flag is 0. Alternatively, when the CU size / partition information is 1 (where 1 is the second value), the CU with a size of 128×64 is partitioned into four CUs of size 64×32 based on a quadtree, and the CU mode can be determined to be AMVP mode, where the value of the coding block flag is 0.

[0246] In the above example, at least one of the dimensions of the CU and the dimensions of the maximum transform block can represent at least one of the width, height, and area.

[0247] At least one of the dimensions of the CU and the maximum transform block can be a preset value in the encoder / decoder, or it can be a value sent from the encoder to the decoder by a signal.

[0248] Additionally, when the depth of the CU is 0 and the partition information is 0, the value of the coded block flag (CBF) of the corresponding CU can be determined as the first value.

[0249] Additionally, when the depth of the CU is 0 and the partition information is 0, the mode of the corresponding CU can be determined as skip mode or AMVP mode, where the coded block flag has a first value and the difference of the motion vector is sent by signal.

[0250] In the above example, the coded block flag may include at least one of the coded block flag of the luminance signal and the coded block flag of the chrominance signal.

[0251] Information regarding the maximum and / or minimum size of the coding unit (CU) and the maximum and / or minimum size of the transform block can be signaled or determined at a higher level than the coding unit. Higher levels can be, for example, sequence level, sub-picture level, picture level, parallel block level, parallel block group level, stripe level, block level, etc. For example, the minimum size of the coding unit can be determined to be 4×4. For example, the maximum size of the transform block can be determined to be 64×64. For example, the minimum size of the transform block can be determined to be 4×4. Here, information regarding the minimum and / or maximum size of the CU and the minimum and / or maximum size of the transform block can be signaled for each stripe and between stripes, or can be determined as values ​​sent from the encoder to the decoder, regardless of the stripe type.

[0252] Information about the minimum and / or maximum size of a CU can be sent using signals 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 can be sent using signals.

[0253] In addition, information about the minimum and / or maximum size of a CU for a specific partition type can be transmitted using signals based on information about the minimum and / or maximum size of a general CU.

[0254] In addition, information about the minimum and / or maximum size of a specific type of CU can be transmitted using signals based on information about the minimum and / or maximum size of a CU of a specific partition type.

[0255] Additionally, information regarding the minimum and / or maximum size of a CU for a specific partition type can be sent via a signal in logarithmic form. In this example, the exponent of the logarithm can be 2.

[0256] Additionally, information regarding the minimum and / or maximum size of the CU for each partition type can be transmitted using signals based on luminance or chrominance signals. In the following text, the values ​​represented by Y or luminance and the information represented by C or chrominance can respectively represent information about luminance units and chrominance units.

[0257] In the example, the difference between the minimum size of the CU after the quadtree partition and the minimum size of the general CU can be signaled. For example, this difference can be signaled using `slice_log2_diff_min_qt_min_cb_luma` or `slice_log2_diff_min_qt_min_cb_chroma`. The decoder can derive the minimum size of the CU after the quadtree partition (MinQtSizeY or MinQtSizeC) using `slice_log2_diff_min_qt_min_cb_luma` or `slice_log2_diff_min_qt_min_cb_chroma` and the minimum size of the general CU (MinCbLog2SizeY). In the following text, when the CU after the quadtree partition has a minimum size, it corresponds to the case where the CU after the quadtree partition corresponds to the leaf node of the quadtree partition.

[0258] In another example, the difference between the maximum size of the CU after the binary tree partition and the minimum size of the CU after the quadtree partition can be signaled. For example, the difference between the maximum size of the CU after the binary tree partition and the minimum size of the CU after the quadtree partition can be signaled using slice_log2_diff_max_bt_min_qt_luma or slice_log2_diff_max_bt_min_qt_chroma. The decoder can derive the maximum size of the CU after the binary tree partition (MaxBtSizeY or MaxBtSizeC) by using slice_log2_diff_max_bt_min_qt_luma or slice_log2_diff_max_bt_min_qt_chroma and the minimum size of the CU after the quadtree partition (MinQtLog2SizeY or MinQtLog2SizeC). Additionally, the decoder can derive the minimum size of the CU after the binary tree partition (MinBtSizeY or MinBtSizeC) by using the minimum size of the general CU (MinCbLog2SizeY).

[0259] In another example, the difference between the maximum size of the CU after the ternary tree partition and the minimum size of the CU after the quadtree partition can be signaled. For example, this difference can be signaled using `slice_log2_diff_max_tt_min_qt_luma` or `slice_log2_diff_max_tt_min_qt_chroma`. The decoder can derive the maximum size of the CU after the ternary tree partition (`MaxTtSizeY` or `MaxTtSizeC`) 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 the quadtree partition (`MinQtLog2SizeY` or `MinQtLog2SizeC`). Additionally, the decoder can derive the minimum size of the CU (MinTtSizeY or MinTtSizeC) after partitioning the ternary tree by using the minimum size of the general CU (MinCbLog2SizeY).

[0260] Information regarding the minimum size of the coding unit corresponding to the leaf node of the quadtree (quadtree minimum size) and / or the maximum depth from the root node to the leaf node of the multi-type tree (multi-type tree maximum depth) can be signaled or determined at a higher level of the coding unit. For example, higher levels could be sequence level, frame level, sub-frame level, stripe level, parallel block group level, parallel block level, block level, etc. The information regarding the minimum size of the quadtree and / or the maximum depth of the multi-type tree can be signaled for each of the intra-frame and inter-frame stripes, or it can be determined as a value signaled from the encoder to the decoder regardless of the stripe type. Here, the information regarding the maximum depth of the multi-type tree can be signaled or determined at the parent level of the CU by partitioning the information regarding the maximum depth of the multi-type tree into information regarding the maximum depth of the binary tree and information regarding the maximum depth of the ternary tree.

[0261] Information about the maximum depth of multiple tree types can be transmitted via signals based on information about the minimum and / or maximum size of a general CU.

[0262] Additionally, information about the maximum depth of the multi-type tree can be sent as a signal in logarithmic form. In this example, the exponent of the logarithm can be 2.

[0263] Additionally, information about the maximum depth of multiple tree types can be transmitted using signals based on luminance or chrominance signals. In the following text, the value represented by Y or luminance and the information represented by C or chrominance can respectively represent information about luminance units and chrominance units.

[0264] For example, information about the maximum depth of a multi-type tree can be sent using signals. For instance, this information can be sent via `slice_max_mtt_hierarchy_depth_luma` or `slice_max_mtt_hierarchy_depth_chroma`. In the example, `slice_max_mtt_hierarchy_depth_luma` or `slice_max_mtt_hierarchy_depth_chroma` can have values ​​from 0 to `CtbLog2SizeY - MinCbLog2SizeY`. The decoder can deduce the maximum depth (MaxMttDepthY or MaxMttDepthC) of the multi-type tree using `slice_max_mtt_hierarchy_depth_luma` or `slice_max_mtt_hierarchy_depth_chroma`.

[0265] The difference information between the size of the CTU and the maximum size of the transform block can be signaled or determined at a higher level of the coding unit. For example, the higher level could be sequence level, frame level, sub-frame level, stripe level, parallel block group level, parallel block level, block level, etc. The maximum size of the coding unit corresponding to each node of the binary tree (hereinafter referred to as the maximum size of the binary tree) can be determined based on the size of the coding tree unit and the difference information. The maximum size of the coding unit corresponding to each node of the ternary tree (hereinafter referred to as the maximum size of the ternary tree) can vary depending on the stripe type. For example, for an intra-frame stripe, the maximum size of the ternary tree can be 32×32. For example, for an inter-frame stripe, the maximum size of the ternary tree can be 128×128. Similarly, the maximum size of the CU corresponding to each node of the binary tree (the maximum size of the binary tree) can have different values ​​depending on the stripe type. For example, in the case of an intra-frame stripe, the maximum size of the binary tree can be 32×32. Alternatively, for example, in the case of an inter-frame stripe, the maximum size of the binary tree can be 128×128. Information regarding the maximum size of the CU corresponding to each node of the ternary tree (the maximum size of the ternary tree) can be determined based on the size of the coding tree unit and the aforementioned 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) can be set as the minimum size of the coding block.

[0266] As another example, the maximum size of a binary tree and / or the maximum size of a ternary tree can be signaled or determined at the stripe level. Alternatively, the minimum size of a binary tree and / or the minimum size of a ternary tree can be signaled or determined at the stripe level.

[0267] In another example, the maximum size of a binary tree and / or the maximum size of a ternary tree can be signaled or determined at the sequence level, frame level, subframe level, stripe level, parallel block group level, parallel block level, block level, etc. Additionally, the minimum size of a binary tree and / or the minimum size of a ternary tree can be signaled or determined at the sequence level, frame level, subframe level, stripe level, parallel block group level, parallel block level, block level, etc.

[0268] In another example, the maximum depth of a binary tree and / or the maximum depth of a ternary tree can be signaled or determined at the sequence level, frame level, subframe level, stripe level, parallel block group level, parallel block level, and block level. Additionally, the minimum depth of a binary tree and / or the minimum depth of a ternary tree can be signaled or determined at the sequence level, frame level, subframe level, stripe level, parallel block group level, parallel block level, and block level.

[0269] Based on the size and depth information of the various blocks mentioned above, quadtree partitioning information, multi-type tree partitioning indication information, partition tree information, partition ratio level and / or partitioning direction information may or may not be included in the bitstream.

[0270] For example, when the size of the encoding unit is no greater than the minimum size of the quadtree, the encoding unit does not include quadtree partition information. Therefore, the quadtree partition information can be derived from the second value.

[0271] For example, when the size (horizontal and vertical dimensions) of the coding unit corresponding to a node of a multi-type tree is greater than the maximum size (horizontal and vertical dimensions) of a binary tree and / or the maximum size (horizontal and vertical dimensions) of a ternary tree, the coding unit may not be partitioned by the binary tree or the ternary tree. Therefore, multi-type tree partitioning indication information can be inferred from a second value without sending a signal.

[0272] Optionally, when the size (horizontal and vertical dimensions) of the coding unit corresponding to a node of a multi-type tree is the same as the maximum size (horizontal and vertical dimensions) of a binary tree and / or twice the maximum size (horizontal and vertical dimensions) of a ternary tree, the coding unit may not be further partitioned into binary or ternary trees. Therefore, multi-type tree partitioning indication information can be derived from a second value instead of being sent via a signal. This is because when coding units are partitioned through binary and / or ternary tree partitioning structures, coding units smaller than the minimum size of a binary tree and / or a ternary tree are generated.

[0273] Alternatively, binary or ternary partitions can be limited based on the size of the virtual pipeline data unit (hereinafter, the pipeline buffer size). For example, when a coding unit is partitioned into sub-coding units that are not suitable for the pipeline buffer size via binary or ternary partitions, the corresponding binary or ternary partitions may be limited. The pipeline buffer size can be the size of the largest transform block (e.g., 64×64). For example, when the pipeline buffer size is 64×64, the following partitions can be limited.

[0274] - N×M (N and / or M are 128) ternary tree partitions for encoding units

[0275] - 128×N (N<=64) binary tree partitioning for the horizontal direction of the encoding unit

[0276] - N×128 (N<=64) binary tree partitions used in the vertical direction of the encoding unit

[0277] Optionally, when the depth of the coding unit corresponding to a node of the multi-type tree is equal to the maximum depth of the multi-type tree, the coding unit may not be further partitioned into binary trees and / or ternary trees. Therefore, multi-type tree partitioning indication information may not be sent by signal, but it can be inferred from the second value.

[0278] Optionally, multi-type tree partitioning indication information may be signaled only if at least one of the 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 binary tree partitioning and / or ternary tree partitioning. Therefore, multi-type tree partitioning indication information may not be signaled, but it may be derived from a second value.

[0279] Optionally, partition direction information may be signaled only if both vertical binary tree partitions and horizontal binary tree partitions, or both vertical ternary tree partitions and horizontal ternary tree partitions, are possible for the coding units corresponding to the nodes of the multi-type tree. Otherwise, partition direction information may not be signaled, but it may be derived from the values ​​indicating possible partition directions.

[0280] Optionally, partition tree information may be signaled only if both vertical binary tree partitions and vertical ternary tree partitions, or both horizontal binary tree partitions and horizontal ternary tree partitions, are possible for encoding trees corresponding to nodes of multiple tree types. Otherwise, partition tree information may not be signaled, but rather derived from values ​​indicating possible partition tree structures.

[0281] When at least one of the width and height of a unit or block is not a power of 2 (2^n) N When ), the corresponding block can be encoded / decoded in a form where no residual signal exists.

[0282] In the example, the coded block flag (CBF) of a unit or block may not be entropy encoded / decoded, or may be estimated (inferred) to be 0.

[0283] In another example, the skip mode flag for the encoding mode of a unit or block may not be entropy encoded / decoded and may be estimated as a skip mode.

[0284] Therefore, for at least one of the width and height not being a power of 2(2^n) N For blocks containing transformations, the transformation / inverse transformation may not be performed. 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 required.

[0285] Figure 4 This is a diagram illustrating intra-frame prediction processing.

[0286] Figure 4 The arrows from the center outwards indicate the prediction direction of the intra-frame prediction mode.

[0287] Intra-frame coding and / or decoding can be performed using reference samples from neighboring blocks of the current block. A neighboring block can be a reconstructed neighboring block. For example, intra-frame coding and / or decoding can be performed using coding parameters or values ​​of reference samples included in the reconstructed neighboring block.

[0288] A prediction block can represent a block generated by performing intra-frame prediction. A prediction block can correspond to at least one of CU, PU, ​​and TU. The cells of a prediction block can have the size of one of CU, PU, ​​and TU. A prediction block can be a square block with dimensions such as 2×2, 4×4, 16×16, 32×32, or 64×64, or a rectangular block with dimensions such as 2×8, 4×8, 2×16, 4×16, and 8×16.

[0289] Intra-prediction can be performed based on the intra-prediction mode for the current block. The number of intra-prediction modes that the current block can have can be a fixed value, or it can be a value determined differently depending on the attributes of the predicted block. For example, the attributes of the predicted block can include the size and shape of the predicted block.

[0290] Regardless of the block size, the number of intra-prediction modes can be fixed at N. Alternatively, the number of intra-prediction modes can be 3, 5, 9, 17, 34, 35, 36, 65, or 67, etc. Optionally, the number of intra-prediction modes can vary depending on the block size or the color component type, or both. For example, the number of intra-prediction modes can vary depending on whether the color component is a luma signal or a chrominance signal. For example, the number of intra-prediction modes can increase as the block size increases. Optionally, the number of intra-prediction modes for the luma component block can be greater than the number of intra-prediction modes for the chrominance component block.

[0291] Intra-prediction modes can be non-angular or angular. Non-angular modes can be DC or planar modes, and angular modes can be prediction modes with a specific direction or angle. An intra-prediction mode can 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 can be greater than 1M, including both non-angular and angular modes. To perform intra-prediction on the current block, a step can be performed to determine whether a sample included in a reconstructed neighboring block can be used as a reference sample for the current block. When a sample cannot be used as a reference sample for the current block, a value obtained by copying or interpolating at least one sample value included in a reconstructed neighboring block, or by both copying and interpolating, can be used to replace the unavailable sample value, and the replaced sample value is used as a reference sample for the current block.

[0292] Figure 7 This is a diagram showing reference samples that can be used for intra-frame prediction.

[0293] like Figure 7 As shown, at least one of reference sample lines 0 to 3 can be used for intra-frame prediction of the current block. Figure 7 In this scenario, samples from fragments A and F can be filled using samples from the nearest fragments B and E, respectively, instead of being retrieved from reconstructed neighboring blocks. Index information indicating the reference sample lines to be used for intra-frame prediction of the current block can be transmitted via signaling. When the upper boundary of the current block is the boundary of the CTU, only reference sample line 0 can be available. Therefore, in this case, index information does not need to be transmitted via signaling. When using reference sample lines other than reference sample line 0, filtering for the prediction block, as described later, can be omitted.

[0294] When performing intra-frame prediction, filters can be applied to at least one of the reference samples and the prediction samples based on the intra-frame prediction mode and the current block size / shape.

[0295] In planar mode, when generating the prediction block for the current block, the sample value of the target sample is generated by using a weighted sum of the reference samples above and to the left of the current sample, and the reference samples to the upper right and lower left of the current block, based on the position of the target sample within the prediction block. Alternatively, in DC mode, the average of the reference samples above and to the left of the current block can be used when generating the prediction block. Furthermore, in angle mode, the prediction block can be generated using the reference samples above, to the left, to the upper right, and / or to the lower left of the current block. Real-valued interpolation can be performed to generate the prediction sample values.

[0296] In the case of intra-frame prediction between color components, a predicted 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, the parameters of a linear model between the first and second color components can be derived based on a template. The template may include the upper and / or left neighboring samples of the current block and the upper and / or left neighboring samples of the 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 in the template and the sample value of the corresponding second color component, and the sample value of the first color component with the minimum value in the template and the sample value of the corresponding second color component. When deriving the parameters of the linear model, the corresponding reconstructed block can be applied to the linear model to generate a predicted block for the current block. Depending on the video format, secondary sampling can be performed on the reconstructed block of the first color component and the neighboring samples of the corresponding reconstructed block. For example, when a sample point of the second color component corresponds to four samples of the first color component, the four samples of the first color component can be resampled to calculate a corresponding sample point. In this case, parameter derivation of the linear model and intra-frame prediction between color components can be performed based on the corresponding resampled sample point. Whether to perform intra-frame prediction between color components and / or the range of the template can be sent as an intra-frame prediction mode signal.

[0297] The current block can be partitioned into two or four sub-blocks, either horizontally or vertically. The partitioned sub-blocks can be reconstructed sequentially. That is, intra-prediction can be performed on the sub-blocks to generate sub-predicted blocks. Additionally, inverse quantization and / or inverse transform can be performed on the sub-blocks to generate sub-residual blocks. Reconstructed sub-blocks can be generated by adding sub-predicted blocks to sub-residual blocks. The reconstructed sub-blocks can be used as reference samples for intra-prediction of the sub-blocks. Sub-blocks can be blocks comprising a predetermined number (e.g., 16) or more samples. Therefore, for example, when the current block is an 8×4 or 4×8 block, the current block can be partitioned into two sub-blocks. Furthermore, when the current block is a 4×4 block, the current block may not be partitioned into sub-blocks. When the current block has other sizes, it can be partitioned into four sub-blocks. Information regarding whether intra-prediction is performed based on sub-blocks and / or partitioning direction (horizontal or vertical) can be signaled. Intra-prediction based on sub-blocks can be limited to being performed only when using reference sample line 0. When performing sub-block-based intra-prediction, filtering for the prediction block, which will be described later, may not be performed.

[0298] A final prediction block can be generated by performing filtering on the prediction block that is intra-predicted. Filtering can be performed by applying predetermined weights to the target sample, the left reference sample, the top reference sample, and / or the top-left reference sample. 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-prediction mode, and the position of the target sample in the prediction block. Filtering can be performed only in a predetermined intra-prediction mode (e.g., DC, planar, vertical, horizontal, diagonal, and / or adjacent diagonal modes). An adjacent diagonal mode can be a mode that adds k to or subtracts k from the diagonal mode. For example, k can be a positive integer of 8 or less.

[0299] The intra-prediction mode of the current block can be entropy-encoded / entropy-decoded by predicting the intra-prediction modes of adjacent blocks. When the intra-prediction modes of the current block and its neighboring blocks are the same, information indicating that the intra-prediction modes of the current block and its neighboring blocks are the same can be signaled using predetermined flag information. Alternatively, an indicator of the intra-prediction mode among multiple neighboring blocks that is the same as the intra-prediction mode of the current block can be signaled. When the intra-prediction modes of the current block and its neighboring blocks are different, the intra-prediction mode information of the current block can be entropy-encoded / entropy-decoded by performing entropy encoding / entropy decoding based on the intra-prediction modes of neighboring blocks.

[0300] Figure 5 This is a diagram illustrating an embodiment of inter-screen prediction processing.

[0301] exist Figure 5 In this context, rectangles can represent the image. Figure 5In the image, the arrow indicates the prediction direction. Based on the encoding type of the frame, frames can be classified into intra-frame frames (I-frames), predictive frames (P-frames), and dual-predictive frames (B-frames).

[0302] I-frames can be encoded via intra-frame prediction without requiring inter-frame prediction. P-frames can be encoded via inter-frame prediction using a reference frame present in one direction (i.e., forward or backward) relative to the current block. B-frames can be encoded via inter-frame prediction using reference frames present in both directions (i.e., forward and backward) relative to the current block. When using inter-frame prediction, the encoder can perform inter-frame prediction or motion compensation, and the decoder can perform the corresponding motion compensation.

[0303] The following section will describe in detail an embodiment of inter-screen prediction.

[0304] Reference frames and motion information can be used to perform inter-frame prediction or motion compensation.

[0305] Motion information of the current block can be derived by each of the encoding device 100 and the decoding device 200 during inter-frame prediction. The motion information of the current block can be derived using motion information of reconstructed neighboring blocks, motion information of co-position blocks (also called col blocks or co-location blocks), and / or motion information of blocks adjacent to the co-position block. A co-position block can represent a block within a previously reconstructed co-position frame (also called a col frame or co-location frame) that is spatially located at the same position as the current block. A co-position frame can be one of one or more reference frames included in a list of reference frames.

[0306] The methods for deriving motion information can 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, triangular partitioning mode, inter-frame-intra-frame combined prediction mode, affine mode, etc. Here, the merge mode can be referred to as motion merge mode.

[0307] For example, when AMVP is used as a prediction mode, at least one of the motion vectors of reconstructed neighboring blocks, co-located blocks, blocks adjacent to co-located blocks, and (0,0) motion vectors can be identified as motion vector candidates for the current block, and a motion vector candidate list is generated using these motion vector candidates. Motion vector candidates for the current block can be derived using the generated motion vector candidate list. Motion information for the current block can be determined based on the derived motion vector candidates. The motion vectors of co-located blocks or blocks adjacent to co-located blocks can be referred to as temporal motion vector candidates, and the motion vectors of reconstructed neighboring blocks can be referred to as spatial motion vector candidates.

[0308] Encoding device 100 can calculate the motion vector difference (MVD) between the motion vector of the current block and motion vector candidates, and can perform entropy encoding on the motion vector difference (MVD). Additionally, encoding device 100 can perform entropy encoding on the motion vector candidate index and generate a bitstream. The motion vector candidate index indicates the best motion vector candidate among the motion vector candidates included in the motion vector candidate list. Decoding device 200 can perform entropy decoding on the motion vector candidate index included in the bitstream, and can select motion vector candidates for the target block to be decoded from the motion vector candidates included in the motion vector candidate list by using the entropy-decoded motion vector candidate index. Furthermore, decoding device 200 can add the entropy-decoded MVD to the motion vector candidate extracted by entropy decoding, thereby deriving the motion vector of the target block to be decoded.

[0309] Additionally, the encoding device 100 can perform entropy encoding on the calculated MVD resolution information. The decoding device 200 can use the MVD resolution information to adjust the resolution of the entropy-decoded MVD.

[0310] Additionally, the encoding device 100 calculates the motion vector difference (MVD) between the motion vectors and motion vector candidates in the current block based on an affine model, and performs entropy encoding on the MVD. The decoding device 200 derives motion vectors based on each sub-block by summing the entropied MVD and the affine control motion vector candidates to derive the affine control motion vectors of the target block.

[0311] The bitstream may include a reference frame index indicating a reference frame. The reference frame index may be entropy encoded by the encoding device 100 and subsequently transmitted as a bitstream to the decoding device 200. The decoding device 200 may generate a predicted block for the decoded target block based on the derived motion vector and reference frame index information.

[0312] Another example of a method for deriving motion information for the current block could be a merge pattern. A merge pattern can represent a method for merging the motion of multiple blocks. A merge pattern can represent a pattern for deriving motion information for the current block from the motion information of neighboring blocks. When a merge pattern is applied, the reconstructed motion information of neighboring blocks and / or the motion information of co-located blocks can be used to generate a list of merge candidates. Motion information may include at least one of motion vectors, reference frame indices, and inter-frame prediction indicators. Prediction indicators may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).

[0313] The merge candidate list can be a list of stored motion information. The motion information included in the merge candidate list can be at least one of the following: motion information of neighboring blocks adjacent to the current block (spatial merge candidate), motion information of co-located blocks of the current block in the reference frame (temporal merge candidate), new motion information generated by combining motion information existing in the merge candidate list, motion information of blocks encoded / decoded before the current block (history-based merge candidate), and zero merge candidate.

[0314] Encoding device 100 can generate a bitstream by performing entropy encoding on at least one of a merge flag and a merge index, and can transmit the bitstream as a signal to decoding device 200. The merge flag may be information indicating whether a merge mode is performed for each block, and the merge index may be information indicating which neighboring block among the current block's neighboring blocks is the target block for merging. 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 time neighboring block that is temporally adjacent to the current block.

[0315] Additionally, the encoding device 100 performs entropy encoding on the correction information for correcting motion vectors in the motion information of the merging candidates and sends it as a signal to the decoding device 200. The decoding device 200 can correct the motion vectors of the merging candidates selected according to the merging 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 that corrects the motion vectors of the merging candidates based on the correction information sent as a signal can be referred to as a merging mode with motion vector difference.

[0316] Skip mode can be a mode in which motion information of neighboring blocks is applied to the current block as is. When skip mode is applied, encoding device 100 can perform entropy encoding on information about which block's motion information will be used as the current block's motion information to generate a bitstream, and can send the bitstream as a signal to decoding device 200. Encoding device 100 may not send syntax elements regarding at least one of motion vector difference information, coded block flags, and transform coefficient levels as signals to decoding device 200.

[0317] Sub-block merging mode can represent a pattern of deriving motion information on a sub-block basis within a coded block (CU). When applying sub-block merging mode, a list of sub-block merging candidates can be generated using motion information of sub-blocks that are in the same position as the current sub-block in the reference frame (based on sub-block time merging candidates) and / or affine control point motion vector merging candidates.

[0318] The triangular partitioning pattern can be represented by deriving motion information by partitioning the current block into diagonal directions, using each of the derived motion information to derive each prediction sample, and deriving the pattern of prediction samples for the current block by weighting each of the derived prediction samples.

[0319] The inter-frame-intra-frame combined prediction mode can be represented as a mode for deriving the prediction samples of the current block by weighting the prediction samples generated by inter-frame prediction and the prediction samples generated by intra-frame prediction.

[0320] The decoding device 200 can self-correct the derived motion information. The decoding device 200 can search a predetermined region based on a reference block indicated by the derived motion information, and derive motion information with minimum SAD as corrected motion information.

[0321] Decoding device 200 can use optical flow to compensate for prediction samples derived via inter-frame prediction.

[0322] Figure 6 This is a diagram illustrating the transformation and quantization processes.

[0323] like Figure 6 As shown, a transform and / or quantization process is performed on the residual signal to produce 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 through intra-frame prediction or inter-frame prediction. The transform can be a first transform, a second transform, or both. The first transform of the residual signal produces transform coefficients, and the second transform of the transform coefficients produces second transform coefficients.

[0324] At least one scheme selected from a variety of predefined transform schemes is used to perform the initial transform. 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 initial transform may undergo a secondary transform. The transform scheme used for the initial and / or secondary transforms can be determined based on the coding parameters of the current block and / or its neighboring blocks. Optionally, transform information indicating the transform scheme can be transmitted via a signal. DCT-based transforms may include, for example, DCT-2, DCT-8, etc. DST-based transforms may include, for example, DST-7.

[0325] A quantized level signal (quantization coefficients) can be generated by performing quantization on the residual signal or the result of performing an initial transform and / or a secondary transform. Depending on the intra-frame prediction mode or block size / shape, the quantized level signal can be scanned using at least one of a diagonal upper-right scan, a vertical scan, and a horizontal scan. For example, when scanning coefficients in a diagonal upper-right scan, the block-form coefficients change to a one-dimensional vector form. In addition to the diagonal upper-right scan, depending on the intra-frame prediction mode and / or the size of the transform block, a horizontal scan that horizontally scans the coefficients in two-dimensional block form or a vertical scan that vertically scans the coefficients in two-dimensional block form can be used. The scanned quantized level coefficients can be entropy-encoded for insertion into the bitstream.

[0326] The decoder performs entropy decoding on the bitstream to obtain the quantized level coefficients. The quantized level coefficients can be arranged in a two-dimensional block format using a reverse scan. For a reverse scan, at least one of a diagonal upper-right scan, a vertical scan, and a horizontal scan can be used.

[0327] Then the quantized level coefficients can be dequantized, followed by a second inverse transform as needed, and finally a first inverse transform as needed to generate the reconstructed residual signal.

[0328] Inverse mapping in the dynamic range can be performed on the luma components reconstructed via intra-frame prediction or inter-frame prediction prior to intra-loop filtering. The dynamic range can be divided into 16 equal segments, and a mapping function for each segment can be signaled. The mapping function can be signaled at the strip level or parallel block group level. The inverse mapping function used to perform the inverse mapping can be derived based on the mapping function. Intra-loop filtering, reference frame storage, and motion compensation are performed in the inverse mapping region, and the prediction blocks generated by inter-frame prediction are transformed into the mapping region via mapping using the mapping function and then used to generate reconstructed blocks. However, since intra-frame prediction is performed in the mapping region, the prediction blocks generated via intra-frame prediction can be used to generate reconstructed blocks without mapping / inverse mapping.

[0329] When the current block is a residual block of the chroma component, the residual block can be transformed into the inverse-mapped region by scaling the chroma components of the mapped region. The availability of scaling can be signaled at the stripe level or the parallel block group level. Scaling can only be applied if the mapping of the luma component is available and the partitions of the luma component and the partitions of the chroma component follow the same tree structure. Scaling can be performed based on the average of the sample values ​​of the luma prediction block corresponding to the chroma block. In this case, when the current block uses inter-frame prediction, the luma prediction block can represent the mapped luma prediction block. The required scaling value can be derived by using an index-referenced lookup table of the segment to which the average of the sample values ​​of the luma prediction block belongs. Finally, by scaling the residual block using the derived value, the residual block can be transformed into the inverse-mapped region. Chroma component block recovery, intra-frame prediction, inter-frame prediction, intra-loop filtering, and reference frame storage can then be performed in the inverse-mapped region.

[0330] Information indicating whether the mapping / inverse mapping of the luminance and chrominance components is available can be sent via a sequence parameter set using signals.

[0331] The predicted block for the current block can be generated based on a block vector indicating the displacement between the current block and a reference block in the current frame. In this way, the prediction mode used to generate the predicted block with reference to the current frame is called Intra-Block Copy (IBC) mode. IBC mode can be applied to M×N (M<=64, N<=64) coding units. IBC modes can include skip mode, merge mode, AMVP mode, etc. In 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 can include at least one of spatial candidates, history-based candidates, candidates based on the average of two candidates, and zero merge candidates. In AMVP mode, the difference block vector can be signaled. Additionally, the predicted block vector can be derived from the left neighboring block and the top neighboring block of the current block. The index of the neighboring block to be used can be signaled. The predicted 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 restricted such that the predicted block of the current block is located in the region of the three 64×64 blocks preceding the 64×64 block to which the current block belongs, in the encoding / decoding order. By restricting the value of the block vector in this way, memory consumption and device complexity can be reduced in implementations according to the IBC mode.

[0332] Figure 8 This is a diagram illustrating the boundaries of a screen / sub-screen / strip / parallel block / block, etc., according to an embodiment of the present invention.

[0333] Figure 8(a) is a diagram showing an example of the current block including both the right boundary and the bottom boundary. Figure 8 (b) is a diagram showing an example of the current block including its lower boundary. Figure 8 (c) is a diagram showing an example of the current block including its right boundary.

[0334] When the current block includes the right boundary, it can indicate that the horizontal coordinate of at least one sample point included in the current block is greater than the horizontal coordinate of a sample point that is adjacent to and included in the frame / subframe / strip / parallel block / block, etc.

[0335] For example, when the current block includes the right boundary, it can be represented as the horizontal coordinate position obtained by adding the width of the current block in the horizontal direction to the coordinate (x,y) corresponding to the (0,0) position of the current block (the upper left position of the current block), which is greater than the horizontal coordinate of the boundary of the screen / sub-screen / strip / parallel block / block.

[0336] Additionally, when the current block includes the lower boundary, it can be indicated that the vertical coordinate of at least one sample point included in the current block is greater than the vertical coordinate of a sample point that is adjacent to and included in the frame / subframe / strip / parallel block / block, etc.

[0337] For example, when the current block includes the bottom boundary, it can be represented as the vertical coordinate position obtained by adding the height of the current block in the vertical direction to the coordinate (x,y) corresponding to the (0,0) position of the current block (the upper left position of the current block) and being greater than the vertical coordinate of the boundary of the screen / sub-screen / strip / parallel block / block.

[0338] Figure 9 This is a diagram illustrating a partitioning method according to an embodiment of a block based on the present invention.

[0339] Figure 9 (a) is a diagram showing an example of a vertical binary tree partition. Figure 9 (b) is a diagram showing an example of a horizontal binary tree partition. Figure 9 (c) is a diagram showing an example of a vertical ternary tree partition. Figure 9 (d) is a diagram showing an example of a horizontal ternary tree partition.

[0340] When the current block includes boundaries such as frames / subframes / strips / parallel blocks / blocks, partitions, etc., implicit partitioning of the current block can be performed. Hereinafter, a boundary can refer to at least one boundary of a frame / subframe / strip / parallel block / block, etc. Each boundary of a frame / subframe / strip / parallel block / block can represent at least one of a right boundary, a bottom boundary, a left boundary, and a top boundary. Implicit partitioning can refer to partitioning the corresponding block using a specific partitioning method without using additional signaled encoding parameters. Alternatively, implicit partitioning can refer to partitioning the corresponding block using a specific partitioning method when predetermined conditions are met, regardless of whether additional signaled encoding parameters exist.

[0341] At least one of the right and left boundaries can represent a vertical boundary. At least one of the top and bottom boundaries can represent a horizontal boundary.

[0342] Vertical or horizontal partitions can be available on the current block when the boundary is a vertical or horizontal boundary. Additionally, partitioning of the current block can be implicitly performed based on its size.

[0343] Additionally, when partitioning the current block, a specific partitioning method can be executed, and information about the specific partitioning method can be encoded / decoded. Here, the specific partitioning method can be determined based on whether the boundary is a vertical or horizontal boundary, and can 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 the example, when the current block includes a vertical boundary, at least one of quadtree partitioning, vertical binary tree partitioning, and vertical ternary tree partitioning can be performed such that the block obtained by partitioning the current block does 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 can be performed such that the 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 can be restricted so that vertical binary tree partitioning is performed only on the current block. Vertical binary tree partitioning can be performed implicitly on the current block. Additionally, information about the vertical binary tree partitioning of the current block can be entropy-encoded / decoded. Here, information about partitions other than the vertical binary tree partitioning may not be entropy-encoded / decoded.

[0347] Specifically, when the current block includes a right boundary and the height of the current block exceeds the size of the largest transform block, the current block can be restricted so that vertical binary tree partitioning is unavailable for the current block.

[0348] For example, if the current block includes a right boundary and the height of the current block exceeds the size of the maximum transform block (64), the current block can be restricted so that vertical binary tree partitioning is not available for the current block.

[0349] Additionally, if the current block includes the right boundary but does not include the bottom boundary, the current block can be restricted to make horizontal binary tree partitioning of the current block unavailable.

[0350] In another example, when the current block includes its lower boundary, partitioning of the current block can be restricted so that horizontal binary tree partitioning is performed only on the current block. Horizontal binary tree partitioning can be performed implicitly on the current block. Additionally, information about the horizontal binary tree partitioning of the current block can be entropy-encoded / decoded. Here, information about partitions other than the horizontal binary tree partitioning may not be entropy-encoded / decoded.

[0351] Specifically, when the current block includes the lower boundary, the current block can be restricted to make vertical binary tree partitioning of the current block unavailable.

[0352] Additionally, if the current block includes the lower boundary and the width of the current block exceeds the size of the maximum transform block, the current block can be restricted so that horizontal binary tree partitioning is unavailable for the current block.

[0353] In another example, when the current block includes a right boundary, partitioning of the current block can be restricted so that vertical ternary tree partitioning is performed only on the current block. Vertical ternary tree partitioning can be performed implicitly on the current block. Additionally, information about the vertical ternary tree partitioning of the current block can 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 can be restricted so that vertical binary tree partitioning is performed only on the current block. Vertical binary tree partitioning can be performed implicitly on the current block. Additionally, information about the vertical binary tree partitioning of the current block can 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 its lower boundary, partitioning of the current block can be restricted so that horizontal binary tree partitioning is performed only on the current block. Horizontal binary tree partitioning can be performed implicitly on the current block. Additionally, information about the horizontal binary tree partitioning of the current block can be entropy-encoded / decoded. Here, information about partitions other than the horizontal binary tree partitioning may not be entropy-encoded / decoded.

[0356] In another example, when the current block includes its lower boundary, partitioning of the current block can be restricted so that horizontal ternary partitioning is performed only on the current block. Horizontal ternary partitioning can be performed implicitly on the current block. Additionally, information about the horizontal ternary partitioning of the current block can be entropy-encoded / decoded. Here, information about partitions other than the horizontal ternary partitioning may not be entropy-encoded / decoded.

[0357] In another example, if the current block includes at least one of the right boundary and the top boundary, the current block can be restricted to make ternary tree partitioning of the current block unavailable.

[0358] In another example, when the current block includes both its right and bottom boundaries, partitioning of the current block can be restricted so that quadtree partitioning is performed only on the current block. Quadtree partitioning can also be performed implicitly on the current block. Additionally, information about the quadtree partitioning of the current block can be entropy-encoded / decoded. In this paper, information about partitions other than quadtree partitioning may not be entropy-encoded / decoded.

[0359] In another example, when the current block includes a right boundary and its height is greater than the size of the largest transform block, the current block can be restricted to prevent vertical binary tree partitioning. Here, quadtree partitioning can be performed on the current block. Quadtree partitioning can be performed implicitly on the current block without performing entropy encoding / decoding on information about the partitions.

[0360] In another example, when the current block includes a lower boundary and its width is greater than the size of the largest transform block, the current block can be restricted to prevent horizontal binary tree partitioning. Here, quadtree partitioning can be performed on the current block. Quadtree partitioning can be performed implicitly on the current block without performing entropy encoding / decoding on information about the partitions.

[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 largest transform block, and the partition of the current block is a vertical binary tree partition, the current block can be restricted to prevent binary tree partitioning. Here, quadtree partitioning can be performed on the current block. Quadtree partitioning can be performed implicitly on the current block without performing entropy encoding / decoding on information about the partitions.

[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 largest transform block, and the partition of the current block is a horizontal binary tree partition, the current block can be restricted to prevent binary tree partitioning. Here, quadtree partitioning can be performed on the current block. Quadtree partitioning can be performed implicitly on the current block without performing entropy encoding / decoding on information about the partitions.

[0363] To determine the partition structure of the current block, the following syntax can be defined.

[0364] In the example, qtbtt_dual_tree_intra_flag can indicate that for an I-strip, each CTU is partitioned based on 64×64 coding units, and the 64×64 coding units are used as the root nodes for the luma and chroma components.

[0365] For example, when qtbtt_dual_tree_intra_flag has a first value (e.g., 0), it can indicate that each CTU can be partitioned based on 64×64 coding units, and that 64×64 coding units are not used as root nodes for the luma and chroma components. When qtbtt_dual_tree_intra_flag has a second value (e.g., 1), it can indicate that each CTU can be partitioned based on 64×64 coding units, and that 64×64 coding units are used as root nodes for the luma and chroma components.

[0366] When `qtbtt_dual_tree_intra_flag` has a first value (e.g., 0), the partitioning structure for the luma component can be the same as that for the chroma component. However, the block size for the luma component and the block size for the chroma component can differ depending on the type of the chroma component. In the above cases, a single tree structure can be used as a reference. The single tree type can be identified as `SINGLE_TREE`.

[0367] When the stripe type is I-strip and qtbtt_dual_tree_intra_flag has a second value (e.g., 1), the block partitioning structure for the luma component and the block partitioning structure for the chroma component from the 64×64 coding unit can be different from each other. In this case, a dual-tree structure can be used. The tree type for the luma component in the dual-tree structure can be identified as DUAL_TREE_LUMA, and the tree type for the chroma component in the dual-tree structure can be identified as DUAL_TREE_CHROMA.

[0368] In the case of a single tree structure, the minimum block size for a chroma component can be set to 2×2 blocks. Blocks smaller than 2×2 blocks may not be used for the chroma component. In other words, partitioning based on a 2×2 block size may not be available for blocks of equal or greater size than 2×2 blocks.

[0369] Additionally, in the case of a single tree structure, the minimum block for the chroma component can be set to a 4×4 block. Here, 2×2, 2×4, and 4×2 blocks may not be used for the chroma component. In other words, partitions based on at least one of the following blocks may not be available: blocks from which the block size is equal to or greater than at least one of 2×2, 2×4, and 4×2 blocks.

[0370] Furthermore, in the case of a dual-tree structure, the smallest block for the chroma component can be set to a 4×4 block. Here, 2×2, 2×4, and 4×2 blocks may not be used for the chroma component. In other words, partitions based on at least one of the following blocks may not be available: blocks from which the block size is equal to or greater than at least one of 2×2, 2×4, and 4×2 blocks.

[0371] The current block may be restricted to make quadtree partitioning of the current block unavailable if at least one of the following conditions is met.

[0372] - The case where the current block belongs to a tree type of SINGLE_TREE or DUAL_TREE_LUMA, and the width or height of the current block is equal to or less than the MinQtSizeY of the minimum quadtree size representing the luminance component.

[0373] - The current block belongs to a tree type of DUAL_TREE_CHROMA, and the value obtained by dividing the width or height of the current block by SubWidthC, which is the subsampling factor of the chroma signal in the horizontal direction, is equal to or less than MinQtSizeC, the minimum quadtree size representing the luminance component. (Here, the SubWidthC value, which is the subsampling factor of the chroma signal in the horizontal direction, can be used as the width of the current block, and the SubHeightC value, which is the subsampling factor of the chroma signal in the vertical direction, can be used as the height of the current block. Additionally, the larger of the SubWidthC value and the SubHeightC value can be used as the width or height of the current block.)

[0374] - The case where the depth of the binary tree partition and ternary tree partition (the depth of the multi-type tree) of the current block is not 0.

[0375] - The current block belongs to a tree type of DUAL_TREE_CHROMA, and the value obtained by dividing the width or height of the current block by the SubWidthC value, which is the subsampling factor of the chroma signal in the horizontal direction, is equal to or less than 4. (Here, the SubWidthC value, which is the subsampling factor of the chroma signal in the horizontal direction, can be used as the width of the current block, and the SubHeightC value, which is the subsampling factor of the chroma signal in the vertical direction, can be used as the height of the current block. Additionally, the larger of the SubWidthC value and the SubHeightC value can be used as the width or height of the current block.)

[0376] - The current block belongs to a tree type of DUAL_TREE_CHROMA, and the current block's mode type is at least one of intra-prediction mode, intra-block copy (IBC) mode, and palette coding mode.

[0377] Additionally, based on the width and / or height of the current block (CU), binary tree partitioning and / or ternary tree partitioning can be restricted to be unavailable.

[0378] In the example, ternary tree partitioning can be restricted to be unavailable when the width and / or height of the current block is L. Here, L can be 128.

[0379] In another example, horizontal binary tree partitioning can be restricted to be unavailable when N is less than 64 within the current block of size M×N (M is the width and N is the height). Here, M can be 128.

[0380] In another example, vertical binary tree partitioning can be restricted to be unavailable when M is less than 64 within the current block of size M×N (M is the width and N is the height). Here, N can be 128.

[0381] In another example, the current block can be restricted to prevent vertical binary tree partitioning when its width is equal to or less than the size of the maximum transform block and its height is greater than the size of the maximum transform block. For example, the current block can be restricted to prevent vertical binary tree partitioning when its width is equal to or less than 64 or 32, which is the size of the maximum transform block, and its height is greater than 64 or 32, which is the size of the maximum transform block.

[0382] In another example, the current block can be restricted to prevent horizontal binary tree partitioning if its height is equal to or less than the size of the maximum transform block and its width is greater than the size of the maximum transform block. For example, the current block can be restricted to prevent horizontal binary tree partitioning if its width is greater than 64 or 32, which is the size of the maximum transform block, and its height is equal to or less than 64 or 32, which is the size of the maximum transform block.

[0383] In another example, if the width or height of the current block is equal to or less than the minimum binary tree size of the luminance component, the current block can be restricted so that binary tree partitioning of the current block is unavailable.

[0384] In another example, if the width of the current block is greater than the size of the maximum binary tree, the current block can be restricted so that binary tree partitioning of the current block is unavailable.

[0385] In another example, if the height of the current block is greater than the size of the maximum binary tree, the current block can be restricted so that binary tree partitioning of the current block is unavailable.

[0386] In another example, the current block can be restricted to make binary tree partitioning unavailable when the depth of the binary tree partition and ternary tree partition (the depth of the multi-type tree) of the current block is equal to or greater than the maximum depth of the binary tree partition and ternary tree partition (the maximum depth of the multi-type tree).

[0387] In another example, if the tree type to which the current block belongs is DUAL_TREE_CHROMA, and the product of the value obtained by dividing the width of the current block by the SubWidthC value, which is the subsampling factor of the chroma signal in the horizontal direction, and the value obtained by dividing the height of the current block by the SubHeightC value, which is the subsampling factor of the chroma signal in the vertical direction, is equal to or less than 16, the current block can be restricted so that binary tree partitioning is not available 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 intra-prediction mode, intra-block copy (IBC) mode, and palette coding mode, the current block can be restricted so that binary tree partitioning of the current block is unavailable.

[0389] In another example, if the width or height of the current block is greater than the size of the largest transform block, the current block can be restricted so that ternary tree partitioning is unavailable for the current block.

[0390] In another example, if the width or height of the current block is greater than the size of the largest transform block and greater than the minimum size of the largest ternary tree, the current block can be restricted so that ternary tree partitioning is unavailable for the current block.

[0391] In another example, if the width or height of the current block is equal to or less than twice the size of the minimum ternary tree, the current block can be restricted so that ternary tree partitioning is not available for the current block.

[0392] In another example, the current block can be restricted to make ternary partitioning unavailable when the depth of the binary tree partition and 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 ternary tree partition (the maximum depth of the multi-type tree).

[0393] In another example, if the tree type to which the current block belongs is DUAL_TREE_CHROMA, and the product of the value obtained by dividing the width of the current block by the SubWidthC value, which is the subsampling factor of the chroma signal in the horizontal direction, and the value obtained by dividing the height of the current block by the SubHeightC value, which is the subsampling factor of the chroma signal in the vertical direction, is equal to or less than 32, the current block can be restricted so that ternary tree partitioning is not available 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 intra-prediction mode, intra-block copy (IBC) mode, and palette coding mode, the current block can be restricted so that ternary tree partitioning is not available for the current block.

[0395] Here, the size of the maximum transform block can be 64 or 32, and is indicated by a flag sent from the encoder to the decoder via a signal. For example, when the flag sent via a signal has a first value, the size of the maximum transform block can be 64. Alternatively, when the flag sent via a signal has a second value, the size of the maximum transform block can be 32.

[0396] In another example, the current block can be restricted to allow ternary tree partitions in a 128×128 block, vertical binary tree partitions in a 128×64 block, and horizontal binary tree partitions in a 64×128 block. Alternatively, the current block can be restricted to disallow ternary tree partitions in both 128×64 and 64×128 blocks.

[0397] When partitioning the current block, the resulting sub-blocks can be restricted so that their (width:height) ratio remains constant at a specific ratio. In other words, the current block can be restricted so that it is partitioned into sub-blocks with a (width:height) ratio equal to or less than a specific ratio. For example, the (width:height) ratio could be 1:N, and the (height:width) ratio could be N:1. Here, N can be a positive integer such as 2, 3, 4, 5, 6, 7, 8, etc. Furthermore, N can be determined based on at least one of the encoding parameters of the current block and the encoding parameters of the candidate blocks. Additionally, N can be a preset value in the encoder / decoder, or it can be a value sent from the encoder to the decoder via a signal.

[0398] When the ratio of the resulting sub-blocks obtained by partitioning the current block becomes greater than the above ratio, entropy encoding / decoding of the information partitioning of the resulting sub-blocks is not required.

[0399] As a first example of partitioning the current block, the following processing can be performed when the current block includes the boundaries of a frame / subframe / strip / parallel block / block, etc.

[0400] 1) The current block includes both the right boundary and the bottom boundary.

[0401] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0402] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. Binary tree partitioning can be implicitly performed on the current block.

[0403] 2) The case where the current block includes the lower boundary.

[0404] 2-1) When the current block is a quadtree block and its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0405] 2-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information about whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0406] 2-3) Additionally (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), partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly 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 its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning is available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary or ternary partitioning can be avoided on the current block.

[0409] 3-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information about whether quadtree partitioning or vertical binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0410] 3-3) Additionally (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), partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0411] As a second example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0412] 1) The current block includes both the right boundary and the bottom boundary.

[0413] 1-1) When the current block is a quadtree block and its size is greater than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0414] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. Binary tree partitioning can be implicitly performed on the current block.

[0415] 2) The case where the current block includes the lower boundary.

[0416] 2-1) When the current block is a quadtree block and its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0417] 2-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information about whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0418] 2-3) Additionally (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), partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly 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 its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0421] 3-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information about whether quadtree partitioning or vertical binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0422] 3-3) Additionally (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), partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0423] As a third example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0424] 1) The current block includes both the right boundary and the bottom boundary.

[0425] 1-1) When the size of the current block is greater than the size of the largest quadtree block, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Optionally, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. Binary tree partitioning can be implicitly performed on the current block.

[0426] 1-2) Additionally, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0427] 2) The case where the current block includes the lower boundary.

[0428] 2-1) When the current block is a quadtree block and its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0429] 2-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information about whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0430] 2-3) Additionally (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), partitioning of the current block can be restricted so that only horizontal binary tree partitions are available on the current block. Horizontal binary tree partitioning can be performed implicitly 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 its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0433] 3-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information about whether quadtree partitioning or vertical binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0434] 3-3) Additionally (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), partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0435] As a fourth example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0436] 1) The current block includes both the right boundary and the bottom boundary.

[0437] 1-1) When the size of the current block is greater than the size of the smallest binary tree block, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Optionally, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available on the current block. Binary tree partitioning can be implicitly performed on the current block.

[0438] 1-2) Additionally, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0439] 2) The case where the current block includes the lower boundary.

[0440] 2-1) When the current block is a quadtree block and its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0441] 2-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or horizontal binary tree partitioning is available for the current block. Information about whether quadtree partitioning or horizontal binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0442] 2-3) Additionally (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), partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly 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 its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0445] 3-2) When the current block is a quadtree block and its size is greater than the size of the smallest quadtree block and equal to or less than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning or vertical binary tree partitioning is available for the current block. Information about whether quadtree partitioning or vertical binary tree partitioning is performed on the current block can be entropy encoded / decoded.

[0446] 3-3) Additionally (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), partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0447] As a fifth example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0448] 1) The current block includes both the right boundary and the bottom boundary.

[0449] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0450] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. In other words, binary tree partitioning can be implicitly performed on the current block.

[0451] 2) The case where the current block includes the lower boundary.

[0452] 2-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0453] 2-2) Additionally (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), partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly 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 its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0456] 3-2) Additionally (when the current block is a binary or ternary tree block, or when the size of the current block is equal to or less than the size of the smallest quadtree block), partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0457] As a sixth example of partitioning the current block, when the current block includes the boundaries of a screen / subscreen / strip / parallel block / block, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of the screen / subscreen / strip / parallel block / block, etc.

[0458] 1) The current block includes both the right boundary and the bottom boundary.

[0459] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0460] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. In other words, binary tree partitioning can be implicitly performed on the current block.

[0461] 2) The case where the current block includes the lower boundary.

[0462] 2-1) When the size of the current block is greater than the size of the smallest quadtree block, it is possible to restrict the availability of only quadtree partitions to the current block. Quadtree partitions can be implicitly performed on the current block. Therefore, at least one of binary tree partitions and ternary tree partitions cannot be performed on the current block.

[0463] 2-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly on the current block.

[0464] 3) The current block includes the right boundary.

[0465] 3-1) When the size of the current block is greater than the size of the smallest quadtree block, partitioning of the current block can be restricted so that only quadtree partitioning is available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0466] 3-2) Additionally, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0467] As a seventh example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0468] 1) The current block includes both the right boundary and the bottom boundary.

[0469] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0470] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. In other words, binary tree partitioning can be implicitly performed on the current block.

[0471] 2) The case where the current block includes the lower boundary.

[0472] 2-1) When the size of the current block is greater than the size of the smallest binary tree block, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block.

[0473] 2-2) Additionally, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot 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 greater than the size of the smallest binary tree block, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0476] 3-2) Additionally, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0477] As an eighth example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0478] 1) The current block includes both the right boundary and the bottom boundary.

[0479] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0480] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. In other words, binary tree partitioning can be implicitly performed on the current block.

[0481] 2) The case where the current block includes the lower boundary.

[0482] 2-1) When the current block is a quadtree block and its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0483] 2-2) Additionally (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 less than the size of the smallest quadtree block or equal to or less than the size of the largest binary tree block), partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly 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 its size is greater than both the smallest and largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary and ternary partitioning cannot be performed on the current block.

[0486] 3-2) Additionally (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 less than the size of the smallest quadtree block or equal to or less than the size of the largest binary tree block), partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0487] As a ninth example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0488] 1) The current block includes both the right boundary and the bottom boundary.

[0489] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0490] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. In other words, binary tree partitioning can be implicitly performed on the current block.

[0491] 2) The case where the current block includes the lower boundary.

[0492] 2-1) When the size of the current block is greater than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning is available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0493] 2-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly on the current block.

[0494] 3) The current block includes the right boundary.

[0495] 3-1) When the size of the current block is greater than the size of the largest binary tree block, partitioning of the current block can be restricted so that only quadtree partitioning is available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0496] 3-2) Additionally, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0497] As a tenth example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0498] 1) The current block includes both the right boundary and the bottom boundary.

[0499] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0500] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. In other words, binary tree partitioning can be implicitly performed on the current block.

[0501] 2) The case where the current block includes the lower boundary.

[0502] 2-1) When the size of the current block is greater than the size of the largest quadtree block, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly on the current block.

[0503] 2-2) Additionally, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, it is possible to avoid performing at least one of binary tree partitioning and ternary tree partitioning on the current block.

[0504] 3) The current block includes the right boundary.

[0505] 3-1) When the size of the current block is greater than the size of the largest quadtree block, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0506] 3-2) Additionally, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0507] As an eleventh example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0508] 1) The current block includes both the right boundary and the bottom boundary.

[0509] 1-1) When the current block is a quadtree block and its size is greater than the smallest quadtree block size, partitioning of the current block can be restricted so that only quadtree partitions are available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0510] 1-2) Additionally, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be implicitly performed on the current block. Alternatively, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be implicitly performed on the current block. Therefore, partitioning of the current block can be restricted so that only binary tree partitions are available for the current block. In other words, binary tree partitioning can be implicitly performed on the current block.

[0511] 2) When the current block includes the lower boundary, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly on the current block.

[0512] 3) When the current block includes a right boundary, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0513] As a twelfth example of partitioning the current block, when the current block includes the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., the following processing can be performed to efficiently perform block partitioning within the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc.

[0514] 1) When the current block includes both its right and bottom boundaries, partitioning of the current block can be restricted so that only quadtree partitioning is available for the current block. Quadtree partitioning can be performed implicitly on the current block. Therefore, at least one of binary tree partitioning and ternary tree partitioning cannot be performed on the current block.

[0515] 2) When the current block includes the lower boundary, partitioning of the current block can be restricted so that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning can be performed implicitly on the current block.

[0516] 3) When the current block includes a right boundary, partitioning of the current block can be restricted so that only vertical binary tree partitions are available for the current block. Vertical binary tree partitioning can be performed implicitly on the current block.

[0517] When the current block includes the boundaries of a frame / subframe / strip / parallel block / block, encoding / decoding may not be performed on the region within the current block that exceeds the boundaries of the frame / subframe / strip / parallel block / block, etc., and therefore at least one of the width and height of the region to be encoded / decoded within the current block may not be a power of 2 (2^N). N ).

[0518] For the region to be encoded / decoded, at least one of the width and height is not a power of 2 (2^N). N Given the current block, encoding / decoding can be performed in the form of residual signals where no region to be encoded / decoded exists.

[0519] When the current block includes at least one of the right boundary and the bottom boundary, when the current block includes the right boundary, and when the current block includes the bottom boundary, it is permissible to specify that at least one of the width and height of the region to be encoded / decoded is not a power of 2 (2^N). N Entropy encoding / decoding is performed on the information of the block.

[0520] Figure 10 It is shown that at least one of the width and height of the region to be encoded / decoded in the current block according to an embodiment of the present invention is not a power of 2 (2^N). N A diagram illustrating the situation. Figure 10 (a) is a diagram showing an example of the current block including both the right boundary and the bottom boundary. Figure 10 (b) is a diagram showing an example of the current block including its lower boundary. Figure 10 (c) is a diagram showing an example of the current block including its right boundary.

[0521] For the case where the current block includes at least one of the right boundary and the bottom boundary, the case where the current block includes the right boundary, and the case where the current block includes the bottom boundary, such as Figure 10 As shown, regarding whether at least one of the width and height of the region to be encoded / decoded in the current block is not a power of 2 (2^N), N The boundary processing information for encoding / decoding can be performed in the form of ) or whether or not the encoding / decoding in at least one of the first to twelfth examples is performed.

[0522] In other words, boundary processing information can be entropy-encoded / decoded in the form of flags. Furthermore, boundary processing information can indicate the following two situations.

[0523] When the boundary processing information has a first value, at least one of the width and height of the region to be encoded / decoded in the current block is not a power of 2 (2^N). N (in the form of ).

[0524] When the boundary processing information has a second value, at least one of the first to twelfth examples is used.

[0525] When the boundary processing information has a first value, encoding / decoding can be performed on the remaining area outside the boundary region within the current block.

[0526] Additionally, when the boundary processing information has a second value, the current block can be implicitly partitioned by using at least one of the first to twelfth examples, or the current block can be encoded / decoded by entropy encoding / decoding information about the partition.

[0527] In other words, boundary processing information can be entropy-encoded / decoded in index form. Furthermore, the boundary processing information can indicate the following N cases. Here, N can be determined based on at least one encoding parameter of the current block. Alternatively, N can be a preset value in the encoder / decoder, or a value sent from the encoder to the decoder via a signal.

[0528] When the boundary processing information has a first value, at least one of the width and height of the region to be encoded / decoded in the current block is not a power of 2 (2^N). N (in the form of ).

[0529] When the boundary processing information has a second value, at least one of the first to twelfth examples is used.

[0530] When the boundary processing information has a third value, at least one of the first to twelfth examples, other than the example used for the case where the boundary processing information has a second value, is used.

[0531] When the boundary processing information has the Nth value, at least one of the first to twelfth examples, other than the examples for cases where the boundary processing information has the second to N-1th values, is used.

[0532] When the boundary processing information has the Mth value, at least two of the examples from the first to the twelfth examples are used.

[0533] When the boundary processing information has a first value, encoding / decoding can be performed on the remaining area outside the boundary region within the current block.

[0534] Additionally, when the boundary processing information does not have a first value, the current block can be implicitly partitioned by using at least one of the first to twelfth examples, or the current block can be encoded / decoded by entropy encoding / decoding the information about the partition.

[0535] By using at least one of the above examples of performing block partitioning at the boundaries of screens / subscreens / strips / parallel blocks / blocks, etc., block partitioning can be performed efficiently with minimal determination of various complex conditions, thereby reducing the complexity of performing block partitioning.

[0536] Furthermore, the size of the smallest quaternary block represents the minimum size of the quaternary tree. Similarly, the size of the largest quaternary block represents the maximum size of the quaternary tree. Likewise, the size of the smallest binary block represents the minimum 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 can 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 can be a preset value in the encoder / decoder, or a value sent from the encoder to the decoder by a signal.

[0538] At least one encoding parameter of a neighboring block in the block partitioning structure can be used as at least one encoding parameter of the current block.

[0539] For example, at least one of the following information about neighboring blocks regarding cell partitioning, whether partitioning is performed in quadtree form, whether partitioning is performed in binary tree form, the partitioning direction (horizontal or vertical), the partitioning form (symmetric or asymmetric), the partitioning ratio (or whether partitioning is performed in ternary tree form, the partitioning direction (horizontal or vertical), the partitioning form (symmetric or asymmetric), and the partitioning ratio (or whether partitioning is performed in ternary tree form) can be used as at least one of the following information about the current block regarding cell partitioning, whether partitioning is performed in quadtree form, whether partitioning is performed in binary tree form, the partitioning direction (horizontal or vertical), the partitioning form (symmetric or asymmetric), and the partitioning ratio (or whether partitioning is performed in ternary tree form).

[0540] At least one encoding parameter of a neighboring block in the block partitioning structure can be used to derive at least one encoding parameter of the current block.

[0541] For example, at least one of the information about the neighboring block regarding cell 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 can be used to derive at least one of the information about the current block regarding cell 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.

[0542] Here, deriving at least one encoding parameter of the current block using at least one encoding parameter of neighboring blocks can mean determining at least one encoding parameter of the current block by using at least one encoding parameter of neighboring blocks.

[0543] At least one encoding parameter of a neighboring block in a block partitioning structure can be used to derive at least one encoding parameter of another block.

[0544] For example, at least one of the information about the neighboring block regarding cell 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 can be used to derive at least one of the information about the other block regarding cell 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.

[0545] Here, using at least one encoding parameter of a neighboring block to derive at least one encoding parameter of another block can mean determining at least one encoding parameter of another block by using at least one encoding parameter of a neighboring block.

[0546] At least one coding parameter of a neighboring block in the block partitioning structure can be used for intra-frame prediction of the current block.

[0547] For example, at least one of the following can be used for intra-prediction of the current block: the intra-prediction mode of the neighboring block, the intra-prediction direction, the reference sample filtering method, the prediction block filtering method, the prediction block filter taps, and the prediction block filter coefficients.

[0548] At least one coding parameter of a neighboring block in the block partitioning structure can be used for inter-frame prediction or motion compensation of the current block.

[0549] For example, at least one of the following can be used for 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 candidates, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter tap, interpolation filter coefficients, and the magnitude of motion vectors of neighboring blocks and the accuracy of 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 partitioning structure can be used for the transform, inverse transform, quantization, or dequantization of the current block. Here, the transform and inverse transform can include at least one of the first transform, second transform, first inverse transform, and second inverse transform.

[0551] For example, at least one of the following can be used for the current block's transform type, transform size, information about whether the first transform is used, information about whether the second transform is used, first transform index, second transform index, information about the presence of residual signals, coding block mode, coding block flag, quantization parameters, and quantization matrix: transform, inverse transform, quantization, or dequantization.

[0552] At least one encoding parameter of a neighboring block in the block partitioning structure can be used for entropy encoding / decoding of the current block.

[0553] For example, at least one of the following information about neighboring blocks—regarding cell 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—can be used to entropy encode / decode at least one of the following information about the current block: regarding cell 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. Here, entropy encoding / decoding may include determining the binarization / debinarization method, determining the context model, updating the context model, executing the normal mode, executing the bypass mode, etc.

[0554] At least one coding parameter of a neighboring block in the block partitioning structure can be used to perform filtering on the current block using methods such as in-loop filtering, deblocking filtering, adaptive sample offset, adaptive in-loop filtering, etc.

[0555] For example, at least one of the following can be used to perform filtering on the current block: whether an in-loop filter is applied, in-loop filter coefficients, in-loop filter taps, in-loop filter shape, in-loop filter form, whether a deblocking filter is applied, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape, deblocking filter form, whether adaptive sample offset is applied, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, whether adaptive in-loop filter is applied, adaptive in-loop filter coefficients, adaptive in-loop filter taps, adaptive in-loop filter shape, and adaptive in-loop filter form.

[0556] At least one coding parameter of a neighboring block in the block partitioning structure can be used for intra-frame prediction, inter-frame prediction or motion compensation, entropy coding / decoding, and filtering methods (such as in-loop filters, deblocking filters, adaptive sample offsets, adaptive in-loop filters, etc.) of another neighboring block.

[0557] At least one coding parameter of the luma signal block in the block partitioning structure can be used as at least one coding parameter of the chroma signal block. Furthermore, at least one coding parameter of the luma signal block in the block partitioning structure can be used to derive at least one coding parameter of the chroma signal block. Additionally, at least one coding parameter of the luma signal block in the block partitioning structure can be used for at least one of the following: intra-frame prediction, inter-frame prediction, motion compensation, transform, inverse transform, quantization, dequantization, entropy coding / decoding, in-loop filtering, deblocking filtering, adaptive sample offset, and adaptive in-loop filtering for the chroma signal block.

[0558] At least one coding parameter of the Cb / Cr signal block in the block partitioning structure can be used as at least one coding parameter of the Cb / Cr signal block. Furthermore, at least one coding parameter of the Cb / Cr signal block in the block partitioning structure can be used to derive at least one coding parameter of the Cb / Cr block signal. Additionally, at least one coding parameter of the Cb / Cr signal block in the block partitioning structure can be used for at least one of the following: intra-frame prediction, inter-frame prediction, motion compensation, transform, inverse transform, quantization, dequantization, entropy coding / decoding, in-loop filtering, deblocking filtering, adaptive sample offset, and adaptive in-loop filtering of the Cr / Cb signal block.

[0559] For each resulting block obtained using the above block partitioning structure, entropy encoding / decoding can be performed on at least one encoding parameter and information described below. Additionally, the method indicated by the following information can be executed based on at least one of the block size and block shape of at least one piece of entropy encoding / decoding information.

[0560] Motion information may include at least one of the following: motion vector, reference image index, inter-frame prediction indicator, information on whether skip mode is used (skip_flag), information on whether merge mode is used (merge_flag), merge index information (merge_index), information on motion vector resolution, information on overlapping block motion compensation, information on local illumination compensation, information on affine motion compensation, information on decoder-side motion vector derivation, and information on bidirectional optical flow.

[0561] Information about motion vector resolution can be information indicating whether at least one of the differences between motion vectors is using a specific resolution. Here, resolution can represent precision. Alternatively, a specific resolution can be set in at least one of integer pixel units (integer pel), 1 / 2 pixel units (1 / 2 pel), 1 / 4 pixel units (1 / 4 pel), 1 / 8 pixel units (1 / 8 pel), 1 / 16 pixel units (1 / 16 pel), 1 / 32 pixel units (1 / 32 pel), and 1 / 64 pixel units (1 / 64 pel).

[0562] Information about motion compensation for overlapping blocks can indicate whether to additionally use the motion vectors of spatially adjacent neighboring blocks to compute a weighted sum of predicted blocks when performing motion compensation on the current block.

[0563] Information regarding local illumination compensation may include information indicating whether at least one of a weighting factor and an offset value is applied when generating the prediction block for the current block. Here, the weighting factor and offset value may be values ​​calculated based on a reference block.

[0564] Information regarding affine motion compensation can indicate whether an affine motion model is used when performing motion compensation on the current block. In this paper, an affine motion model can be a model calculated by partitioning a block into sub-blocks using multiple parameters and by calculating the motion vectors of the sub-blocks using representative motion vectors.

[0565] Information regarding the decoder-side motion vector derivation can indicate whether the motion vectors required for motion compensation are derived and used in the decoder. Entropy encoding / decoding of motion vector information can be performed without relying on information regarding the decoder-side motion vector derivation. Alternatively, when information regarding the decoder-side motion vector derivation indicates that the motion vectors are derived and used in the decoder, entropy encoding / decoding of information regarding the merging mode can be performed. In other words, information regarding the decoder-side motion vector derivation can indicate whether a merging mode is used in the decoder.

[0566] Information about bidirectional optical flow can indicate whether motion compensation is performed by correcting motion vectors based on pixels or sub-blocks. Entropy encoding / decoding of pixel- or sub-block-based motion vectors can be performed without information about bidirectional optical flow. Here, correcting motion vectors can involve replacing block-based motion vectors with pixel- or sub-block-based motion vector values.

[0567] Figure 11 This is a flowchart illustrating a method for decoding an image according to an embodiment of the present invention.

[0568] In S1101, information about the block partitions of the current block included in the current frame can be decoded from the bitstream.

[0569] Here, information about block partitioning may include at least one of information about the current block size, information about the current block depth, and information about whether partitioning has been performed.

[0570] In S1102, the partitioning method for the current block can be determined based on information about the block partitions.

[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] In S1103, the current block can be partitioned using a defined partitioning method.

[0573] Here, the partitioning method can be determined based on whether the current block includes a predetermined boundary.

[0574] Here, the predetermined boundary may include at least one of the right boundary, bottom boundary, left boundary, and top boundary of the screen, sub-screen, strip, parallel block, and block to which the current block belongs.

[0575] Additionally, when the current block includes the right and bottom edges of the current screen and the width of the current block is greater than the size of the smallest quadtree block, the partitioning method can be determined as quadtree partitioning.

[0576] Additionally, when the current block includes the right edge of the current frame and the height of the current block is greater than the size of the largest transform block, the partitioning method can be determined as a partition other than the vertical binary tree partitioning.

[0577] Additionally, when the current block includes the lower boundary of the current screen and the width of the current block is greater than the size of the largest transform block, the partitioning method can be determined as a partition other than the horizontal binary tree partitioning.

[0578] Additionally, when the width of the current block is equal to or less than the size of the maximum transform block and the height of the current block is greater than the size of the maximum transform block, the partitioning method can be determined as a partition other than the vertical binary tree partitioning.

[0579] Additionally, when the height of the current block is equal to or less than the size of the maximum transform block and the width of the current block is greater than the size of the maximum transform block, the partitioning method can be determined as a partition other than the horizontal binary tree partitioning.

[0580] Here, the size of the maximum transform block can be the value sent from the encoder to the decoder by a signal.

[0581] Figure 12 This is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

[0582] In S1201, the partitioning method of the current block included in the current screen can be determined.

[0583] In S1202, the current block can be partitioned using a defined 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 can be determined based on whether the current block includes a predetermined boundary.

[0586] Here, the predetermined boundary may include at least one of the right boundary, bottom boundary, left boundary, and top boundary of the screen, sub-screen, strip, parallel block, and block to which the current block belongs.

[0587] Additionally, when the current block includes the right and bottom edges of the current screen and the width of the current block is greater than the size of the smallest quadtree block, the partitioning method can be determined as quadtree partitioning.

[0588] Additionally, when the current block includes the right edge of the current frame and the height of the current block is greater than the size of the largest transform block, the partitioning method can be determined as a partition other than the vertical binary tree partitioning.

[0589] Additionally, when the current block includes the lower boundary of the current screen and the width of the current block is greater than the size of the largest transform block, the partitioning method can be determined as a partition other than the horizontal binary tree partitioning.

[0590] Additionally, when the width of the current block is equal to or less than the size of the maximum transform block and the height of the current block is greater than the size of the maximum transform block, the partitioning method can be determined as a partition other than the vertical binary tree partitioning.

[0591] Additionally, when the height of the current block is equal to or less than the size of the maximum transform block and the width of the current block is greater than the size of the maximum transform block, the partitioning method can be determined as a partition other than the horizontal binary tree partitioning.

[0592] Here, the size of the maximum transform block can be the value sent from the encoder to the decoder by a signal.

[0593] In S1203, information about block partitions using the above partitioning method can be encoded.

[0594] Here, information about block partitioning may include at least one of information about the current block size, information about the current block depth, and information about whether partitioning has been performed.

[0595] When an image is partitioned based on at least one of the prediction unit (PU), transform unit (TU), prediction block (PB), and transform block (TB), at least one of the coding units in the above examples may be used.

[0596] The above examples of the present invention can be applied based on at least one size of the coding block, prediction block, block, and unit. Here, the size can be defined as a minimum size and / or a maximum size, such that the above examples are applied, or defined as a fixed size for applying the above examples. Furthermore, in the above examples, the first example can be applied to a first size, and the second example can be applied to a second size. In other words, the above examples can be combined based on the size. Additionally, 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 within a specific range.

[0597] Furthermore, 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 the maximum size can be one of the sizes of the coding block, the prediction block, the block, and the cell, respectively. In other words, the block with the minimum size and the block with the maximum size 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 the prediction block and equal to or less than the maximum size of the 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 time layers. Additional identifiers can be signaled to identify the time layers to which the above examples may be applied, and the above examples can be applied to the time layers specified by the corresponding identifiers. Here, the identifiers can be defined as the smallest and / or largest layers to which the above examples may be applied, or as indicating a specific time layer to which the above examples may be applied.

[0600] For example, the above examples can be applied only when the time layer of the current frame is the lowest layer. For example, the above examples can be applied only when the identifier of the time layer of the current frame is zero. For example, the above examples can be applied only when the identifier of the time layer of the current frame is 1. For example, the above examples can be applied only when the time layer of the current frame is the highest layer.

[0601] As described in the examples above of the present invention, when generating a reference screen list (reference screen list construction) and modifying the reference screen list, the reference screen set used can be at least one of reference screen lists L0, L1, L2 and L3.

[0602] According to the above examples of the present invention, when calculating the boundary strength in the deblocking filter, at least one 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 examples of the present invention can be applied when the motion vector has at least one of the following units: 16 pixels (16 pel), 8 pixels (8 pel), 4 pixels (4 pel), an integer pixel (integer pel), a 1 / 2 pixel (1 / 2 pel), a 1 / 4 pixel (1 / 4 pel), a 1 / 8 pixel (1 / 8 pel), a 1 / 16 pixel (1 / 16 pel), a 1 / 32 pixel (1 / 32 pel), and a 1 / 64 pixel (1 / 64 pel). Furthermore, when encoding / decoding the current block, the motion vector can be selectively used for each pixel unit.

[0604] The strip types that may be applied to the above examples of the present invention can be defined, and the above examples of the present invention can be applied according to the strip types.

[0605] The block shape in the above examples where the present invention may be applied can be square or non-square.

[0606] The above examples can be executed in the encoder and decoder in the same way.

[0607] Images can be encoded / decoded using at least one of the examples above or by combining at least two of the examples above.

[0608] The order in which the above examples are applied in the encoder and decoder can be different, or the order in which the examples are applied in the encoder and decoder can be the same.

[0609] The above example can be performed for each of the luminance and chrominance signals, or the above example can be performed for both the luminance and chrominance signals in the same way.

[0610] At least one of the syntax elements (such as flags, indices, etc.) that are entropy-encoded in the encoder and entropy-decoded in the decoder can use at least one of the following: binarization, debinarization, and entropy encoding / decoding methods. Here, the binarization, debinarization, and entropy encoding / decoding methods can include at least one of the following: a signed 0th-order exp_Golomb binarization / debinarization method (se(v)), a signed kth-order exp_Golomb binarization / debinarization method (sek(v)), a 0th-order exp_Golomb binarization / debinarization method for unsigned positive integers (ue(v)), and a kth-order exp_Golomb binarization / debinarization method for unsigned positive integers (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 encoding / 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] The encoding / decoding of the current block is not limited to any of the examples above, and specific examples or combinations of the examples above can be applied to the 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. However, the present invention is not limited to the order of the steps, but some steps may be performed simultaneously with other steps or in a different order. Furthermore, those skilled in the art should understand that the steps in the flowchart are not mutually exclusive; other steps may be added to the flowchart, or some steps may be deleted from the flowchart, without affecting the scope of the present invention.

[0613] The embodiments include various aspects of the examples. Not all possible combinations of the aspects may be described, but those skilled in the art will recognize different combinations. Therefore, the invention can include all substitutions, modifications, and alterations within the scope of the claims.

[0614] Embodiments of the invention may be implemented in the form of program instructions executable by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include individual program instructions, data files, data structures, etc., or combinations thereof. The program instructions recorded in the computer-readable recording medium may be specifically designed and constructed for the present invention or may be known to those skilled in the art of computer software. 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.) specifically configured to store and implement program instructions. Examples of program instructions include not only machine language code formatted by a compiler but also high-level language code that can be implemented by a computer using an interpreter. The hardware device may be configured to be operated by one or more software modules to perform the processing according to the invention, or vice versa.

[0615] Although the invention has been described with reference to specific items such as detailed elements and limited embodiments and drawings, these are provided only to aid in a more comprehensive understanding of the invention, and the invention is not limited to the embodiments described above. Those skilled in the art will understand 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 embodiments, and the entire scope of the appended claims and their equivalents shall fall within the scope and spirit of the present invention.

[0617] Industrial applicability

[0618] This invention can be used to encode or decode images.

Claims

1. A method for decoding an image, the method comprising: Decode information about the block partitions of the current block included in the current frame from the bitstream; The partitioning method for the current block is determined based on the information provided. as well as The current block is partitioned using a defined 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 based on whether the current block includes a predetermined boundary. Wherein, in response to the current block including the right and bottom boundaries of the current screen and the width of the current block being greater than the size of the smallest quadtree block, the partitioning method is determined to be a quadtree partitioning method other than the horizontal binary tree partitioning method and the vertical binary tree partitioning method.

2. The method as described in claim 1, in, In response to the current block including the right boundary of the current frame and the current block's height being greater than the size of the largest transform block, the partitioning method is determined to be a partition other than vertical binary tree partitioning. Specifically, in response to the current block including the lower boundary of the current frame and the width of the current block being greater than the size of the largest transform block, the partitioning method is determined to be a partition other than the horizontal binary tree partitioning, and The size of the largest transform block is 64.

3. The method as described in claim 1, wherein, The information regarding block partitioning includes at least one of the following: information about the size of the current block, information about the depth of the current block, and information about whether partitioning is performed.

4. The method of claim 1, wherein, The predetermined boundary includes at least one of the following boundaries: the right boundary, bottom boundary, left boundary, and top boundary of at least one of the following: the screen to which the current block belongs, the sub-screen, the strip, the parallel block, and the block.

5. A method for encoding an image, the method comprising: Determine the partitioning method for the current block included in the current screen; The current block is partitioned using a defined partitioning method to obtain multiple sub-blocks; as well as Information regarding block partitioning methods is encoded. 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 based on whether the current block includes a predetermined boundary. Wherein, in response to the current block including the right and bottom boundaries of the current screen and the width of the current block being greater than the size of the smallest quadtree block, the partitioning method is determined to be a quadtree partitioning method other than the horizontal binary tree partitioning method and the vertical binary tree partitioning method.

6. The method as described in claim 5, in, In response to the current block including the right boundary of the current frame and the current block's height being greater than the size of the largest transform block, the partitioning method is determined to be a partition other than vertical binary tree partitioning. Specifically, in response to the current block including the lower boundary of the current frame and the width of the current block being greater than the size of the largest transform block, the partitioning method is determined to be a partition other than the horizontal binary tree partitioning, and The size of the largest transform block is 64.

7. The method of claim 5, wherein, Information about block partitioning includes at least one of the following: information about the size of the current block, information about the depth of the current block, and information about whether partitioning has been performed.

8. The method of claim 5, wherein, The predetermined boundary includes at least one of the following boundaries: the right boundary, bottom boundary, left boundary, and top boundary of at least one of the following: the screen to which the current block belongs, the sub-screen, the strip, the parallel block, and the block.

9. A non-transitory computer-readable medium for storing a bitstream generated by an encoding method, the method comprising: Determine the partitioning method for the current block included in the current screen; The current block is partitioned using a defined partitioning method to obtain multiple sub-blocks; as well as Information regarding block partitioning methods is encoded. 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 based on whether the current block includes a predetermined boundary. Wherein, in response to the current block including the right and bottom boundaries of the current screen and the width of the current block being greater than the size of the smallest quadtree block, the partitioning method is determined to be a quadtree partitioning method other than the horizontal binary tree partitioning method and the vertical binary tree partitioning method.