Image encoding / decoding method and apparatus
By optimizing block shape and size through sub-block-based transformation methods and entropy coding, the problem of increased data volume in high-resolution image coding is solved, efficient image coding and decoding are achieved, and coding efficiency and image quality are improved.
Patent Information
- Application Number
- CN202511117943.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-25
- Filing Date
- 2020-06-25
- Publication Date
- 2025-09-19
AI Technical Summary
Existing image coding technologies have the problem of high transmission and storage costs caused by increased data volume when processing high-resolution and high-quality images, and traditional transformation technologies may lead to low compression efficiency and additional bit signaling requirements.
A sub-block-based transformation method is adopted to transform image blocks through SBT partition information, direction and position information, and entropy coding is combined to optimize the shape and size of the block to reduce unnecessary signaling bits.
It improves image coding efficiency and subjective image quality, while reducing the storage and transmission requirements of bit streams and improving coding efficiency.
Smart Images

Figure CN120676154A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of June 25, 2020, application number "202080040583.4", and title "Image encoding / decoding method and device". Technical Field
[0002] The present invention relates to an image encoding / decoding method and apparatus, and a recording medium for storing a bit stream. More particularly, the present invention relates to an image encoding / decoding method and apparatus using sub-block based transform (SBT). Background Art
[0003] Recently, in various applications, the demand for high-resolution and high-quality images, such as high-definition (HD) or ultra-high-definition (UHD) images, has increased. As the resolution and quality of images increase, the amount of data increases accordingly. This is one of the reasons for the increase in transmission costs and storage costs when image data is transmitted through existing transmission media such as wired or wireless broadband channels or when image data is stored. In order to solve these problems of high-resolution and high-quality image data, efficient image encoding / decoding technology is needed.
[0004] There are various video compression techniques, such as inter-frame prediction techniques that predict the values of pixels in a current picture from the values of pixels in a previous picture or a subsequent picture, intra-frame prediction techniques that predict the values of pixels in an area of the current picture from the values of pixels in another area of the current picture, transformation and quantization techniques for compressing the energy of residual signals, and entropy coding techniques that assign shorter codes to frequently occurring pixel values and longer codes to less frequently occurring pixel values.
[0005] Various compression techniques can be used to encode images. Furthermore, depending on the properties of the image being encoded, certain techniques may be more advantageous than others. Therefore, an encoder can adaptively determine whether multiple compression techniques should be used for a corresponding block to achieve the most advantageous compression. To select the most advantageous compression technique for a corresponding block from among the available techniques, the encoder can perform rate-distortion optimization (RDO). Since it's impossible to know in advance which of the various encoding schemes will be selected for encoding an image, encoders applying RDO typically use the following method: encoding (or simplified encoding) is performed for each possible combination of image encoding schemes, the rate-distortion (RD) value is calculated, and the image encoding scheme with the minimum RDO value among the calculated RDO values is set as the final encoding scheme for the corresponding block. After the encoder has finalized the technique to be used or not, it must signal this to the decoder for appropriate decoding. However, since separate information is transmitted (or signaled) for signaling, additional bits are used, potentially reducing compression performance. Therefore, there is a need for techniques that can improve compression efficiency and provide optimal image quality for reconstructed images while minimizing the amount of bits used to transmit individual information.
[0006] In addition, it is known that inter-frame prediction is very effective for predictive coding of images. Generally, since the objects in each picture (or frame) image that constitutes a video sequence do not move very quickly, there is a very high correlation between the pictures unless the screen changes. In order to take advantage of this, when using inter-frame differential coding in the time axis direction using motion prediction coding technology, temporal redundancy can be removed, so a very high coding efficiency can be obtained. Coding that uses the correlation between pictures arranged in the time axis direction is called inter-frame prediction. This inter-frame prediction method enables random access, and therefore greatly contributes to improving coding efficiency together with the intra-frame prediction coding method that can improve the fault tolerance of the encoded bit stream.
[0007] The residual signal obtained by intra-frame prediction or inter-frame prediction is compressed by transformation and quantization, and then compressed by entropy coding using an arithmetic encoder such as CABAC. However, in the residual signal obtained after prediction, it may not be necessary to often transform all signals (e.g., pixels) of the corresponding block. However, if conventional transformation techniques are used, the entire residual signal block obtained by prediction should be transformed, and thus low compression efficiency may occur. This problem can be avoided by performing prediction on further divided blocks. However, in this case, since the blocks are further subdivided, additional bits are required to signal the block division. Summary of the Invention
[0008] Technical issues
[0009] The present invention provides a sub-block based transformation method and device.
[0010] The present invention is to provide a method and apparatus for compressing coding information for sub-block-based transformation and constructing the compressed bit stream.
[0011] The present invention is to provide a method and apparatus for efficiently performing block transform in consideration of the shape and size of a block in sub-block based transform coding.
[0012] The present invention is to provide a method and apparatus for efficiently performing block transform in consideration of the shape and size of a block in sub-block based transform decoding.
[0013] Furthermore, the present invention is to provide a recording medium for storing a bit stream generated by an image encoding / decoding method or apparatus.
[0014] Technical Solution
[0015] An image decoding method according to the present invention includes: obtaining sub-block based transform (SBT) usage information; when the SBT usage information indicates use of the SBT, obtaining at least one of SBT partition information, SBT partition direction information, or SBT position information; and performing the SBT on a current block based on at least one of the SBT partition information, SBT partition direction information, or SBT position information. When the width of the current block and the height of the current block are less than a maximum transform size, the SBT usage information is obtained.
[0016] In the image decoding method, the SBT splitting information may indicate a method for SBT splitting the current block, the SBT splitting direction information may indicate a splitting direction for the SBT, and the SBT position information may indicate which sub-block of the sub-blocks split from the current block is transformed based on the SBT splitting information and the SBT splitting direction information.
[0017] In the image decoding method, the step of obtaining the SBT usage information may include: deriving context model information of the SBT usage information, and performing entropy decoding based on the context model information to obtain the SBT usage information.
[0018] In the image decoding method, the step of deriving context model information of the SBT usage information may include deriving the context model information of the SBT usage information based on whether an area of the current block is greater than or equal to a predefined value.
[0019] In the image decoding method, the predefined value may be 256.
[0020] An image encoding method according to the present invention may include: determining whether a sub-block based transform (SBT) is used for a current block; encoding SBT usage information based on the determination; and when the SBT usage information indicates that the SBT is used, encoding at least one of SBT partition information, SBT partition direction information, or SBT position information. When the width of the current block and the height of the current block are less than a maximum transform size, encoding the SBT usage information.
[0021] In the image encoding method, the SBT splitting information may indicate a method for SBT splitting the current block, the SBT splitting direction information may indicate a splitting direction for the SBT, and the SBT position information may indicate which sub-block of the sub-blocks split from the current block is transformed based on the SBT splitting information and the SBT splitting direction information.
[0022] In the image encoding method, encoding the SBT usage information may include determining context model information of the SBT usage information, and performing entropy encoding based on the context model information to encode the SBT usage information.
[0023] In the image encoding method, the determining of the context model information of the SBT usage information may include determining the context model information of the SBT usage information based on whether an area of the current block is greater than or equal to a predefined value.
[0024] In the image encoding method, the predefined value may be 256.
[0025] Furthermore, the recording medium according to the present invention can store a bit stream generated by the image encoding method according to the present invention.
[0026] Beneficial effects
[0027] The present invention can improve coding efficiency and enhance subjective image quality by providing improved encoding and decoding methods and apparatus for image encoding and decoding using sub-block based transforms.
[0028] Furthermore, according to the present invention, it is possible to provide a recording medium for storing a bit stream generated by an image encoding / decoding method or apparatus.
[0029] Furthermore, according to the present invention, image encoding and decoding efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a block diagram showing a configuration of an encoding device according to an embodiment to which the present invention is applied.
[0031] Figure 2 is a block diagram showing a configuration of a decoding device to which the present invention is applied according to an embodiment.
[0032] Figure 3 is a diagram schematically illustrating a partition structure of an image when encoding and decoding the image.
[0033] Figure 4 is a diagram illustrating an intra prediction process.
[0034] Figure 5 is a diagram illustrating an embodiment of an inter-picture prediction process.
[0035] Figure 6 is a diagram illustrating transform and quantization processing.
[0036] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0037] Figure 8 is a diagram illustrating an example of division of a CU as a coding unit.
[0038] Figure 9 is a diagram illustrating eight SBT modes according to an embodiment of the present invention.
[0039] Figure 10 is a diagram showing syntax for signaling cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag.
[0040] Figure 11 It is a diagram showing a method of implementing the embodiment 1 of the present invention.
[0041] Figure 12 It is a diagram showing another method of implementing the embodiment 1 of the present invention.
[0042] Figure 13 It is a diagram showing a method of implementing the embodiment 2 of the present invention.
[0043] Figure 14 is a diagram illustrating a 1 / 4-divided SBT mode according to an embodiment of the present invention.
[0044] Figure 15 is a diagram illustrating an embodiment of determining a context for cu_sbt_quad_flag.
[0045] Figure 16 is a diagram illustrating a subblock splitting direction according to a shape of a CU according to an embodiment of the present invention.
[0046] Figure 17 is a diagram illustrating the shape of a CU and a subblock division direction according to an embodiment of the present invention.
[0047] Figure 18 is a diagram illustrating an embodiment of selectively signaling cu_sbt_horizontal_flag.
[0048] Figure 19 is a diagram illustrating the shape of a CU and an SBT mode according to an embodiment of the present invention.
[0049] Figure 20 is a diagram illustrating an embodiment of determining a context of cu_sbt_horizontal_flag (or sbtHorFlag).
[0050] Figure 21 is a diagram illustrating an embodiment of a context determination method for entropy encoding (or decoding) of SBT information.
[0051] Figures 22 to 25 is a diagram illustrating a context determination method for CABAC encoding / decoding according to various embodiments of the present invention.
[0052] Figure 26 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0053] Figure 27 is a flowchart illustrating an image encoding method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention may be modified in various ways, and there are various embodiments of the present invention, of which examples of various embodiments will now be provided with reference to the accompanying drawings and described in detail. However, the present invention is not limited thereto, although the exemplary embodiments may be interpreted as including all modifications, equivalents, or alternatives within the technical concept and technical scope of the present invention. In various aspects, similar figure numerals refer to the same or similar functions. In the drawings, the shapes and sizes of elements may be exaggerated for clarity. In the following detailed description of the present invention, reference is made to the accompanying drawings that illustrate specific embodiments in which the present invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to implement the present disclosure. It should be understood that the various embodiments of the present disclosure, although different, are not necessarily mutually exclusive. For example, specific features, structures, and characteristics described herein in conjunction with one embodiment may be implemented in other embodiments without departing from the spirit and scope of the present disclosure. In addition, it should be understood that the position or arrangement of the various elements within each disclosed embodiment may be modified without departing from the spirit and scope of the present disclosure. Therefore, the following detailed description should not be taken as having a limiting meaning, and the scope of the present disclosure is limited solely by the appended claims (and, when appropriately interpreted, together with the full scope of equivalents claimed by the claims).
[0055] The terms "first," "second," and the like used in the specification may be used to describe various components, but the components should not be construed as being limited to these terms. These terms are used only to distinguish one component from other components. For example, a "first" component may be named a "second" component, and a "second" component may be similarly named a "first" component without departing from the scope of the present invention. The term "and / or" includes a combination of a plurality of items or any one of the plurality of items.
[0056] It will be understood that in this specification, when an element is simply referred to as being “connected to” or “coupled to” another element rather than being “directly connected to” or “directly coupled to” another element, the element may be “directly connected to” or “directly coupled to” another element, or connected to or coupled to another element with other elements intervening therebetween. Conversely, it will be understood that when an element is referred to as being “directly coupled to” or “directly connected to” another element, there are no intervening elements.
[0057] In addition, the components shown in the embodiments of the present invention are shown independently to represent different characteristic functions from each other. Therefore, this does not mean that each component is composed of a separate hardware or software component unit. In other words, for convenience, each component includes each component in the listed components. Therefore, at least two components of each component can be combined to form a component, or a component can be divided into multiple components to perform each function. If it does not depart from the essence of the present invention, the embodiment in which each component is combined and the embodiment in which a component is divided are also included in the scope of the present invention.
[0058] The terms used in this specification are only used to describe specific embodiments and are not intended to limit the present invention. Unless there is a significantly different meaning in the context, the expressions used in the singular include the expressions in the plural form. In this specification, it will be understood that terms such as "including", "having" etc. are intended to indicate the presence of features, numbers, steps, actions, elements, parts or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, elements, parts or combinations thereof may be present or may be added. In other words, when a particular element is referred to as "comprising", it does not exclude elements other than the corresponding element, but other elements may be included in embodiments of the present invention or in the scope of the present invention.
[0059] Furthermore, some components may not be essential components for performing the basic functions of the present invention, but may be optional components that only enhance its performance. The present invention may be implemented by including only the essential components for achieving the essence of the present invention without including components that enhance its performance. Structures that include only the essential components without including optional components that enhance its performance are also within the scope of the present invention.
[0060] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. When describing exemplary embodiments of the present invention, well-known functions or configurations will not be described in detail because they may unnecessarily obscure the understanding of the present invention. The same constituent elements in the accompanying drawings are represented by the same reference numerals, and repeated descriptions of the same elements will be omitted.
[0061] Hereinafter, an image may refer to a frame constituting a video, or may refer to the video itself. For example, "encoding or decoding an image, or both encoding and decoding the image" may refer to "encoding or decoding a moving picture, or both encoding and decoding the image," and may refer to "encoding or decoding one of the images in the moving picture, or both encoding and decoding the image."
[0062] Hereinafter, the terms "moving picture" and "video" may be used as the same meaning and may be replaced with each other.
[0063] Hereinafter, a target image may be an encoding target image and / or a decoding target image. Furthermore, a target image may be an input image to an encoding device or an input image to a decoding device. Here, the target image may have the same meaning as the current image.
[0064] Hereinafter, the terms "image," "picture," "frame," and "screen" may be used as the same meaning and may be replaced with each other.
[0065] Hereinafter, a target block may be an encoding target block as an encoding target and / or a decoding target block as a decoding target. In addition, a target block may be a current block as a target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used as having the same meaning and may be used interchangeably.
[0066] Hereinafter, the terms "block" and "unit" may be used as the same meaning and may be replaced with each other. Alternatively, "block" may refer to a specific unit.
[0067] Hereinafter, the terms "region" and "segment" may be used interchangeably.
[0068] Hereinafter, a specific signal may be a signal representing a specific block. For example, an original signal may be a signal representing a target block. A prediction signal may be a signal representing a prediction block. A residual signal may be a signal representing a residual block.
[0069] In an embodiment, each of the specific information, data, flags, indexes, elements, and attributes may have a value. A value of "0" for the information, data, flags, indexes, elements, and attributes may represent a logical false value or a first predefined value. In other words, the values "0," false, logical false, and the first predefined value may be interchangeable. A value of "1" for the information, data, flags, indexes, elements, and attributes may represent a logical true value or a second predefined value. In other words, the values "1," true, logical true, and the second predefined value may be interchangeable.
[0070] When the variable i or j is used to represent a column, row, or index, the value of i can be an integer equal to or greater than 0, or an integer equal to or greater than 1. That is, the column, row, index, etc. can be counted from 0 or 1.
[0071] Description of terms
[0072] Encoder: This refers to a device that performs encoding. In other words, it refers to an encoding device.
[0073] Decoder: This refers to a device that performs decoding. In other words, it refers to a decoding device.
[0074] Block: An M×N array of samples. Here, M and N may represent positive integers, and a block may represent a two-dimensional array of samples. A block may refer to a unit. The current block may refer to an encoding target block that is targeted during encoding, or a decoding target block that is targeted during decoding. Furthermore, the current block may be at least one of a coding block, a prediction block, a residual block, and a transform block.
[0075] Sample: It is the basic unit of a block. d ), the sample point can be represented from 0 to 2 Bd In the present invention, the term "sample point" may be used to mean a pixel. That is, the terms "sample point", "pel", and "pixel" may have the same meaning as each other.
[0076] Unit: This refers to an encoding and decoding unit. When encoding and decoding an image, a unit may be a region generated by partitioning a single image. Furthermore, when a single image is partitioned into sub-partitioned units during encoding or decoding, a unit may represent a sub-partitioned unit. In other words, an image may be partitioned into multiple units. When encoding and decoding an image, predetermined processing may be performed on each unit. A single unit may be partitioned into sub-units smaller than the unit. Depending on its function, a unit may represent a block, macroblock, coding tree unit, coding tree block, coding unit, coding block, prediction unit, prediction block, residual unit, residual block, transform unit, transform block, and so on. Furthermore, to distinguish a unit from a block, a unit may include a luma component block, chroma component blocks associated with the luma component block, and syntax elements for each color component block. A unit may have various sizes and shapes. Specifically, the shape of a unit may be a two-dimensional geometric figure such as a square, rectangle, trapezoid, triangle, pentagon, and so on. Also, the unit information may include at least one of a unit type indicating a coding unit, a prediction unit, a transformation unit, etc., and a unit size, a unit depth, an order of encoding and decoding of the unit, and the like.
[0077] Coding tree unit: A single coding tree block configured with the luma component Y and two coding tree blocks associated with the chroma components Cb and Cr. In addition, the coding tree unit may represent a syntax element including a block and each block. Each coding tree unit may be partitioned by using at least one of a quadtree partitioning method, a binary tree partitioning method, and a ternary tree partitioning method to configure lower-level units such as coding units, prediction units, and transform units. The coding tree unit may be used as a term for specifying a sample block that becomes a processing unit when encoding / decoding an image as an input image. Here, the quadtree may represent a quadtree.
[0078] When the size of a coding block is within a predetermined range, partitioning using only quadtree partitioning is possible. Here, the predetermined range may be defined as at least one of the maximum and minimum sizes of the coding block that can be partitioned using only quadtree partitioning. Information indicating the maximum / minimum sizes of the coding block that allow quadtree partitioning may be signaled via the bitstream and may be signaled in at least one of a sequence, a picture parameter, a tile group, or a slice (segment). Alternatively, the maximum / minimum sizes of the coding block may be fixed sizes predetermined in the encoder / decoder. For example, when the size of the coding block corresponds to 256×256 to 64×64, partitioning using only quadtree partitioning is possible. Alternatively, when the size of the coding block is larger than the size of the largest transform block, partitioning using only quadtree partitioning is possible. Here, the block to be partitioned may be at least one of a coding block and a transform block. In this case, the information indicating the partitioning of the coding block (e.g., split_flag) may be a flag indicating whether quadtree partitioning is performed. When the size of the coding block falls within a predetermined range, partitioning using only binary or ternary tree partitioning is possible. In this case, the above description of the quadtree partition can be applied to the binary tree partition or the ternary tree partition in the same manner.
[0079] Coding tree block: may be used as a term for designating any one of a Y coding tree block, a Cb coding tree block, and a Cr coding tree block.
[0080] Neighboring blocks: These may represent blocks adjacent to the current block. These blocks may be blocks that touch the boundary of the current block or are located within a predetermined distance from the current block. These blocks may be blocks adjacent to vertices of the current block. Here, blocks adjacent to vertices of the current block may be blocks that are vertically adjacent to a neighboring block horizontally adjacent to the current block, or blocks that are horizontally adjacent to a neighboring block vertically adjacent to the current block.
[0081] Reconstructed Neighboring Block: This refers to a neighboring block that is adjacent to the current block and has already been spatially or temporally encoded or decoded. Here, a reconstructed neighboring block may refer to a reconstructed neighboring unit. A reconstructed spatial neighboring block may be a block within the current picture that has been reconstructed through encoding or decoding, or both. A reconstructed temporal neighboring block is a block within a reference image that is located at a position corresponding to the current block in the current picture, or a neighboring block of the current block.
[0082] Unit depth: may represent the degree of partitioning of a unit. In a tree structure, the highest node (root node) may correspond to the first unit that has not been partitioned. In addition, the highest node may have the minimum depth value. In this case, the depth of the highest node may be level 0. A node with a depth of level 1 may represent a unit generated by partitioning the first unit once. A node with a depth of level 2 may represent a unit generated by partitioning the first unit twice. A node with a depth of level n may represent a unit generated by partitioning the first unit n times. A leaf node may be the lowest node and a node that cannot be further partitioned. The depth of a leaf node may be the maximum level. For example, the predefined value of the maximum level may be 3. The depth of the root node may be the lowest, and the depth of the leaf node may be the deepest. In addition, when a unit is represented as a tree structure, the level at which the unit exists may represent the unit depth.
[0083] Bitstream: can represent a bit stream containing coded image information.
[0084] Parameter set: This corresponds to header information within the bitstream configuration. A parameter set may include at least one of a video parameter set, a sequence parameter set, a picture parameter set, and an adaptation parameter set. Furthermore, a parameter set may include a slice header, a tile group header, and tile header information. The term "tile group" refers to a group of tiles and has the same meaning as a slice.
[0085] An adaptation parameter set may refer to a parameter set that can be shared by being referenced in different pictures, sub-pictures, slices, tile groups, tiles, or bricks. Furthermore, information in an adaptation parameter set may be used by referencing different adaptation parameter sets for sub-pictures, slices, tile groups, tiles, or bricks within a picture.
[0086] Furthermore, regarding adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for a sub-picture, slice, tile group, tile, or partition within a picture.
[0087] Furthermore, regarding the adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for slices, tile groups, tiles, or partitions within a sub-picture.
[0088] Furthermore, regarding adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for tiles or partitions within a slice.
[0089] Furthermore, with respect to adaptation parameter sets, different adaptation parameter sets may be referenced by using identifiers of different adaptation parameter sets for partitions within a tile.
[0090] Information about the adaptation parameter set identifier may be included in a header or a parameter set of a sub-picture, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the sub-picture.
[0091] Information about the adaptation parameter set identifier may be included in a header or parameter set of the tile, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the tile.
[0092] Information about the adaptation parameter set identifier may be included in a header of a tile, and an adaptation parameter set corresponding to the adaptation parameter set identifier may be used for the tile.
[0093] A picture may be partitioned into one or more tile rows and one or more tile columns.
[0094] A sub-picture may be partitioned into one or more tile rows and one or more tile columns within a picture. A sub-picture may be a rectangular / square area within a picture and may include one or more CTUs. In addition, at least one or more tiles / blocks / slices may be included in a sub-picture.
[0095] A tile may be an area having a rectangular / square form within a picture and may include one or more CTUs. In addition, a tile may be partitioned into one or more partitions.
[0096] A partition may represent one or more CTU rows within a tile. A tile may be partitioned into one or more partitions, and each partition may have at least one or more CTU rows. A tile that is not partitioned into two or more partitions may represent a partition.
[0097] A slice may include one or more tiles within a picture, and may include one or more partitions within a tile.
[0098] Parsing: may refer to determining the value of a syntax element by performing entropy decoding, or may refer to the entropy decoding itself.
[0099] Symbol: can represent at least one of the syntax elements, coding parameters, and transform coefficient values of the encoding / decoding target unit. In addition, the symbol can represent the entropy encoding target or the entropy decoding result.
[0100] Prediction mode: may be information indicating a mode for encoding / decoding using intra-frame prediction or a mode for encoding / decoding using inter-frame prediction.
[0101] Prediction unit: This refers to the basic unit used when performing predictions such as inter-frame prediction, intra-frame prediction, inter-frame compensation, intra-frame compensation, and motion compensation. A single prediction unit can be partitioned into multiple partitions of smaller sizes, or into multiple lower-level prediction units. Multiple partitions can be the basic unit used when performing prediction or compensation. Partitions generated by splitting a prediction unit can also be prediction units.
[0102] Prediction unit partition: may represent a shape obtained by partitioning a prediction unit.
[0103] A reference picture list may refer to a list including one or more reference pictures used for inter prediction or motion compensation. There are several types of reference picture lists available, including LC (List Combination), L0 (List 0), L1 (List 1), L2 (List 2), and L3 (List 3).
[0104] The inter-frame prediction indicator may indicate the direction of inter-frame prediction for the current block (unidirectional prediction, bidirectional prediction, etc.). Alternatively, the inter-frame prediction indicator may indicate the number of reference pictures used to generate the prediction block for the current block. Alternatively, the inter-frame prediction indicator may indicate the number of prediction blocks used when performing inter-frame prediction or motion compensation on the current block.
[0105] The prediction list utilization flag indicates whether at least one reference picture in a specific reference picture list is used to generate a prediction block. The prediction list utilization flag can be used to derive the inter prediction indicator, and conversely, the inter prediction indicator can be used to derive the prediction list utilization flag. For example, when the prediction list utilization flag has a first value of zero (0), it indicates that the reference pictures in the reference picture list are not used to generate the prediction block. On the other hand, when the prediction list utilization flag has a second value of one (1), it indicates that the reference picture list is used to generate the prediction block.
[0106] The reference picture index may refer to an index indicating a specific reference picture in a reference picture list.
[0107] A reference picture may refer to a reference picture referenced by a specific block for the purpose of inter-frame prediction or motion compensation of the specific block. Alternatively, a reference picture may be a picture including a reference block referenced by a current block for inter-frame prediction or motion compensation. Hereinafter, the terms "reference picture" and "reference image" have the same meaning and are interchangeable.
[0108] A motion vector can be a two-dimensional vector used for inter-frame prediction or motion compensation. A motion vector can represent the offset between the encoding / decoding target block and the reference block. For example, (mvX, mvY) can represent a motion vector. Here, mvX can represent the horizontal component, and mvY can represent the vertical component.
[0109] The search range may be a two-dimensional area that is searched during inter-frame prediction to retrieve a motion vector. For example, the size of the search range may be M×N. Here, M and N are both integers.
[0110] The motion vector candidate may refer to a prediction candidate block or a motion vector of the prediction candidate block when predicting a motion vector. In addition, the motion vector candidate may be included in a motion vector candidate list.
[0111] The motion vector candidate list may mean a list consisting of one or more motion vector candidates.
[0112] The motion vector candidate index may represent an indicator indicating a motion vector candidate in the motion vector candidate list. Alternatively, it may be an index of a motion vector predictor.
[0113] The motion information may represent information including at least one of items including a motion vector, a reference picture index, an inter prediction indicator, a prediction list utilization flag, reference picture list information, a reference picture, a motion vector candidate, a motion vector candidate index, a merge candidate, and a merge index.
[0114] The merge candidate list may mean a list consisting of one or more merge candidates.
[0115] The merge candidate may represent a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined bi-predictive merge candidate, or a zero merge candidate. The merge candidate may include motion information such as an inter prediction indicator, a reference picture index for each list, a motion vector, a prediction list utilization flag, and an inter prediction indicator.
[0116] The merge index may represent an indicator indicating a merge candidate in the merge candidate list. Alternatively, the merge index may indicate a block in a reconstructed block that is spatially / temporally adjacent to the current block, from which the merge candidate has been derived. Alternatively, the merge index may indicate at least one piece of motion information of the merge candidate.
[0117] Transform unit: This refers to a basic unit used when encoding / decoding a residual signal (such as transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding / decoding). A single transform unit can be partitioned into multiple lower-level transform units of smaller size. The transform / inverse transform may include at least one of a first transform / first inverse transform and a second transform / second inverse transform.
[0118] 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.
[0119] Quantization parameter: This may indicate the value used when generating the quantization level using the transform coefficient during quantization. It may also indicate the value used when generating the transform coefficient by scaling the quantization level during inverse quantization. The quantization parameter may be a value mapped to the quantization step size.
[0120] Delta quantization parameter: may represent the difference between the predicted quantization parameter and the quantization parameter of the encoding / decoding target unit.
[0121] Scan: This refers to a method of sorting coefficients within a cell, block, or matrix. For example, changing a two-dimensional matrix of coefficients to a one-dimensional matrix can be called a scan, and changing a one-dimensional matrix of coefficients to a two-dimensional matrix can be called a scan or an inverse scan.
[0122] Transform coefficient: This term may refer to a coefficient value generated after a transform is performed in an encoder. A transform coefficient may refer to a coefficient value generated after at least one of entropy decoding and inverse quantization is performed in a decoder. A transform coefficient also includes a quantization level obtained by quantizing a transform coefficient or a residual signal, or a quantized transform coefficient level.
[0123] Quantization level: This refers to the value generated by quantizing transform coefficients or residual signals in an encoder. Alternatively, the quantization level may refer to a value that is a target for inverse quantization in a decoder. Similarly, the level of quantized transform coefficients, which are the result of transformation and quantization, also falls within the meaning of the quantization level.
[0124] Non-zero transform coefficient: may refer to a transform coefficient having a value other than zero, or a transform coefficient level or quantization level having a value other than zero.
[0125] Quantization Matrix: This refers to a matrix used in a quantization process or an inverse quantization process performed to improve subjective or objective image quality. The quantization matrix may also be referred to as a scaling list.
[0126] Quantization matrix coefficients: These represent each element in the quantization matrix. Quantization matrix coefficients are also called matrix coefficients.
[0127] Default matrix: may represent a predetermined quantization matrix predefined in an encoder or decoder.
[0128] Non-default matrix: may represent a quantization matrix that is not pre-defined in the encoder or decoder but is signaled by the user.
[0129] Statistical value: The statistical value for at least one of a variable, coding parameter, constant value, etc. having a calculable specific value can be one or more of the average value, sum value, weighted average value, weighted sum value, minimum value, maximum value, most frequently occurring value, median value, and interpolation value of the corresponding specific value.
[0130] Figure 1 is a block diagram showing a configuration of an encoding device according to an embodiment to which the present invention is applied.
[0131] The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. A video may include at least one image. The encoding device 100 may sequentially encode at least one image.
[0132] Reference Figure 1 , the encoding device 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra-frame prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180 and a reference picture buffer 190.
[0133] The encoding device 100 can perform encoding of an input image by using intra mode or inter mode, or both intra mode and inter mode. In addition, the encoding device 100 can generate a bit stream including encoding information by encoding the input image, and output the generated bit stream. The generated bit stream can be stored in a computer-readable recording medium, or can be streamed via a wired / wireless transmission medium. When intra mode is used as the prediction mode, the switch 115 can switch to intra mode. Alternatively, when inter mode is used as the prediction mode, the switch 115 can switch to inter mode. Here, intra mode may refer to intra prediction mode, and inter mode may refer to inter prediction mode. The encoding device 100 can generate a prediction block for an input block of the input image. In addition, after generating the prediction block, the encoding device 100 can encode a residual block using the residual of the input block and the prediction block. The input image can be referred to as the current image that is the current encoding target. The input block can be referred to as the current block that is the current encoding target, or as the encoding target block.
[0134] When the prediction mode is intra mode, the intra prediction unit 120 may use samples of a block that has been encoded / decoded and is adjacent to the current block as reference samples. The intra prediction unit 120 may perform spatial prediction on the current block using the reference samples, or may generate prediction samples of the input block by performing spatial prediction. Here, intra prediction may refer to prediction within a frame.
[0135] When the prediction mode is inter mode, the motion prediction unit 111 may retrieve the area that best matches the input block from the reference image when performing motion prediction, and derive a motion vector by using the retrieved area. In this case, the search area may be used as the area. The reference image may be stored in the reference picture buffer 190. Here, when encoding / decoding the reference image, the reference image may be stored in the reference picture buffer 190.
[0136] The motion compensation unit 112 may generate a prediction block by performing motion compensation on the current block using a motion vector. Here, inter prediction may refer to prediction or motion compensation between frames.
[0137] When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 may generate a prediction block by applying an interpolation filter to a partial area of a reference picture. To perform inter-picture prediction or motion compensation on a coding unit, it may be determined which mode among skip mode, merge mode, advanced motion vector prediction (AMVP) mode, and current picture reference mode is used for motion prediction and motion compensation of the prediction unit included in the corresponding coding unit. Then, inter-picture prediction or motion compensation may be performed differently depending on the determined mode.
[0138] The subtractor 125 may generate a residual block by using the difference between the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may represent the difference between the original signal and the prediction signal. In addition, the residual signal may be a signal generated by transforming or quantizing, or transforming and quantizing, the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.
[0139] The transform unit 130 may generate a transform coefficient by performing a transform on the residual block and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit 130 may skip transforming the residual block.
[0140] The quantization level may be generated by applying quantization to a transform coefficient or to a residual signal. Hereinafter, the quantization level may also be referred to as a transform coefficient in embodiments.
[0141] The quantization unit 140 may generate a quantization level by quantizing the transform coefficient or the residual signal according to the parameter and output the generated quantization level. Here, the quantization unit 140 may quantize the transform coefficient by using a quantization matrix.
[0142] The entropy coding unit 150 may generate a bitstream by performing entropy coding on the value calculated by the quantization unit 140 or the coding parameter value calculated when performing coding according to the probability distribution, and output the generated bitstream. The entropy coding unit 150 may perform entropy coding on sample information of an image and information for decoding the image. For example, the information for decoding the image may include syntax elements.
[0143] When entropy coding is applied, symbols are represented so that a smaller number of bits are allocated to symbols with a high probability of generation, and a larger number of bits are allocated to symbols with a low probability of generation, thereby reducing the size of the bit stream for the symbols to be encoded. The entropy coding unit 150 may use a coding method for entropy coding such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. For example, the entropy coding unit 150 may perform entropy coding by using a variable length coding / code (VLC) table. In addition, the entropy coding unit 150 may derive a binarization method of the target symbol and a probability model of the target symbol / binary bit, and perform arithmetic coding by using the derived binarization method, probability model, and context model.
[0144] In order to encode transform coefficient levels (quantized levels), the entropy encoding unit 150 may change coefficients in a two-dimensional block form into a one-dimensional vector form by using a transform coefficient scanning method.
[0145] The coding parameters may include information such as syntax elements (flags, indexes, etc.) that are encoded in the encoder and sent to the decoder using a signal, as well as information derived when performing encoding or decoding. The coding parameters may represent information required when encoding or decoding an image. For example, at least one value or combination of the following items may be included in the coding parameters: unit / block size, unit / block depth, unit / block partition information, unit / block shape, unit / block partition structure, whether quadtree partitioning is performed, whether binary tree partitioning is performed, binary tree partitioning direction (horizontal or vertical), binary tree partitioning form (symmetric partitioning or asymmetric partitioning), whether the current coding unit is partitioned by ternary tree partitioning, the direction of ternary tree partitioning (horizontal or vertical), the type of ternary tree partitioning (symmetric type or asymmetric type), whether the current coding unit is partitioned by multi-type tree partitioning, the type of multi-type tree partitioning direction (horizontal or vertical), type of multi-type tree partition (symmetric or asymmetric), tree (binary tree or ternary tree) structure of multi-type tree partition, prediction mode (intra-frame prediction or inter-frame prediction), luminance intra-frame prediction mode / direction, chrominance intra-frame prediction mode / direction, intra-frame partition information, inter-frame partition information, coding block partition flag, prediction block partition flag, transform block partition flag, reference sample filtering method, reference sample filter taps, reference sample filter coefficients, prediction block filtering method, prediction block filter taps, prediction block filter coefficients, prediction block boundary filtering method, prediction block boundary filter taps, prediction block boundary filter coefficients, intra-frame prediction mode , inter-frame prediction mode, motion information, motion vector, motion vector difference, reference picture index, inter-frame prediction angle, inter-frame prediction indicator, prediction list utilization flag, reference picture list, reference picture, motion vector predictor index, motion vector predictor candidate, motion vector candidate list, whether to use merge mode, merge index, merge candidate, merge candidate list, whether to use skip mode, interpolation filter type, interpolation filter tap, interpolation filter coefficient, motion vector size, representation accuracy of motion vector, transform type, transform size, information on whether primary (first) transform is used, information on whether secondary transform is used, primary transform index, secondary transform index , information on whether a residual signal exists, coding block pattern, coding block flag (CBF), quantization parameter, quantization parameter residual, quantization matrix, whether to apply an intra-loop filter, intra-loop filter coefficients, intra-loop filter taps, intra-loop filter shape / form, whether to apply a deblocking filter, deblocking filter coefficients, deblocking filter taps, deblocking filter strength, deblocking filter shape / form, whether to apply adaptive sample offset, adaptive sample offset value, adaptive sample offset category, adaptive sample offset type, whether to apply an adaptive intra-loop filter, adaptive intra-loop filter coefficients, adaptive intra-loop filter taps, adaptive intra-loop filter shape / form,Binarization / debinarization method, context model determination method, context model updating method, whether to execute normal mode, whether to execute bypass mode, context binary bit, bypass binary bit, significant coefficient flag, last significant coefficient flag, coding flag for unit of coefficient group, position of last significant coefficient, flag on whether the value of coefficient is greater than 1, flag on whether the value of coefficient is greater than 2, flag on whether the value of coefficient is greater than 3, information on remaining coefficient values, sign information, reconstructed luminance sample, reconstructed chrominance sample, residual luminance sample, residual chrominance sample, luminance transform coefficient, chrominance transform coefficient, quantized luminance level, quantized chrominance level, transform coefficient level scanning method, motion vector search area at decoder side domain size, shape of a motion vector search area at the decoder side, number of motion vector searches at the decoder side, information on a CTU size, information on a minimum block size, information on a maximum block size, information on a maximum block depth, information on a minimum block depth, image display / output order, slice identification information, slice type, slice partition information, tile identification information, tile type, tile partition information, tile group identification information, tile group type, tile group partition information, picture type, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients, bit depth of quantization levels, and information on a luminance signal or information on a chrominance signal.
[0146] Here, signaling a flag or an index may mean entropy encoding the corresponding flag or index by an encoder and including it in a bitstream, and may mean entropy decoding the corresponding flag or index from the bitstream by a decoder.
[0147] When the encoding apparatus 100 performs encoding by inter-frame prediction, the current image being encoded can be used as a reference image for another image to be processed subsequently. Therefore, the encoding apparatus 100 can reconstruct or decode the current image being encoded, or store the reconstructed or decoded image as a reference image in the reference picture buffer 190.
[0148] The quantization level may be inversely quantized in the inverse quantization unit 160 or inversely transformed in the inverse transform unit 170. The inversely quantized or inversely transformed coefficient or the inversely quantized and inversely transformed coefficient may be added to the prediction block by the adder 175. By adding the inversely quantized or inversely transformed coefficient or the inversely quantized and inversely transformed coefficient to the prediction block, a reconstructed block may be generated. Here, the inversely quantized or inversely transformed coefficient or the inversely quantized and inversely transformed coefficient may mean a coefficient on which at least one of inverse quantization and inverse transformation has been performed, and may mean a reconstructed residual block.
[0149] The reconstructed block may pass through the filter unit 180. The filter unit 180 may apply at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive in-loop filter (ALF) to the reconstructed samples, the reconstructed block, or the reconstructed image. The filter unit 180 may be referred to as an in-loop filter.
[0150] A deblocking filter can remove block distortion generated at the boundaries between blocks. To determine whether to apply a deblocking filter, the application of the deblocking filter to the current block can be determined based on the samples included in a number of rows or columns included in the block. When applying a deblocking filter to a block, different filters can be applied depending on the desired deblocking filter strength.
[0151] To compensate for coding errors, sample adaptive offset can be used to add an appropriate offset value to the sample value. Sample adaptive offset can correct the offset between the deblocked image and the original image on a sample-by-sample basis. A method can be used to apply the offset by considering edge information about each sample, or a method can be used in which the samples of the image are partitioned into a predetermined number of regions, the regions to which the offset is applied are determined, and the offset is applied to the determined regions.
[0152] The adaptive in-loop filter can perform filtering based on the comparison result of the filtered reconstructed image and the original image. The samples included in the image can be partitioned into predetermined groups, the filter to be applied to each group can be determined, and differential filtering can be performed on each group. Information on whether to apply ALF can be signaled by the coding unit (CU), and the form and coefficients of the ALF to be applied to each block can be varied.
[0153] The reconstructed block or reconstructed image that has passed through the filter unit 180 may be stored in the reference picture buffer 190. The reconstructed block processed by the filter unit 180 may be part of a reference image. That is, the reference image is a reconstructed image composed of the reconstructed blocks processed by the filter unit 180. The stored reference image may be used later in inter-frame prediction or motion compensation.
[0154] Figure 2 is a block diagram showing the configuration of a decoding device according to an embodiment and to which the present invention is applied.
[0155] The decoding device 200 may be a decoder, a video decoding device, or an image decoding device.
[0156] Reference Figure 2 , the decoding apparatus 200 may include an entropy decoding unit 210 , an inverse quantization unit 220 , an inverse transform unit 230 , an intra prediction unit 240 , a motion compensation unit 250 , an adder 255 , a filter unit 260 , and a reference picture buffer 270 .
[0157] The decoding device 200 may receive the bitstream output from the encoding device 100. The decoding device 200 may receive the bitstream stored in a computer-readable recording medium, or may receive the bitstream streamed via a wired / wireless transmission medium. The decoding device 200 may decode the bitstream using an intra-frame mode or an inter-frame mode. In addition, the decoding device 200 may generate a reconstructed image or a decoded image generated by decoding, and output the reconstructed image or the decoded image.
[0158] When the prediction mode used at the time of decoding is the intra mode, the switch may be switched to the intra mode. Alternatively, when the prediction mode used at the time of decoding is the inter mode, the switch may be switched to the inter mode.
[0159] The decoding device 200 can obtain a reconstructed residual block by decoding the input bit stream and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding device 200 can generate a reconstructed block that becomes the decoding target by adding the reconstructed residual block to the prediction block. The decoding target block may be referred to as the current block.
[0160] The entropy decoding unit 210 may generate symbols by entropy decoding the bit stream according to the probability distribution. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be an inverse process of the above entropy encoding method.
[0161] In order to decode transform coefficient levels (quantized levels), the entropy decoding unit 210 may change coefficients in a unidirectional vector form into a two-dimensional block form by using a transform coefficient scanning method.
[0162] The quantized levels may be inversely quantized in the inverse quantization unit 220, or inversely transformed in the inverse transform unit 230. The quantized levels may be the result of inverse quantization or inverse transformation, or both, and may be generated as a reconstructed residual block. Here, the inverse quantization unit 220 may apply a quantization matrix to the quantized levels.
[0163] When the intra mode is used, the intra prediction unit 240 may generate a predicted block by performing spatial prediction on the current block, wherein the spatial prediction uses sample values of blocks that are adjacent to the decoding target block and have already been decoded.
[0164] When the inter mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation on the current block, wherein the motion compensation uses a motion vector and a reference image stored in the reference picture buffer 270 .
[0165] The adder 255 can generate a reconstructed block by adding the reconstructed residual block to the prediction block. The filter unit 260 can apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive in-loop filter to the reconstructed block or reconstructed image. The filter unit 260 can output the reconstructed image. The reconstructed block or reconstructed image can be stored in the reference picture buffer 270 and used when performing inter-frame prediction. The reconstructed block processed by the filter unit 260 can be part of a reference image. In other words, the reference image is a reconstructed image composed of the reconstructed blocks processed by the filter unit 260. The stored reference image can be used later in inter-frame prediction or motion compensation.
[0166] Figure 3 is a diagram schematically illustrating a partition structure of an image when encoding and decoding the image. Figure 3 An example of partitioning a single unit into multiple lower-level units is schematically shown.
[0167] In order to efficiently partition an image, a coding unit (CU) may be used when encoding and decoding. A coding unit may be used as a basic unit when encoding / decoding an image. In addition, a coding unit may be used as a unit for distinguishing between an intra-frame prediction mode and an inter-frame prediction mode when encoding / decoding an image. A coding unit may be a basic unit for prediction, transformation, quantization, inverse transformation, inverse quantization, or encoding / decoding processing of a transform coefficient.
[0168] Reference Figure 3 , the image 300 is partitioned sequentially according to the largest coding unit (LCU), and the LCU unit is determined as a partition structure. Here, LCU can be used with the same meaning as the coding tree unit (CTU). Unit partitioning may mean partitioning the block associated with the unit. In the block partition information, information on the unit depth may be included. The depth information may indicate the number or degree of partitioning of the unit or both the number and degree of partitioning of the unit. A single unit may be partitioned into multiple lower-level units hierarchically associated with the depth information based on a tree structure. In other words, the unit and the lower-level units generated by partitioning the unit may correspond to a node and a child node of the node, respectively. Each of the partitioned lower-level units may have depth information. The depth information may be information indicating the size of a CU and may be stored in each CU. The unit depth indicates the number and / or degree associated with partitioning the unit. Therefore, the partition information of the lower-level unit may include information about the size of the lower-level unit.
[0169] The partition structure may indicate the distribution of coding units (CUs) within LCU 310. This distribution may be determined based on whether a single CU is partitioned into multiple CUs (including 2, 4, 8, 16, and other positive integers equal to or greater than 2). The horizontal and vertical sizes of the CU generated by partitioning may be half the horizontal and vertical sizes of the CU before partitioning, or may be smaller than the horizontal and vertical sizes before partitioning, depending on the number of partitioning operations. A CU may be recursively partitioned into multiple CUs. Recursive partitioning may reduce at least one of the height and width of the CU after partitioning compared to at least one of the height and width of the CU before partitioning. CU partitioning may be recursively performed until a predefined depth or a predefined size is reached. For example, the depth of an LCU may be 0, and the depth of a smallest coding unit (SCU) may be a predefined maximum depth. As described above, an LCU may be a coding unit with the largest coding unit size, and an SCU may be a coding unit with the smallest coding unit size. Partitioning starts from the LCU 310. When the horizontal size or vertical size, or both the horizontal size and the vertical size of the CU are reduced by partitioning, the CU depth increases by 1. For example, the size of a non-partitioned CU can be 2N×2N for each depth. In addition, in the case of a partitioned CU, a CU of size 2N×2N can be partitioned into four CUs of size N×N. As the depth increases by 1, the size of N can be halved.
[0170] In addition, information on whether a CU is partitioned can be indicated by using its partition information. The partition information can be 1-bit information. All CUs except the SCU can include partition information. For example, when the partition information value is a first value, the CU may not be partitioned, and when the partition information value is a second value, the CU may be partitioned.
[0171] Reference Figure 3 , an LCU with a depth of 0 may be a 64×64 block. 0 may be the minimum depth. An SCU with a depth of 3 may be an 8×8 block. 3 may be the maximum depth. CUs with a 32×32 block and a 16×16 block may be denoted as depth 1 and depth 2, respectively.
[0172] For example, when a single coding unit is partitioned into four coding units, the horizontal and vertical sizes of the four partitioned coding units may be half the horizontal and vertical sizes of the CU before partitioning. In one embodiment, when a coding unit of size 32×32 is partitioned into four coding units, each of the four partitioned coding units may have a size of 16×16. When a single coding unit is partitioned into four coding units, it can be said that the coding unit can be partitioned into a quadtree form.
[0173] For example, when one coding unit is partitioned into two sub-coding units, the horizontal size or vertical size (width or height) of each of the two sub-coding units may be half the horizontal size or vertical size of the original coding unit. For example, when a coding unit of size 32×32 is partitioned vertically into two sub-coding units, each of the two sub-coding units may have a size of 16×32. For example, when a coding unit of size 8×32 is partitioned horizontally into two sub-coding units, each of the two sub-coding units may have a size of 8×16. When one coding unit is partitioned into two sub-coding units, the coding unit may be said to be partitioned into two or partitioned according to a binary tree partition structure.
[0174] For example, when a coding unit is partitioned into three sub-coding units, the horizontal size or vertical size of the coding unit may be partitioned in a ratio of 1:2:1, thereby generating three sub-coding units having a ratio of 1:2:1 in terms of the horizontal size or vertical size. For example, when a coding unit having a size of 16×32 is partitioned horizontally into three sub-coding units, the three sub-coding units may have sizes of 16×8, 16×16, and 16×8, respectively, in order from the uppermost sub-coding unit to the lowermost sub-coding unit. For example, when a coding unit having a size of 32×32 is partitioned vertically into three sub-coding units, the three sub-coding units may have sizes of 8×32, 16×32, and 8×32, respectively, in order from the left sub-coding unit to the right sub-coding unit. When a coding unit is partitioned into three sub-coding units, the coding unit may be said to be partitioned into three or partitioned according to a ternary tree partition structure.
[0175] exist Figure 3 , a coding tree unit (CTU) 320 is an example of a CTU to which a quadtree partition structure, a binary tree partition structure, and a ternary tree partition structure are all applied.
[0176] As described above, to partition a CTU, at least one of a quadtree partition structure, a binary tree partition structure, and a ternary tree partition structure may be applied. The various tree partition structures may be sequentially applied to the CTU according to a predetermined priority order. For example, the quadtree partition structure may be preferentially applied to the CTU. Coding units that can no longer be partitioned using the quadtree partition structure may correspond to leaf nodes of the quadtree. Coding units corresponding to leaf nodes of the quadtree may serve as root nodes of the binary and / or ternary tree partition structures. In other words, coding units corresponding to leaf nodes of the quadtree may be further partitioned according to the binary or ternary tree partition structure, or may not be further partitioned. Therefore, by preventing coding units derived from binary or ternary tree partitioning of coding units corresponding to leaf nodes of the quadtree from undergoing further quadtree partitioning, block partitioning operations and / or operations for signaling partition information may be efficiently performed.
[0177] The fact that the coding unit corresponding to the node of the quadtree is partitioned can be signaled using the four partition information. The four partition information having a first value (e.g., "1") can indicate that the current coding unit is partitioned according to the quadtree partition structure. The four partition information having a second value (e.g., "0") can indicate that the current coding unit is not partitioned according to the quadtree partition structure. The four partition information can be a flag with a predetermined length (e.g., one bit).
[0178] There may be no priority between binary tree partitioning and ternary tree partitioning. That is, the coding unit corresponding to the leaf node of the quadtree may be further partitioned by either binary tree partitioning or ternary tree partitioning. In addition, the coding unit generated by binary tree partitioning or ternary tree partitioning may be further partitioned by binary tree partitioning or ternary tree partitioning, or may not be further partitioned.
[0179] A tree structure in which there is no priority between binary tree partitioning and ternary tree partitioning is called a multi-type tree structure. The coding unit corresponding to the leaf node of the quadtree can be used as the root node of the multi-type tree. At least one of the 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 the node of the multi-type tree. In order to partition the coding unit corresponding to the node of the multi-type tree, the multi-type tree partition indication information, partition direction information, and partition tree information can be sequentially signaled.
[0180] The multi-type tree partition indication information having a first value (e.g., '1') may indicate that the current coding unit will undergo multi-type tree partitioning. The multi-type tree partition indication information having a second value (e.g., '0') may indicate that the current coding unit will not undergo multi-type tree partitioning.
[0181] When a coding unit corresponding to a node of a multi-type tree is further partitioned according to a multi-type tree partition structure, the coding unit may include partition direction information. The partition direction information may indicate in which direction the current coding unit will be partitioned for the multi-type tree partition. Partition direction information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned vertically. Partition direction information having a second value (e.g., "0") may indicate that the current coding unit will be partitioned horizontally.
[0182] When the coding unit corresponding to the node of the multi-type tree is further partitioned according to the multi-type tree partition structure, the current coding unit may include partition tree information. The partition tree information may indicate the tree partition structure to be used to partition the node of the multi-type tree. The partition tree information having a first value (e.g., "1") may indicate that the current coding unit will be partitioned according to the binary tree partition structure. The partition tree information having a second value (e.g., "0") may indicate that the current coding unit will be partitioned according to the ternary tree partition structure.
[0183] The partition indication information, partition tree information and partition direction information may all be flags with a predetermined length (eg, one bit).
[0184] At least any one of quadtree partition indication information, multi-type tree partition indication information, partition direction information, and partition tree information may be entropy encoded / decoded. In order to entropy encode / decode those types of information, information about neighboring coding units adjacent to the current coding unit may be used. For example, there is a high probability that the partition type (partitioned or not partitioned, partition tree, and / or partition direction) of the left neighboring coding unit and / or the upper neighboring coding unit of the current coding unit is similar to the partition type of the current coding unit. Therefore, context information for entropy encoding / decoding information about the current coding unit may be derived from the information about the neighboring coding units. The information about the neighboring coding units may include at least any one of quadtree partition information, multi-type tree partition indication information, partition direction information, and partition tree information.
[0185] As another example, between binary tree partitioning and ternary tree partitioning, binary tree partitioning may be performed preferentially. That is, the current coding unit may first undergo binary tree partitioning, and then the coding unit corresponding to the leaf node of the binary tree may be set as the root node for the ternary tree partitioning. In this case, for the coding unit corresponding to the node of the ternary tree, neither quadtree partitioning nor binary tree partitioning may be performed.
[0186] A coding unit that cannot be partitioned according to a quadtree partition structure, a binary tree partition structure, and / or a ternary tree partition structure becomes a basic unit for encoding, prediction, and / or transformation. That is, the coding unit cannot be further partitioned for prediction and / or transformation. Therefore, partition structure information and partition information for partitioning a coding unit into prediction units and / or transformation units may not exist in the bitstream.
[0187] However, when the size of a coding unit (i.e., the basic unit for partitioning) is larger than the size of the maximum transform block, the coding unit may be recursively partitioned until the size of the coding unit is reduced to be equal to or smaller than the size of the maximum transform block. For example, when the size of the coding unit is 64×64 and the size of the maximum transform block is 32×32, the coding unit may be partitioned into four 32×32 blocks for transforming. For example, when the size of the coding unit is 32×64 and the size of the maximum transform block is 32×32, the coding unit may be partitioned into two 32×32 blocks for transforming. In this case, the transform-specific partitioning of the coding unit is not separately signaled and may be determined by comparing the horizontal or vertical size of the coding unit with the horizontal or vertical size of the maximum transform block. For example, when the horizontal size (width) of the coding unit is larger than the horizontal size (width) of the maximum transform block, the coding unit may be vertically bisected. For example, when the vertical size (height) of the coding unit is larger than the vertical size (height) of the maximum transform block, the coding unit may be horizontally bisected.
[0188] Information about the maximum and / or minimum size of a coding unit and information about the maximum and / or minimum size of a transform block may be signaled or determined at a higher level of the coding unit. The higher level may be, for example, a sequence level, a picture level, a slice level, a tile group level, a tile level, or the like. For example, the minimum size of a coding unit may be determined to be 4×4. For example, the maximum size of a transform block may be determined to be 64×64. For example, the minimum size of a transform block may be determined to be 4×4.
[0189] Information about the minimum size of the coding unit corresponding to the leaf node of the quadtree (quadtree minimum size) and / or information about the maximum depth from the root node to the leaf node of the multi-type tree (maximum tree depth of the multi-type tree) may be signaled or determined at an upper level of the coding unit. For example, the upper level may be a sequence level, a picture level, a slice level, a tile group level, a tile level, etc. Information about the minimum size of the quadtree and / or information about the maximum depth of the multi-type tree may be signaled or determined for each of the intra-picture slices and the inter-picture slices.
[0190] The difference between the size of the CTU and the maximum size of the transform block may be signaled or determined at a higher level of the coding unit. For example, the higher level may be the sequence level, picture level, slice level, tile group level, tile level, etc. Information regarding the maximum size of the coding units corresponding to each node of the binary tree (hereinafter referred to as the maximum size of the binary tree) may be determined based on the size of the coding tree unit and the difference information. The maximum size of the coding units corresponding to each node of the ternary tree (hereinafter referred to as the maximum size of the ternary tree) may vary depending on the slice type. For example, for intra-picture slices, the maximum size of the ternary tree may be 32×32. For example, for inter-picture slices, the maximum size of the ternary tree may be 128×128. For example, the minimum size of the coding units 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 units corresponding to each node of the ternary tree (hereinafter referred to as the minimum size of the ternary tree) may be set to the minimum size of the coding block.
[0191] As another example, the maximum size of the binary tree and / or the maximum size of the ternary tree may be signaled or determined at the slice level. Alternatively, the minimum size of the binary tree and / or the minimum size of the ternary tree may be signaled or determined at the slice level.
[0192] According to the size and depth information of the various blocks described above, quad partition information, multi-type tree partition indication information, partition tree information and / or partition direction information may or may not be included in the bitstream.
[0193] For example, when the size of the coding unit is not greater than the minimum size of the quadtree, the coding unit does not include the quad partition information. The quad partition information may be inferred as the second value.
[0194] For example, when the size (horizontal size and vertical size) of the coding unit corresponding to the node of the multi-type tree is larger than the maximum size (horizontal size and vertical size) of the binary tree and / or the maximum size (horizontal size and vertical size) of the ternary tree, the coding unit may not be partitioned into two or three partitions. Therefore, the multi-type tree partition indication information may not be signaled, but the multi-type tree partition indication information may be inferred as the second value.
[0195] Optionally, when the size (horizontal size and vertical size) of the coding unit corresponding to the node of the multi-type tree is the same as the maximum size (horizontal size and vertical size) of the binary tree and / or is twice the maximum size (horizontal size and vertical size) of the ternary tree, the coding unit may not be further partitioned into two or three partitions. Therefore, the multi-type tree partition indication information may not be signaled, but the multi-type tree partition indication information may be inferred as the second value. This is because when the coding unit is partitioned according to the binary tree partition structure and / or the ternary tree partition structure, a coding unit smaller than the minimum size of the binary tree and / or the minimum size of the ternary tree is generated.
[0196] Optionally, binary tree partitioning or ternary tree partitioning may be limited based on the size of the virtual pipeline data unit (hereinafter, the pipeline buffer size). For example, when a coding unit is divided into sub-coding units that do not fit in the pipeline buffer size by binary tree partitioning or ternary tree partitioning, the corresponding binary tree partitioning or ternary tree partitioning may be limited. The pipeline buffer size may be the size of the largest transform block (e.g., 64×64). For example, when the pipeline buffer size is 64×64, the following partitioning may be limited.
[0197] - N×M (N and / or M is 128) ternary tree partitions for coding units
[0198] - 128×N (N<=64) binary tree partitions in the horizontal direction for coding units
[0199] - N×128 (N<=64) binary tree partitions in the vertical direction for the coding unit
[0200] 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 two and / or three partitions. Therefore, the multi-type tree partition indication information may not be signaled, but the multi-type tree partition indication information may be inferred as the second value.
[0201] Optionally, multi-type tree partition indication information may be signaled only when at least one of vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning is possible for a coding unit corresponding to a node of a multi-type tree. Otherwise, the coding unit may not be partitioned into two or three partitions. Therefore, multi-type tree partition indication information may not be signaled, but the multi-type tree partition indication information may be inferred as the second value.
[0202] Optionally, partition direction information may be signaled only when both vertical binary tree partitioning and horizontal binary tree partitioning, or both vertical ternary tree partitioning and horizontal ternary tree partitioning, are possible for a coding unit corresponding to a node of a multi-type tree. Otherwise, partition direction information may not be signaled, but the partition direction information may be inferred as a value indicating a possible partition direction.
[0203] Optionally, partition tree information may be signaled only when both vertical binary tree partitioning and vertical ternary tree partitioning, or both horizontal binary tree partitioning and horizontal ternary tree partitioning, are possible for a coding tree corresponding to a node of a multi-type tree. Otherwise, partition tree information may not be signaled, but the partition tree information may be inferred as a value indicating a possible partition tree structure.
[0204] Figure 4 is a diagram illustrating an intra prediction process.
[0205] Figure 4 The arrows from the center to the outside in FIG. 1 represent the prediction direction of the intra prediction mode.
[0206] Intra-frame encoding and / or decoding may be performed by using reference samples of a neighboring block of the current block. The neighboring block may be a reconstructed neighboring block. For example, intra-frame encoding and / or decoding may be performed by using values of reference samples or coding parameters included in the reconstructed neighboring block.
[0207] A prediction block may represent a block generated by performing intra prediction. A prediction block may correspond to at least one of a CU, a PU, and a TU. A unit of a prediction block may have the size of one of a CU, a PU, and a TU. A prediction block may be a square block of a size of 2×2, 4×4, 16×16, 32×32, or 64×64, or a rectangular block of a size of 2×8, 4×8, 2×16, 4×16, or 8×16, etc.
[0208] Intra-frame prediction may be performed based on an intra-frame prediction mode for the current block. The number of intra-frame prediction modes that the current block may have may be a fixed value or may be a value determined differently depending on the properties of the prediction block. For example, the properties of the prediction block may include the size and shape of the prediction block.
[0209] Regardless of the block size, the number of intra-frame prediction modes can be fixed to N. Alternatively, the number of intra-frame prediction modes can be 3, 5, 9, 17, 34, 35, 36, 65, or 67, etc. Alternatively, the number of intra-frame prediction modes can vary depending on the block size or the color component type, or both. For example, the number of intra-frame prediction modes can vary depending on whether the color component is a luminance signal or a chrominance signal. For example, as the block size increases, the number of intra-frame prediction modes can increase. Alternatively, the number of intra-frame prediction modes for a luminance component block can be greater than the number of intra-frame prediction modes for a chrominance component block.
[0210] The intra prediction mode may be a non-angle mode or an angle mode. The non-angle mode may be a DC mode or a planar mode, and the angle mode may be a prediction mode having a specific direction or angle. The intra prediction mode may be represented by at least one of a mode number, a mode value, a mode number, a mode angle, and a mode direction. The number of intra prediction modes may be M, which is greater than 1, including non-angle modes and angle modes. In order to perform intra prediction on a current block, a step of determining whether a sample included in a reconstructed neighboring block can be used as a reference sample for the current block may be performed. When there are samples that cannot be used as reference samples for the current block, a value obtained by copying or interpolating at least one sample value of the samples included in the reconstructed neighboring block, or performing both copying and interpolation, may be used to replace the unavailable sample value of the sample, so that the replaced sample value is used as the reference sample for the current block.
[0211] Figure 7 is a diagram showing reference samples that can be used for intra prediction.
[0212] like Figure 7 As shown in , at least one of the reference sample line 0 to the reference sample line 3 can be used for intra prediction of the current block. Figure 7 In the example, the samples of fragments A and F can be filled with the samples of the closest fragments B and E, respectively, instead of retrieving them from the reconstructed neighboring blocks. The index information indicating the reference sample line to be used for intra prediction of the current block can be signaled. For example, in Figure 7 In the example, reference sample line indicators 0, 1, and 2 may be signaled as index information indicating reference sample line 0, reference sample line 1, and reference sample line 2. When the upper boundary of the current block is the boundary of the CTU, only reference sample line 0 may be available. Therefore, in this case, index information may not be signaled. When reference sample lines other than reference sample line 0 are used, filtering for the prediction block, which will be described later, may not be performed.
[0213] When intra prediction is performed, a filter may be applied to at least one of a reference sample and a prediction sample based on at least one of an intra prediction mode and a current block size.
[0214] In the case of planar mode, when generating a prediction block for the current block, the sample value of the prediction target sample may be generated by using a weighted sum of the upper and left reference samples of the current block, and the upper right and lower left reference samples of the current block, depending on the position of the prediction target sample within the prediction block. Furthermore, in the case of DC mode, when generating a prediction block for the current block, the average of the upper and left reference samples of the current block may be used. Furthermore, in the case of angular mode, the prediction block may be generated by using the upper, left, upper right, and / or lower left reference samples of the current block. To generate the prediction sample values, interpolation of real units may be performed.
[0215] In the case of intra-frame prediction between color components, a prediction block for the current block of the second color component can be generated based on the corresponding reconstructed block of the first color component. For example, the first color component can be a luma component, and the second color component can be a chroma component. For intra-frame prediction between color components, parameters of a linear model between the first and second color components can be derived based on a template. The template can include the upper and / or left neighboring samples of the current block and the upper and / or left neighboring samples of the corresponding reconstructed block of the first color component. For example, the parameters of the linear model can be derived using the sample value of the first color component with the maximum value and the corresponding sample value of the second color component among the samples in the template, as well as the sample value of the first color component with the minimum value and the corresponding sample value of the second color component among the samples in the template. Once the parameters of the linear model are derived, the corresponding reconstructed block can be applied to the linear model to generate a prediction block for the current block. Depending on the video format, subsampling can be performed on the neighboring samples of the reconstructed block of the first color component and the corresponding reconstructed block. For example, when one sample of the second color component corresponds to four samples of the first color component, the four samples of the first color component may be subsampled to calculate one corresponding sample. In this case, parameter derivation of a linear model and intra prediction between color components may be performed based on the corresponding subsampled samples. Whether to perform intra prediction between color components and / or the range of the template may be signaled as an intra prediction mode.
[0216] The current block may be partitioned into two subblocks or four subblocks in the horizontal or vertical direction. The partitioned subblocks may be reconstructed sequentially. That is, intra prediction may be performed on the subblocks to generate sub-prediction blocks. Furthermore, inverse quantization and / or inverse transformation may be performed on the subblocks to generate sub-residual blocks. A reconstructed subblock may be generated by adding the sub-prediction block to the sub-residual block. The reconstructed subblock may be used as a reference sample for intra prediction of a subsequent subblock. A subblock may be a block including a predetermined number (e.g., 16) or more samples. Thus, for example, when the current block is an 8×4 block or a 4×8 block, the current block may be partitioned into two subblocks. Furthermore, when the current block is a 4×4 block, the current block may not be partitioned into subblocks. When the current block has other sizes, the current block may be partitioned into four subblocks. Information regarding whether intra prediction is performed based on subblocks and / or the partition direction (horizontal or vertical) may be signaled. Subblock-based intra prediction may be limited to only when using reference sample line 0. When subblock-based intra prediction is performed, filtering for a prediction block, which will be described later, may not be performed.
[0217] The final prediction block can be generated by performing filtering on the prediction block predicted by the intra-frame. The filtering can be performed by applying predetermined weights to the filtering target samples, the left reference samples, the upper reference samples and / or the upper left reference samples. The weights and / or reference samples (range, position, etc.) used for filtering can be determined based on at least one of the block size, the intra-frame prediction mode and the position of the filtering target sample in the prediction block. The filtering can be performed only in the case of a predetermined intra-frame prediction mode (e.g., DC, plane, vertical, horizontal, diagonal and / or adjacent diagonal mode). The adjacent diagonal mode can be a mode in which k is added to the diagonal mode or subtracted from the diagonal mode. For example, k can be a positive integer of 8 or less.
[0218] The intra-frame prediction mode of the current block can be entropy encoded / decoded by predicting the intra-frame prediction mode of a block adjacent to the current block. When the intra-frame prediction mode of the current block is the same as that of the neighboring block, information indicating that the intra-frame prediction mode of the current block and the neighboring block is the same can be signaled using predetermined flag information. In addition, indicator information of an intra-frame prediction mode that is the same as the intra-frame prediction mode of the current block among the intra-frame prediction modes of multiple neighboring blocks can be signaled. When the intra-frame prediction mode of the current block is different from that of the neighboring block, the intra-frame prediction mode information of the current block can be entropy encoded / decoded by performing entropy encoding / decoding based on the intra-frame prediction mode of the neighboring block.
[0219] Figure 5 is a diagram illustrating an embodiment of an inter-picture prediction process.
[0220] exist Figure 5 In , a rectangle can represent a picture. Figure 5In FIG, the arrow indicates the prediction direction. According to the encoding type of a picture, the picture can be classified into an intra picture (I picture), a predicted picture (P picture), and a bi-predictive picture (B picture).
[0221] I-pictures can be encoded using intra-frame prediction without requiring inter-picture prediction. P-pictures can be encoded using inter-picture prediction using reference pictures in one direction (i.e., forward or backward) relative to the current block. B-pictures can be encoded using inter-picture prediction using reference pictures in two directions (i.e., forward and backward) relative to the current block. When using inter-picture prediction, the encoder can perform inter-picture prediction or motion compensation, and the decoder can perform corresponding motion compensation.
[0222] Hereinafter, embodiments of inter-picture prediction will be described in detail.
[0223] Inter-picture prediction or motion compensation may be performed using reference pictures and motion information.
[0224] Motion information of the current block may be derived during inter-picture prediction by each of the encoding apparatus 100 and the decoding apparatus 200. The motion information of the current block may be derived by using motion information of a reconstructed neighboring block, motion information of a co-located block (also referred to as a col block or co-located block), and / or motion information of a block adjacent to the co-located block. The co-located block may refer to a block in a previously reconstructed co-located picture (also referred to as a col picture or co-located picture) that is spatially co-located with the current block. The co-located picture may be one of one or more reference pictures included in a reference picture list.
[0225] The method of deriving motion information may vary depending on the prediction mode of the current block. For example, prediction modes applied to inter-frame prediction include AMVP mode, merge mode, skip mode, merge mode with motion vector difference, sub-block merge mode, geometric partition mode, combined inter-frame and intra-frame prediction mode, affine mode, etc. Here, the merge mode may be referred to as motion merge mode.
[0226] For example, when AMVP is used as a prediction mode, at least one of the motion vector of the reconstructed neighboring block, the motion vector of the co-located block, the motion vector of the block adjacent to the co-located block, and the (0,0) motion vector may be determined as a motion vector candidate for the current block, and a motion vector candidate list may be generated by using the motion vector candidates. The motion vector candidate for the current block may be derived by using the generated motion vector candidate list. The motion information of the current block may be determined based on the derived motion vector candidate. The motion vector of the co-located block or the motion vector of the block adjacent to the co-located block may be referred to as a temporal motion vector candidate, and the motion vector of the reconstructed neighboring block may be referred to as a spatial motion vector candidate.
[0227] The encoding device 100 may calculate a motion vector difference (MVD) between the motion vector of the current block and the motion vector candidate, and may perform entropy encoding on the motion vector difference (MVD). In addition, the encoding device 100 may perform entropy encoding on the motion vector candidate index and generate a bitstream. The motion vector candidate index may indicate the best motion vector candidate among the motion vector candidates included in the motion vector candidate list. The decoding device may perform entropy decoding on the motion vector candidate index included in the bitstream, and may select a motion vector candidate for the decoding target block from the motion vector candidates included in the motion vector candidate list by using the entropy-decoded motion vector candidate index. In addition, the decoding device 200 may add the entropy-decoded MVD to the motion vector candidate extracted by entropy decoding, thereby deriving the motion vector of the decoding target block.
[0228] In addition, the encoding apparatus 100 may perform entropy encoding on the calculated resolution information of the MVD. The decoding apparatus 200 may adjust the resolution of the entropy-decoded MVD using the MVD resolution information.
[0229] In addition, the encoding device 100 calculates a motion vector difference (MVD) between a motion vector in the current block and a motion vector candidate based on an affine model and performs entropy encoding on the MVD. The decoding device 200 derives a motion vector based on each subblock by deriving an affine controlled motion vector of a decoding target block from the sum of the entropy-decoded MVD and the affine controlled motion vector candidate.
[0230] The bitstream may include a reference picture index indicating a reference picture. The reference picture index may be entropy-encoded by the encoding apparatus 100 and then signaled as a bitstream to the decoding apparatus 200. The decoding apparatus 200 may generate a prediction block of a decoding target block based on the derived motion vector and the reference picture index information.
[0231] Another example of a method for deriving motion information of a current block may be a merge mode. Merge mode may indicate a method for merging the motion of multiple blocks. Merge mode may indicate a mode for deriving motion information of a current block from motion information of neighboring blocks. When merge mode is applied, the motion information of reconstructed neighboring blocks and / or the motion information of co-located blocks may be used to generate a merge candidate list. The motion information may include at least one of a motion vector, a reference picture index, and an inter-picture prediction indicator. The prediction indicator may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).
[0232] The merge candidate list may be a list of stored motion information. The motion information included in the merge candidate list may be at least one of the following: motion information of a neighboring block adjacent to the current block (spatial merge candidate), motion information of a co-located block of the current block in a reference picture (temporal merge candidate), new motion information generated by combining motion information present in the merge candidate list, motion information of a block encoded / decoded before the current block (history-based merge candidate), and a zero merge candidate.
[0233] The encoding device 100 may generate a bitstream by performing entropy encoding on at least one of a merge flag and a merge index, and may transmit the bitstream to the decoding device 200 using a signal. The merge flag may be information indicating whether a merge mode is performed for each block, and the merge index may be information indicating which neighboring block of the current block is a merge target block. For example, the neighboring blocks of the current block may include a left neighboring block located to the left of the current block, an upper neighboring block arranged above the current block, and a temporal neighboring block temporally adjacent to the current block.
[0234] In addition, the encoding device 100 performs entropy encoding on correction information for correcting the motion vector in the motion information of the merge candidate and transmits the correction information to the decoding device 200 using a signal. The decoding device 200 may correct the motion vector of the merge candidate selected by the merge index based on the correction information. Here, the correction information may include at least one of information on whether correction is performed, correction direction information, and correction size information. As described above, the prediction mode in which the motion vector of the merge candidate is corrected based on the signaled correction information may be referred to as a merge mode with a motion vector difference.
[0235] The skip mode may be a mode in which the motion information of the neighboring blocks is applied to the current block as is. When the skip mode is applied, the encoding device 100 may perform entropy encoding on information indicating which block's motion information is to be used as the motion information of the current block to generate a bitstream, and may signal the bitstream to the decoding device 200. The encoding device 100 may not signal a syntax element regarding at least any one of the motion vector difference information, the coded block flag, and the transform coefficient level to the decoding device 200.
[0236] The subblock merge mode may indicate a mode for deriving motion information in units of subblocks of a coding block (CU). When the subblock merge mode is applied, the subblock merge candidate list may be generated using motion information of subblocks co-located with the current subblock in the reference image (subblock-based temporal merge candidates) and / or affine control point motion vector merge candidates.
[0237] The geometric partitioning mode may indicate a mode in which motion information is derived by partitioning the current block in a predetermined direction, each prediction sample is derived using each of the derived motion information, and the prediction sample of the current block is derived by weighting each of the derived prediction samples.
[0238] The inter-intra combined prediction mode may mean a mode of deriving prediction samples of a current block by weighting prediction samples generated by inter prediction and prediction samples generated by intra prediction.
[0239] The decoding apparatus 200 may correct the derived motion information by itself. The decoding apparatus 200 may search for a predetermined area based on a reference block indicated by the derived motion information, and derive motion information having a minimum SAD as the corrected motion information.
[0240] The decoding apparatus 200 may compensate for prediction samples derived through inter-frame prediction using optical flow.
[0241] Figure 6 is a diagram illustrating transform and quantization processing.
[0242] like Figure 6 As shown in , a transform process and / or a quantization process is performed on the residual signal to generate a quantized level signal. The residual signal is the difference between the original block and the prediction block (i.e., an intra-frame prediction block or an inter-frame prediction block). The prediction block is a block generated by intra-frame prediction or inter-frame prediction. The transform can be a primary transform, a secondary transform, or both a primary transform and a secondary transform. The primary transform of the residual signal generates transform coefficients, and the secondary transform of the transform coefficients generates secondary transform coefficients.
[0243] At least one scheme selected from various predefined transform schemes is used to perform the primary transform. For example, examples of the predefined transform schemes include discrete cosine transform (DCT), discrete sine transform (DST), and Karhunen-Loève transform (KLT). The transform coefficients generated by the primary transform may undergo a secondary transform. The transform scheme used for the primary transform and / or secondary transform may be determined based on coding parameters of the current block and / or neighboring blocks of the current block. Optionally, transform information indicating the transform scheme may be signaled. DCT-based transforms may include, for example, DCT-2, DCT-8, etc. DST-based transforms may include, for example, DST-7.
[0244] A quantized level signal (quantized coefficient) may be generated by performing quantization on a residual signal or on a result of performing a primary transform and / or a secondary transform. Depending on the intra prediction mode or block size / shape of the block, the quantized level signal may be scanned according to at least one of diagonal upper right scanning, vertical scanning, and horizontal scanning. For example, when the coefficients are scanned according to diagonal upper right scanning, the coefficients in block form are changed to a one-dimensional vector form. In addition to diagonal upper right scanning, horizontal scanning for horizontally scanning the coefficients in two-dimensional block form or vertical scanning for vertically scanning the coefficients in two-dimensional block form may be used depending on the intra prediction mode and / or the size of the transform block. The scanned quantized level coefficients may be entropy coded for insertion into the bitstream.
[0245] The decoder entropy decodes the bitstream to obtain quantized level coefficients. The quantized level coefficients can be arranged in a two-dimensional block form by inverse scanning. For inverse scanning, at least one of diagonal upper right scanning, vertical scanning, and horizontal scanning can be used.
[0246] The quantized level coefficients may then be dequantized, then inversely transformed at a secondary level as needed, and finally inversely transformed at a primary level as needed to generate a reconstructed residual signal.
[0247] Inverse mapping in the dynamic range can be performed for the luminance component reconstructed by intra prediction or inter prediction before in-loop filtering. The dynamic range can be divided into 16 equal segments, and the mapping function for each segment can be sent by signal. The mapping function can be sent by signal at the slice level or the parallel block group level. The inverse mapping function for performing inverse mapping can be derived based on the mapping function. In-loop filtering, reference picture storage and motion compensation are performed in the inverse mapping area, and the prediction block generated by inter prediction is converted to the mapping area via mapping using the mapping function, and then used to generate the reconstructed block. However, since intra prediction is performed in the mapping area, the prediction block generated by intra prediction can be used to generate the reconstructed block without mapping / inverse mapping.
[0248] When the current block is a residual block of a chroma component, the residual block can be converted to an inverse mapping area by performing scaling on the chroma component of the mapping area. The availability of scaling can be signaled at the slice level or the parallel block group level. Scaling can only be applied when mapping for the luma component is available and the partitioning of the luma component and the partitioning of the chroma component follow the same tree structure. Scaling can be performed based on the average value of the sample values of the 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 value required for scaling can be derived by referencing a lookup table using the index of the segment to which the average value of the sample values of the luma prediction block belongs. Finally, the residual block can be converted to the inverse mapping area by scaling the residual block using the derived value. Then, chroma component block recovery, intra-frame prediction, inter-frame prediction, in-loop filtering, and reference picture storage can be performed in the inverse mapping area.
[0249] Information indicating whether mapping / inverse mapping of luma components and chroma components is available may be signaled through a sequence parameter set.
[0250] The prediction block of the current block can be generated based on a block vector indicating the displacement between the current block and the reference block in the current picture. In this way, the prediction mode for generating the prediction block with reference to the current picture is called intra block copy (IBC) mode. The IBC mode can be applied to M×N (M<=64, N<=64) coding units. The IBC mode may include skip mode, merge mode, AMVP mode, etc. In the case of skip mode or merge mode, a merge candidate list is constructed and a merge index is signaled so that a merge candidate can be specified. The block vector of the specified merge candidate can be used as the block vector of the current block. The merge candidate list may include at least one of a spatial candidate, a history-based candidate, a candidate based on the average of two candidates, and a zero merge candidate. In the case of AMVP mode, a difference block vector may be signaled. In addition, the prediction block vector may be derived from the left neighboring block and the upper neighboring block of the current block. The index of the neighboring block to be used may be signaled. The prediction block in IBC mode is included in the current CTU or the left CTU and is limited to blocks in the already reconstructed area. For example, the block vector value may be limited so that the prediction block of the current block is located within the region of three 64×64 blocks preceding the 64×64 block to which the current block belongs in the encoding / decoding order. By limiting the block vector value in this manner, memory consumption and device complexity of an implementation according to the IBC mode can be reduced.
[0251] Hereinafter, an image encoding / decoding method using subblock-based transform (subblock transform) according to the present invention will be described.
[0252] When transform is applied for image compression under certain conditions, the present invention improves coding efficiency by performing sub-block based transform (SBT). The present invention can improve traditional coding techniques that may result in system complexity, lower coding efficiency, lower transmission efficiency or lower image quality.
[0253] In addition, when transform is applied to an image under certain conditions, encoding efficiency can be improved by not performing sub-block based transform (SBT). At this time, the present invention can improve encoding efficiency by considering the shape and size of the block under certain conditions.
[0254] Hereinafter, transform and subblock-based transform may include inverse transform and subblock-based inverse transform, respectively.
[0255] SBT stands for Sub-Block Transform, which is one of transform techniques applicable to a residual signal obtained by subtracting a predicted image signal (or a predicted signal) from an image input to an encoder.
[0256] SBT is applied to the residual signal or directly to the image input to the encoder. Therefore, there is no particular limitation on the signal to which SBT is applied.
[0257] The basic unit of encoding may be referred to as a coding unit (CU). A CU itself may be used as a unit for prediction, or may be divided into further subdivided units according to applications to perform prediction.
[0258] The unit in which prediction is performed may generally be referred to as a prediction unit (PU). Thus, one CU may be predicted as one PU, or a method may be used in which a prediction residual signal is obtained by dividing one CU into multiple PUs and obtaining a prediction signal in each prediction unit.
[0259] In addition, instead of dividing one CU into a plurality of PUs, if the CU is divided into CUs with smaller sizes so that one CU becomes one PU, then one CU can become one PU. By configuring one CU as one PU, the encoding / decoding system can be implemented more simply.
[0260] In the present invention, for convenience of description, unless otherwise specified, the technology of the present invention will be described under the assumption that prediction is performed in CU units (ie, this means that one CU becomes one PU).
[0261] In addition, since a CU is divided into smaller sizes, it is necessary to separately signal whether the CU is divided.
[0262] Therefore, when splitting is performed such that one CU becomes one PU in order to further simplify system implementation, the amount of information indicating the CU splitting may increase, thereby degrading encoding efficiency. Figure 8is a diagram illustrating an example of division of a CU as a coding unit.
[0263] Although the CU is not further divided, if the same effect as further dividing the CU is obtained, encoding efficiency can be improved without the above-mentioned problems.
[0264] The present invention relates to a transform method and device designed to solve these technical problems. In addition, the present invention relates to an encoding method and device, a decoding method and device, and a method and device for constructing a compressed bit stream using the transform method and device.
[0265] A residual signal obtained by subtracting a prediction signal from a coding unit signal input to an encoder may be transformed into a transform coefficient through transformation for encoding.
[0266] The unit where transform is performed is called a transform unit (TU).
[0267] For example, one CU may be converted into one TU. That is, an input image signal of a coding unit is converted into a residual signal through prediction, wherein the residual signal may be converted into a transform coefficient through transformation.
[0268] However, after a CU is divided into two sub-blocks and not used as a TU, the transform is applied to one sub-block, and the transform is not applied to the other sub-block. The other sub-block has a value of 0. This may be called zeroing-out.
[0269] The encoder encodes and transmits the transform coefficients of a sub-block divided from the CU, and the decoder decodes and inverse-transforms the transform coefficients that have been encoded and transmitted. However, since both the encoder and the decoder know that the other sub-blocks have a value of 0, general transform coefficient encoding or decoding may not be performed.
[0270] Although zeroing (i.e., having a value of 0) has been assumed so far for ease of description, a specific value other than 0 may be used. In this case, the specific value may be predefined by the encoder and decoder, and the value may be determined and used for each sub-block and may be transmitted. The decoder may parse and decode the value.
[0271] That is, in encoding of a CU, there may be transform coefficients for only one subblock of the CU, and the values for other subblocks may be considered to be 0 (or a specific value). Therefore, encoding is not performed, thereby improving encoding efficiency.
[0272] Figure 9 is a diagram illustrating eight SBT modes according to an embodiment of the present invention.
[0273] Figure 9(a) shows an example of a return-to-zero sub-block according to the SBT mode. Here, a sub-block represented in white indicates a return-to-zero sub-block that does not require transformation.
[0274] Figure 9 (b) shows an embodiment indicating the SBT mode using cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag.
[0275] Figure 9 (b) cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag may be transmitted from the encoder to the decoder.
[0276] Figure 10 is a diagram showing syntax for signaling cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag.
[0277] The information cu_sbt_flag indicating whether SBT is used may indicate whether the current CU uses SBT. When cu_sbt_flag has a first value (e.g., "0"), this may indicate that SBT is not used, and when cu_sbt_flag has a second value (e.g., "1"), this may indicate that SBT is used. Therefore, the encoder can determine whether all or part of the current CU is inverse transformed by parsing and interpreting the value of cu_sbt_flag. When the value of cu_sbt_flag is the second value (e.g., "1") (i.e., when SBT is used), the decoder can entropy decode cu_sbt_quad_flag as the next information.
[0278] The SBT split information cu_sbt_quad_flag may indicate a method of splitting the current CU. That is, when cu_sbt_quad_flag has a first value (e.g., "1"), this may indicate that the current CU is split 1:3 (or 3:1) (this is called 1 / 4 split), and when cu_sbt_quad_flag has a second value (e.g., "0"), this may indicate that the current CU is split 1:1 (this is called 1 / 2 split). In addition, when cu_sbt_flag and cu_sbt_quad_flag are not entropy decoded, cu_sbt_flag and cu_sbt_quad_flag may be inferred to be the second value (e.g., "0").
[0279] In addition, the decoder may entropy-decode cu_sbt_horizontal_flag indicating a split direction for a subblock.
[0280] The SBT split direction information cu_sbt_horizontal_flag may indicate a split direction for a sub-block. That is, when cu_sbt_horizontal_flag has a first value (e.g., "1"), this may indicate that the current CU is split into two sub-blocks in a horizontal direction, and when cu_sbt_horizontal_flag has a second value (e.g., "0"), this may indicate that the current CU is split into two sub-blocks in a vertical direction.
[0281] Additionally, the decoder may entropy decode cu_sbt_pos_flag.
[0282] The SBT position information cu_sbt_pos_flag may indicate which sub-block of the two sub-blocks constituting the current CU is transformed. That is, when the value of cu_sbt_pos_flag is a first value (e.g., "1"), the first sub-block located at the top (or left) is transformed, and when the value of cu_sbt_pos_flag is a second value (e.g., "0"), the second sub-block located at the bottom (or right) is transformed.
[0283] As described above, other sub-blocks that are not transformed are set to zero (or a specific value).
[0284] Therefore, eight SBT modes can be derived from information other than cu_sbt_flag indicating whether SBT is used. Figure 9 An example of a combination of eight modes is shown in (a). Figure 9 Examples of four flag values cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag for eight SBT modes are shown in (b).
[0285] In addition, in the description of cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag, examples of the first value and the second value are not limited to the above description, and different values may be set according to the embodiment. For example, when the value of cu_sbt_pos_flag is a first value (e.g., "0"), this may indicate that the first sub-block located at the top (or left) is transformed, and when the value of cu_sbt_pos_flag is a second value (e.g., "1"), this may indicate that the second sub-block located at the bottom (or right) is transformed.
[0286] A case where the SBT technique is advantageous for dividing a CU with the minimum steps and obtaining the same effect as further division can be predicted according to the shape, size, or coding state of a block or a channel such as YCbCr.
[0287] Therefore, if a specific condition is determined in advance between the encoder and the decoder and the SBT is not used when the condition is met, the value of cu_sbt_flag can be inferred to be 0, instead of transmitting information indicating whether SBT is used (cu_sbt_flag), whether the CU is subjected to 1 / 4 split or 1 / 2 split (cu_sbt_quad_flag), whether the CU is split horizontally or vertically to obtain sub-blocks (cu_sbt_horizontal_flag), and which of the two divided sub-blocks is transformed (cu_sbt_pos_flag), the decoder can be informed that SBT is not used without transmitting the above information, thereby improving encoding efficiency.
[0288] In another method, a specific condition between the encoder and the decoder may be predetermined, and when the condition is met, when the SBT-related information selected by the encoder (hereinafter referred to as SBT information, e.g., cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag) is entropy encoded (e.g., arithmetic encoded or CABAC encoded), predictable context information may be used for entropy encoding (e.g., arithmetic encoded or CABAC encoded) by further increasing (or decreasing) the probability of a specific value of the corresponding information, thereby improving encoding efficiency or simplifying the encoder.
[0289] Similarly, if specified conditions predetermined by the encoder are met, when the decoder performs entropy decoding (e.g., arithmetic decoding or CABAC decoding) on the selected SBT-related information, the predictable context information used for entropy decoding (e.g., arithmetic decoding or CABAC decoding) can be used as much as possible, thereby improving coding efficiency.
[0290] In another method, a specific condition between the encoder and the decoder is predetermined, and when the condition is met, when the SBT-related information (cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag) selected by the encoder is entropy encoded (e.g., arithmetic coding or CABAC encoding), the number of necessary contexts is limited to a predetermined number (1, 2, or 3), and the corresponding information is entropy encoded using the limited number of contexts to use as much predictable context information as possible for entropy encoding, thereby reducing the complexity of the encoder while improving encoding efficiency.
[0291] Similarly, if specified conditions predetermined by the encoder are met, when the decoder performs entropy decoding (e.g., arithmetic decoding or CABAC decoding) on the selected SBT-related information (cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag), the number of necessary contexts is limited to a predetermined number (1, 2, or 3), and the corresponding information is entropy decoded using a limited number of contexts so as to use as much predictable context information as possible for entropy decoding, thereby reducing the complexity of the decoder while improving encoding efficiency.
[0292] An embodiment of the present invention designed to solve the above-mentioned technical problems will now be described.
[0293] <Example 1>
[0294] In this embodiment, compression efficiency can be improved by allowing the encoder and decoder to pre-identify the non-use of SBT under specific conditions, without separately transmitting the cu_sbt_flag indicating whether SBT is used. In this case, the specific conditions may include at least one of the shape or size of at least one block. Alternatively, predefined characteristics of the block may be considered. Alternatively, whether the block is a luma signal or a chroma signal may be considered.
[0295] For a more specific example, when a block is a chroma signal, SBT may not always be used between the encoder and the decoder without transmitting cu_sbt_flag having a value of 0. That is, for a luma signal, a method of transmitting information related to whether SBT is used (e.g., cu_sbt_flag) may be used, and for a chroma signal, it may be agreed between the encoder and the decoder not to use SBT instead of transmitting information related to whether SBT is used (e.g., cu_sbt_flag).
[0296] Various implementations of Embodiment 1 may be implemented differently depending on how specific conditions are set and used. Since the encoder and decoder know in advance under what conditions cu_sbt_flag has a value of 0, SBT may not be used without sending the cu_sbt_flag value, thereby improving encoding efficiency.
[0297] Figure 11 3 is a diagram illustrating a method for implementing Embodiment 1.
[0298] Depending on how the encoder and decoder are determined Figure 11 The “condition check for suggested practice 1” of Example 1 can be implemented in various forms.
[0299] 1.1 (Embodiment according to block shape): In this case, when a block has a specific shape, the encoder and decoder may predetermine not to use SBT (or use SBT depending on the implementation). Therefore, even if cu_sbt_flag is not sent, the decoder may not (or may) use SBT. To this end, the "conditional check for recommended practice 1" can be implemented in various forms as follows.
[0300] <Conditional checks for recommended practice 1>
[0301] 1.1.a(cbWidth!=cbHeight)
[0302] 1.1.b(cbWidth == cbHeight)
[0303] 1.1.c(cbWidth>=N*cbHeight)
[0304] 1.1.d(cbHeight>=N*cbWidth)
[0305] Here, cbWidth and cbHeight refer to the width and height of the current CU, respectively. In addition, the inequality "=<" indicating that the left side is "less than or equal to" the right side can be replaced with "<" indicating that the left side is less than the right side. Furthermore, N is a value representing the aspect ratio, which is calculated by dividing width by height and can be any of at least 2, 4, 8, 16, or 32.
[0306] In the embodiment of 1.1.a, if the condition (cbWidth!=cbHeight) is true, it means that the CU is not a square. That is, if this condition is agreed upon between the encoder and the decoder, when the CU is a square, SBT may not be used even though cu_sbt_flag is not sent. That is, when cbWidth is equal to cbHeight, cu_sbt_flag may not be sent, and the decoder may perform decoding without using the SBT technology by inferring cu_sbt_flag=0.
[0307] In the example of using the condition of 1.1.b (cbWidth == cbHeight), when the CU is not square, the encoder and decoder do not use SBT without sending cu_sbt_flag. That is, when cbWidth is different from cbHeight, cu_sbt_flag may not be sent, and the decoder can perform decoding by inferring cu_sbt_flag = 0.
[0308] In the example of 1.1.c, if the width of the CU is less than N times the height of the CU (similarly, in the example of 1.1.d, the height of the CU is less than N times the width of the CU), then although cu_sbt_flag is not sent, the decoder can perform decoding without using SBT by inferring cu_sbt_flag = 0. Through such an example, encoding efficiency can be improved.
[0309] Figure 12 is a diagram illustrating another method of implementing Embodiment 1.
[0310] Depending on how the encoder and decoder are determined Figure 12 The “condition check for recommended practice 2” of Example 1 can be implemented in various forms.
[0311] 1.2 (According to the embodiment of the block size): In this case, when the size of the CU is greater than (or less than or equal to) a predetermined size, the encoder and decoder may predetermine not to use SBT (SBT is used depending on the embodiment). Therefore, although cu_sbt_flag is not transmitted, the decoder may not (or may) use SBT. To this end, the "conditional check for recommended practice 2" indicating the condition for checking the size of the CU can be implemented in various forms as follows.
[0312] <Conditional checks for recommended practice 2>
[0313] 1.2.a((cbWidth <N1)&&(cbHeight<N2))
[0314] 1.2.b((cbWidth <N1)OR(cbHeight<N2))
[0315] 1.2.c(min(cbWidth,cbHeight) <N3)
[0316] 1.2.d(max(cbWidth,cbHeight) <N4)
[0317] 1.2.e(cbWidth*cbHeight <N5)
[0318] 1.2.f(cbWidth+cbHeight <N6)
[0319] 1.2.g(cbWidth==N7&&cbHeight==N6)
[0320] 1.2.h(cbWidth==N7&&cbHeight==N7)
[0321] 1.2.i(log(cbWidth)+log(cbHeight) <N8)
[0322] In various embodiments, the inequality "<" indicating that the left side is "less than" the right side can be replaced with "=<" indicating that the left side is less than or equal to the right side. Furthermore, N1 to N7, indicating the predetermined conditional boundary values, can independently be one of 2, 4, 8, 12, 16, 32, 64, or 128, and N8 can be one of 0, 1, 2, 3, 4, 5, or 6. Furthermore, N1 to N8, indicating the predetermined conditional boundary values, can be determined based on maximum transform size information. Here, the maximum transform size information can be information signaled from the encoder to the decoder.
[0323] In embodiment 1.2.a, when the width and height of the current CU are not less than (or greater than) predetermined boundary values N1 and N2, respectively, SBT may not be used without sending cu_sbt_flag. That is, in this case, although cu_sbt_flag is not sent, the decoder can perform decoding without using the SBT technology by inferring cu_sbt_flag = 0. This is because when the size of the CU is larger than the predetermined size, it is extremely unlikely that zeroing of a sub-block whose size is 1 / 2 or 3 / 4 of the size of the CU will be beneficial.
[0324] In the example of using the condition of 1.2.b, ((cbWidth < N1) OR (cbHeight < N2)), when both the width and height of the current CU are equal to or greater than the predetermined boundary values (N1 and N2) respectively, although the cu_sbt_flag is not transmitted, the decoder can perform decoding without using the SBT technique by inferring that cu_sbt_flag = 0. This is because, similar to the situation described above, when the size of the CU is larger than the predetermined size, it is highly unlikely that zeroing of sub-blocks that are 1 / 2 or 3 / 4 of the size of the CU is beneficial.
[0325] In the example of 1.2.c, when the shorter length among the width and height is equal to or greater than the predetermined boundary value N3, although the cu_sbt_flag is not transmitted, the decoder can perform decoding without using the SBT technique by inferring that cu_sbt_flag = 0. In the example of 1.2.d, when the longer length among the width and height of the CU is equal to or greater than the predetermined boundary value N4, although the cu_sbt_flag is not transmitted, the decoder can perform decoding without using the SBT technique by inferring that cu_sbt_flag = 0.
[0326] In the example of 1.2.e, when the product of the width and height of the CU is equal to or greater than the predetermined boundary value N5, although the cu_sbt_flag is not transmitted, the decoder can perform decoding without using the SBT technique by inferring that cu_sbt_flag = 0. The example of 1.2.e can be slightly modified to be implemented like 1.2.f or 1.2.i. In 1.2.i, when the sum of the logarithms of the width and height of the CU is equal to or greater than the boundary value N8, and in 1.2.f, when the sum of the width and height of the CU is equal to or greater than the boundary value N6, although the cu_sbt_flag is not transmitted, the decoder can perform decoding without using the SBT technique by inferring that cu_sbt_flag = 0.
[0327] In 1.2.g, when the width and height of the CU are not the predetermined sizes N7 and N6, respectively, although cu_sbt_flag is not sent, the decoder can perform decoding without using the SBT technology by inferring cu_sbt_flag = 0. In 1.2.h, when both the width and height of the CU are not the predetermined size N7, although cu_sbt_flag is not sent, the decoder can perform decoding without using the SBT technology by inferring cu_sbt_flag = 0. In 1.2.i, when the sum of the logarithmic values of the width and height of the CU is equal to or greater than the predetermined size N8, although cu_sbt_flag is not sent, the decoder can perform decoding without using the SBT technology by inferring cu_sbt_flag = 0.
[0328] 1.3 (according to the embodiment of the channel): In the case of a special channel (or component) of a CU, the encoder and the decoder may predetermine not to use SBT (or use SBT according to the implementation), so that even if sbt_cu_flag is not sent, the decoder may not use (may use) SBT. To this end, "conditional check for recommended practice 1" or "conditional check for recommended practice 2" can be implemented in various forms as follows.
[0329] <Conditional checks for recommended practice 2>
[0330] 1.3.a isLuma(compID)
[0331] 1.3.b(!isLuma(compID))
[0332] 1.3.c isChroma(partitioner.chType)
[0333] 1.3.d(!isChroma(partitioner.chType))
[0334] 1.3.e(compID==COMPONENT_Y)
[0335] 1.3.f Conditional check for recommended practice 1 -> (compID == COMPONENT_Cb)
[0336] 1.3.g(compID==COMPONENT_Cr)
[0337] compID is an abbreviation of component ID, which indicates a color component. compID can be one of 0, 1, or 2, where 0 indicates brightness, 1 indicates Cb, and 2 indicates Cr.
[0338] The isLuma() function of (1) below determines whether the component index is 0 to determine whether it is a luminance block or a chrominance block.
[0339] Furthermore, the function of (2) has the same meaning as (1), but determines whether the current channel is a luma channel or a chroma channel in another format.
[0340] In addition, the isChroma() function of (3) can determine whether the component index is 1 or 2 to determine whether it is a luminance block or a chrominance block.
[0341] In addition, the function of (4) has the same meaning as (3), but determines whether the current channel is a luma channel or a chroma channel in another format.
[0342] isLuma(const ComponentID id)(1){
[0343] return(id==COMPONENT_Y);
[0344] }
[0345] isLuma(const ChannelType id)(2)
[0346] {
[0347] return(id==CHANNEL_TYPE_LUMA);
[0348] }
[0349] isChroma(const ComponentID id)(3){
[0350] return(id!=COMPONENT_Y);
[0351] }
[0352] sChroma(const ChannelType id)(4){
[0353] return(id!=CHANNEL_TYPE_LUMA);
[0354] }
[0355] Although only cu_sbt_flag is described in Embodiment 1, the present invention is not limited thereto. Embodiment 1 is similarly applicable to other information related to SBT, namely, cu_sbt_quad_flag, cu_sbt_horizontal_flag, cu_sbt_pos_flag, etc.
[0356] <Example 2>
[0357] In this embodiment, a method and apparatus for performing entropy encoding / decoding using at least one of a block shape, a block size, or information about neighboring blocks in entropy encoding / decoding of SBT information when an image is encoded / decoded will be described. Figure 13 An embodiment obtained by applying this embodiment to cu_sbt_flag is shown in FIG.
[0358] By setting Figure 13 The conditional check for the suggested practice 3, as in embodiments 1.1 and 1.2, may determine the context reflecting the probability of the occurrence frequency of the SBT information value according to the size of the block or the shape of the block.
[0359] When using CABAC (Context Adaptive Binary Arithmetic Coding) or arithmetic coding, probability value information of the symbols to be entropy coded is required. When entropy coding a symbol, which probability value is used is an important factor in terms of compression efficiency. Which symbol has what value is closely affected by other information related to the symbol. For example, the probability value of cu_sbt_flag may be closely affected by the size or shape of the current CU. The various values of other information (which may be called context) that determine the probability value of the corresponding symbol and the probability value of the corresponding symbol may be called a context model. That is, the CABAC encoder / decoder can use a context model instead of using an arbitrary probability value, wherein the context model indicates the probability value of the symbol to be coded based on the value of the relevant other information. The CABAC encoder / decoder can perform arithmetic coding / arithmetic decoding by selecting a probability model for each symbol according to the context of the input symbol and using a series of processes of local statistical adaptive probability estimation.
[0360] The SBT information has a binary value of 0 or 1, and a context model is defined for the SBT information to be entropy-encoded. The context model is a set of probability models for one or more binary bits of a binary symbol, and is selected from available models based on the statistics of recently encoded data symbols. The context model stores the probability of each binary bit becoming "1" or "0". The CABAC encoder encodes each binary bit according to the selected probability model. Thereafter, the selected probability model is updated based on the actual encoded value.
[0361] To improve coding efficiency, it is important to find information that closely affects the SBT information to be encoded and set probability values for the SBT information values to be encoded based on various values. Therefore, if a more precise and accurate context model with a large number of contexts is used, coding efficiency can be improved. However, as the number of contexts increases, system complexity may increase.
[0362] Figure 13 An embodiment of two contexts is shown for encoding / decoding cu_sbt_flag (or sbtFlag) values. The selection and use of one of the two contexts can be implemented in various forms.
[0363] exist Figure 13 In the example, when the conditional statement for the conditional check of recommended practice 3 becomes true or false, context 1 (ctxIdx=1) or context 0 (ctxIdx=0) can be selected.
[0364] Therefore, it is important to set up the conditional checks for recommended practice 3 to become true under a specific condition and false under another condition.
[0365] In this technique, a conditional check for Suggested Practice 3 can be set up like the conditional check for Suggested Practice 1 in 1.1a to 1.1.d, or like the conditional check for Suggested Practice 2 in 1.2.a to 1.2.i. In another embodiment, a setting like 2.1.a or 2.1.b below is possible.
[0366] <Conditional checks for recommended practice 3>
[0367] 2.1.a(cuWidth*cuHeight<=256)
[0368] 2.1.b(cuWidth*cuHeight>256)
[0369] Here, although 256 is used as the predetermined value, another value of 128, 64, or 32 may be used according to the application.
[0370] That is, when SBT information is entropy encoded (CABAC encoding or arithmetic encoding) or entropy decoded (CABAC decoding or arithmetic decoding) by referring to the CU's sizes cuWidth and cuHeight and their correlation (i.e., the CU's shape) or characteristics, an appropriate context can be selected and used, thereby improving compression efficiency.
[0371] Although only cu_sbt_flag is specifically described in Embodiment 2, the present invention is not limited thereto. Embodiment 2 is similarly applicable to other information related to SBT, namely, cu_sbt_quad_flag, cu_sbt_horizontal_flag, cu_sbt_pos_flag, etc.
[0372] <Example 3>
[0373] As described above, in entropy encoding / decoding of SBT information, a method and apparatus for performing entropy encoding / decoding using at least one of a shape or size of a block or information about neighboring blocks may be implemented.
[0374] Figure 15 is a diagram illustrating an embodiment of determining a context for cu_sbt_quad_flag.
[0375] As described above, cu_sbt_quad_flag (or sbtQuadFlag) indicates the partitioning method of the block (i.e., 1 / 2 partitioning or 1 / 4 partitioning). If the value is 1, this may indicate that the given CU is subjected to 1 / 4 partitioning, and if the value is 0, this may indicate that the given CU is subjected to 1 / 2 partitioning. For the purpose of describing this embodiment, it is assumed that cu_sbt_quad_flag is 1. In this case, as Figure 14 As shown, a given CU is subjected to 1 / 4 split, that is, is split according to 1:3 or 3:1.
[0376] One of the two sub-blocks obtained after the CU is split into 3:1 or 1:3 sub-blocks has a smaller size and the other sub-block has a larger size. Since the larger sub-block has a zero value (depending on the embodiment, it may have a specific value other than 0), the improvement in encoding efficiency is very good, but if an incorrect determination is made, the loss due to image quality degradation may be more fatal.
[0377] For a CU with a large number of zeroed sub-block pixels (i.e., with a relatively large size), there is a possibility that the loss is very large. To avoid this risk, when the size of the CU is equal to or larger than a predetermined size, the arithmetic coding context for 1 / 4 division (CABAC) can be used alone. This embodiment can be Figure 15 Shown in.
[0378] In addition, when considering the width (W or cuWidth) and height (H or cuHeight) of the CU, if only one side is subject to 1 / 4 division, cu_sbt_flag may have a value of 1. If only one side is subject to 1 / 4 division, the probability that the value of cu_sbt_quad_flag is 1 is lower than the case where both sides (height H and width W) of the CU are subject to 1 / 4 division. That is, the probability trend of the division direction of the sub-block according to the shape of the sub-block is closely related to the shape of the block. To further understand this, refer to Figure 16 Describes the shape of the CU before division into sub-blocks.
[0379] Figure 16 Four cases are shown where only one of the W or H of a CU may be subject to a 1 / 4 split. Figure 16The CUs of (a) and (c) are horizontally long CUs. Since the height of the CU is small, 1 / 4 division is impossible in the horizontal direction, and 1 / 4 division is possible only in the vertical direction. However, since these CUs are horizontally long, the probability of dividing these CUs in the vertical direction is expected to be slightly smaller. Similarly, Figure 16 The CUs of (b) and (d) are vertically long CUs, 1 / 4 split in the vertical direction is impossible, and 1 / 4 split is possible only in the horizontal direction. However, since these CUs are vertically long, the probability of splitting these CUs in the horizontal direction is expected to be slightly smaller.
[0380] In order to exploit these statistical properties in practical applications, when either the width W or the height H of the CU is smaller than the minimum size that can undergo 1 / 4 split (for example, 16), entropy encoding / entropy decoding can be performed by reducing the probability that the cu_sbt_quad_flag indicating that the CU undergoes 1 / 4 split has 1, thereby improving compression efficiency.
[0381] Therefore, this technique can be shown to improve compression efficiency by reflecting this trend in context.
[0382] Figure 15 The conditional check for recommended practice 4 can be determined in context by reflecting the probability of the occurrence frequency of SBT based on the block size and block shape, as in the above embodiments 1.1 and 1.2. That is, the conditional check for recommended practice 4 can be determined and implemented in the same way as the conditional check for recommended practice 1 in 1.1.a to 1.1.d, or the conditional check for recommended practice 4 can be determined and implemented in the same way as the conditional check for recommended practice 2 in 1.2.a to 1.2.i.
[0383] In another embodiment, the conditional check for Suggested Practice 4 may be determined and implemented similarly to the conditional check for Suggested Practice 3 of 2.1.a or 2.1.b.
[0384] In another embodiment, conditional checks for recommended practice 4 may be determined and implemented as in 3.1.a below.
[0385] <Conditional checks for recommended practice 4>
[0386] 3.1.a(sbtHorQuadAllow&&sbtVerQuadAllow)
[0387] sbtHorQuadAllow may have a value of 0 or 1. If the current CU can undergo 1 / 4 splitting in the horizontal direction, the value may be 1, and if not, the value may be 0. That is, in a state where the use of SBT is enabled, when the height of the CU (H or cuHeight) is equal to or greater than 16, sbtHorQuadAllow may be set to 1.
[0388] Similarly, sbtVerQuadAllow may have a value of 0 or 1. If the current CU can undergo 1 / 4 splitting in the vertical direction, the value may be 1, and if not, the value may be 0. That is, in a state where the use of SBT is enabled, when the width of the CU (W or cuWidth) is equal to or greater than 16, sbtVerQuadAllow may be set to 1. This is expressed by the following equation. Here, minSbtCUSize may have a value of 8.
[0389] Equation 1
[0390] sbtHorQuadAllow=(cuHeight>=(minSbtCUSize<<1))
[0391] sbtVerQuadAllow=(cuWidth>=(minSbtCUSize<<1))
[0392] Although only cu_sbt_quad_flag is specifically described in Embodiment 3, the present invention is not limited thereto. Embodiment 3 is similarly applicable to other information related to SBT, namely, cu_sbt_flag, cu_sbt_horizontal_flag, cu_sbt_pos_flag, etc.
[0393] <Example 4>
[0394] When various CU partitioning concepts such as QTBT or QT-BT-TT are applied, the CU can be divided into sub-blocks having not only a normal square shape but also a rectangular shape of various shapes and sizes. According to the partition shape of the CU, when SBT is used, the probability of splitting the CU in a specific direction tends to be high. Therefore, by limiting the size of the CU according to the shape of the CU, the probability of splitting the CU in a specific direction tends to be high. Figure 9 The SBT_mode shown in (a), the method of determining the division direction or determining the context for entropy encoding / entropy decoding information indicating the SBT mode can improve compression efficiency or simplify system implementation.
[0395] 4.1 (An embodiment of selectively signaling cu_sbt_horizontal_flag to indicate the partitioning direction of the block): As the simplest embodiment, when the CU is square, cu_sbt_horizontal_flag is sent to indicate the partitioning direction of the block, otherwise (i.e., the CU is rectangular), SBT can be used by fixing a specific partitioning direction with the highest probability possibility.
[0396] Figure 17 is a diagram illustrating the shape of a CU and a subblock division direction.
[0397] like Figure 17 As shown in (a) of FIG. 5 , if the CU has a horizontally long rectangular shape (ie, a rectangular shape with a width greater than a height), the horizontal splitting tendency may be much greater.
[0398] like Figure 17 As shown in (b) of FIG. 5 , if the CU has a vertically long rectangular shape (i.e., a rectangular shape with a height greater than a width), the vertical splitting tendency may be much greater. Therefore, an embodiment taking this into consideration may be as follows: Figure 18 is implemented.
[0399] Figure 18 is a diagram illustrating an embodiment of selectively signaling cu_sbt_horizontal_flag.
[0400] according to Figure 18 If the CU is square, the value of cu_sbt_horizontal_flag may be sent. This is because the CU is square, and therefore it is impossible to know the specific trend of dividing the CU in the horizontal direction or vertical direction to form sub-blocks.
[0401] However, if the CU is rectangular, the value of cu_sbt_horizontal_flag may not be transmitted, and the decoder may infer and decode using the following method. That is, if the CU has a horizontally long rectangular shape, the value of cu_sbt_horizontal_flag may be inferred to be 1, and if the CU has a vertically long rectangular shape, the value of cu_sbt_horizontal_flag may be inferred to be 0, and then encoding or decoding may be performed.
[0402] Figure 19 is a diagram showing the shape of a CU and the SBT mode.
[0403] like Figure 19 As shown in (a) of FIG. 5 , if the CU has a horizontally long rectangular shape, as described above, the tendency of selecting sbt_mode of horizontal division may be high.
[0404] However, in certain images, e.g. Figure 19 As shown in (b), a horizontally long rectangular CU can be divided vertically. It can be seen that heterogeneous objects exist horizontally in the current CU, and even if the CU can be further divided, the division of the CU stops after the CU is divided vertically. In order to consider this situation, as Figure 20 As shown, the context determination method of cu_sbt_horizontal_flags can be implemented.
[0405] Figure 20 is a diagram illustrating an embodiment of determining a context of cu_sbt_horizontal_flag (or sbtHorFlag).
[0406] Figure 20 The conditional check for recommended practice 5 can determine the context by reflecting the probability of the occurrence frequency of SBT based on the size of the block and the shape of the block, as in the above embodiments 1.1 and 1.2. That is, the conditional check for recommended practice 5 can be determined and implemented like the conditional check for recommended practice 1 of 1.1.a to 1.1.d, or the conditional check for recommended practice 5 can be determined and implemented like the conditional check for recommended practice 2 of 1.2.a to 1.2.i. In another embodiment, the conditional check for recommended practice 5 can be determined and implemented like the conditional check for recommended practice 3 of 2.1.a or 2.1.b. In another embodiment, the conditional check for recommended practice 5 can be determined and implemented like the conditional check for recommended practice 4 of 3.1.a.
[0407] Although only cu_sbt_horizontal_flag is specifically described in Embodiment 4, the present invention is not limited thereto. Embodiment 4 is similarly applicable to other information related to SBT, namely, cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_pos_flag, etc.
[0408] <Example 5>
[0409] SBT itself has good compression efficiency, but it may be difficult to predict whether to use SBT, in which direction to perform 1 / 2 division or 1 / 4 division if SBT is used, or which sub-block is reset to zero based on image features.
[0410] The context modeler used in CABAC models the probability of a symbol (ie, a flag of the SBT to be encoded (or decoded)) using binary bits binarized by a binarization unit as input.
[0411] Since, in addition to the bins to be encoded / decoded, syntax information for the bins and information about neighboring blocks are required for probability estimation, separate computational processing is required to store and process these information. Therefore, given that it is not easy to determine whether SBT is used, the SBT partitioning method and direction, and the sub-blocks to be transformed using neighboring blocks or already obtained information (collectively referred to as context or context variables), using various contexts can be advantageous in terms of improving compression efficiency. However, in this case, the complexity of the encoding or decoding system may increase. Therefore, for flag information whose probability trends are somewhat predictable, using a single context, using equal probabilities of 0.5 / 0.5 when no context is required, using a small number of contexts (1 or 2) when possible, or performing bypass coding without CABAC encoding / decoding (more generally, arithmetic encoding / decoding) can be advantageous in terms of reducing system complexity. In this case, since the computational effort required to model, track, and update the various symbol probabilities can be reduced, this can be highly desirable in terms of system simplification.
[0412] The size of the block can be used during encoding / decoding to estimate whether the current CU uses SBT to a certain extent probabilistically. That is, it can be assumed that when the product of the width and height of the CU is less than or equal to 256, the probability of using SBT is greater.
[0413] Furthermore, even in the case where cu_sbt_horizontal_flag indicates the sub-block split direction, the probability of the split direction to be selected can be estimated to some extent based on the shape of the CU. That is, when the CU has a horizontally long shape, the probability of the CU being split horizontally is likely to be high. In most cases, the above assumption has a high probability of being statistically correct, but this may not be the case depending on the image. In addition, since syntax information for the binary bits to be encoded and information about neighboring blocks are required, separate computational processing is required to store and process them. Furthermore, even in terms of the number of contexts, since processing multiple contexts requires a greater amount of computation than a single context, reducing the number of contexts can simplify the system. This can be very advantageous in practical applications.
[0414] Figure 21 : is a diagram showing an embodiment of a context determination method for entropy encoding (or decoding) of SBT information. Figure 21 In the SBT information shown, for example, cu_sbt_flag indicating whether to use SBT is described.
[0415] exist Figure 21In the context 1 (hereinafter referred to as “Context Determination 1”) for encoding / decoding cu_sbt_flag (or sbtFlag), as shown in the figure, the size of the CU can be referred to when selecting the context for encoding / decoding.
[0416] exist Figure 21 When selecting a context for entropy encoding / decoding cu_sbt_flag, the size of the CU may be used as shown in the following context determination 1.
[0417] Context determination 1:
[0418] uint8_t ctxIdx=(cuWidth*cuHeight<=256)? 1:0;
[0419] m_BinEncoder.encodeBin(sbtFlag,Ctx::SbtFlag(ctxIdx));
[0420] According to the context determination 1, during CABAC encoding / decoding of cu_sbt_flag, it can be determined according to Figure 22 Sets and uses the context. cbWidth and cbHeight can have the same meanings as cuWidth and cuHeight, respectively.
[0421] However, when using Figure 22 When the context shown is used, the complexity of the system may be unnecessarily increased due to the use of two (0 / 1) or three (0 / 1 / 2) contexts. To improve this, in another example, by using a single context or reducing the three (0 / 1 / 2) contexts to two (0 / 1) contexts, the complexity of the system can be reduced without greatly affecting the coding efficiency. Alternatively, by using an equal probability of 1 / 2 for the flag value to be 0 or 1, unnecessary calculations can be reduced. This embodiment is shown in the following "Context Determination 1.1" and "Context Determination 1.2". In actual implementation, Figure 21 Context 1 (or "Context Determination 1") shown in can be replaced by "Context Determination 1.1" or "Context Determination 1.2".
[0422] Context Determination 1.1: Implementation using a single context
[0423] m_BinEncoder.encodeBin(sbtFlag,Ctx::SbtFlag(0));
[0424] Context Determination 1.2: Implementation using equal probability
[0425] m_BinEncoder.encodeBinEP(sbtFlag);
[0426] According to "Context Determination 1.1" or "Context Determination 1.2", during CABAC encoding / decoding of cu_sbt_flag, Figure 23 Setting up and using context.
[0427] In another embodiment, Figure 21 The context 1 (or "context determination 1") shown can be replaced by "context determination 1.3". This is shown in the following "context determination 1.3" and Figure 24 Shown in.
[0428] Context Determination 1.3: Implementation using bypass encoding / decoding
[0429] m_BinEncoder.encodeBin(sbtFlag);
[0430] In another embodiment, the entropy encoding / decoding system can be simplified by reducing the number of contexts to reduce the total amount of computation without reducing compression efficiency. Specifically, in this embodiment, for example, cu_sbt_horizontal_flag will be described. Although the shape and partitioning trend of the block are statistically analyzed and used as context information when cu_sbt_horizontal_flag information is transmitted, the number of contexts can be designed to be reduced to simplify the system.
[0431] When encoding cu_sbt_horizontal_flag, the partition direction (i.e., Figure 21 The context is selected based on the shape of the block of part 2. This can be expressed in the form of "context determination 2" as described below.
[0432] Context determination 2:
[0433] uint8_t ctxIdx=(cuWidth==cuHeight)? 0:(cuWidth <cuHeight?1:2);
[0434] m_BinEncoder.encodeBin(sbtHorFlag,Ctx::SbtHorFlag(ctxIdx));
[0435] That is, according to "Context Determination 2", context can be set and used during CABAC encoding / decoding of cu_sbt_horizontal_flag. Figure 22 is shown in .
[0436] According to the present embodiment, in this case, the system can be designed to be simplified while minimizing the impact on coding efficiency. That is, as described above, without performing general context modeling of various values of other information (which can be called context) that affects the probability value of the corresponding symbol and the probability value of the corresponding symbol, the amount of calculation is significantly reduced by making the probabilities of 0 and 1 equal or a bypass coding method that does not perform arithmetic coding, thereby improving compression efficiency. Alternatively, in a model that does not have a relatively large impact on the encoding and decoding of the corresponding symbol in the existing context model, the amount of calculation can be reduced by reducing the number, and the same compression performance can be obtained, thereby improving compression efficiency. This is described in detail in "Context Determination 2.1".
[0437] Context determination 2.1:
[0438] uint8_t ctxIdx=(cbWidth <cbHeight)?0:1;
[0439] m_BinEncoder.encodeBin(sbtHorFlag,Ctx::SbtHorFlag(ctxIdx));
[0440] That is, according to "Context Determination 2.1", context can be set and used during CABAC encoding / decoding of cu_sbt_horizontal_flag. Figure 25 is shown in .
[0441] In another embodiment, "Context Determination 2.2" or "Context Determination 2.3" is possible.
[0442] Context determination 2.2:
[0443] uint8_t ctxIdx=(cbWidth <cbHeight)?1:0;
[0444] m_BinEncoder.encodeBin(sbtHorFlag,Ctx::SbtHorFlag(ctxIdx));
[0445] Context determination 2.3:
[0446] uint8_t ctxIdx=(cbWidth>=cbHeight)? 0:1;
[0447] m_BinEncoder.encodeBin(sbtHorFlag,Ctx::SbtHorFlag(ctxIdx));
[0448] Figure 25 The conditional check for recommended practice 6 can determine the context by reflecting the probability of the occurrence frequency of SBT according to the size of the block and the shape of the block, as in the above embodiments 1.1 and 1.2. That is, the conditional check for recommended practice 6 can be determined and implemented like the conditional check for recommended practice 1 of 1.1.a to 1.1.d, or the conditional check for recommended practice 6 can be determined and implemented like the conditional check for recommended practice 2 of 1.2.a to 1.2.i. In another embodiment, the conditional check for recommended practice 6 can be determined and implemented like the conditional check for recommended practice 3 of 2.1.a or 2.1.b. In another embodiment, the conditional check for recommended practice 6 can be determined and implemented like the conditional check for recommended practice 4 of 3.1.a.
[0449] Although only cu_sbt_flag or cu_sbt_horizontal_flag is specifically described in Embodiment 5, the present invention is not limited thereto. Embodiment 5 is similarly applicable to other information related to SBT, namely, cu_sbt_quad_flag, cu_sbt_pos_flag, etc.
[0450] Figure 26 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0451] refer to Figure 26 , the decoder may obtain SBT usage information (eg, cu_sbt_flag) (S2601). Specifically, when the width of the current block and the height of the current block are less than the maximum transform size, the SBT usage information may be obtained.
[0452] In addition, the step S2601 of obtaining the SBT usage information may include deriving context model information (eg, ctxInc) of the SBT usage information, and performing entropy encoding based on the context model information to obtain the SBT usage information.
[0453] Here, the operation of deriving context model information of the SBT usage information may include deriving the context model information of the SBT usage information based on whether the area of the current block is greater than or equal to a predefined value. The predefined value may be 256.
[0454] In addition, when the SBT use information indicates that the SBT is used, the decoder may obtain at least one of SBT division information, SBT division direction information, or SBT position information (S2602).
[0455] Here, the SBT split information (e.g., cu_sbt_quad_flag) may indicate a method for SBT splitting the current block, the SBT split direction information (e.g., cu_sbt_horizontal_flag) may indicate a split direction for the SBT, and the SBT position information (e.g., cu_sbt_pos_flag) may indicate which sub-block of the sub-blocks split from the current block is transformed based on the SBT split information and the SBT split direction information.
[0456] Also, the decoder may perform SBT on the current block based on at least one of the SBT split information, the SBT split direction information, or the SBT position information ( S2603 ).
[0457] Figure 27 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.
[0458] Reference Figure 27 , the encoder may determine whether SBT is used for the current block (S2701).
[0459] In addition, the encoder may encode SBT usage information (eg, cu_sbt_flag) based on the determination of step S2701 ( S2702 ). Specifically, when the width and height of the current block are smaller than the maximum transform size, the SBT usage information may be encoded.
[0460] In addition, the step S2702 of encoding the SBT usage information may include determining context model information of the SBT usage information, and performing entropy encoding based on the context model information to encode the SBT usage information.
[0461] Here, the operation of determining the context model information of the SBT usage information may include determining the context model information of the SBT usage information based on whether the area of the current block is greater than or equal to a predefined value. The predefined value may be 256.
[0462] Also, when the SBT usage information indicates that the SBT is used, the encoder may encode at least one of SBT split information, SBT split direction information, or SBT position information ( S2703 ).
[0463] Here, the SBT split information (e.g., cu_sbt_quad_flag) may indicate a method for SBT splitting the current block, the SBT split direction information (e.g., cu_sbt_horizontal_flag) may indicate a split direction for the SBT, and the SBT position information (e.g., cu_sbt_pos_flag) may indicate which sub-block of the sub-blocks split from the current block is transformed based on the SBT split information and the SBT split direction information.
[0464] In addition, through Figure 27 The bitstream generated by the image encoding method may be stored in a non-transitory computer-readable recording medium.
[0465] The above-described embodiments can be performed in the same manner in an encoder and a decoder.
[0466] At least one embodiment or a combination of the above embodiments may be used to encode / decode a video.
[0467] The order in which the above-described embodiments are applied may be different between an encoder and a decoder, or the order in which the above-described embodiments are applied may be the same in an encoder and a decoder.
[0468] The above-described embodiments may be performed on each luminance signal and each chrominance signal, or may be performed identically on the luminance signal and the chrominance signal.
[0469] The block form to which the above-described embodiment of the present invention is applied may have a square form or a non-square form.
[0470] At least one of the syntax elements (flags, indices, etc.) entropy-encoded in the encoder and entropy-decoded in the decoder may use at least one of the following binarization, debinarization, and entropy encoding / decoding methods.
[0471] - Binarization / debinarization method with signed 0th order Exp_Golomb (se(v))
[0472] - Binarization / debinarization method of k-order Exp_Golomb with sign (sek(v))
[0473] - Binarization / debinarization method of Exp_Golomb of order 0 for unsigned positive integers (ue(v))
[0474] - Unsigned positive integer k-order Exp_Golomb binarization / debinarization method (uek(v))
[0475] -Fixed-length binarization / debinarization method (f(n))
[0476] - Truncated Rice binarization / debinarization method or truncated unary binarization / debinarization method (tu(v))
[0477] - Truncated binary binarization / debinarization method (tb(v))
[0478] -Context-adaptive arithmetic coding / decoding method (ae(v))
[0479] -Byte unit bit string (b(8))
[0480] - Binarization / debinarization methods for signed integers (i(n))
[0481] - Binarization / debinarization method for unsigned positive integers (u(n))
[0482] - Unary binarization / debinarization method
[0483] The above embodiments of the present invention may be applied based on the size of at least one of a coding block, a prediction block, a transform block, a block, a current block, a coding unit, a prediction unit, a transform unit, a unit, and a current unit. Here, the size may be defined as a minimum size or a maximum size, or both the minimum size and the maximum size, so that the above embodiments are applied, or the size may be defined as a fixed size to which the above embodiments are applied. In addition, in the above embodiments, the first embodiment may be applied to a first size, and the second embodiment may be applied to a second size. In other words, the above embodiments may be applied in combination based on the size. In addition, the above embodiments may be applied when the size is equal to or greater than the minimum size and equal to or less than the maximum size. In other words, the above embodiments may be applied when the block size is within a specific range.
[0484] For example, when the size of the current block is 8×8 or larger, the above embodiment may be applied. For example, when the size of the current block is only 4×4, the above embodiment may be applied. For example, when the size of the current block is 16×16 or smaller, the above embodiment may be applied. For example, when the size of the current block is equal to or larger than 16×16 and equal to or smaller than 64×64, the above embodiment may be applied.
[0485] The above-described embodiments of the present invention can be applied according to time layers. To identify the time layers to which the above-described embodiments are applicable, a corresponding identifier can be signaled, and the above-described embodiments can be applied to the specified time layers identified by the corresponding identifiers. Here, the identifier can be defined as the lowest layer, the highest layer, or both the lowest layer and the highest layer to which the above-described embodiments are applicable, or can be defined as indicating a specific layer to which the above-described embodiments are applicable. Furthermore, a fixed time layer to which the above-described embodiments are applicable can be defined.
[0486] For example, when the temporal layer of the current image is the lowest layer, the above embodiment can be applied. For example, when the temporal layer identifier of the current image is 1, the above embodiment can be applied. For example, when the temporal layer of the current image is the highest layer, the above embodiment can be applied.
[0487] A slice type or a tile group type to which the above-described embodiments of the present invention are applied may be defined, and the above-described embodiments may be applied according to the corresponding slice type or tile group type.
[0488] In the above embodiments, the method is described based on a flowchart having a series of steps or units, but the present invention is not limited to the order of the steps, but some steps may be performed simultaneously with other steps or in a different order. In addition, it should be understood by those skilled in the art that the steps in the flowchart are not mutually exclusive, and other steps may be added to the flowchart, or some steps may be deleted from the flowchart without affecting the scope of the present invention.
[0489] The embodiments include various aspects of the examples. All possible combinations for each aspect may not be described, but those skilled in the art will be able to recognize different combinations. Therefore, the present invention may include all replacements, modifications and changes within the scope of the claims.
[0490] The embodiments of the present invention can be implemented in the form of program instructions that can be executed by various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include a combination of independent program instructions, data files, data structures, etc. or program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable recording medium may be specifically designed and constructed for the present invention, or they may be well known to those skilled in the art of computer software technology. Examples of computer-readable recording media include magnetic recording media (such as hard disks, floppy disks, and magnetic tapes), optical data storage media (such as CD-ROMs or DVD-ROMs), magneto-optical media (such as floppy disks), and hardware devices (such as read-only memories (ROMs), random access memories (RAMs), flash memories, etc.) that are specifically constructed to store and implement program instructions. Examples of program instructions include not only machine language codes formatted by a compiler, but also high-level language codes that can be implemented by a computer using an interpreter. The hardware device may be configured to be operated by one or more software modules to perform processing according to the present invention, or vice versa.
[0491] Although the present invention has been described based on specific items such as detailed elements and limited embodiments and drawings, they are provided only to help a greater understanding of the present invention, and the present invention is not limited to the above embodiments. It will be understood by those skilled in the art that various modifications and changes can be made from the above description.
[0492] Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the full scope of the claims and their equivalents should fall within the scope and spirit of the present invention.
[0493] Industrial Applicability
[0494] The present invention can be used to encode or decode images.
Claims
1. An image decoding method, comprising: Obtaining sub-block based transform (SBT) usage information; When the SBT usage information indicates that the SBT is used, obtaining at least one of SBT division information, SBT division direction information, or SBT position information; as well as performing SBT on the current block based on at least one of the SBT split information, the SBT split direction information, or the SBT position information, The step of performing SBT includes: partitioning the current block into a plurality of sub-blocks based on at least one of SBT partition information or SBT partition direction information; and performing inverse transformation on some of the sub-blocks in the plurality of sub-blocks based on SBT position information. When the width of the current block and the height of the current block are less than the maximum transform size, SBT usage information is obtained. The steps of obtaining SBT partition direction information include: Derivation of context model information of SBT partition direction information based on the shape of the current block; and Perform entropy decoding based on the context model information of the SBT partition direction information to obtain the SBT partition direction information, The SBT division direction information indicates the division direction for the SBT. The steps of obtaining SBT usage information include: When the product of the width and the height of the current block is less than 256, setting the context model information of the SBT usage information to a first value; When the product of the width and the height of the current block is equal to 256, setting the context model information of the SBT usage information to a first value; When the product of the width and the height of the current block is greater than 256, setting the context model information of the SBT usage information to a second value different from the first value; and The SBT usage information is obtained by performing entropy decoding based on the context model information of the SBT usage information.
2. An image encoding method, comprising: determining whether a sub-block based transform (SBT) is used for the current block; encoding SBT usage information based on the determination; When it is determined that the SBT is used for the current block, partitioning the current block into a plurality of sub-blocks to encode a portion of the sub-blocks; as well as When the SBT use information indicates that the SBT is used, at least one of the SBT division information, the SBT division direction information, or the SBT position information is encoded, Wherein, when the width of the current block and the height of the current block are less than the maximum transform size, the SBT usage information is encoded, The step of encoding the SBT division direction information includes: Derivation of context model information of SBT partition direction information based on the shape of the current block; and Entropy coding is performed based on the context model information of the SBT partition direction information to encode the SBT partition direction information. The SBT division direction information indicates the division direction for the SBT. The step of encoding the SBT usage information includes: When the product of the width and the height of the current block is less than 256, setting the context model information of the SBT usage information to a first value; When the product of the width and the height of the current block is equal to 256, setting the context model information of the SBT usage information to a first value; When the product of the width and the height of the current block is greater than 256, setting the context model information of the SBT usage information to a second value different from the first value; and Entropy encoding is performed based on context model information of the SBT usage information to encode the SBT usage information.
3. A method for transmitting a bitstream, the method comprising: Send bitstream, The bit stream is obtained by the following operations: determining whether a sub-block based transform (SBT) is used for the current block; encoding SBT usage information based on the determination; When it is determined that the SBT is used for the current block, partitioning the current block into a plurality of sub-blocks to encode a portion of the sub-blocks; and When the SBT use information indicates that the SBT is used, at least one of the SBT division information, the SBT division direction information, or the SBT position information is encoded, Wherein, when the width of the current block and the height of the current block are less than the maximum transform size, the SBT usage information is encoded, The step of encoding the SBT division direction information includes: Derivation of context model information of SBT partition direction information based on the shape of the current block; and Entropy coding is performed based on the context model information of the SBT partition direction information to encode the SBT partition direction information. The SBT division direction information indicates the division direction for the SBT. The step of encoding the SBT usage information includes: When the product of the width and the height of the current block is less than 256, setting the context model information of the SBT usage information to a first value; When the product of the width and the height of the current block is equal to 256, setting the context model information of the SBT usage information to a first value; When the product of the width and the height of the current block is greater than 256, setting the context model information of the SBT usage information to a second value different from the first value; and Entropy encoding is performed based on context model information of the SBT usage information to encode the SBT usage information.