Methods of decoding and encoding images, non-transitory computer readable medium
Patent Information
- Application Number
- CN202310800262.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2016-11-08
- Filing Date
- 2017-11-08
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2037-11-08
AI Technical Summary
因此,在通过使用介质例如常规的有线和无线宽带网络传输图像数据时,或者在通过使用常规的存储介质存储图像数据时,传输和存储的成本增加了
[0023]根据本发明,可以通过有效地拆分编码/解码目标块来提高编码/解码效率。
Smart Images

Figure CN116582690B_ABST
Abstract
Description
[0001] This invention application is a divisional application of patent application No. 201780068856.4 entitled "Video Signal Processing Method and Apparatus", filed on November 8, 2017, with international application number PCT / KR2017 / 012617, and entered the Chinese national phase on May 7, 2019. Technical Field
[0002] This invention relates to methods and apparatus for processing video signals. Background Technology
[0003] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD) images, has increased across various application areas. However, the data volume of higher resolution and quality image data increases compared to regular image data. Therefore, the costs of transmission and storage increase when transmitting image data using media such as conventional wired and wireless broadband networks, or when storing image data using conventional storage media. To address these issues arising from the increasing resolution and quality of image data, efficient image encoding / decoding techniques can be utilized.
[0004] Image compression techniques encompass various methods, including: inter-frame prediction techniques that predict pixel values included in the current image based on previous or subsequent images; intra-frame prediction techniques that predict pixel values included in the current image using pixel information from the current image; and entropy coding techniques that assign short codes to frequently occurring values and long codes to less frequently occurring values. Image data can be effectively compressed using such image compression techniques, and image data can be transmitted or stored.
[0005] Simultaneously, with the increasing demand for high-resolution images, the demand for stereoscopic image content as a new image service is also increasing. Video compression techniques for effectively delivering stereoscopic image content with high and ultra-high resolution are being discussed. Summary of the Invention
[0006] Technical issues
[0007] The purpose of this invention is to provide a method and apparatus for effectively splitting encoded / decoded target blocks when encoding / decoding video signals.
[0008] The purpose of this invention is to provide a method and apparatus for splitting an encoded / decoded target block into symmetric or asymmetric blocks when encoding / decoding a video signal.
[0009] The purpose of this invention is to provide a method and apparatus for splitting encoded / decoded target blocks to include polygonal partitioning.
[0010] The purpose of this invention is to provide a method and apparatus for variably selecting the number of divisions of an encoding / decoding target block.
[0011] The technical objectives of this invention are not limited to the aforementioned technical problems. Furthermore, those skilled in the art will readily understand other technical problems not mentioned below based on the following description.
[0012] Technical solution
[0013] The method and apparatus for decoding video signals according to the present invention can: determine whether to segment the current block using quadtree partitioning, and if it is determined that the current block should be segmented using quadtree partitioning, divide the current block into four partitions based on vertical and horizontal lines. Here, at least one of the vertical and horizontal lines can asymmetrically segment the current block.
[0014] The method and apparatus for encoding video signals according to the present invention can: determine whether to segment the current block using quadtree partitioning, and if it is determined that the current block should be segmented using quadtree partitioning, divide the current block into four partitions based on vertical lines and horizontal lines. Here, at least one of the vertical lines and horizontal lines can asymmetrically segment the current block.
[0015] In the method and apparatus for encoding / decoding video signals according to the present invention, a first indicator indicating whether at least one of a vertical line or a horizontal line is used for asymmetrical division can be decoded / encoded, and if the first indicator indicates that the vertical line or horizontal line is used for asymmetrical division, a second indicator specifying the position of the vertical line or horizontal line can be decoded / encoded.
[0016] In the method and apparatus for encoding / decoding video signals according to the present invention, a current block can be divided into four partitions by two horizontal lines and one vertical line, wherein the vertical line divides one of the three blocks divided by the two horizontal lines, or the current block can be divided into four partitions by two vertical lines and one horizontal line, wherein the horizontal line divides one of the three blocks divided by the two vertical lines.
[0017] In the method and apparatus for encoding / decoding video signals according to the present invention, if it is determined that a quadtree partitioning is not used to segment the current block, it can be determined whether a binary tree partitioning is used to segment the current block, and if it is determined that a binary tree partitioning is used to segment the current block, the current block can be divided into two partitions.
[0018] In the method and apparatus for encoding / decoding video signals according to the present invention, it can be determined whether to apply a polygonal binary tree partition to the current block, and if a polygonal binary tree partition is applied to the current block, the current block can be divided into rectangular partitions and polygonal partitions.
[0019] In the method and apparatus for encoding / decoding video signals according to the present invention, a polygonal shape can be divided into rectangular sub-divisions, and a prediction of the polygonal shape division can be performed for each sub-division.
[0020] In the method and apparatus for encoding / decoding video signals according to the present invention, the current block can be divided by dividing the current block into two dividing vertical or horizontal lines, and the vertical or horizontal lines can divide the current block asymmetrically.
[0021] The features briefly outlined above are merely illustrative aspects of the invention as described in the following detailed description and do not limit the scope of the invention.
[0022] Beneficial effects
[0023] According to the present invention, encoding / decoding efficiency can be improved by effectively splitting the encoding / decoding target block.
[0024] According to the present invention, encoding / decoding efficiency can be improved by splitting the encoding / decoding target block into symmetric type blocks or asymmetric type blocks.
[0025] According to the present invention, encoding / decoding efficiency can be improved by splitting the encoding / decoding target block into polygonal partitions.
[0026] According to the present invention, the encoding / decoding efficiency can be improved by variably selecting the number of divisions of the encoding / decoding target block.
[0027] The effects that can be obtained by the present invention are not limited to those described above, and other effects not mentioned can be clearly understood by those skilled in the art based on the following description. Attached Figure Description
[0028] Figure 1 This is a block diagram illustrating an apparatus for encoding video according to an embodiment of the present invention.
[0029] Figure 2 This is a block diagram illustrating an apparatus for decoding video according to an embodiment of the present invention.
[0030] Figure 3 This diagram illustrates the partitioning patterns that can be applied to coded blocks when encoding them via inter-frame prediction.
[0031] Figure 4 This is a diagram illustrating an example of hierarchical partitioning of coded blocks based on a tree structure according to an embodiment of the present invention.
[0032] Figure 5 This is a diagram illustrating partitioning types that allow binary tree-based partitioning according to an embodiment of the present invention.
[0033] Figure 6 This is a diagram illustrating an example of binary tree-based partitioning that allows only predetermined types according to an embodiment of the present invention.
[0034] Figure 7 This is a diagram illustrating an example of encoding / decoding information related to the permissible number of binary tree partitions according to an embodiment of the present invention.
[0035] Figure 8 The partitioning types of coded blocks based on asymmetric binary tree partitioning are shown.
[0036] Figure 9 An example is shown of using QTBT and asymmetric binary tree partitioning to divide a coded block into multiple coded blocks.
[0037] Figure 10 This is a diagram showing the partitioning types that can be applied to coded blocks.
[0038] Figure 11 This is a diagram showing the quadtree partitioning type of the coded block.
[0039] Figure 12 This is a diagram illustrating an example of segmenting a coded block by combining multiple vertical / horizontal lines and a single horizontal / vertical line.
[0040] Figure 13 This is a diagram illustrating the partitioning types based on a polygonal binary tree.
[0041] Figure 14 This is a diagram illustrating an example of dividing a polygon into sub-partitions.
[0042] Figure 15 An example of dividing coding blocks based on a ternary tree is shown.
[0043] Figure 16 and Figure 17 The partitioning type of the coded block according to the multi-way tree partitioning method is shown.
[0044] Figure 18 This is a flowchart illustrating the process of dividing a coding block according to an embodiment of the present invention.
[0045] Figure 19This is a flowchart illustrating the process of determining the partitioning type of a quadtree partition according to an embodiment of the present invention.
[0046] Figure 20 This is a flowchart illustrating the process of determining the partitioning type of a binary tree partition according to an embodiment of the present invention.
[0047] Figure 21 This is a flowchart illustrating the process of obtaining residual samples according to an embodiment of the present invention. Detailed Implementation
[0048] Various modifications can be made to this invention, and various embodiments of the invention exist. Examples of various embodiments will now be provided with reference to the accompanying drawings, and examples of various embodiments will be described in detail. However, the invention is not limited thereto, and the exemplary embodiments can be interpreted as including all modifications, equivalents, or alternatives within the technical concept and scope of the invention. In the described drawings, similar reference numerals refer to similar elements.
[0049] The terms "first," "second," etc., used in this specification may be used to describe various components, but these components are not to be construed as limited to these terms. These terms are only used to distinguish one component from other components. For example, without departing from the scope of the invention, a "first" component may be referred to as a "second" component, and a "second" component may similarly be referred to as a "first" component. The term "and / or" includes a combination of multiple items or any one of multiple terms.
[0050] It should be understood that in this specification, when an element is simply referred to as "connected to" or "coupled to" another element rather than "directly connected to" or "directly coupled to" another element, the element may be "directly connected to" or "directly coupled to" another element, or the element may be connected to or coupled to another element with other elements in between. Conversely, it should be understood that when an element is referred to as "directly coupled to" or "directly connected to" another element, there are no intermediate elements.
[0051] The terminology used in this specification is for describing particular embodiments only and is not intended to limit the invention. Expressions used in the singular include expressions in the plural unless they have a distinct meaning in the context. It should be understood in this specification that terms such as “comprising,” “having,” etc., are intended to indicate the presence of features, numbers, steps, actions, elements, portions, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, elements, portions, or combinations thereof may be present or added.
[0052] Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. In the following drawings, the same constituent elements are indicated by the same reference numerals, and repeated descriptions of the same elements will be omitted.
[0053] Figure 1 This is a block diagram illustrating an apparatus for encoding video according to an embodiment of the present invention.
[0054] Reference Figure 1 The device 100 for encoding video may include: an image segmentation module 110, prediction modules 120 and 125, a transformation module 130, a quantization module 135, a rearrangement module 160, an entropy coding module 165, an inverse quantization module 140, an inverse transformation module 145, a filter module 150, and a memory 155.
[0055] Figure 1 The constituent parts shown are illustrated independently to represent different functional characteristics within a device for encoding video. Therefore, this does not imply that each constituent part is composed of a separate hardware or software unit. In other words, for convenience, each constituent part includes each of the listed constituent parts. Thus, at least two constituent parts of each constituent part can be combined to form a single constituent part, or a constituent part can be divided into multiple constituent parts to perform each function. Embodiments combining each constituent part and embodiments dividing a constituent part are also included within the scope of this invention without departing from its spirit.
[0056] Furthermore, some of the constituent parts may not be essential components for performing the basic functions of the invention, but rather optional components used only to improve the performance of the invention. The invention can be implemented by excluding components used to improve performance and including only those essential for achieving the essence of the invention. Structures that exclude optional components used only to improve performance and include only essential components are also included within the scope of the invention.
[0057] Image partitioning module 110 can partition an input image into one or more processing units. Here, the processing unit can be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). Image partitioning module 110 can partition an image into a combination of multiple coding units, prediction units, and transform units, and can encode the image by selecting a combination of coding units, prediction units, and transform units using a predetermined criterion (e.g., a cost function).
[0058] For example, an image can be divided into multiple coding units. A recursive tree structure, such as a quadtree, can be used to divide the image into coding units. Coding units that are further divided into other coding units, with the image or the largest coding unit as the root, can be divided in such a way that the number of child nodes corresponds to the number of coding units in the division. Coding units that cannot be further divided by a predetermined constraint are used as leaf nodes. That is, when it is assumed that only a square partition is feasible for a coding unit, a coding unit can be divided into at most four other coding units.
[0059] In the following, in embodiments of the present invention, the encoding unit may refer to a unit that performs encoding or a unit that performs decoding.
[0060] A prediction unit can be one of the partitions that are square or rectangular in shape and have the same size in a single coding unit, or a prediction unit can be one of the partitions that have different shapes / sizes in a single coding unit.
[0061] When a prediction unit to be performed is generated based on a coding unit and the coding unit is not the smallest coding unit, intra-frame prediction can be performed without dividing the coding unit into multiple prediction units N×N.
[0062] Prediction modules 120 and 125 may include an inter-frame prediction module 120 performing inter-frame prediction and an intra-frame prediction module 125 performing intra-frame prediction. It can be determined whether inter-frame or intra-frame prediction is performed for a prediction unit, and detailed information based on each prediction method (e.g., intra-frame prediction mode, motion vectors, reference image, etc.) can be determined. Here, the processing unit performing the prediction may be different from the processing unit that determines the prediction method and details. For example, the prediction method, prediction mode, etc., may be determined by the prediction unit, and the prediction may be performed by the transform unit. The residual value (residual block) between the generated prediction block and the original block can be input to the transform module 130. Furthermore, prediction mode information, motion vector information, etc., used for prediction can be encoded together with the residual value by the entropy coding module 165 and can be transmitted to the device for decoding the video. When using a specific coding mode, the original block can be encoded as is and transmitted to the device for decoding the video without generating a prediction block through prediction modules 120 and 125.
[0063] The inter-frame prediction module 120 can predict prediction units based on information from at least one of the previous or subsequent images of the current image, or in some cases, it can predict prediction units based on information from some coded regions in the current image. The inter-frame prediction module 120 may include a reference image interpolation module, a motion prediction module, and a motion compensation module.
[0064] The reference image interpolation module can receive reference image information from the memory 155 and generate pixel information (integer pixels or smaller) based on the reference image. In the case of luminance pixels, an 8-tap DCT-based interpolation filter with different filter coefficients can be used to generate pixel information (integer pixels or smaller) in 1 / 4-pixel units. In the case of chrominance signals, a 4-tap DCT-based interpolation filter with different filter coefficients can be used to generate pixel information (integer pixels or smaller) in 1 / 8-pixel units.
[0065] The motion prediction module can perform motion prediction based on a reference image interpolated by the reference image interpolation module. Various methods can be used to calculate motion vectors, such as Full Search-Based Block Matching (FBMA), Three-Step Search (TSS), and New Three-Step Search (NTS). Based on the interpolated pixels, the motion vector can have motion vector values in units of 1 / 2 pixel or 1 / 4 pixel. The motion prediction module can predict the current prediction unit by changing the motion prediction method. Various methods can be used as motion prediction methods, such as skipping methods, merging methods, AMVP (Advanced Motion Vector Prediction) methods, and intra-block copying methods.
[0066] The intra-frame prediction module 125 can generate prediction units based on reference pixel information adjacent to the current block, which serves as pixel information in the current image. When the neighboring block of the current prediction unit is a block to be inter-frame predicted, and therefore the reference pixel is a pixel to be inter-frame predicted, the reference pixel information of the neighboring block to be intra-frame predicted can be used to replace the reference pixel included in the block to be inter-frame predicted. That is, when a reference pixel is unavailable, at least one of the available reference pixels can be used to replace the unavailable reference pixel information.
[0067] Intra-frame prediction can include directional prediction modes that use reference pixel information depending on the prediction direction and non-directional prediction modes that do not use directional information when performing prediction. The mode used to predict luminance information can be different from the mode used to predict chrominance information, and to predict chrominance information, either the intra-frame prediction mode information used to predict luminance information or the predicted luminance signal information can be used.
[0068] When performing intra-prediction, if the size of the prediction unit is the same as the size of the transform unit, intra-prediction can be performed based on pixels located to the left, upper left, and upper part of the prediction unit. However, when performing intra-prediction, if the size of the prediction unit is different from the size of the transform unit, intra-prediction can be performed using reference pixels based on the transform unit. Furthermore, intra-prediction using an N×N partition can be used only for the smallest coding unit.
[0069] In intra-frame prediction methods, prediction blocks can be generated after applying an AIS (Adaptive Intra-Frame Smoothing) filter to a reference pixel, depending on the prediction mode. The type of AIS filter applied to the reference pixel can vary. To perform intra-frame prediction, the intra-frame prediction mode of the current prediction unit can be predicted based on the intra-frame prediction modes of prediction units adjacent to it. When predicting the prediction mode of the current prediction unit using mode information predicted by neighboring prediction units, if the intra-frame prediction mode of the current prediction unit is the same as that of neighboring prediction units, predetermined flag information can be used to transmit information indicating that the prediction modes of the current prediction unit and those of neighboring prediction units are identical. If the prediction mode of the current prediction unit differs from that of neighboring prediction units, entropy coding can be performed to encode the prediction mode information of the current block.
[0070] Furthermore, residual blocks containing information about residual values—the difference between the prediction unit to be predicted and the original block of the prediction unit—can be generated based on the prediction units generated by prediction modules 120 and 125. The generated residual blocks can then be input to transformation module 130.
[0071] Transform module 130 can transform the residual block using transformation methods such as Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), and KLT. The residual block includes information about the residual values between the original block and the prediction units generated by prediction modules 120 and 125. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra-frame prediction mode information of the prediction units used to generate the residual block.
[0072] The quantization module 135 can quantize the values transformed to the frequency domain by the transformation module 130. The quantization coefficients can vary depending on the blocks or importance of the image. The values calculated by the quantization module 135 can be provided to the inverse quantization module 140 and the rearrangement module 160.
[0073] The rearrangement module 160 can rearrange the coefficients of the quantized residual values.
[0074] The rearrangement module 160 can transform coefficients in two-dimensional block form into coefficients in one-dimensional vector form using a coefficient scanning method. For example, the rearrangement module 160 can use a zigzag scanning method to scan from DC coefficients to coefficients in the high-frequency domain to transform the coefficients into one-dimensional vector form. Depending on the size of the transform unit and the intra-frame prediction mode, a vertical scan along the column direction or a horizontal scan along the row direction can be used instead of a zigzag scan. That is, the choice between zigzag scanning, vertical scanning, and horizontal scanning can be determined based on the size of the transform unit and the intra-frame prediction mode.
[0075] Entropy coding module 165 can perform entropy coding based on the value calculated by rearrangement module 160. Entropy coding can use various coding methods, such as exponential Golomb coding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
[0076] The entropy coding module 165 can encode various information from the rearrangement module 160 and the prediction modules 120 and 125, such as residual coefficient information and block type information of coding units, prediction mode information, partitioning unit information, prediction unit information, transform unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc.
[0077] The entropy coding module 165 can entropy code the coefficients of the coding units input from the rearrangement module 160.
[0078] The inverse quantization module 140 can inverse quantize the value quantized by the quantization module 135, and the inverse transform module 145 can inverse transform the value transformed by the transform module 130. The residual value generated by the inverse quantization module 140 and the inverse transform module 145 can be combined with the prediction units predicted by the motion estimation module, motion compensation module and intra-frame prediction module of prediction modules 120 and 125 to generate a reconstruction block.
[0079] The filter module 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
[0080] Deblocking filters can remove block distortion caused by boundaries between blocks in a reconstructed image. To determine whether to perform deblocking, the pixels included in several rows or columns of a block can be the basis for deciding whether to apply a deblocking filter to the current block. When a deblocking filter is applied to a block, a strong or weak filter can be applied depending on the desired deblocking filtering intensity. Furthermore, horizontal and vertical filtering can be processed in parallel when applying a deblocking filter.
[0081] The offset correction module can correct the offset from the original image on a pixel-by-pixel basis in the image to be deblocked. To perform offset correction on a specific image, a method that considers the edge information of each pixel to apply the offset can be used, or the following method can be used: divide the image's pixels into a predetermined number of regions, determine the regions to be offset, and apply the offset to the determined regions.
[0082] Adaptive Loop Filtering (ALF) can be performed based on values obtained by comparing the filtered reconstructed image with the original image. Pixels included in the image can be divided into predetermined groups, the filter to be applied to each group can be determined, and filtering can be performed individually for each group. Information about whether ALF is applied and the luminance signal can be transmitted via the coding unit (CU). The shape and filter coefficients of the filter used for ALF can vary depending on each block. Furthermore, a filter of the same shape (fixed shape) used for ALF can be applied regardless of the characteristics of the target block.
[0083] The memory 155 can store reconstructed blocks or reconstructed images calculated by the filter module 150. The stored reconstructed blocks or reconstructed images can be provided to the prediction modules 120 and 125 during inter-frame prediction.
[0084] Figure 2 This is a block diagram illustrating an apparatus for decoding video according to an embodiment of the present invention.
[0085] Reference Figure 2 The device 200 for decoding video may include: an entropy decoding module 210, a rearrangement module 215, an inverse quantization module 220, an inverse transform module 225, prediction modules 230 and 235, a filter module 240, and a memory 245.
[0086] When a video bitstream is input from a device used to encode video, the input bitstream can be decoded by inverse processing of the device used to encode video.
[0087] The entropy decoding module 210 can perform entropy decoding based on the inverse processing of entropy encoding performed by the entropy encoding module of the device used to encode the video. For example, various methods can be applied corresponding to the method performed by the device used to encode the video, such as exponential Golomb coding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
[0088] The entropy decoding module 210 can decode information about intra-frame prediction and inter-frame prediction performed by the device used to encode the video.
[0089] The rearrangement module 215 can rearrange the bitstream entropy decoded by the entropy decoding module 210 based on the rearrangement method used in the device for encoding video. The rearrangement module can reconstruct and rearrange coefficients in one-dimensional vector form into coefficients in two-dimensional block form. The rearrangement module 215 can receive information related to the coefficient scan performed in the device for encoding video, and can perform the rearrangement via a method that inversely scans the coefficients based on the scan order performed in the device for encoding video.
[0090] The inverse quantization module 220 can perform inverse quantization based on the quantization parameters received from the device used to encode the video and the coefficients of the rearranged block.
[0091] The inverse transform module 225 can perform inverse transforms, namely inverse DCT, inverse DST, and inverse KLT. These are the inverse processes of DCT, DST, and KLT, which are performed by the transform module on the quantization results of the device used to encode the video. The inverse transform can be performed based on the transform units determined by the device used to encode the video. The inverse transform module 225 of the device used to decode the video can selectively execute transform schemes such as DCT, DST, and KLT based on multiple pieces of information, such as the prediction method, the size of the current block, and the prediction direction.
[0092] Prediction modules 230 and 235 can generate prediction blocks based on information about prediction block generation received from entropy decoding module 210 and previously decoded block or image information received from memory 245.
[0093] As described above, similar to the operation of a device used for encoding video, when performing intra-frame prediction, if the size of the prediction unit is the same as the size of the transform unit, intra-frame prediction can be performed based on pixels located to the left, upper left, and top of the prediction unit. When performing intra-frame prediction, if the size of the prediction unit is different from the size of the transform unit, intra-frame prediction can be performed using reference pixels based on the transform unit. Furthermore, intra-frame prediction using N×N partitioning can be used only for the smallest coding unit.
[0094] Prediction modules 230 and 235 may include a prediction unit determination module, an inter-frame prediction module, and an intra-frame prediction module. The prediction unit determination module can receive various information from the entropy decoding module 210, such as prediction unit information, prediction mode information of the intra-frame prediction method, motion prediction information about the inter-frame prediction method, etc., and can segment the current coding unit into prediction units and determine whether to perform inter-frame prediction or intra-frame prediction on the prediction units. By using the information required for inter-frame prediction of the current prediction unit received from the device for encoding video, the inter-frame prediction module 230 can perform inter-frame prediction on the current prediction unit based on information from at least one of the previous or subsequent images that include the current image of the current prediction unit. Alternatively, inter-frame prediction can be performed based on information from some pre-reconstructed regions in the current image that includes the current prediction unit.
[0095] To perform inter-frame prediction, it is possible to determine for the coding unit which of the following modes—skip mode, merge mode, AMVP mode, and inter-block copy mode—will be used as the motion prediction method for the prediction unit included in the coding unit.
[0096] Intra-prediction module 235 can generate prediction blocks based on pixel information in the current image. When the prediction unit is a prediction unit to be intra-predicted, intra-prediction can be performed based on intra-prediction mode information of the prediction unit received from the device used to encode the video. Intra-prediction module 235 may include an adaptive intra-smoothing (AIS) filter, a reference pixel interpolation module, and a DC filter. The AIS filter performs filtering on the reference pixels of the current block and can determine whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block using the prediction mode of the prediction unit and AIS filter information received from the device used to encode the video. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
[0097] When the prediction mode of the prediction unit is a prediction mode that performs intra-frame prediction based on pixel values obtained by interpolating reference pixels, the reference pixel interpolation module can interpolate the reference pixels to generate reference pixels of integer pixels or less than integer pixels. When the prediction mode of the current prediction unit is a prediction mode that generates prediction blocks without interpolating reference pixels, interpolation of reference pixels is not required. When the prediction mode of the current block is DC mode, the DC filter can generate prediction blocks through filtering.
[0098] The reconstructed block or reconstructed image can be provided to the filter module 240. The filter module 240 may include a deblocking filter, an offset correction module, and an ALF.
[0099] The device used for encoding video can receive information about whether a deblocking filter should be applied to a corresponding block or image, and which filter (strong or weak) should be applied when using the deblocking filter. The device used for decoding video can receive this information from the device used for encoding video and can perform deblocking filtering on the corresponding blocks.
[0100] The offset correction module can perform offset correction on the reconstructed image based on the type and offset value information of the offset correction applied to the image during encoding.
[0101] ALF can be applied to the coding unit based on information received from the device used to encode the video, such as whether ALF is applied and ALF coefficient information. ALF information can be provided as included in a specific parameter set.
[0102] The memory 245 can store reconstructed images or reconstructed blocks for use as reference images or reference blocks, and can provide the reconstructed images to the output module.
[0103] As described above, in embodiments of the present invention, for ease of explanation, the term "encoding unit" is used to refer to a unit used for encoding; however, the term "encoding unit" can also be used to refer to a unit that performs both decoding and encoding.
[0104] Additionally, the current block can represent the target block to be encoded / decoded. Furthermore, depending on the encoding / decoding steps, the current block can represent a coding tree block (or coding tree unit), a coding block (or coding unit), a transform block (or transform unit), a prediction block (or prediction unit), etc. In this specification, "unit" refers to a basic unit used to perform a specific encoding / decoding process, and "block" can represent a sample array of a predetermined size. The terms "block" and "unit" can be used interchangeably if there is no distinction between them. For example, in the embodiments described below, it can be understood that coding block and coding unit have equivalent meanings.
[0105] Images can be encoded / decoded by segmenting them into basic blocks of square or non-square shapes. These basic blocks are called coding tree units (CRUs). A CRU can be defined as the largest allowed coding unit within a sequence or slice. Information about the shape of the CRU, whether it is square or non-square, or its size, can be signaled via sequence parameter sets, image parameter sets, or slice headers. CRUs can be further subdivided into smaller segments. For example, if the segment depth generated by segmenting a CRU is 1, then the segment depth generated by segmenting a CRU with depth 1 can be defined as 2. That is, the segment generated by segmenting a CRU with depth k can be defined as having depth k+1.
[0106] A partition of arbitrary size generated by dividing the coding tree units can be defined as a coding unit. A coding unit can be recursively divided or subdivided into basic units for performing prediction, quantization, transform, or loop filtering, etc. For example, a partition of arbitrary size generated by dividing coding units can be defined as a coding unit, or it can be defined as a transform unit or prediction unit, which is a basic unit for performing prediction, quantization, transform, or loop filtering, etc.
[0107] Alternatively, if a coded block is determined, a predicted block of the same or smaller size can be determined by predicting the partitioning of the coded block. The predicted partitioning of the coded block can be performed using a partition mode (Part_mode) that indicates the partitioning type. The size or shape of the predicted block can be determined based on the partition mode. The partitioning type of the coded block can be determined by specifying information for any of the partitioning candidates. In this case, depending on the size, shape, and coding mode of the coded block, the available partitioning candidates can include asymmetric partitioning types (e.g., nL×2N, nR×2N, 2N×nU, 2N×nD). For example, the available partitioning candidates for the coded block can be determined based on the coding mode of the current block. Figure 3 This demonstrates the partitioning modes that can be applied to coded blocks when encoding them via inter-frame prediction.
[0108] When encoding blocks using inter-frame prediction, one of the eight partitioning modes can be applied to the coding block, such as... Figure 3 As shown in the example.
[0109] On the other hand, when encoding blocks by intra-frame prediction, the partitioning mode PART_2N×2N or PART_N×N can be applied to the blocks.
[0110] When the coded block has a minimum size, PART_N×N can be applied. Here, the minimum size of the coded block can be predefined in the encoder and decoder. Alternatively, information about the minimum size of the coded block can be sent via a signal through the bitstream. For example, the minimum size of the coded block can be sent via a signal in the chip header, thus defining the minimum size of the coded block for each chip.
[0111] In another example, the available partitioning candidates for a coded block can be determined differently based on at least one of the size or shape of the coded block. For example, the number or type of available partitioning candidates for a coded block can be determined differently based on at least one of the size or shape of the coded block.
[0112] Alternatively, the type or number of asymmetric partition candidates available for a coded block can be limited based on the size or shape of the coded block. For example, the number or type of asymmetric partition candidates available for a coded block can be determined differently based on at least one of the size or shape of the coded block.
[0113] Typically, prediction blocks can range in size from 64×64 to 4×4. However, when encoding coded blocks via inter-frame prediction, a 4×4 size can be avoided to reduce memory bandwidth during motion compensation.
[0114] The coded blocks can also be recursively divided using partitioning patterns. That is, the coded blocks can be divided according to the partitioning pattern indicated by the partition index, and each partition generated by dividing the coded blocks can be defined as a coded block.
[0115] The method for recursively segmenting coding units will be described in more detail below. For ease of explanation, it is assumed that coding tree units are also included in the category of coding units. That is, in the embodiments described later, a coding unit may refer to a coding tree unit, or it may refer to a coding unit generated by segmenting a coding tree unit. Furthermore, when recursively segmenting coding blocks, it is understood that the "segmentation" generated by segmenting coding blocks means "coding block".
[0116] A coding unit can be divided by at least one line. The line dividing the coding unit can have a predetermined angle. This predetermined angle can be a value within the range of 0 degrees to 360 degrees. For example, a 0-degree line can represent a horizontal line, a 90-degree line can represent a vertical line, and a 45-degree or 135-degree line can represent a diagonal line.
[0117] When segmenting a coding unit using multiple lines, all lines can have the same angle. Alternatively, at least one line can have an angle different from the others. Alternatively, the lines segmenting a coding tree unit or coding unit can be set to have a predefined angle difference (e.g., 90 degrees).
[0118] Information about lines that divide coding tree units or coding units can be defined and encoded as partitioning patterns. Alternatively, information such as the number of lines, the direction of the lines, the angle of the lines, and the position of the lines within the block can be encoded.
[0119] For ease of explanation, in the following embodiments, it is assumed that at least one of vertical lines and horizontal lines is used to divide the coding tree unit or coding unit into multiple coding units.
[0120] If it is assumed that the partitioning of the coding unit is based on at least one of vertical and horizontal lines, then the number of vertical or horizontal lines dividing the coding unit can be at least one or more. For example, a coding tree unit or coding unit can be divided into two partitions using one vertical line or one horizontal line, or a coding unit can be divided into three partitions using two vertical lines or two horizontal lines. Alternatively, a coding unit can be divided into four partitions with a length and width of 1 / 2 using one vertical line and one horizontal line.
[0121] When dividing a coding tree unit or coding unit into multiple partitions using at least one vertical line or at least one horizontal line, the partitions may have a uniform size. Alternatively, any partition may have a different size from the remaining partitions, or each partition may have a different size.
[0122] In the embodiments described below, it is assumed that dividing the coding unit into four partitions is based on quadtree partitioning, and dividing the coding unit into two partitions is based on binary tree partitioning. In the figures below, it is assumed that a predetermined number of vertical lines or a predetermined number of horizontal lines are used to divide the coding unit; however, the following situations are also within the scope of the invention: dividing the coding unit into more partitions than shown in the figures using a greater number of vertical lines or a greater number of horizontal lines, or dividing the coding unit into fewer partitions than shown in the figures.
[0123] Figure 4 This is a diagram illustrating an example of hierarchical partitioning of coded blocks based on a tree structure according to an embodiment of the present invention.
[0124] The input video signal is decoded in predetermined block units. The default unit for decoding the input video signal is the coding block. A coding block can be a block that performs intra / inter-frame prediction, transform, and quantization. Furthermore, a prediction mode (e.g., intra-frame prediction mode or inter-frame prediction mode) is determined on a block-by-block basis, and prediction blocks included in a coding block can share the determined prediction mode. A coding block can be a square or non-square block of any size in the range of 8×8 to 64×64, or it can be a square or non-square block of 128×128, 256×256, or larger.
[0125] Specifically, the coded blocks can be partitioned hierarchically based on at least one of quadtrees and binary trees. Here, quadtree-based partitioning means dividing a 2N×2N coded block into four N×N coded blocks, and binary tree-based partitioning means dividing one coded block into two coded blocks. Even when performing binary tree-based partitioning, square-shaped coded blocks can exist at a lower depth.
[0126] Binary tree-based partitioning can be performed symmetrically or asymmetrically. Furthermore, the encoded blocks based on binary tree partitioning can be square blocks or non-square blocks, such as rectangular blocks. For example, as... Figure 5 The example shown in the figure allows for a partition type that can be based on a binary tree, which may include at least one of the following: a symmetric type of 2N×N (horizontal non-square coding unit) or N×2N (vertical non-square coding unit), an asymmetric type of nL×2N, nR×2N, 2N×nU, or 2N×nD.
[0127] Binary tree-based partitioning can be restricted to either symmetric or asymmetric partitioning. In this case, constructing coding tree units using square blocks corresponds to quadtree CU partitioning, and constructing coding tree units using symmetric non-square blocks corresponds to binary tree partitioning. Constructing coding tree units using both square blocks and symmetric non-square blocks corresponds to quadtree CU partitioning and binary tree CU partitioning, respectively.
[0128] Binary tree-based partitioning can be performed on coded blocks that no longer require quadtree-based partitioning. Quadtree-based partitioning can be omitted from coded blocks that already require binary tree-based partitioning.
[0129] Furthermore, the partitioning type at a lower depth can be determined based on the partitioning type at a higher depth. For example, if binary tree-based partitioning is allowed at two or more depths, then only the same type of binary tree partitioning as at higher depths can be allowed at lower depths. For instance, if a binary tree-based partition at a higher depth is performed using a 2N×N type, then a binary tree-based partitioning at a lower depth is also performed using a 2N×N type. Alternatively, if a binary tree-based partition at a higher depth is performed using an N×2N type, then a binary tree-based partitioning at a lower depth is also performed using an N×2N type.
[0130] In contrast, it is also possible to allow only types that are different from the binary tree partitioning types at lower depths.
[0131] It is possible to restrict the use of only specific types of binary tree-based partitions for sequences, slices, coded tree units, or coded units. For example, for coded tree units, only 2N×N or N×2N type binary tree-based partitions may be allowed. Available partition types can be predefined in the encoder or decoder. Alternatively, information about available partition types or unavailable partition types can be encoded and then transmitted as a signal via a bitstream.
[0132] Figure 6 This is a diagram illustrating an example of binary tree-based partitioning that only allows specific types of partitioning. Figure 6 (a) shows an example that only allows binary tree-based partitioning of type N×2N, and Figure 6(b) shows an example of binary tree-based partitioning that only allows 2N×N type partitions. To implement adaptive partitioning based on quadtrees or binary trees, the following information can be used: information indicating quadtree-based partitioning, information about the size / depth of the coded block that allows quadtree-based partitioning, information indicating binary tree-based partitioning, information about the size / depth of the coded block that allows binary tree-based partitioning, information about the size / depth of the coded block that does not allow binary tree-based partitioning, information about whether binary tree-based partitioning is performed vertically, horizontally, etc. For example, `quad_split_flag` indicates whether to split the coded block into four coded blocks, and `binary_split_flag` indicates whether to split the coded block into two coded blocks. In the case of splitting the coded block into two coded blocks, `is_hor_split_flag` can be used to signal whether the partitioning direction of the coded block is vertical or horizontal.
[0133] Additionally, the following information can be obtained for a coding tree unit or a specific coding unit: the number of allowed binary tree partitions, the depth of allowed binary tree partitions, or the number of allowed binary tree partition depths. Information can be encoded in units of coding tree units or coding units, and this information can be transmitted to the decoder via a bitstream.
[0134] For example, the syntax "max_binary_depth_idx_minus1" indicating the maximum allowed depth of a binary tree partition can be encoded / decoded via a bitstream. In this case, max_binary_depth_idx_minus1+1 can indicate the maximum allowed depth of a binary tree partition.
[0135] Reference Figure 7 The example shown is in Figure 7 In the code, binary tree partitioning has already been performed for coding units of depth 2 and depth 3. Therefore, the bitstream can be encoded / decoded using at least one of the following: information indicating the number of times a binary tree partition has been performed in the coding unit (i.e., 2 times), information indicating the maximum depth of binary tree partitioning allowed in the coding unit (i.e., depth 3), or information indicating the number of depths of binary tree partitioning performed in the coding unit (i.e., 2 (depth 2 and depth 3)).
[0136] As another example, at least one of the following information can be obtained for each sequence or slice: the number of allowed binary tree partitions, the allowed depth of binary tree partitions, or the number of allowed depths of binary tree partitions. For example, this information can be encoded in units of sequences, images, or slices and transmitted via a bitstream. Therefore, at least one of the following—the number of binary tree partitions in the first slice, the maximum allowed depth of binary tree partitions in the first slice, or the number of depths at which binary tree partitions are performed in the first slice—can differ from that in the second slice. For example, in the first slice, binary tree partitions can be allowed for only one depth, while in the second slice, binary tree partitions can be allowed for two depths.
[0137] As another example, the allowed number of binary tree partitions, the allowed depth of binary tree partitions, or the allowed depth of binary tree partitions can be set differently based on the temporal ID of the slice or image. Here, the temporal ID is used to identify each of multiple video layers that have scalability in at least one of view, space, time, or quality.
[0138] like Figure 4 As shown, a first coding block 300 with a partition depth (splitting depth) of k can be divided into multiple second coding blocks based on a quadtree. For example, second coding blocks 310 to 340 can be square blocks with half the width and half the height of the first coding block, and the partition depth of the second coding blocks can be increased to k+1.
[0139] A second coding block 310 with a partitioning depth of k+1 can be partitioned into multiple third coding blocks with a partitioning depth of k+2. The partitioning of the second coding block 310 can be performed by selectively using either a quadtree or a binary tree, depending on the partitioning method. Here, the partitioning method can be determined based on at least one of information indicating quadtree-based partitioning and information indicating binary tree-based partitioning.
[0140] When partitioning the second coding block 310 based on a quadtree, the second coding block 310 can be divided into four third coding blocks 310a, each having half the width and half the height of the second coding block, and the partitioning depth of the third coding blocks 310a can be increased to k+2. In contrast, when partitioning the second coding block 310 based on a binary tree, the second coding block 310 can be divided into two third coding blocks. Here, each of the two third coding blocks can be a non-square block having half the width and half the height of the second coding block, and the partitioning depth can be increased to k+2. The second coding block can be determined as a horizontal or vertical non-square block depending on the partitioning direction, and the partitioning direction can be determined based on information about whether the binary tree-based partitioning is performed along the vertical or horizontal direction.
[0141] Meanwhile, the second coding block 310 can be determined as a leaf coding block that is no longer partitioned based on a quadtree or binary tree. In this case, the leaf coding block can be used as a prediction block or a transform block.
[0142] Similar to the division of the second coding block 310, the third coding block 310a can be determined as a leaf coding block, or it can be further divided based on a quadtree or a binary tree.
[0143] Simultaneously, the third coding block 310b, based on the binary tree partitioning, can be further divided into vertical coding blocks 310b-2 or horizontal coding blocks 310b-3, and the partitioning depth of the relevant coding blocks can be increased to k+3. Alternatively, the third coding block 310b can be determined as a leaf coding block 310b-1 that is no longer partitioned based on the binary tree. In this case, coding block 310b-1 can be used as a prediction block or a transform block. However, the above partitioning process can be performed restrictively based on at least one of the following information: information about the size / depth of coding blocks that allow quadtree-based partitioning, information about the size / depth of coding blocks that allow binary tree-based partitioning, and information about the size / depth of coding blocks that do not allow binary tree-based partitioning.
[0144] The number of candidates representing the size of a coded block can be limited to a predetermined number, or the size of the coded block within a predetermined unit can have a fixed value. For example, the size of a coded block in a sequence or image can be limited to 256×256, 128×128, or 32×32. Information indicating the size of the coded blocks in a sequence or image can be sent via signals through the sequence header or image header.
[0145] As a result of partitioning based on quadtrees and binary trees, the coding unit can be represented as a square or rectangle of arbitrary size.
[0146] As a result of quadtree and binary tree-based partitioning, coded blocks that are not further divided can be used as prediction blocks or transform blocks. That is, in the quadtree and binary tree-based QTBT partitioning method, a coded block can become a prediction block, and a prediction block can become a transform block. For example, when using the QTBT partitioning method, prediction images can be generated on a coded block basis, and residual signals, which are the differences between the original image and the prediction image, can be transformed on a coded block basis. Here, generating prediction images on a coded block basis can mean determining motion information for the coded block or determining an intra-frame prediction mode for the coded block. Therefore, at least one of skip mode, intra-frame prediction, or inter-frame prediction can be used to encode the coded block.
[0147] As another example, transform blocks or prediction blocks smaller than the coding blocks can also be used by splitting the coding blocks.
[0148] In the QTBT partitioning method, only symmetric partitioning can be allowed in the BT. However, if only symmetric binary partitioning is allowed, even when dividing objects and backgrounds at block boundaries, only symmetric binary partitioning is permitted, which may reduce coding efficiency. Therefore, this invention proposes a method for asymmetric partitioning of coding blocks to improve coding efficiency.
[0149] Asymmetric binary tree partitioning refers to dividing a coded block into two smaller coded blocks. As a result of asymmetric binary tree partitioning, a coded block can be divided into two coded blocks of asymmetric form. For ease of explanation, in the following embodiments, dividing a coded block into two symmetrical partitions will be referred to as binary tree partitioning (or binary tree partitioning), and dividing a coded block into two asymmetric partitions will be referred to as asymmetric binary tree partitioning (or asymmetric binary tree partitioning).
[0150] Figure 8 This illustrates the partitioning types of coded blocks based on asymmetric binary tree partitioning. A 2N×2N coded block can be partitioned into two coded blocks with a width ratio of n:(1-n) or a height ratio of n:(1-n). Here, n can represent a real number greater than 0 and less than 1.
[0151] exist Figure 8 The diagram shows that by applying asymmetric binary tree partitioning to the coding blocks, two coding blocks with a width ratio of 1:3 or 3:1 or a height ratio of 1:3 or 3:1 can be generated.
[0152] Specifically, when dividing a W×H coded block vertically, a left partition with a width of 1 / 4W and a right partition with a width of 3 / 4W can be generated. As mentioned above, the partition type where the width of the left partition is smaller than the width of the right partition can be called an nL×2N binary partition.
[0153] When dividing a coding block of size W×H in the vertical direction, a left partition with a width of 3 / 4W and a right partition with a width of 1 / 4W can be generated. As mentioned above, the partition type in which the width of the right partition is smaller than the width of the left partition can be called an nR×2N binary partition.
[0154] When dividing a coding block of size W×H horizontally, an upper partition with a height of 1 / 4H and a lower partition with a height of 3 / 4H can be generated. As mentioned above, the partition type where the height of the upper partition is less than the height of the lower partition can be called a 2N×nU binary partition.
[0155] When dividing a coding block of size W×H horizontally, an upper partition with a height of 3 / 4H and a lower partition with a height of 1 / 4H can be generated. As mentioned above, the partition type where the height of the lower partition is less than the height of the upper partition can be called a 2N×nD binary partition.
[0156] exist Figure 8 The diagram shows a width-to-height ratio of 1:3 or 3:1 between two coded blocks. However, the width-to-height ratio between two coded blocks generated by asymmetric binary tree partitioning is not limited to this. Coded blocks can be partitioned with a width-to-height ratio of 1:3 or 3:1. Figure 8 The diagram shows two coded blocks with different width or height ratios.
[0157] When using asymmetric binary tree partitioning, the asymmetric binary partitioning type of the coded block can be determined based on information transmitted via signals through the bit stream. For example, the partitioning type of the coded block can be determined based on information indicating the partitioning direction of the coded block and information indicating whether the first partition generated by splitting the coded block has a smaller size than the second partition.
[0158] Information indicating the direction of coded block partitioning can be a 1-bit flag indicating whether the coded block was partitioned vertically or horizontally. For example, `hor_binary_flag` can indicate whether the coded block was partitioned horizontally. If the value of `hor_binary_flag` is 1, it indicates that the coded block was partitioned horizontally; if the value of `hor_binary_flag` is 0, it indicates that the coded block was partitioned vertically. Alternatively, `ver_binary_flag` can be used to indicate whether the coded block was partitioned vertically.
[0159] The information indicating whether the first partition is smaller than the second partition can be a 1-bit flag. For example, `is_left_above_small_part_flag` can indicate whether the size of the left or upper partition generated by splitting the coded block is smaller than the size of the right or lower partition. If the value of `is_left_above_small_part_flag` is 1, it means that the size of the left or upper partition is smaller than the size of the right or lower partition. If the value of `is_left_above_small_part_flag` is 0, it means that the size of the left or upper partition is larger than the size of the right or lower partition. Alternatively, `is_right_bottom_small_part_flag` can be used to indicate whether the size of the right or lower partition is smaller than the size of the left or upper partition.
[0160] Alternatively, the size of the first and second divisions can be determined by using information indicating the width ratio, height ratio, or area ratio between the first and second divisions.
[0161] When `hor_binary_flag` is 0 and `is_left_above_small_part_flag` is 1, it can represent an nL×2N binary partition; when `hor_binary_flag` is 0 and `is_left_above_small_part_flag` is 0, it can represent an nR×2N binary partition. Furthermore, when `hor_binary_flag` is 1 and `is_left_above_small_part_flag` is 1, it can represent a 2N×nU binary partition; and when `hor_binary_flag` is 1 and `is_left_above_small_part_flag` is 0, it can represent a 2N×nD binary partition.
[0162] As another example, the asymmetric binary partition type of a coded block can be determined by index information indicating the partition type of the coded block. Here, the index information is the information to be transmitted via a signal through the bit stream, and can be encoded with a fixed length (i.e., a fixed number of bits) or with a variable length. For example, Table 1 below shows the partition index for each asymmetric binary partition.
[0163] [Table 1]
[0164] nL×2N 0 0 nR×2N 1 10 2N×nU 2 100 2N×nD 3 111
[0165] Asymmetric binary tree partitioning can be used according to the QTBT partitioning method. For example, if quadtree partitioning or binary tree partitioning is no longer suitable for the coded block, it can be determined whether to apply asymmetric binary tree partitioning to the coded block. Here, it can be determined whether to apply asymmetric binary tree partitioning to the coded block via information transmitted by signaling through a bitstream. For example, this information could be a 1-bit flag 'asymmetric_binary_tree_flag', and based on this flag, it can be determined whether to apply asymmetric binary tree partitioning to the coded block.
[0166] Alternatively, when determining that a coded block is to be divided into two blocks, it is possible to determine whether the partition type is a binary tree partition or an asymmetric binary tree partition. Here, the partition type can be determined by information transmitted via a signal through a bitstream. For example, this information could be a 1-bit flag 'is_asymmetric_split_flag', and based on this flag, it can be determined whether the coded block should be partitioned in a symmetric or asymmetric form.
[0167] As another example, the indices assigned to symmetric and asymmetric binary partitions can be different, and the choice between symmetric and asymmetric partitioning of a coding block can be determined based on the index information. For example, Table 2 shows examples where different indices are assigned to symmetric and asymmetric binary partitions.
[0168] [Table 2]
[0169] 2N×N (binary partition along the horizontal direction) 0 0 N×2N (Binary partition along the vertical direction) 1 10 nL×2N 2 110 nR×2N 3 1110 2N×nU 4 11110 2N×nD 5 11111
[0170] A coding tree block or coding block can be divided into multiple coding blocks using quadtree partitioning, binary tree partitioning, or asymmetric binary tree partitioning. For example, Figure 8 An example is shown where QTBT and asymmetric binary tree partitioning are used to divide a coded block into multiple coded blocks. (See reference...) Figure 9 As can be seen, asymmetric binary tree partitioning is performed in the depth 2 partitioning in the first figure, the depth 3 partitioning in the second figure, and the depth 3 partitioning in the third figure.
[0171] It is possible to restrict the further segmentation of coded blocks partitioned by asymmetric binary trees. For example, for coded blocks generated by asymmetric binary tree partitioning, information related to quadtrees, binary trees, or asymmetric binary trees may not need to be encoded / decoded. In other words, for coded blocks generated by asymmetric binary tree partitioning, flags indicating whether quadtree partitioning, binary tree partitioning, or asymmetric binary tree partitioning are omitted, as are flags indicating the direction of binary or asymmetric binary tree partitioning, or index information indicating asymmetric binary tree partitioning.
[0172] As another example, whether binary tree partitioning is allowed can be determined based on whether QTBT-based partitioning is permitted. For instance, in images or slices where QTBT-based partitioning methods are not used, asymmetric binary tree partitioning can be restricted.
[0173] Information indicating whether asymmetric binary tree partitioning is allowed can be encoded and signaled at the block, slice, or image level. Here, the information indicating whether asymmetric binary tree partitioning is allowed can be a 1-bit flag. For example, if the value of `is_used_asymmetric_QTBT_enabled_flag` is 0, it can indicate that asymmetric binary tree partitioning is not used. If binary tree partitioning is not used in an image or slice, `is_used_asymmetric_QTBT_enabled_Flag` can also be set to 0 without signaling.
[0174] The allowed partition types in a coded block can also be determined based on the size, shape, partition depth, or partition type of the coded block. For example, at least one of the allowed partition types, partition shapes, or number of partitions in a coded block generated by quadtree partitioning and a coded block generated by binary tree partitioning can be different from each other.
[0175] For example, if a coded block is generated using a quadtree partition, then all quadtree partitions, binary tree partitions, and asymmetric binary tree partitions are allowed for that coded block. In other words, if a coded block is generated based on a quadtree partition, then... Figure 10 All the partitioning types shown are applied to the coded block. For example, a 2N×2N partition can represent the case where the coded block is not further divided, N×N can represent the case where the coded block is partitioned using a quadtree, and N×2N and 2N×N can represent the case where the coded block is partitioned using a binary tree. In addition, nL×2N, nR×2N, 2N×nU, and 2N×nD can represent the case where the coded block is partitioned using an asymmetric binary tree.
[0176] On the other hand, when generating coded blocks through binary tree partitioning, asymmetric binary tree partitioning may not be allowed for certain coded blocks. In other words, when generating coded blocks based on binary tree partitioning, restrictions can be placed on the use of asymmetric binary trees. Figure 10 The asymmetric partition types (nL×2N, nR×2N, 2N×nU, 2N×nD) shown are applied to the coded blocks.
[0177] As described in the examples above, coding units (or coding tree units) can be recursively divided using at least one vertical or horizontal line. For example, quadtree partitioning can be summarized as a method of dividing coding blocks using both horizontal and vertical lines, while binary tree partitioning is a method of dividing coding blocks using either horizontal or vertical lines. The types of coding block partitioning based on quadtree and binary tree partitioning are not limited to... Figures 4 to 10 The example shown can be used, and extended partitioning types other than those shown can be used. That is, it can be used with... Figure 4 and Figure 10 The different types shown are used to recursively partition coded blocks. The various partitioning types of coded blocks based on quadtree partitioning and binary tree partitioning will be described below.
[0178] When the current block is partitioned by a quadtree, at least one of the horizontal or vertical lines can asymmetrically divide the coded block. Here, asymmetry can mean that blocks divided by horizontal lines have different heights, or blocks divided by vertical lines have different widths. For example, a horizontal line can divide the coded block into an asymmetric shape, while a vertical line divides it into a symmetric shape, or vice versa. Alternatively, both horizontal and vertical lines can divide the coded block asymmetricly.
[0179] Figure 11 This is a diagram illustrating the quadtree partitioning type of the coded block. Figure 11 The first example shows an instance where both horizontal and vertical lines are used for symmetrical division. The second and third examples show instances where horizontal lines are used for symmetrical division and vertical lines are used for asymmetrical division. The fourth and fifth examples show instances where vertical lines are used for symmetrical division and horizontal lines are used for asymmetrical division.
[0180] To specify the partitioning type of a coded block, information related to the partitioning type can be encoded. This information may include a first indicator indicating whether the partitioning type of the coded block is symmetric or asymmetric. This first indicator may be encoded on a block-by-block basis, or it may be encoded for each vertical line or each horizontal line. For example, the first indicator may include information indicating whether vertical lines are used for symmetric partitioning and information indicating whether horizontal lines are used for symmetric partitioning.
[0181] Alternatively, the first indicator can be encoded only for vertical or horizontal lines, and the division type of another line not encoded by the first indicator can be obtained dependently from the first indicator. For example, the division type of the other line not encoded by the first indicator can have a value opposite to the value of the first indicator. That is, if the first indicator indicates that vertical lines are used for asymmetrical division, then, conversely, horizontal lines can be used for symmetrical division.
[0182] In cases where the first indicator indicates asymmetric division, a second indicator can be further encoded for the vertical or horizontal lines. Here, the second indicator may indicate at least one of the following: the position of the vertical or horizontal lines used for asymmetric division, or the ratio between blocks divided by vertical or horizontal lines.
[0183] Quadtree partitioning can be performed using multiple vertical lines or multiple horizontal lines. For example, a coded block can also be divided into four blocks by combining at least one of one or more vertical lines or one or more horizontal lines.
[0184] Figure 12This is a diagram illustrating an example of segmenting a coded block by combining multiple vertical / horizontal lines and a single horizontal / vertical line.
[0185] Reference Figure 12 The quadtree partitioning is performed as follows: the coded block is divided into three blocks using two vertical or two horizontal lines, and then one of the three partitioned blocks is further divided into two blocks. At this point, as shown... Figure 12 The examples shown illustrate how a central block within a block divided by two vertical lines or two horizontal lines can be segmented using horizontal or vertical lines. Blocks located to the side of a coded block can also be segmented using horizontal or vertical lines. Alternatively, information specifying the segment to be divided among the three partitions (e.g., a partition index) can be transmitted via a bitstream using signals.
[0186] A coding block can be asymmetrically divided using at least one of horizontal or vertical lines, and other lines can be used to symmetrically divide the coding block. For example, a coding block can be divided into a symmetrical shape using multiple vertical or multiple horizontal lines, or it can be divided into a symmetrical shape using one horizontal or one vertical line. Alternatively, both horizontal and vertical lines can be used to divide the coding block into a symmetrical shape, or they can be used to divide the coding block into an asymmetrical shape.
[0187] When combining multiple vertical / horizontal lines and one horizontal / one vertical line, a coded block can be divided into four partitions (i.e., four coded blocks) consisting of at least two different sizes. This method of dividing a coded block into four partitions with at least two different sizes can be called triple-type asymmetric quadtree partitioning (triple-type asymmetric quadtree CU partitioning).
[0188] Information regarding the three types of asymmetric quadtree partitions can be encoded based on at least one of the first or second indicators described above. For example, the first indicator can indicate whether the partition type of the encoded block is symmetric or asymmetric. The first indicator can be encoded on a block-by-block basis, or it can be encoded separately for vertical lines or horizontal lines. For example, the first indicator may include information indicating whether one or more vertical lines are used for symmetric partitions and information indicating whether one or more horizontal lines are used for symmetric partitions.
[0189] Alternatively, the first indicator can be encoded only for vertical or horizontal lines, and the division type of another line whose first indicator is not encoded can be obtained from the first indicator.
[0190] In cases where the first indicator indicates asymmetric division, a second indicator can be further encoded for the vertical or horizontal lines. Here, the second indicator may indicate at least one of the following: the position of the vertical or horizontal lines used for asymmetric division, or the ratio between blocks divided by vertical or horizontal lines.
[0191] Binary tree partitioning methods can be used, where the encoded blocks are divided into rectangular and non-rectangular partitions. The binary tree partitioning method that recursively divides the encoded blocks into rectangular and non-rectangular blocks can be called polygonal binary tree partitioning (Polygonal Binary Tree CU partitioning).
[0192] Figure 13 This is a diagram illustrating the partitioning types based on a polygonal binary tree.
[0193] As in Figure 13 As shown in the example, when segmenting a coded block based on a polygonal binary tree partition, the coded block can be segmented into square-shaped partitions and polygon-shaped partitions.
[0194] The partition type of a coded block can be determined based on an index specifying the partition type. For example, it can be determined based on an indicator. Figure 13 The index information of any one of Poly 0 to Poly 3 shown in the figure is used to determine the partition type of the coded block.
[0195] Alternatively, the partitioning type of the coding block can be determined based on information about the position of the square block within the coding block. For example, if the position information indicates that the square block in the coding block is located in the upper left corner relative to the center of the coding block, the partitioning type of the coding block can be determined as follows: Figure 13 Poly 0 is shown in the figure.
[0196] Polygonal partitions can also be generated by merging multiple previously segmented coded blocks. For example, when a 2N×2N coded block is divided into four N×N sub-coded blocks, a polygonal partition can be generated by merging any one of the four sub-coded blocks with its adjacent sub-coded block. Alternatively, when a 2N×2N coded block is divided into two N×N sub-coded blocks and one 2N×N or N×2N sub-coded block, a polygonal partition can be generated by merging the N×N sub-coded block with the 2N×N or N×2N sub-coded block.
[0197] When segmenting the current coding block based on polygonal binary tree partitioning, signals can be used to send an index indicating the partition type of the current coding block or information indicating the position of square blocks within the current coding block, or signals can be used to send information for constructing polygonal shapes within the current coding block. Here, the information for constructing polygonal shapes may include at least one of the following: information indicating whether a segmented block should be merged with adjacent blocks, information about the block's position, and / or the number of blocks to be merged. Information specifying the partition type can be sent via signals through at least one of video parameter sets, sequence parameter sets, picture parameter sets, title sequences, or block levels, depending on the characteristics.
[0198] It is possible to restrict segmented coded blocks generated based on polygonal binary tree partitioning from being further segmented. Alternatively, for segmented coded blocks generated based on polygonal binary tree partitioning, only specific types of partitioning can be allowed.
[0199] Information regarding whether polygon binary tree partitioning is allowed can be signaled via at least one of the following: video parameter set, sequence parameter set, image parameter set, title sequence, or block level. For example, via the sequence header, the syntax `isUsePolygonBinaryTreeFlag` indicating whether polygon binary tree partitioning is allowed can be signaled. If `isUsePolygonBinaryTreeFlag` equals 1, then the coded blocks in the current sequence can be segmented based on polygon binary tree partitioning.
[0200] Whether to use a polygonal binary tree partition can be determined based on whether binary tree partitioning is allowed. For example, if binary tree partitioning is not allowed (e.g., if isUseBinaryTreeFlag is 0), then polygonal binary tree partitioning may not be allowed. On the other hand, if binary tree partitioning is allowed, it can be determined based on the syntax isUsePolygonBinaryTreeFlag, which indicates whether polygonal binary tree partitioning is allowed.
[0201] The partition index of the partition generated by the polygon binary tree partition can be determined based on the position of the partition. For example, a partition including a predetermined position can have a partition index that precedes the partition excluding the predetermined position. For example, as in Figure 13 As shown in the example, it can be set that the partition including the position of the top-left sample of the coded block can have a partition index of 0, and other partitions can have a partition index of 1. Alternatively, the partition index of each partition can be determined based on the size of the partition.
[0202] When dividing the coded blocks using a polygonal binary tree partition, the encoding / decoding order of each partition can follow the partition index. That is, after partition 0 is encoded first, partition 1 can be encoded in the next order. Alternatively, partition 0 and partition 1 can be encoded / decoded in parallel.
[0203] At this point, when performing prediction on polygon partitions, the polygon partitions can be divided into subpartitions, and prediction can be performed on a subpartition basis.
[0204] Figure 14 This is a diagram illustrating an example of dividing a polygon into sub-partitions.
[0205] When performing intra-frame prediction on polygon partitions, the polygon partitions can be divided into rectangular sub-blocks, such as... Figure 14 As shown in the example, a polygon can be divided into square-shaped subdivisions and non-square-shaped subdivisions, such as... Figure 14 As shown in the example, or although not shown in the figure, the polygon can be divided into square-shaped partitions.
[0206] When a polygon partition is divided into multiple partitions, intra-frame prediction can be performed on each partition. For example, in Figure 14 In the example shown, intra-frame prediction can be performed for each of Pred 0 and Pred 1.
[0207] Although the intra-prediction modes of Pred 0 and Pred 1 can be determined differently, reference samples for each partition can be obtained based on polygon partitions or coded blocks. Alternatively, the intra-prediction mode of Pred 1 can be obtained based on the intra-prediction mode of Pred 0, or the intra-prediction mode of Pred 0 can be obtained based on the intra-prediction mode of Pred 1.
[0208] The aforementioned asymmetric quadtree partitioning and polygon-type binary tree partitioning can be defined as extended types of quadtree partitioning and binary tree partitioning, respectively. Whether to use an extended partitioning type can be determined at the sequence unit, image unit, slice unit, or block level, or based on whether quadtree partitioning or binary tree partitioning is allowed.
[0209] In the examples above, it is assumed that the coded block is divided into four partitions or two partitions. However, the coded block can also be recursively divided into more or fewer partitions. For example, the number of vertical or horizontal lines can be adjusted, and the coded block can be divided into two or three partitions using only vertical lines (one or more) or horizontal lines (one or more). For example, if one horizontal line or one vertical line is used, the coded block can be divided into two partitions. In this case, the partition type of the coded block can be determined as either an asymmetric binary partition or a symmetric binary partition, depending on whether each partition is the same size. As another example, the coded block can be divided into three partitions using two vertical lines or two horizontal lines. Dividing the coded block into three partitions using two vertical lines or two horizontal lines can be called a ternary tree partition.
[0210] Figure 15 An example of partitioning coding blocks based on a ternary tree is shown. (See example in...) Figure 15 As shown in the example, three partitions can be generated when dividing a coded block by two horizontal lines or two vertical lines.
[0211] The coded blocks generated by the ternary tree partitioning can be further divided into sub-coded blocks, or further divided into smaller units for prediction or transformation.
[0212] In another example, the coded blocks generated by ternary tree partitioning can be restricted from further segmentation. Alternatively, the coded blocks generated by ternary tree partitioning can be restricted so that some of the quadtree partitioning, ternary tree partitioning, or binary tree partitioning is not applied.
[0213] Whether ternary tree partitioning is allowed can be determined based on the size or shape of the coded block. For example, when the size of the coded block is M×N, ternary tree partitioning can be restricted. Here, N and M are natural numbers, and N and M can be the same or can be the same as each other. For example, N and M can have values of 4, 8, 16, 32, 64, or more.
[0214] Information indicating the size or shape of blocks that allow ternary tree partitioning can be encoded and transmitted via a bitstream. This information can represent a maximum or minimum value. Alternatively, the size or shape of the blocks allowing ternary tree partitioning can have fixed values pre-defined in the encoder / decoder.
[0215] Information indicating whether ternary tree partitioning is permitted can be sent via signals in units of images, slices, or blocks. Only when the information indicates that ternary tree partitioning is permitted for a predetermined unit can the information indicating whether ternary tree partitioning should be applied be sent via signals to the block included in the predetermined unit.
[0216] The information indicating whether to apply a tritree partition can be a 1-bit flag. For example, `triple_split_flag` can indicate whether to partition the current coded block based on a tritree. When partitioning the current coded block based on a tritree, additional signals can be sent indicating the partition direction or the size / ratio of each partition. The partition direction information can be used to determine whether to partition the coded block using two horizontal lines or two vertical lines.
[0217] When partitioning a coding block based on a ternary tree, the partitions included within the coding block can share motion information, merging candidates, reference samples, or intra-prediction modes based on the size or shape of the coding block. For example, if the current coding block is partitioned based on a ternary tree and the size or shape of the current coding block meets predetermined conditions, then the coding blocks within the current coding block can share at least one of spatial or temporal neighbor block candidates for inter-frame prediction, reference samples, or intra-prediction modes for intra-frame prediction. Alternatively, only some coding blocks within the current coding block can share this information, and the remaining coding blocks cannot.
[0218] A method of partitioning a coding block using at least one of quadtree partitioning, binary tree partitioning, or ternary tree partitioning can be called multi-tree partitioning. According to the multi-tree partitioning method, a coding unit can be divided into multiple partitions using at least one of quadtree partitioning, binary tree partitioning, or ternary tree partitioning. Each partition generated by partitioning the coding block can be defined as a coding unit.
[0219] Figure 16 and Figure 17 This illustrates the partitioning types of coded blocks based on the multi-way tree partitioning method. Figure 16 The diagram shows nine partitioning types based on quadtree partitioning, binary partitioning, and ternary tree partitioning.
[0220] If polygon-type binary tree partitioning is included in the category of multi-way tree partitioning, then the coded block can be divided into multiple partitions based on at least one of quadtree partitioning, binary tree partitioning, ternary tree partitioning, and polygon-type binary tree partitioning. Therefore, the coded block can have, for example, Figure 17 The partitioning type shown in the example.
[0221] Based on the multi-way tree partitioning method, only in... Figure 16 or Figure 17 The predefined partition types shown in the example can be set to be available. However, the predefined partition types are not limited to... Figure 16 or Figure 17 The example shown is shown in the image.
[0222] Depending on the multi-branch tree partitioning method, it can be determined whether to use each of quadtree partitioning, binary tree partitioning, and ternary tree partitioning, on a sequence, image, or slice basis. For example, it can be determined whether to use quadtree partitioning, binary tree partitioning, and ternary tree partitioning based on flag information indicating whether to use each partitioning method. Based on this determination, blocks included in a predetermined unit (i.e., sequence, image, slice, etc.) can be partitioned using all quadtree partitioning, binary tree partitioning, and ternary tree partitioning, or blocks included in a predetermined unit can be partitioned using one or two of quadtree partitioning, binary tree partitioning, and ternary tree partitioning.
[0223] The alternative can default to using some of the quadtree, binary tree, and ternary tree partitioning methods, and can selectively determine whether to use the remaining partitioning methods. For example, it can default to using quadtree partitioning, but selectively determine whether to use binary tree or ternary tree partitioning. Or, it can default to using both quadtree and ternary tree partitioning, but selectively determine whether to use binary tree partitioning. Or, it can default to using both quadtree and binary tree partitioning, but selectively determine whether to use ternary tree partitioning.
[0224] The indicator that specifies whether to use a binary tree partitioning method or a ternary tree partitioning method can be a 1-bit flag. For example, `isUseBinaryTreeFlag` indicates whether to use a binary tree partitioning method, and `isUseTripleTreeFlag` indicates whether to use a ternary tree partitioning method.
[0225] Indicators can be sent via signals through the sequence header. For example, if the value of isUseBinaryTreeFlag is 1, a binary tree partition can be used for the coding units in the current sequence. Alternatively, if the value of isUseTripleTreeFlag is 1, a ternary tree partition can be used for the coding units in the current sequence. In addition to the above examples, indicators can also be sent via video parameter sets, image parameter sets, title sequences, or block levels.
[0226] The partitioning type of the current coding block can be restricted to prevent the generation of more partitions than the previous node. For example, if the current coding block is generated by a ternary tree partition, then only ternary tree or binary tree partitions are allowed for the current coding block, and quadtree partitions are not allowed for the current coding block.
[0227] Furthermore, the information indicating whether to segment the current coding block can be encoded / decoded hierarchically based on the number of segments generated as a result of the segmentation. For example, information indicating whether to segment the current coding block based on a quadtree can be encoded / decoded, and if it is determined that the current block should not be segmented based on a quadtree, information indicating whether to segment based on a ternary tree or a binary tree can be encoded / decoded.
[0228] Instead of the example above, the coded block can also be divided into four or more blocks by combining multiple horizontal lines and multiple vertical lines.
[0229] Figure 18 This is a flowchart illustrating the process of dividing a coding block according to an embodiment of the present invention.
[0230] First, it can be determined whether to perform quadtree partitioning on the current block S1810. If it is determined that quadtree partitioning should be performed on the current block, then the current block can be divided into four coded blocks S1820.
[0231] When splitting the current block into four blocks, you can execute the following separately. Figure 19 The processing determines the partition type of the current block.
[0232] First, when dividing the current block into four coded blocks, it can be determined whether to apply a type-three asymmetric quadtree partitioning to the current block S1910. If a type-three asymmetric quadtree partitioning is applied to the current block, the partitioning type S1920 of the current block can be determined based on the number or position of the vertical / horizontal lines that divide the current block. For example, if a type-three asymmetric quadtree partitioning is applied to the current block, the current block can be divided into four partitions by two vertical lines and one horizontal line, or two horizontal lines and one vertical line.
[0233] If the three-type asymmetric quadtree partitioning is not applied, it is possible to determine whether the partitioning type of the current block is square or non-square (S1930). Here, the partitioning type of the current block can be determined based on whether at least one of the vertical or horizontal lines that partition the current block symmetrically divides the current block. If the current block is partitioned into a non-square type, the partitioning type of the current block can be determined based on the position of the vertical / horizontal lines that partition the current block (S1940).
[0234] On the other hand, if it is determined that quadtree partitioning is not allowed for the current block, it can be determined whether to perform ternary tree partitioning or binary tree partitioning on the current block S1830.
[0235] If it is determined that a ternary tree partition or a binary tree partition will be performed on the current block, then the partition type of the current block can be determined. In this case, the ternary tree partition type or the binary tree partition type of the current block can be determined based on at least one of the information indicating the partition direction of the current block or the index information specifying the partition type.
[0236] Based on the determined ternary or binary partitioning type, the current block can be divided into three blocks or two blocks S1840.
[0237] In the above example, it is shown that after determining whether to apply a quadtree partition, a ternary tree partition or a binary tree partition is selectively applied; however, the invention is not limited to the illustrated embodiment. Unlike the illustrated example, the determination of whether to apply a ternary tree partition or a binary tree partition can also be performed hierarchically. For example, it can be predetermined whether to partition the current block based on a ternary tree, and if it is determined not to partition the current block based on a ternary tree, then a determination of whether to partition the current block based on a binary tree is performed. Alternatively, it can be preferentially determined whether to partition the current block based on a binary tree, and if it is determined not to partition the current block based on a binary tree, then a determination of whether to partition the current block based on a ternary tree is performed.
[0238] When splitting the current block into two blocks, it can be executed separately. Figure 20 The processing determines the partition type of the current block.
[0239] First, when dividing the current block into two encoded blocks, it can be determined whether to apply polygonal binary tree partitioning to the current block S2010. If polygonal binary tree partitioning is applied to the current block, the partitioning type S2020 of the current block can be determined based on the index indicating the partitioning type of the current block or the position of the rectangular partition. For example, if polygonal binary tree partitioning is applied to the current block, the current block can be divided into a rectangular partition and a non-rectangular partition.
[0240] If a polygonal binary tree partition is not applied, it can be determined whether the partition type of the current block is a square type or a non-square type (S2030). Here, the partition type of the current block can be determined by whether at least one of the vertical or horizontal lines that divide the current block divides the current block into a symmetrical form. If the current block is divided into a non-square block, the partition type of the current block can be determined based on the position of the vertical or horizontal lines that divide the current block (S2040).
[0241] As Figure 20 The example shown can also sequentially determine whether to perform a binary tree partition on the current block and whether to perform an asymmetric binary tree partition on the current block. For example, it can be determined whether to perform an asymmetric binary tree partition only if it is determined that a binary tree partition on the current block is not allowed.
[0242] The recursive partitioning of coded blocks using quadtree partitioning, binary tree partitioning, or ternary tree partitioning has been described above. The described partitioning methods can be applied to partitioning coded blocks into prediction blocks or transform blocks, or to recursively partitioning prediction blocks or transform blocks. For example, a coded block can be partitioned into multiple prediction blocks or multiple transform blocks using quadtree partitioning, binary tree partitioning, or ternary tree partitioning.
[0243] Figure 21 This is a flowchart illustrating the process of obtaining residual samples according to an embodiment of the present invention.
[0244] First, the residual coefficients S2110 of the current block can be obtained. The decoder can obtain the residual coefficients through coefficient scanning methods. For example, the decoder can perform coefficient scanning using diagonal scanning, jig-zag scanning, upper right scanning, vertical scanning, or horizontal scanning, and can obtain residual coefficients in the form of two-dimensional blocks.
[0245] Inverse quantization S2120 can be performed on the residual coefficients of the current block.
[0246] It can be determined whether to skip the inverse transform S2130 of the dequantized residual coefficients of the current block. Specifically, the decoder can determine whether to skip the inverse transform in at least one direction, either horizontal or vertical, of the current block. When determining whether to apply the inverse transform in at least one direction, either horizontal or vertical, the residual sample of the current block can be obtained by performing the inverse transform on the dequantized residual coefficients of the current block S2140. Here, at least one of DCT, DST, and KLT can be used to perform the inverse transform.
[0247] If the inverse transform is skipped in both the horizontal and vertical directions of the current block, then the inverse transform is not performed in the horizontal and vertical directions of the current block. In this case, the residual sample S2150 of the current block can be obtained by scaling the dequantized residual coefficients with a predetermined value.
[0248] Skipping the inverse transformation in the horizontal direction means performing the inverse transformation in the vertical direction instead of the horizontal one. In this case, scaling can be performed in the horizontal direction.
[0249] Skipping the inverse transform in the vertical direction means performing the inverse transform in the horizontal direction instead of the vertical one. In this case, scaling can be performed in the vertical direction.
[0250] The type of partitioning the current block can be used to determine whether an inverse transform skipping technique can be applied to the current block. For example, if the current block is generated through a binary tree-based partition, the inverse transform skipping scheme can be restricted for the current block. Therefore, when generating the current block through a binary tree-based partition, the residual sample of the current block can be obtained by performing an inverse transform on the current block. Furthermore, when generating the current block through a binary tree-based partition, the encoding / decoding of information indicating whether to skip the inverse transform (e.g., transform_skip_flag) can be omitted.
[0251] Alternatively, when generating the current block through binary tree-based partitioning, the inverse transform skipping scheme can be restricted to at least one of the horizontal or vertical directions. Here, the direction in which the inverse transform skipping scheme is restricted can be determined based on information decoded from the bitstream, or it can be adaptively determined based on at least one of the current block size, the current block shape, or the intra-frame prediction mode of the current block.
[0252] For example, when the current block is a non-square block with a width greater than its height, inverse transformation skipping schemes can be allowed only in the vertical direction and restricted in the horizontal direction. That is, when the current block is 2N×N, the inverse transformation is performed in the horizontal direction of the current block, and the inverse transformation can be selectively performed in the vertical direction.
[0253] On the other hand, when the current block is a non-square block with a height greater than its width, inverse transformation skipping schemes can be allowed only in the horizontal direction and restricted in the vertical direction. That is, when the current block is N×2N, the inverse transformation is performed in the vertical direction of the current block, and the inverse transformation can be selectively performed in the horizontal direction.
[0254] Compared to the example above, when the current block is a non-square block with a width greater than its height, the inverse transformation skipping scheme can be allowed only in the horizontal direction, and when the current block is a non-square block with a height greater than its width, the inverse transformation skipping scheme can be allowed only in the vertical direction.
[0255] Information indicating whether to skip the inverse transform in the horizontal direction or the vertical direction can be transmitted via a bitstream signal. For example, the information indicating whether to skip the inverse transform in the horizontal direction is a 1-bit flag "hor_transform_skip_flag", and the information indicating whether to skip the inverse transform in the vertical direction is a 1-bit flag "ver_transform_skip_flag". The encoder can encode at least one of "hor_transform_skip_flag" or "ver_transform_skip_flag" based on the shape of the current block. Furthermore, the decoder can determine whether to skip the inverse transform in the horizontal or vertical direction by using at least one of "hor_transform_skip_flag" or "ver_transform_skip_flag".
[0256] It can be configured to skip the inverse transformation of the current block in either direction, depending on the partition type of the current block. For example, if the current block is generated by a binary tree-based partition, the inverse transformation in either the horizontal or vertical direction can be skipped. That is, if the current block is generated by a binary tree-based partition, it is possible to determine whether to skip the inverse transformation of the current block in at least one direction, either horizontally or vertically, without encoding / decoding information indicating whether to skip the inverse transformation of the current block (e.g., transform_skip_flag, hor_transform_skip_flag, ver_transform_skip_flag).
[0257] Although the above embodiments have been described based on a series of steps or flowcharts, they do not limit the temporal order of the invention and can be executed simultaneously or in different orders as needed. Furthermore, each of the components (e.g., units, modules, etc.) constituting the block diagrams in the above embodiments can be implemented by hardware devices or software and multiple components. Alternatively, multiple components can be combined and implemented by a single hardware device or software. The above embodiments can be implemented in the form of program instructions, which can be executed by various computer components and recorded in a computer-readable recording medium. A computer-readable recording medium can include one or a combination of program commands, data files, data structures, etc. Examples of computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as optical-magnetic floppy disks; media; and hardware devices specifically configured to store and execute program instructions, such as ROMs, RAMs, flash memory, etc. Hardware devices can be configured to operate as one or more software modules to perform the processing according to the invention, and vice versa.
[0258] Industrial application
[0259] This invention can be applied to electronic devices capable of encoding / decoding video.
[0260] This technology can also be configured as follows.
[0261] (1) A method for decoding video, the method comprising:
[0262] Determine whether to use a quadtree partition to divide the current block; and
[0263] If it is determined that the current block will be partitioned using the quadtree partitioning method, the current block will be divided into four partitions based on vertical and horizontal lines.
[0264] The current block is divided asymmetrically by at least one of the vertical line and the horizontal line.
[0265] (2) The method according to (1), wherein the method comprises:
[0266] Decoding a first indicator that indicates whether at least one of the vertical or horizontal lines is used for asymmetric division; and
[0267] When the first indicator indicates that the vertical line or the horizontal line is used for the asymmetric division, the second indicator specifying the position of the vertical line or the horizontal line is decoded.
[0268] (3) According to the method of (1), the current block is divided into four partitions by two horizontal lines and one vertical line, wherein the vertical line divides one of the three blocks divided by the two horizontal lines, or the current block is divided into four partitions by two vertical lines and one horizontal line, wherein the horizontal line divides one of the three blocks divided by the two vertical lines.
[0269] (4) The method according to (1), wherein the method comprises:
[0270] If it is determined that the quadtree partitioning should not be used to segment the current block, determine whether to use binary tree partitioning to segment the current block; and
[0271] If it is determined that the current block is to be partitioned using the binary tree partition, the current block is partitioned into two partitions.
[0272] (5) The method according to (4), wherein the method further comprises: determining whether to apply a polygonal binary tree partition to the current block, and
[0273] Specifically, when the polygonal binary tree partitioning is applied to the current block, the current block is divided into rectangular partitions and polygonal partitions.
[0274] (6) According to the method of (5), wherein the division of the polygon shape is divided into sub-divisions of rectangular shapes, and a prediction of the division of the polygon shape is performed for each sub-division.
[0275] (7) The method according to (4), wherein the current block is divided by dividing the current block into two dividing vertical or horizontal lines, and the vertical or horizontal lines divide the current block asymmetrically.
[0276] (8) A method for encoding video, the method comprising:
[0277] Determine whether to use a quadtree partition to divide the current block; and
[0278] If it is determined that the current block will be partitioned using the quadtree partitioning method, the current block will be divided into four partitions based on vertical and horizontal lines.
[0279] The current block is divided asymmetrically by at least one of the vertical line and the horizontal line.
[0280] (9) The method according to (8), wherein the method comprises:
[0281] Encoding a first indicator that indicates whether at least one of the vertical or horizontal lines is used for asymmetric division; and
[0282] When the first indicator indicates that the vertical line or the horizontal line is used for the asymmetric division, the second indicator specifying the position of the vertical line or the horizontal line is encoded.
[0283] (10) According to the method of (8), the current block is divided into four partitions by two horizontal lines and one vertical line, wherein the vertical line divides one of the three blocks divided by the two horizontal lines, or the current block is divided into four partitions by two vertical lines and one horizontal line, wherein the horizontal line divides one of the three blocks divided by the two vertical lines.
[0284] (11) The method according to (8), wherein the method comprises:
[0285] If it is determined that the quadtree partitioning should not be used to segment the current block, determine whether to use binary tree partitioning to segment the current block; and
[0286] If it is determined that the current block is to be partitioned using the binary tree partition, the current block is partitioned into two partitions.
[0287] (12) According to the method of (11), wherein the method further comprises: determining whether to apply a polygonal binary tree partition to the current block, and
[0288] Specifically, when the polygonal binary tree partitioning is applied to the current block, the current block is divided into rectangular partitions and polygonal partitions.
[0289] (13) According to the method of (12), wherein the division of the polygon shape is divided into sub-divisions of rectangular shapes, and a prediction of the division of the polygon shape is performed for each sub-division.
[0290] (14) The method according to (11), wherein the current block is divided by dividing the current block into two dividing vertical or horizontal lines, and the vertical or horizontal lines divide the current block asymmetrically.
[0291] (15) An apparatus for decoding video, the apparatus comprising:
[0292] The image segmentation unit is used to: determine whether to use quadtree partitioning to segment the current block, and if it is determined that the current block should be segmented using the quadtree partitioning, to segment the current block into four partitions based on vertical and horizontal lines.
[0293] The current block is divided asymmetrically by at least one of the vertical line and the horizontal line.
Claims
1. A method for decoding an image using a decoding device, the method comprising: Using the decoding device, the parent coding block is segmented according to a tree-based partition to determine the current block, wherein the tree-based partition includes a triple asymmetric quadtree partition; The decoding device is used to determine reference samples for intra-frame prediction of the current block; Using the decoding device, a predicted block for the current block is generated based on the reference sample; as well as Using the decoding device, the reconstructed block of the current block is obtained based on the predicted block. Specifically, when it is determined that the triple asymmetric quadtree partitioning is used to segment the parent coding block, the parent coding block is divided into four sub-coding blocks. Of the four sub-coding blocks, two have the same shape as the parent coding block. Among them, the other two sub-coding blocks of the four sub-coding blocks have shapes different from the shape of the parent coding block, and Among them, the two sub-coding blocks that have the same shape as the parent coding block are located between the other two sub-coding blocks.
2. The method according to claim 1, wherein, The width and height of each of the two child coding blocks having the same shape as the parent coding block are respectively half the width and half the height of the parent coding block. In each of the remaining two sub-coding blocks, one of the width and height is equal to the corresponding width and height of the parent coding block, and the other of the width and height is equal to 1 / 4 of the corresponding width and height of the parent coding block.
3. A method for encoding an image using an encoding device, the method comprising: Using the encoding device, the parent encoding block is segmented according to tree-based segmentation to determine the current block, wherein the tree-based segmentation includes triple asymmetric quadtree partitioning; The coding device is used to determine reference samples for intra-frame prediction of the current block; Using the encoding device, a residual block for the current block is generated based on the prediction block of the current block, wherein the prediction block is generated based on the reference sample; as well as The encoding device is used to encode the coefficients generated by performing a transformation on the residual block. Specifically, when it is determined that the triple asymmetric quadtree partitioning is used to segment the parent coding block, the parent coding block is divided into four sub-coding blocks. Of the four sub-coding blocks, two have the same shape as the parent coding block. Among them, the other two sub-coding blocks of the four sub-coding blocks have shapes different from the shape of the parent coding block, and Among them, the two sub-coding blocks that have the same shape as the parent coding block are located between the other two sub-coding blocks.
4. A method for transmitting compressed video data, comprising: Generate the compressed video data, Transmit the compressed video data; The generation of the compressed video data includes: The parent coding block is segmented according to a tree-based partition to determine the current block, wherein the tree-based partition includes a triple asymmetric quadtree partition; Determine reference samples for intra-frame prediction of the current block; Generate a residual block for the current block based on the predicted block of the current block, wherein the predicted block is generated based on the reference sample; and The coefficients generated by performing the transformation on the residual block are encoded. Specifically, when it is determined that the triple asymmetric quadtree partitioning is used to segment the parent coding block, the parent coding block is divided into four sub-coding blocks. Of the four sub-coding blocks, two have the same shape as the parent coding block. Among them, the other two sub-coding blocks of the four sub-coding blocks have shapes different from the shape of the parent coding block, and Among them, the two sub-coding blocks that have the same shape as the parent coding block are located between the other two sub-coding blocks.