Image decoding apparatus, image encoding apparatus, and apparatus for transmitting bitstream

By dividing the image into blocks and optimizing the multi-frame intra-prediction mode, the problem of low compression efficiency in image encoding/decoding is solved, and a more efficient image compression effect is achieved.

CN117499649BActive Publication Date: 2026-11-20KONINKLIJKE PHILIPS NV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311469935.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2016-04-29
Filing Date
2017-04-28
Publication Date
2026-11-20
Estimated Expiration
2037-04-28

AI Technical Summary

Technical Problem

Existing technologies have low compression efficiency in image encoding/decoding, especially in the encoding/decoding of intra-frame prediction modes, where they have failed to effectively improve efficiency.

Method used

By dividing the current decoding/encoding block into two parts of symmetrical or asymmetrical shape, and utilizing multiple candidates of intra-prediction modes, the most likely mode of the current block is determined. Combining linear or diagonal partitioning, the encoding/decoding process of the intra-prediction mode is optimized.

Benefits of technology

It improves image compression efficiency, enhances the encoding/decoding effect of intra-frame prediction mode, and improves the overall encoding/decoding performance of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117499649B_ABST
    Figure CN117499649B_ABST
Patent Text Reader

Abstract

An image decoding apparatus, an image encoding apparatus, and an apparatus for transmitting a bitstream are disclosed. The image decoding apparatus includes a memory; and at least one processor connected to the memory, the at least one processor configured to determine an intra prediction mode of a current block; generate a prediction block of the current block based on the intra prediction mode; and reconstruct the current block based on the prediction block, wherein the intra prediction mode of the current block is determined differently based on size information of the current block, wherein the size information of the current block is a ratio of a width and a height of the current block, and wherein a number of horizontal direction intra prediction modes or a number of vertical direction intra prediction modes that can be applied to the current block are determined differently based on the ratio.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of Chinese patent application filed on December 28, 2018, with application number 201780040684.X and entitled "Method and Apparatus for Encoding / Decoding Video Signals". The international filing date of the parent application is April 28, 2017, and the international application number is PCT / KR2017 / 004571. Technical Field

[0002] This invention relates to methods and apparatus for encoding / decoding video signals. Background Technology

[0003] Recently, the demand for multimedia data (such as video) on the Internet has increased rapidly. However, the bandwidth of channels is struggling to keep up with the rapidly increasing volume of multimedia data. Summary of the Invention

[0004] Technical issues When encoding / decoding images, this invention aims to enhance image compression efficiency by effectively encoding / decoding the partitioning method of the target block.

[0005] When encoding / decoding images, this invention aims to enhance image compression efficiency by effectively encoding / decoding intra-frame prediction mode information of the target block.

[0006] When encoding / decoding images, this invention aims to enhance image compression efficiency by using multiple intra-frame prediction modes.

[0007] Technical solution According to the present invention, a method and apparatus for decoding video signals are provided. The method includes: decoding partitioning information indicating whether a current decoded block is divided into two partial blocks; when the partitioning information indicates that the current decoded block is divided into two partial blocks, decoding information indicating the partitioning direction of the current decoded block; and dividing the current decoded block into two partial blocks according to the partitioning direction. Here, the partitioning information includes at least one of SBT partitioning information and ASBT partitioning information, wherein the SBT partitioning information indicates whether the current decoded block is divided into two symmetrically shaped partial blocks, and the ASBT partitioning information indicates whether the current decoded block is divided into two asymmetrically shaped partial blocks.

[0008] In the method and apparatus for decoding video signals according to the present invention, the division of direction can indicate one of the horizontal direction and the vertical direction.

[0009] In the method and apparatus for decoding video signals according to the present invention, the method may further include: determining the most probable mode (MPM) candidate of the current decoding block based on the intra prediction modes of neighboring blocks close to the current decoding block; decoding information indicating whether there is an MPM candidate that is the same as the intra prediction mode of the current decoding block; and deriving the intra prediction mode of the current decoding block based on the information.

[0010] In the method and apparatus for decoding video signals according to the present invention, the number of intra-prediction modes available for the current decoding block can be variably determined based on the size and shape of the current decoding block or the intra-prediction modes of adjacent blocks.

[0011] In the method and apparatus for decoding video signals according to the present invention, MPM candidates can be determined based on the frequency of use of intra-prediction modes in adjacent blocks.

[0012] In the method and apparatus for decoding video signals according to the present invention, when the number of intra-prediction modes available for the current decoding block is different from the number of intra-prediction modes available for adjacent blocks, the MPM candidate can indicate the angle of the intra-prediction mode.

[0013] According to the present invention, a method and apparatus for decoding a video signal are provided. The method includes: decoding information indicating whether a plurality of intra-frame prediction modes are used for a current decoding block; when it is determined that the plurality of intra-frame prediction modes are used, decoding information indicating the partition shape of the current decoding block; and decoding information regarding the intra-frame prediction modes of a portion of the blocks included in the current decoding block.

[0014] In the method and apparatus for decoding video signals according to the present invention, information about the intra-prediction mode of a partial block may include combination index information indicating a combination of intra-prediction modes of the partial block.

[0015] In the method and apparatus for decoding video signals according to the present invention, the current decoding block can be divided based on dividing lines that are straight lines or diagonals.

[0016] According to the present invention, a method and apparatus for encoding a video signal are provided. The method includes: encoding partitioning information indicating whether a current coding block is divided into two partial blocks; and encoding information indicating the partitioning direction of the current coding block when the partitioning information indicates that the current coding block is divided into two partial blocks. Here, the partitioning information includes at least one of SBT partitioning information and ASBT partitioning information, wherein the SBT partitioning information indicates whether the current coding block is divided into two partial blocks of symmetrical shape, and the ASBT partitioning information indicates whether the current coding block is divided into two partial blocks of asymmetrical shape.

[0017] In the method and apparatus for encoding video signals according to the present invention, the division direction can indicate one of the horizontal and vertical directions.

[0018] In the method and apparatus for encoding video signals according to the present invention, the method may further include: determining the most probable mode (MPM) candidate of the current coding block based on the intra prediction modes of neighboring blocks close to the current coding block; determining whether the intra prediction mode of the current coding block is the same as the MPM candidate; and encoding information indicating whether there is an MPM candidate that is the same as the intra prediction mode of the current coding block.

[0019] In the method and apparatus for encoding video signals according to the present invention, the most probable mode (MPM) candidate of the current coding block is determined based on the intra prediction modes of neighboring blocks close to the current coding block; it is determined whether the intra prediction mode of the current coding block is the same as the MPM candidate; and information indicating whether there is an MPM candidate that is the same as the intra prediction mode of the current coding block is encoded.

[0020] In the method and apparatus for encoding video signals according to the present invention, MPM candidates can be determined based on the frequency of use of intra-prediction modes in adjacent blocks.

[0021] In the method and apparatus for encoding video signals according to the present invention, when the current coding block is different from the number of intra-prediction modes available for adjacent blocks, the MPM candidate can indicate the angle of the intra-prediction mode.

[0022] According to the present invention, a method and apparatus for encoding video signals are provided. The method includes: encoding information indicating whether multiple intra-prediction modes are used for a current coding block; when it is determined that multiple intra-prediction modes are used, encoding information indicating the partition shape of the current coding block; and encoding information regarding the intra-prediction modes of portions of the current coding block.

[0023] In the method and apparatus for encoding video signals according to the present invention, information regarding the intra-prediction mode of a partial block may include combination index information indicating a combination of intra-prediction modes of the partial block.

[0024] In the method and apparatus for encoding video signals according to the present invention, the current encoding block can be divided based on dividing lines that are straight lines or diagonals.

[0025] Beneficial effects According to the present invention, the compression efficiency of an image can be enhanced by effectively encoding / decoding the partitioning method of the target block.

[0026] According to the present invention, the compression efficiency of an image can be enhanced by effectively encoding / decoding the intra-frame prediction mode information of the target block.

[0027] According to the present invention, the compression efficiency of an image can be enhanced by using multiple intra-frame prediction modes. Attached Figure Description

[0028] Figure 1 This is a block diagram illustrating an apparatus for encoding images according to an embodiment of the present invention.

[0029] Figure 2 This is a block diagram illustrating an apparatus for decoding images according to an embodiment of the present invention.

[0030] Figure 3 This is a diagram illustrating the intra-frame prediction method using DC mode.

[0031] Figure 4 This is a diagram illustrating an intra-frame prediction method using a planar mode.

[0032] Figure 5 This is a diagram illustrating an intra-frame prediction method using a direction prediction mode.

[0033] Figure 6 This is a diagram illustrating a method for encoding QT partition information of a coding block.

[0034] Figure 7 This diagram illustrates a method for encoding the BT partitioning information of a coded block.

[0035] Figure 8 This is a diagram illustrating the method for decoding QT partitioning information used to decode blocks.

[0036] Figure 9 This is a diagram illustrating the method for decoding the BT partitioning information used to decode blocks.

[0037] Figure 10 This is a diagram illustrating an example of the partitioning states in a coded block.

[0038] Figure 11 This shows the use of a tree structure. Figure 10 The diagram shows the optimal partitioning state of the input coded block.

[0039] Figure 12 It is a flowchart illustrating the process by which the number or type of prediction patterns is controlled by a device used for encoding.

[0040] Figure 13 and 14 This is a diagram showing an example of the 13 directional prediction modes available in the current coding block.

[0041] Figure 15 and 16 This is a diagram showing an example of the 21 directional prediction modes available in the current block.

[0042] Figure 17 This is a flowchart illustrating the process of encoding the optimal intra-prediction mode for the current coding block.

[0043] Figure 18 This is a diagram showing an example of setting up MPM candidates.

[0044] Figure 19 and 20 This is a diagram illustrating an example of a quantitative prediction perspective.

[0045] Figure 21 This is a diagram illustrating an example of deriving MPM candidates from neighboring blocks that are not adjacent to the current coded block.

[0046] Figure 22 This is a flowchart illustrating the process of decoding the intra-prediction mode of the current decoded block.

[0047] Figure 23 This is a diagram illustrating an example of determining the optimal partition shape for the current coded block.

[0048] Figure 24 This is a diagram showing an example of a partition shape that can be used for the current coded block.

[0049] Figure 25 This is a diagram illustrating an example of overlapping regions based on the partition shape of the current coded block.

[0050] Figure 26 This is a flowchart illustrating a method for encoding multiple intra-prediction modes of the current coding block.

[0051] Figure 27 This is a diagram showing an example of generating combinations.

[0052] Figure 28 This is a flowchart illustrating a method for decoding multiple intra-prediction modes of the current coded block.

[0053] Figure 29 This is another flowchart illustrating the process of encoding multiple intra-frame prediction modes.

[0054] Figure 30 This is a diagram illustrating an example of reassigning an index to an intra-prediction mode that can be used for a sub-prediction block.

[0055] Figure 31 This is another flowchart illustrating the process of decoding multiple intra-frame prediction modes. Detailed Implementation

[0056] Various modifications can be made to this invention, and various embodiments of the invention exist, examples of which will now be provided and described in detail with reference to the accompanying drawings. However, the invention is not limited thereto, and exemplary embodiments may be interpreted as including all modifications, equivalents, or substitutions within the technical concept and scope of the invention. Similar reference numerals denote similar elements described in the drawings.

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

[0058] It should be understood that 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 in this specification, it can mean "directly connected to" or "directly coupled to" another element, or connected to or coupled to another element with another element inserted therebetween. Conversely, it should be understood that when an element is referred to as "directly coupled to" or "directly connected to" another element, there is no intermediate element.

[0059] The terminology used in this specification is for describing particular embodiments only and is not intended to limit the invention. Unless the context clearly distinguishes them, expressions used in the singular include plural expressions. 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 the specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, numbers, steps, actions, elements, portions, or combinations thereof.

[0060] Preferred embodiments of the invention will be described in detail below with reference to the accompanying drawings. In the drawings, the same elements are designated by the same reference numerals, and repeated descriptions of the same elements will be omitted.

[0061] Figure 1 This is a block diagram illustrating an apparatus for encoding images according to an embodiment of the present invention.

[0062] Reference Figure 1 The apparatus 100 for encoding images 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 encoding module 165, an inverse quantization module 140, an inverse transformation module 145, a filter module 150, and a memory 155.

[0063] Figure 1 The components shown are illustrated independently to represent characteristic functions that differ from each other in an apparatus for encoding images. Therefore, it is not implied that each component constitutes a separate unit of hardware or software. In other words, for convenience, each component includes each of the listed components. Thus, at least two components of each type can be combined to form a single component, or a single component can be divided into multiple components to perform each function. Embodiments combining each component and embodiments dividing a single component are also included within the scope of this invention without departing from its spirit.

[0064] Furthermore, some components may not be essential for performing the basic functions of the invention, but rather selective components that only improve its performance. In addition to components used to improve performance, the invention can be implemented by including only the essential components necessary to achieve the essence of the invention. Structures that include only essential components, in addition to selective components used only to improve performance, are also included within the scope of the invention.

[0065] Image segmentation module 110 can divide an input image into one or more blocks. Here, a block can represent a coding unit (CU), a prediction unit (PU), or a transform unit (TU). Segmentation can be performed based on a quadtree, a binary tree, or both. A quadtree is a method of dividing a higher-level block into four lower-level blocks, each with a width and height half that of the higher-level block. A binary tree is a method of dividing a higher-level block into two lower-level blocks, each with a width or height half that of the higher-level block. Through binary tree-based segmentation, blocks can be square or non-square.

[0066] In the following, in embodiments of the present invention, an encoding unit may refer to a unit that performs encoding or a unit that performs decoding.

[0067] Prediction modules 120 and 125 may include an inter-frame prediction module 120 that performs inter-frame prediction and an intra-frame prediction module 125 that performs intra-frame prediction. It can be determined whether to perform inter-frame prediction or intra-frame prediction for prediction, and details based on each prediction method (e.g., intra-frame prediction mode, motion vector, reference image, etc.) can be determined. Here, the processing unit undergoing prediction may differ 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 transformation unit.

[0068] The encoding apparatus can determine the optimal prediction mode for the encoded block using various techniques such as rate-distortion optimization (RDO) for residual blocks without original and predicted blocks. For example, RDO can be determined by Equation 1 below.

[0069] [Equation 1] In Equation 1, D represents the degradation due to quantization, R represents the rate of the compressed stream, and J represents the RD cost. Furthermore, Φ represents the encoding mode, and λ represents the Lagrange multiplier. Λ can be used as a scaling factor to match the unit between the error amount and the bit amount. In the encoding process, the encoding apparatus can determine the optimal mode for the encoding block as the mode where the RD cost value is minimized. Here, the RD cost value is determined by simultaneously considering the bit rate and the error.

[0070] In intra-frame mode, DC mode, which is a non-directional prediction mode (or non-angle prediction mode), uses the average value of the neighboring pixels of the current block. Figure 3 This is a diagram illustrating the intra-frame prediction method using DC mode.

[0071] After filling the prediction block with the average of neighboring pixels, filtering can be performed on pixels located at the boundaries of the prediction block. For example, a weighted sum filter using neighboring reference pixels can be applied to pixels located at the left or top boundary of the prediction block. For example, Equation 2 is an example of generating prediction pixels for each section using DC mode. In Equation 1 below, regions R1, R2, and R3 are the outermost (i.e., boundary) regions of the prediction block, and a weighted sum filter can be applied to pixels included in these regions.

[0072] [Equation 2] In Equation 2, Wid represents the horizontal length of the prediction block, and Hei represents the vertical length of the prediction block. x, y represent the coordinates of each predicted pixel when the top-left point of the prediction block is set to (0,0). R represents adjacent pixels. For example, when Figure 3 When pixel s is defined as R[-1][-1], pixels a to i are represented by R[0][-1] to R[8][-1], and pixels j to r are represented by R[-1][0] to R[-1][8]. Figure 3 In the example shown, as shown in Equation 2, the predicted pixel value Pred is obtained for each of the portions R1 to R4 according to the weighted sum filtering method.

[0073] In the planar mode within the non-directional mode, neighboring pixels of the current block are linearly interpolated based on distance, and the predicted pixels for the current block are generated. For example, Figure 4 This is a diagram illustrating an intra-frame prediction method using a planar mode.

[0074] For example, suppose Figure 4The Pred shown is predicted in an 8×8 coded block. In this case, the vertical predicted value can be obtained by linear interpolation based on the distance between pixel e above Pred and pixel r below Pred (which is a copy of pixel r to the lower left of Pred). Similarly, the horizontal predicted value can be obtained by linear interpolation based on the distance between pixel n to the left of Pred and pixel i to the right of Pred (which is a copy of pixel i to the upper right of Pred). The average of the horizontal and vertical predicted values ​​can then be defined as the value of Pred. Equation 3 illustrates the process of obtaining the predicted value Pred in planar mode.

[0075] [Equation 3] In Equation 3, Wid represents the horizontal length of the prediction block, and Hei represents the vertical length of the prediction block. x, y represent the coordinates of each predicted pixel when the top-left point of the prediction block is set to (0,0). R represents adjacent pixels. For example, when Figure 4 When pixel s is defined as R[-1][-1], pixels a to i are represented by R[0][-1] to R[8][-1], and pixels j to r are represented by R[-1][0] to R[-1][8].

[0076] Figure 5 This is a diagram illustrating an intra-frame prediction method using a direction prediction mode.

[0077] In the direction prediction mode (or angle prediction mode), at least one pixel located in one of N predetermined directions is generated as a prediction sample among the neighboring pixels of the current block.

[0078] Examples of direction prediction patterns can include horizontal and vertical patterns. Here, a horizontal pattern means a pattern with greater horizontal directivity than a 45-degree angle prediction pattern pointing to the upper left. A vertical pattern means a pattern with greater vertical directivity than a 45-degree angle prediction pattern pointing to the upper left. A direction prediction pattern with a 45-degree prediction direction pointing to the upper left can be considered either a horizontal or vertical pattern. Figure 5 The horizontal and vertical modes are shown.

[0079] Reference Figure 5For each direction, there exists a direction that does not correspond to an integer pixel portion. In this case, after performing interpolation using various interpolation methods, such as linear interpolation based on the distance between adjacent pixels, DCT-IF method, cubic convolution interpolation method, etc., the pixel value can be placed at the pixel position corresponding to the prediction block direction.

[0080] The residual values ​​(residual blocks or transform blocks) between the generated prediction blocks and the original blocks can be input into the transform module 130. The residual block is the smallest unit used in the transform and quantization process. The method of dividing the encoded blocks can also be applied to the transform blocks. For example, the transform block can be divided into four or two partial blocks.

[0081] Prediction mode information, motion vector information, etc., used for prediction can be encoded by entropy encoding module 165 using residual values ​​and can be sent to the decoding device. When a specific encoding mode is used, the original block is encoded as is and sent to the decoding module, instead of prediction blocks being generated by prediction modules 120 and 125.

[0082] The inter-frame prediction module 120 can predict prediction units based on information about at least one of the previous and subsequent images of the current image, or in some cases, it can predict prediction units based on information about certain 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.

[0083] The reference image interpolation module can receive reference image information from memory 155 and can generate pixel information of integer pixels or smaller from the reference image. In the case of luminance pixels, an interpolation filter based on an 8-tap DCT with different coefficients can be used to generate pixel information about integer pixels or smaller based on each 1 / 4 pixel. In the case of chrominance signals, an interpolation filter based on a 4-tap DCT with different filter coefficients can be used to generate pixel information about integer pixels or smaller based on each 1 / 8 pixel.

[0084] 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 the full-search-based block matching algorithm (FBMA), the three-step search (TSS) algorithm, and the novel three-step search (NTS) algorithm. Based on interpolated pixels, the motion vector can have motion vector values ​​based on every 1 / 2 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, and the Advanced Motion Vector Prediction (AMVP) method.

[0085] The means for encoding can generate motion information about the current block based on motion estimation or motion information on the closed block. Here, the motion information may include at least one of motion vectors, reference image indexes, and predicted directions.

[0086] The intra-frame prediction module 125 can generate prediction units based on reference pixel information surrounding the current block, which is pixel information in the current image. When the neighboring block of the current prediction unit is a block undergoing inter-frame prediction and therefore the reference pixel is a pixel undergoing inter-frame prediction, the reference pixel information of the neighboring block undergoing intra-frame prediction is used instead of the reference pixel included in the block undergoing inter-frame prediction. That is, when the reference pixel is unavailable, at least one reference pixel of available reference pixels is used instead of the unavailable reference pixel information.

[0087] Intra-frame prediction can include directional prediction modes that use reference pixel information that depends on the prediction direction and non-directional modes that do not use direction information when performing prediction. The mode used to predict luminance information can be different from the mode used to predict chrominance information, and intra-frame prediction mode information used to predict luminance information or predicted luminance signal information can be utilized to predict chrominance information.

[0088] In intra-prediction methods, prediction blocks can be generated after applying an adaptive intra-smoothing (AIS) filter to a reference pixel based on the prediction mode. The type of AIS filter applied to the reference pixel can vary. To perform intra-prediction, the intra-prediction mode of the current prediction unit can be predicted from the intra-prediction modes of prediction units surrounding it. When predicting the prediction mode of the current prediction unit using mode information predicted from neighboring prediction units, if the intra-prediction mode of the current prediction unit is the same as that of neighboring prediction units, information indicating that the current prediction unit and neighboring prediction units have the same prediction mode is sent using predetermined flag information. If the prediction mode of the current prediction unit is different from that of neighboring prediction units, entropy coding is performed to encode the prediction mode information of the current block.

[0089] Furthermore, residual blocks can be generated based on the prediction units generated by prediction modules 120 and 125. These residual blocks include information about residual values, which are the differences between the predicted prediction units and the original blocks of the predicted units. The generated residual blocks can be input to transformation module 130.

[0090] Transform module 130 transforms the residual signal to the frequency domain to generate a residual block (or transform block) with transform coefficients. Various transform techniques, such as Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), and Karhunen-Loeve Transform (KLT), can be used to transform the residual signal to the frequency domain. To facilitate the use of transform techniques, matrix operations are performed using basis vectors. Depending on the prediction mode used to encode the prediction block, transform techniques can be combined differently to perform matrix operations. For example, when performing intra-frame prediction, depending on the prediction mode, Discrete Cosine Transform can be used for the horizontal direction, and Discrete Sine Transform can be used for the vertical direction.

[0091] Quantization module 135 quantizes the values ​​transformed into the frequency domain by transformation module 130. That is, quantization module 135 quantizes the transform coefficients of the transform block generated by transformation module 130, enabling the generation of a quantized transform block with quantized transform coefficients. Examples of quantization techniques may include dead-zone uniform threshold quantization (DZUTQ), quantization weighting matrices, etc. Improved quantization techniques can also be used to enhance these techniques. The quantization coefficients can vary depending on the blocks or importance of the image. The values ​​calculated by quantization module 135 can be provided to inverse quantization module 140 and rearrangement module 160.

[0092] Transformation module 130 and / or quantization module 135 may optionally be included in the means 100 for encoding an image. That is, the means 100 for encoding an image may encode the residual block by performing at least one of transformation and quantization on the residual data of the residual block, or by skipping transformation and quantization. Even if the means 100 for encoding an image does not perform one of transformation and quantization, or does not perform both transformation and quantization, the block input to the entropy encoding module 165 is generally referred to as a transformed block (or a quantized transformed block).

[0093] The rearrangement module 160 can rearrange the coefficient values ​​with respect to the quantized residual values.

[0094] 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 predetermined scan type to scan from DC coefficients to coefficients in the high-frequency domain in order to transform the coefficients into one-dimensional vector form.

[0095] 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).

[0096] The entropy coding module 165 can encode various types of information, such as residual coefficient information and block type information, prediction mode information, partitioning unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information from the coding units of the rearrangement module 160 and prediction modules 120 and 125. The entropy coding module 165 can encode the coefficients of the transform block into various types of flags indicating non-zero coefficients, coefficients with absolute values ​​greater than 1 or 2, and the sign of the coefficients, based on each partial block. Coefficients not encoded in the aforementioned flags can be encoded using the absolute value of the difference between the coefficients encoded by the flags and the actual coefficients of the transform block.

[0097] The entropy coding module 165 can entropy code the coefficient values ​​of the coding units input from the rearrangement module 160.

[0098] The inverse quantization module 140 can perform inverse quantization on the value quantized by the quantization module 135, and the inverse transformation module 145 can perform inverse transformation on the value transformed by the transformation module 130.

[0099] Simultaneously, the inverse quantization module 140 and the inverse transform module 145 can perform inverse quantization and inverse transform respectively by reversing the quantization and transform methods used in the quantization module 135 and the transform module 130. Furthermore, when only quantization is performed by the quantization module 135 and the transform is not performed by the transform module 130, only inverse quantization is performed and no inverse transform is performed. When neither transform nor quantization is performed, the inverse quantization module 140 and the inverse transform module 145 do not perform inverse transform and inverse quantization, or are not included in the apparatus 100 for encoding images.

[0100] The residual values ​​generated by the inverse quantization module 140 and the inverse transform module 145 can be combined with prediction units predicted by the motion estimation module, motion compensation module and intra-frame prediction module included in prediction modules 120 and 125 to generate a reconstruction block.

[0101] The filter module 150 may include at least one of a deblocking filter, an offset correction module, and an adaptive loop filter (ALF).

[0102] Deblocking filters remove block distortion caused by boundaries between blocks in a reconstructed image. To determine whether to perform deblocking, the number of pixels included in several rows and columns within the block can be used to decide whether to apply a deblocking filter to the current block. When applying a deblocking filter to a block, a strong or weak filter is applied depending on the desired deblocking intensity. Furthermore, when applying deblocking filters, horizontal and vertical filtering are configured to be processed in parallel.

[0103] The offset correction module can correct the offset from the original image on a pixel-by-pixel basis relative to the image that has undergone deblocking. To perform offset correction on a specific image, methods are used such as dividing the image's pixels into a predetermined number of regions, determining the regions to be offset, and applying the offset to the determined regions, or applying the offset considering the edge information of each pixel.

[0104] Adaptive Loop Filtering (ALF) can be performed based on values ​​obtained by comparing the reconstructed image obtained through filtering 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 regarding whether to apply ALF and the luminance signal can be sent to each coding unit (CU). The form and filter coefficients of the ALF filter to be applied can vary according to each block. Furthermore, the same form (fixed form) of the ALF filter can be applied regardless of the characteristics of the target block.

[0105] The memory 155 can store reconstructed blocks of the image calculated by the filter module 150. The stored reconstructed blocks or images can be provided to the prediction modules 120 and 125 during inter-frame prediction.

[0106] Figure 2 This is a block diagram illustrating an apparatus for decoding images according to an embodiment of the present invention.

[0107] refer to Figure 2 The device 200 for the decoding apparatus 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.

[0108] When an image bitstream is input from a device for encoding an image, the input bitstream is decoded according to the reverse process of the device for encoding an image.

[0109] The entropy decoding module 210 can perform entropy decoding according to the inverse process of the entropy encoding module of the apparatus for encoding images. For example, various methods can be applied corresponding to the method performed by the apparatus for encoding images, such as exponential Golomb coding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy decoding module 210 can decode the coefficients of the transform block based on each sub-block in the transform block based on various types of flags indicating non-zero coefficients, coefficients whose absolute value is greater than one or two, the sign of the coefficients, etc. Coefficients not represented by the aforementioned flags can be decoded by the sum of the coefficients represented by the flags and the coefficients notified by the signal.

[0110] The entropy decoding module 210 can decode information about intra-frame prediction and inter-frame prediction performed by the means used for encoding.

[0111] The rearrangement module 215 can perform rearrangement on the bitstream entropy decoded by the entropy decoding module 210 based on the rearrangement method used in the encoding apparatus. Coefficients represented as one-dimensional vectors can be reconstructed and rearranged into coefficients in the form of two-dimensional blocks. The rearrangement module 215 can perform the rearrangement by receiving information related to the coefficient scan performed in the encoding apparatus and by a method of inverse scanning based on the scan order performed in the encoding apparatus.

[0112] The inverse quantization module 220 can perform inverse quantization based on the quantization parameters received from the encoding device and the coefficient values ​​of the block rearrangement.

[0113] The inverse transform module 225 can perform an inverse transform on the transform coefficients that have undergone inverse quantization using a predetermined transform method. Here, the transform method can be determined based on information about the prediction method (inter-frame / intra-frame prediction), block size / shape, intra-frame prediction mode, etc.

[0114] Prediction modules 230 and 235 can generate prediction blocks based on information received from entropy decoding module 210 regarding the generation of prediction blocks and information about previously decoded blocks or images received from memory 245.

[0115] 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 may 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 may separate prediction units in the current coding unit and determine whether to perform inter-frame prediction or intra-frame prediction on the prediction unit. Using the information required for inter-frame prediction of the current prediction unit received from the means for encoding the image, the inter-frame prediction module 230 may perform inter-frame prediction on the current prediction unit based on information about at least one of the previous and subsequent images that include the current prediction unit. Alternatively, inter-frame prediction may be performed based on information about some pre-reconstructed regions in the current image that includes the current prediction unit.

[0116] To perform inter-frame prediction, based on the coding unit, it can be determined which of the skip mode, merge mode, and AMVP mode will be used as the motion prediction method for the prediction units included in the coding unit.

[0117] Intra-prediction module 235 can generate prediction blocks based on pixel information in the current image. When the prediction unit is a prediction unit undergoing intra-prediction, intra-prediction is performed based on intra-prediction mode information of the prediction unit received from the means for encoding the image. 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. The prediction mode and AIS filter information of the prediction unit received from the means for encoding the image are used to perform AIS filtering on the reference pixels of the current block. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter is not applied.

[0118] When the prediction mode of the current prediction unit is one in which intra-frame prediction is performed based on pixel values ​​obtained by interpolating reference pixels, the reference pixel interpolation module can interpolate reference pixels to generate reference pixels in units of integer values ​​or smaller pixels. When the prediction mode of the current prediction unit is one in which a prediction block is generated without interpolated reference pixels, no reference pixels are interpolated. When the prediction mode of the current block is DC mode, the DC filter can generate the prediction block by filtering.

[0119] The reconstructed blocks or images can be provided to the filter module 240. The filter module 240 may include a deblocking filter, an offset correction module, and an ALF.

[0120] The means for encoding an image receives information about whether to apply a deblocking filter to a relevant block or image, and whether a strong or weak filter is applied when the deblocking filter is applied. The means for decoding an image receives information about the deblocking filter from the means for encoding the image, and the means for decoding the image can perform deblocking filtering on the relevant blocks.

[0121] The offset correction module can perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding, offset value information, etc.

[0122] The ALF can be applied to the coding unit based on information such as whether to apply the ALF received from the encoding device, and ALF coefficient information. The ALF information can be provided as included in a specific parameter set.

[0123] The memory 245 can store reconstructed images or blocks for use as reference images or reference blocks, and can provide the reconstructed images to the output module.

[0124] A coded block can be divided into one or more blocks. Specifically, the coded block can be divided into a maximum-size coded block to a minimum-size coded block based on quadtree partitioning, binary tree partitioning (or dual-tree partitioning), etc. Information about the maximum-size and minimum-size coded blocks, or information about the difference between the maximum-size and minimum-size coded blocks, can be signaled to the means used for decoding in the bitstream.

[0125] Quadtree (QT) partitioning is a method of dividing a coded block into four blocks. With QT partitioning, a coded block can be divided into four blocks, where the horizontal and vertical lengths are reduced by half. Information such as the maximum or minimum size of the coded block that can be QT partitioned, the number of QT partitions (or the maximum partition depth), the partition depth of the minimum-sized block, and the partition depth used in the maximum-sized coded block that can be QT partitioned or in the current coded block can be signaled via upper-layer headers. Examples of upper-layer headers here can include slice layers, image layers, sequence layers, video layers, etc.

[0126] Binary tree (BT) partitioning is a method of dividing a coded block into two blocks. BT partitioning allows a coded block to be divided into two blocks horizontally or vertically. For example, a coded block can be partitioned by BT into two blocks where the horizontal or vertical length is reduced by half, or into two blocks where the horizontal or vertical length is reduced by 3 / 4 and 1 / 4 respectively. As mentioned above, BT partitioning can represent a method of dividing coded blocks with a precision of 1 / N (N≥2). Information regarding the maximum or minimum size of the coded block that can be BT partitioned, the number of BT partitions (or the maximum partition depth), the partition depth of the minimum-sized block, the maximum depth for BT partitioning based on the maximum-sized coded block, and the available BT partition depth or precision for the current coded block, etc., can be signaled via upper-layer headers.

[0127] Examples of BT partitioning can include a symmetric binary tree (SBT) partition where the current block is divided into two blocks of symmetrical shape, and an asymmetric binary tree (ASBT) partition where the current block is divided into two blocks of asymmetrical shape. An SBT partition represents a partition shape using 1 / 2 precision, and with an SBT partition, the current block can be divided into two blocks of the same size. Conversely, an ASBT partition represents a partition shape using less than 1 / 2 precision (i.e., 1 / M, where M is an integer greater than 2), and with an ASBT partition, the current block can be divided into two blocks of different sizes. Based on the maximum size coded block, information such as the maximum depth of the SBT or ASBT partition, the available SBT or ASBT depth for the current coded block, the number of SBT or ASBT partitions (or the maximum partition depth), and the maximum or minimum size of the coded block that can be partitioned using SBT or ASBT can be signaled via the upper-layer header.

[0128] In the following text, for ease of description, it is assumed that QT partitioning indicates that the current encoding / decoding block is divided into four blocks and BT partitioning indicates that the current encoding / decoding block is divided into two blocks. Furthermore, it is assumed that SBT partitioning means that the current encoding / decoding block is divided into two blocks and the partition shape is symmetrical, and ASBT partitioning means that the partition shape is asymmetrical.

[0129] In the following sections, QT partitioning and BT partitioning will be described in detail with reference to the accompanying drawings. In the embodiments described later, the block that is the current encoding / decoding target is referred to as the current encoding block, the current decoding block, or the current block. Here, depending on the encoding / decoding process, the current encoding / decoding block may represent one of the following: an encoding block (or encoding unit), a prediction block (or prediction unit), a transform block (or transform unit), or a partial block.

[0130] Figure 6 This diagram illustrates a method for encoding QT partition information of a coded block. In this embodiment, the "current" coded block represents the target block for encoding at a specific time. For example, the current coded block may represent a block with a partition depth at which the current encoding is performed. For instance, when an input coded block is used for encoding, the first input coded block is considered the "current coded block." Subsequently, when partitioning coded blocks, the resulting block from the partition is considered the "current coded block" when encoding is performed on the blocks obtained from the partition.

[0131] When an input encoding block is input, in step S601 the input encoding block is regarded as the "current encoding block". The first input encoding block can represent the encoding block with the highest partition depth (i.e., the encoding block with a depth of zero) to be encoded.

[0132] In step S602, the encoding device can encode QT partitioning information about the current encoding block. Here, QT partitioning information indicates whether QT partitioning is performed on the current encoding block. When QT partitioning is performed on the current encoding block, the QT partitioning information is set to "true", and when QT partitioning is not performed on the current encoding block, the QT partitioning information is set to "false".

[0133] When it is determined in step S603 that QT partitioning is not performed on the current coding block, the QT partitioning process for the current coding block ends. Conversely, when it is determined in step S603 that QT partitioning is performed on the current coding block, in step S604, four partial blocks (or sub-blocks) included in the current coding block are generated through QT partitioning.

[0134] When the current coding block is divided into four partial blocks, one of the partial blocks included in the current coding block is set as the current partial block, and in step S605, the QT partitioning information of the current partial block is encoded according to the encoding order. Here, the encoding order of the partial blocks can be based on raster scanning, Z-scanning, etc., or it can be a predefined order. That is, the QT partitioning information of the partial blocks is encoded sequentially according to the encoding order of the partial blocks.

[0135] If it is determined in step S606 that QT partitioning is not performed on the current partial block, proceeding to steps S607 and S608. The QT partitioning process ends based on whether the current partial block is the last block in the current coding block and the last block in the input coding block. For example, when QT partitioning is not performed on the current partial block and the current partial block is the last block in both the current coding block and the input coding block, the QT partitioning process ends. Conversely, when the current partial block is not the last block in the current coding block, or when the current coding block is the last block in the current coding block but not the last block in the input coding block, in step S609, subsequent partial blocks are treated as the current partial block in the scan order, and the processing of encoding QT partitioning information is performed.

[0136] Conversely, when it is determined in step S606 that QT partitioning will be performed on the current partial block, the current partial block is set as the current coding block in step S610, and the newly set current coding block is divided into four partial blocks in step S604. When the newly set current coding block is divided into four partial blocks, the processing of encoding QT partitioning information is repeated for the four newly generated partial blocks in steps S605 to S610.

[0137] The encoding device can, based on the result of dividing the current encoding block, encode, via the upper-layer header, the maximum size of the encoding block that can be QT-divided, the depth of the encoding block that can be QT-divided, etc.

[0138] For subsequent coding blocks, the result of dividing the current coding block can be used to determine the maximum size of the coding block that can be divided using QT, the depth of the coding block in which the QT division occurs, and so on.

[0139] The encoding apparatus can use BT partitioning information to encode whether the current coding block is divided into two blocks. Here, the BT partitioning information can be information indicating whether the current coding block is divided into two blocks. When the current coding block is divided into two blocks, the encoding apparatus can also encode information indicating whether the partition shape is SBT or ASBT. Here, the information indicating the partition shape of the current coding block can be a single flag, but is not limited to this.

[0140] As another example, the encoding apparatus can use SBT partitioning information or ASBT partitioning information to indicate whether to perform SBT partitioning or ASBT partitioning on the current coded block. Here, SBT partitioning information indicates whether the current coded block is divided into two symmetrical blocks, and ASBT partitioning information indicates whether the current coded block is divided into two asymmetrical blocks.

[0141] Here, in Figure 7 In this context, it is assumed that BT partitioning information is used to encode whether the current coding block is divided into two blocks. Although not shown, SBT partitioning information or ASBT partitioning information can be used to encode whether the current coding block is divided into two blocks. When encoding SBT partitioning information or ASBT partitioning information, in Figure 7 In this context, BT partitioning or BT partitioning information is replaced with SBT / ASBT partitioning or SBT / ASBT partitioning information. For example, to determine whether to perform SBT partitioning on the current coding block, Figure 7 The BT information in the code can be replaced with SBT partition information. Furthermore, to determine whether to perform ASBT partitioning on the current coding block, Figure 7 The BT information in the data can also be replaced with ASBT partitioning information.

[0142] Figure 7 This diagram illustrates a method for encoding the BT partitioning information of a coded block.

[0143] When an input encoding block is input, it is treated as the "current encoding block" in step S701. The first input encoding block can represent the encoding block with the highest partition depth (i.e., the encoding block with a depth of zero) to be encoded.

[0144] In step S702, the encoding device can encode the BT partitioning information of the current encoding block. Here, the BT partitioning information indicates whether to perform BT partitioning on the current encoding block. When BT partitioning is performed on the current encoding block, the BT partitioning information is set to "true", and when BT partitioning is not performed on the current encoding block, the BT partitioning information is set to "false".

[0145] When encoding SBT partitioning information, the encoding device sets the value of the SBT partitioning information based on whether SBT partitioning is performed on the current coded block. For example, when the current coded block is divided into two symmetrical blocks, the SBT partitioning information is set to "true". Conversely, when the current coded block is not divided into two blocks or is divided into an asymmetrical shape, the SBT partitioning information is set to "false".

[0146] Similarly, when encoding ASBT partition information, the encoding apparatus sets the value of the ASBT partition information based on whether an ASBT partition is performed on the current coded block. For example, when the current coded block is divided into two asymmetrical blocks, the ASBT partition information is set to "true". Conversely, when the current coded block is not divided into two blocks or is divided into a symmetrical shape, the ASBT partition information is set to "false".

[0147] When encoding BT partitioning information, SBT and ASBT partitioning information are not encoded. Conversely, when BT partitioning information is not encoded, at least one of SBT and ASBT partitioning information is encoded. Here, when one of the SBT and ASBT partitioning information indicates "false," the other is encoded. For example, when the SBT partitioning information indicates "true," the ASBT partitioning information is not encoded. When the SBT partitioning information indicates "false," the ASBT partitioning information is encoded.

[0148] When the current coded block is divided into two parts, the encoding device can further encode information about the division direction. Here, the division direction indicates whether the current coded block is divided horizontally or vertically.

[0149] When it is determined in step S703 that no BT partitioning is performed on the current coding block, the BT partitioning process for the current coding block ends. Conversely, when it is determined in step S703 that BT partitioning is performed on the current coding block, the two partial blocks (or sub-blocks) included in the current coding block are generated through BT partitioning in step S704.

[0150] When the current coding block is divided into two partial blocks, one of the partial blocks included in the current coding block is set as the current partial block, and in step S705, the BT partitioning information of the current partial block is encoded according to the encoding order. Here, the encoding order of the partial blocks can be based on raster scanning, Z-scanning, etc., or it can be a predefined order. That is, the BT partitioning information of the partial blocks is encoded sequentially according to the encoding order of the partial blocks.

[0151] When it is determined in step S706 that no BT partitioning is performed on the current partial block, in steps S707 and S708, the BT partitioning process ends based on whether the current partial block is the last block in the current coding block and the last block in the input coding block. For example, when no BT partitioning is performed on the current partial block and the current partial block is the last block in both the current coding block and the input coding block, the BT partitioning process ends. Conversely, when the current partial block is not the last block in the current coding block, or when the current coding block is the last block in the current coding block but not the last block in the input coding block, in step S709, subsequent partial blocks are treated as the current partial block in the scan order, and the processing of encoding BT partitioning information is performed.

[0152] Conversely, when the BT partitioning is performed on the current partial block in step S706, the current partial block is set in the current coding block in step S710, and the newly set current coding block is divided into two partial blocks in step S704. When the newly set current coding block is divided into two partial blocks, the BT partitioning information processing is repeated on the two newly generated partial blocks in steps S705 to S710.

[0153] The encoding device can, based on the result of encoding the current encoding block, encode the maximum size of the possible encoding block for the BT partition (or SBT / ASBT partition), the depth of the possible encoding block for the BT partition (or SBT / ASBT partition), etc., via the upper-layer header.

[0154] Figure 8 This diagram illustrates a method for decoding QT partitioning information used to decode blocks. In this embodiment, the "current" decoding block represents the target decoding block at a specific time. For example, the current decoding block can represent a block with a partitioning depth at which the current decoding is performed. For instance, when an input decoding block is used for decoding, the first input decoding block is considered the "current decoding block." Subsequently, when decoding blocks are partitioned, the blocks obtained from the partitions are considered the "current decoding blocks" when decoding is performed on the partitioned blocks.

[0155] When a decoded block is input, it is treated as the "current decoded block" in step S801. The first decoded block input can represent the decoded block with the highest partition depth to be decoded (i.e., the decoded block with a depth of zero).

[0156] In step S802, the decoding device can decode the QT partitioning information for the current decoded block. Here, the QT partitioning information indicates whether to perform QT ​​partitioning on the current decoded block. When the QT partitioning information indicates "true", QT partitioning is performed on the current decoded block, and when the QT partitioning information indicates "false", QT partitioning is not performed on the current decoded block.

[0157] When the QT partitioning information indication is false, that is, when it is determined in step S803 that QT partitioning has not been performed on the current decoding block, the QT partitioning process for the current decoding block ends. Conversely, when the QT partitioning information indication is true, that is, when it is determined in step S803 that QT partitioning has been performed on the current decoding block, the four partial blocks (or sub-blocks) included in the current decoding block are generated in step S804 through the QT partitioning step.

[0158] When the current decoded block is divided into four partial blocks, one of the partial blocks included in the current decoded block is set as the current partial block, and in step S805, the QT partitioning information of the current partial block is decoded according to the decoding order. Here, the decoding order of the partial blocks can be based on raster scanning, Z-scanning, etc., or it can be a predefined order. That is, according to the decoding order of the partial blocks, the QT partitioning information of the partial blocks is decoded sequentially.

[0159] When the QT partitioning information indication for the current partial block is false, that is, when it is determined in step S806 that QT partitioning has not been performed on the current partial block, in steps S807 and S808, the QT partitioning process ends based on whether the current partial block is the last block of the current decoding block and the input decoding block. For example, when QT partitioning is not performed on the current partial block and the current partial block is the last block of the current decoding block and the input decoding block, the QT partitioning process ends. Conversely, when the current partial block is not the last block of the current decoding block, or when the current decoding block is the last block of the current decoding block but not the last block of the input decoding block, in step S809, subsequent partial blocks are treated as the current partial block in the scan order, and the decoding QT partitioning information processing is performed.

[0160] Conversely, when the QT partitioning information indication for the current partial block is true, that is, when it is determined in step S806 that QT partitioning will be performed on the current partial block, the current partial block is set as the current decoding block in step S810, and in step S804, the newly set current decoding block is divided into four partial blocks. When the newly set current decoding block is divided into four partial blocks, in steps S805 to S810, the processing of decoding QT partitioning information is repeated for the four newly generated partial blocks.

[0161] In this embodiment, when the size of the current decoded block is equal to or less than the maximum possible block size where QT partitioning is possible, it sends a signal from the upper layer to notify the upper layer; or when the depth of the current decoded block is equal to or greater than the maximum possible block depth where QT partitioning is possible, it sends a signal from the upper layer to notify the upper layer to omit the decoding of the partitioning information of the current decoded block and no longer perform QT ​​partitioning on the current decoded block.

[0162] The decoding apparatus can use BT partitioning information, SBT partitioning information, or ASBT partitioning information to determine whether the current decoded block is divided into two blocks. Here, BT partitioning information indicates whether the current decoded block is divided into two blocks, and SBT partitioning information indicates whether the current decoded block is divided into two symmetrically shaped blocks. ASBT partitioning information indicates whether the current decoded block is divided into two asymmetrically shaped blocks.

[0163] When using BT partitioning information, if the BT partitioning information indicates that the current decoded block is divided into two blocks, the decoding apparatus further decodes information indicating the partition shape of the current decoded block (e.g., symmetrical or asymmetrical shape). Conversely, if SBT partitioning information or ASBT partitioning information indicates the partition shape of the current decoded block, then when decoding this information, the information indicating the partition shape of the current decoded block is not further decoded.

[0164] In the following text, reference will be made to Figure 9 A method for encoding BT partitioning information is described. However, Figure 9 The embodiments shown can be used to encode SBT partition information or ASBT partition information. For example, to determine whether to perform an SBT partition on the current coding block, Figure 9 The BT information in the code can be replaced with SBT partition information. Furthermore, to determine whether to perform ASBT partitioning on the current coding block, Figure 9 The BT information in the data can be replaced with ASBT partitioning information.

[0165] Figure 9 This is a diagram illustrating the method for decoding the BT partitioning information used to decode blocks.

[0166] When a decoded block is input, it is treated as the current decoded block in step S901. The first decoded block input can represent the decoded block with the highest partition depth to be decoded (i.e., the decoded block with a depth of zero).

[0167] In step S902, the decoding device can decode the BT partitioning information for the current decoded block. Here, the BT partitioning information indicates whether to perform BT partitioning on the current decoded block. When the BT partitioning information indicates "true", BT partitioning is performed on the current decoded block; and when the BT partitioning information indicates "false", BT partitioning is not performed on the current decoded block.

[0168] When decoding SBT partitioning information, the SBT partitioning information indicates whether to perform SBT partitioning on the current decoded block. For example, when the SBT partitioning information indicates "true", SBT partitioning is performed on the current decoded block, and when the SBT partitioning information indicates "false", SBT partitioning is not performed on the current decoded block.

[0169] When decoding ASBT partition information, the ASBT partition information indicates whether to perform ASBT partitioning on the current decoded block. For example, when the ASBT partition information indicates "true", ASBT partitioning is performed on the current decoded block, and when the ASBT partition information indicates "false", ASBT partitioning is not performed on the current decoded block.

[0170] When decoding the BT partition information, the SBT and ASBT partition information are not decoded. Conversely, when the BT partition information is not decoded, at least one of the SBT and ASBT partition information is decoded. Here, when one of the SBT and ASBT partition information represents "false", the other is decoded. For example, when the SBT partition information represents "true", the ASBT partition information is not decoded, and when the SBT partition information represents "false", the ASBT partition information is decoded.

[0171] When the BT partitioning information is true, that is, when the current decoded block is divided into two blocks, the decoding device further decodes information about the partitioning direction. Here, the partitioning direction indicates whether the current decoded block is partitioned horizontally or vertically.

[0172] When the BT partitioning information indication is false, that is, when it is determined in step S903 that no BT partitioning has been performed on the current decoded block, the BT partitioning process for the current decoded block ends. Conversely, when the BT partitioning information indication is true, that is, when it is determined in step S903 that BT partitioning has been performed on the current decoded block, the two partial blocks (or sub-blocks) included in the current decoded block can be generated through BT partitioning in step S904.

[0173] When the current decoded block is divided into two partial blocks, one of the partial blocks included in the current decoded block is set as the current partial block, and in step S905, the BT partitioning information of the current partial block is decoded according to the decoding order. Here, the decoding order of the partial blocks can be based on raster scanning, Z-scanning, etc., or it can be a predefined order. That is, according to the decoding order of the partial blocks, the BT partitioning information of the partial blocks is decoded sequentially.

[0174] When it is determined in step S906 that no BT partitioning is performed on the current partial block, in steps S907 and S708, the BT partitioning process ends based on whether the current partial block is the last block in the current decoded block and the input decoded block. For example, when no BT partitioning is performed on the current partial block and the current partial block is the last block in both the current decoded block and the input decoded block, the BT partitioning process ends. Conversely, when the current partial block is not the last block in the current decoded block, or when the current decoded block is the last block in the current decoded block but not the last block in the input decoded block, in step S909, subsequent partial blocks are treated as the current partial block in the scan order, and the process of decoding the BT partitioning information is performed.

[0175] Conversely, when it is determined in step S906 that BT partitioning will be performed on the current partial block, the current partial block is set as the current decoding block in step S910, and the newly set current decoding block is divided into two partial blocks in step S904. When the newly set current decoding block is divided into two partial blocks, the BT partitioning information processing is repeated for the two newly generated partial blocks in steps S905 to S910.

[0176] In this embodiment, the size of the current decoded block is equal to or less than the maximum possible block size where the BT partition (or SBT / ASBT partition) is, which can be notified by a signal from the upper layer. Alternatively, when the depth of the current decoded block is equal to or greater than the maximum possible block depth where the BT partition (or SBT / ASBT partition) is, it can be notified by a signal from the upper layer. In this case, the partition information of the current decoded block is omitted, and no further BT partitioning is performed on the current decoded block.

[0177] exist Figures 6 to 9 The example shown describes a method for recursively dividing the largest encoding / decoding block using either QT partitioning or BT partitioning (or SBT / ASBT partitioning). Here, the QT partitioning method and the BT partitioning method are used in combination when dividing the encoding / decoding block into multiple partial blocks. The order of QT partitioning and BT partitioning can be set differently. For example, the encoding apparatus uses QT partitioning to divide the largest encoding block, and when a partial block exists where BT partitioning is determined to be optimal, QT partitioning is terminated, and the partial block is divided using BT partitioning. Alternatively, even if partial blocks are generated using BT partitioning, when QT partitioning is determined to be optimal, the partial block is divided again using QT partitioning. As described above, the encoding apparatus can check the optimal partitioning method for each block and, based on this, can encode information indicating the optimal partitioning method for each block.

[0178] As another example, the decoding apparatus decodes either QT partitioning information or BT partitioning information to determine the optimal partitioning state of the decoded block. Here, one of the QT partitioning method and the BT partitioning method can be applied only when no other method is applied. For example, the BT partitioning information about the predetermined block is decoded only when the QT partitioning information about the predetermined block indicates false or when BT partitioning is performed on the upper-level block including the predetermined block.

[0179] In the coded block partitioning information, the means for encoding can encode information indicating whether each partitioning method is used via the upper-layer header. For example, the means for encoding can encode information indicating whether QT partitioning or BT partitioning is used via the upper-layer header. For instance, when it is determined that QT partitioning is used but BT partitioning is not, only QT partitioning is used to partition the coded block. In this case, the encoding of BT partitioning information indicating whether BT partitioning is performed on the coded block can be omitted. As another example, when it is determined that both QT and BT partitioning are used, the coded block is partitioned using both QT and BT partitioning modes.

[0180] Figure 10 This is a diagram illustrating an example of the partitioning states in a coded block.

[0181] For ease of description, when performing BT partitioning on a block, it is assumed that the portion of the block generated by BT partitioning is not further divided into BT blocks. Furthermore, it is assumed that SBT partitioning information or ASBT partitioning information indicates whether the current coded block is divided into two blocks. Figure 10 In the examples shown, solid lines represent partitioning using the QT partitioning method, dashed lines represent partitioning using the SBT partitioning method, and dotted lines represent partitioning using the ASBT partitioning method.

[0182] Reference Figure 10 QT partitioning generates a sub-block with half the horizontal and vertical lines compared to the upper-level block. SBT partitioning generates a sub-block with one of the horizontal or vertical lines reduced by half compared to the upper-level block. ASBT partitioning generates a sub-block with one of the horizontal or vertical lines reduced by one-quarter compared to the upper-level block. Figure 10 In the diagram, the numbers marked on the dividing line indicate the order of division.

[0183] Reference Figure 10Partition line ① indicates that the QT partition is optimal in the first input coded block. Partition line ② indicates that the SBT horizontal partition is the optimal partition in the upper left block generated by partition line ①. Partition line ③ indicates that the SBT vertical partition is the optimal partition in the upper block generated by partition line ②. Partition line ④ indicates that the SBT horizontal partition is the optimal partition in the lower block generated by partition link ②. Partition line ⑤ indicates that the SBT vertical partition is the optimal partition in the upper right block generated by partition line ①. Partition line ⑥ indicates that the SBT vertical partition is the optimal partition in the left block generated by partition line ⑤. Partition line ⑦ indicates that the SBT vertical partition is the optimal partition in the right block generated by partition line ⑤. Partition line ⑧ indicates that the QT partition is the optimal partition in the lower left block generated by partition line ①. Partition line ⑨ indicates that the SBT horizontal partition is the optimal partition in the upper left block generated by partition line ⑧. Partition line ⑩ indicates that the ASBT 3 / 4 horizontal partition is the optimal partition in the lower block generated by partition line ⑨. Dividing line (11) indicates that the SBT horizontal division is the best division in the lower left block generated by dividing line ⑧. Dividing line (12) indicates that the SBT horizontal division is the best division in the lower right block generated by dividing line ①. Dividing line (13) indicates that the ASBT 3 / 4 vertical division is the best division in the upper block generated by dividing line (12). Dividing line (14) indicates that the SBT vertical division is the best division in the lower block generated by dividing line (12). Dividing line (15) indicates that the ASBT 3 / 4 vertical division is the best division in the right block generated by dividing line (14).

[0184] Figure 11 This shows the use of a tree structure. Figure 10 A graph showing the optimal partitioning state of the input coded block.

[0185] Regarding QT partitioning, there are two possibilities: QT partitioning is not performed; and according to QT partitioning, the block is divided into four partial blocks (i.e., the width and height are divided into 1 / 2 blocks). Therefore, QT partitioning information is represented by 0 or 1. Regarding SBT partitioning, there are three possibilities: SBT partitioning is not performed; partitioning is performed horizontally into two blocks; and partitioning is performed vertically. Therefore, SBT partitioning information is represented by 0, 1, or 2. Regarding ASBT partitioning, there are five possibilities: ASBT partitioning is not performed; partitioning is performed horizontally into 1 / 4 blocks; partitioning is performed horizontally into 3 / 4 blocks; partitioning is performed vertically into 1 / 4 blocks; and partitioning is performed vertically into 3 / 4 blocks. Therefore, ASBT partitioning information is represented by 0, 1, 2, 3, or 4.

[0186] like Figure 11 As shown, QT partitioning information and BT partitioning information are marked on each node of the tree structure.

[0187] Based on the above description, a method for controlling the intra-frame prediction mode and the number or type of encoding / decoding in an encoding / decoding block will be described in detail.

[0188] Figure 12 This is a flowchart illustrating the process by which the number or type of predicted patterns is controlled by a device used for encoding. Figure 12 In the diagram, the steps are shown as a series, but they do not necessarily need to be performed in the order shown. For example, the order can be changed when the result of determining the number or type of intra-prediction modes for the prediction block has no effect. For instance, even if the order of steps S1201 and S1202 is changed, their order can still be changed if the number or type of intra-prediction modes does not change. Moreover, some steps can be omitted. Figure 12 The steps are as follows. For example, when controlling the number or type of intra-frame prediction modes regardless of the shape of the prediction block, step S1202 is omitted.

[0189] In this embodiment, the current coding block can represent a prediction block, a coding block including the prediction block, etc. Referring below... Figure 12 The present invention will be described in detail.

[0190] In step S1201, the number or type of intra-prediction modes that can be controlled is shown based on the size of the current coding block. This is described in detail; the number of intra-prediction modes available for the current coding block can be variably determined based on the size of the current coding block. For example, as the size of the current coding block increases, the number of intra-prediction modes available for the current coding block increases. For instance, assuming the minimum size of the prediction block is 4×4 and the maximum size is 256×256, when the current coding block size is equal to or greater than 4×4 and equal to or less than 32×32, the number of intra-prediction modes available for the current coding block is set to 35. When the current coding block size is equal to or greater than 64×64 and equal to or less than 256×256, the number of intra-prediction modes available for the current coding block is set to 67.

[0191] Conversely, as the size of the current coding block decreases, the number of intra-prediction modes available for the current coding block increases. For example, assuming the minimum size of the prediction block is 4×4 and the maximum size is 256×256, when the current coding block size is equal to or greater than 4×4 and equal to or less than 32×32, the number of intra-prediction modes available for the current coding block is set to 67. When the current coding block size is equal to or greater than 64×64 and equal to or less than 256×256, the number of intra-prediction modes available for the current coding block is set to 35.

[0192] The number of intra-prediction modes available for the current coding block can be determined by comparing the current coding block size with a standard size. Here, the standard size can be signaled via an upper-layer header, or it can be derived from the encoding apparatus and the decoding apparatus under the same conditions. For example, assuming a standard size of 32×32, the information about the standard size can be defined as "log232" by applying a logarithmic function and transmitted in the bitstream. The number of intra-prediction modes available for the current coding block may increase when the current coding block size is less than or greater than the standard size. For example, when the current coding block size is 32×32, the number of available intra-prediction modes is 19. When the current coding block size is equal to or greater than 64×64 and equal to or less than 128×128, the number of available intra-prediction modes is 35. When the current coding block size is 256×256, the number of available intra-prediction modes is 67. When the current coding block size is equal to or less than 16×16 and equal to or greater than 8×8, the number of available intra-prediction modes is 35. If the current coding block size is 4×4, then the number of intra-prediction blocks that the current coding block can be used for is 67.

[0193] Conversely, when the size of the current coding block is smaller than or larger than the standard size, the number of intra-prediction modes available for the current coding block may decrease. For example, when the current coding block size is 32×32, the number of available intra-prediction modes is 67. When the current coding block size is equal to or greater than 64×64 and equal to or less than 128×128, the number of available intra-prediction modes is 35. When the current coding block size is 256×256, the number of available intra-prediction modes is 19. When the current coding block size is equal to or less than 16×16 and equal to or greater than 8×8, the number of available intra-prediction modes is 35. When the current coding block size is 4×4, the number of available intra-prediction modes is 19.

[0194] Regardless of the size of the current coding block, the intra-prediction modes available for the current coding block can include non-directional intra-prediction modes (or non-angular prediction modes). That is, regardless of the size of the current coding block, non-directional intra-prediction modes can be used to encode the current coding block. Conversely, the number of directional prediction modes available for the current coding block (i.e., angular prediction modes) can vary depending on the size of the current coding block. As the number of intra-prediction modes available for the current coding block decreases or increases, the number of directional prediction modes available for the current coding block also decreases or increases.

[0195] When the number of directional prediction modes available for the current coding block decreases, the current coding block may use a per-integer or similar mode for directional prediction. Here, a per-integer-based directional prediction mode means a mode that performs intra-frame prediction using a per-integer-based reference sample. This per-integer-based reference sample can represent the reference sample itself rather than additional reference samples generated by interpolation of the reference sample. For example, intra-frame prediction modes in the horizontal, vertical, or diagonal directions can be per-integer-based directional prediction modes.

[0196] Alternatively, the direction prediction modes available for the current coding block can be determined by dividing the entire direction prediction mode portion (N-1 parts) by the number N of direction prediction modes to be used.

[0197] Figure 13 and 14 This is a diagram showing an example of the 13 directional prediction modes available in the current coding block.

[0198] Reference Figure 13 The intra-frame prediction mode that can be used for the current coding block can be a direction prediction mode based on each integer, or a direction prediction mode adjacent to the direction prediction mode based on each integer. For example, in Figure 13 The diagram shows the intra-prediction modes in the vertical, horizontal, and diagonal directions, as well as the adjacent intra-prediction modes (with an offset of ±1) as the directional prediction modes available for the current coding block.

[0199] Reference Figure 14 The direction prediction mode that can be used for the current coding block can be 13 direction prediction modes that are evenly distributed by dividing the entire direction prediction mode part into 12 equal parts.

[0200] As the number of available intra-prediction modes for the current prediction block increases, use more directional prediction modes based on each integer and more adjacent intra-prediction modes, or divide the entire directional prediction mode portion into more parts.

[0201] For example, Figure 15 and 16 This is a diagram showing an example of the 21 directional prediction modes available in the current block.

[0202] exist Figure 15 The diagram shows intra-prediction modes in three directions, such as vertical, horizontal and diagonal, as well as the intra-prediction modes adjacent to them (intra-prediction modes with an offset of ±2) as the intra-prediction modes available for the current coding block.

[0203] exist Figure 16In this context, the intra-prediction modes available for the current coding block are 21 directional prediction modes that are evenly spaced by dividing the entire directional prediction mode portion into 20 equal parts.

[0204] The encoding apparatus can encode the number of available intra-prediction modes for each size of the prediction block and send the result to the decoding apparatus. Here, information indicating the number of available intra-prediction modes for each size of the prediction block can be encoded in the upper-layer header. For example, assuming the minimum size of the prediction block is 4×4 and the maximum size is 256×256, when it is determined that the number of intra-prediction modes available for a prediction block equal to or less than 32×32 is 64, the value obtained by applying the logarithm to the number of available modes (log264) is encoded and sent to the decoding apparatus. When it is determined that the number of intra-prediction modes available for a 64×64 prediction block is 32, the value obtained by applying the logarithm to the number of available modes (log232) is encoded. When the number of intra-prediction modes available for a 128×128 prediction block is 16, the value obtained by applying the logarithm to the number of available modes (log216) is encoded. When the number of intra-prediction modes available for a 256×256 prediction block is eight, the value (log28) obtained by applying the logarithm to the number of available modes is encoded.

[0205] As another example, the upper-layer header can pre-define the number of intra-prediction modes available for each size of the prediction block, determine the optimal number of intra-prediction modes for each prediction block, and encode index information indicating the number of available intra-prediction modes for each prediction block. For instance, when the number of intra-prediction modes available for a 32×32 prediction block is 19, 35, or 67, index information indicating which of 19, 35, and 67 is optimal for the 32×32 prediction block is encoded.

[0206] The encoding apparatus can encode information indicating whether to adjust the number or type of intra-prediction modes according to the size of the prediction block. This encoded information can be sent to the decoding apparatus via an upper-layer header. Here, the information can be a flag, but is not limited to this. The decoding apparatus can pre-determine whether to adjust the number or type of intra-prediction modes for each size of the prediction block based on the flag information.

[0207] Even if the information encoded in the upper-layer header indicates that the number of available intra-prediction modes is adjusted according to the size of the prediction block, intra-prediction of the current coding block is performed using either conventional methods or by adjusting the number of available intra-prediction modes according to the size of the prediction block. Therefore, when the information encoded in the upper-layer header indicates that the number of available intra-prediction modes is adjusted according to the size of the prediction block, the means for encoding can further encode information on a per-prediction-block basis indicating whether to use the conventional method (i.e., using a fixed number of intra-prediction modes) or to use a method that adjusts the number of available intra-prediction modes according to the size of the prediction block. Here, the encoded information can be a single flag, but is not limited to this.

[0208] In step S1202, the number or type of intra-prediction modes is controlled according to the shape of the current coding block. This is described in detail as follows: the number of intra-prediction modes available for the current coding block can be variably determined based on the shape of the current coding block. For example, when the current coding block is not square (e.g., rectangular), the current coding block is configured to use more horizontal intra-prediction modes than vertical intra-prediction modes, or more vertical intra-prediction modes than horizontal intra-prediction modes.

[0209] Specifically, when the current coding block is not square, the number of available intra-prediction modes in the horizontal and vertical directions is determined based on the width-to-height ratio of the current coding block. For example, when the current coding block size is 8×16, the height of the current coding block is twice its width. Therefore, the number of available intra-prediction modes in the horizontal direction is approximately twice the number of available intra-prediction modes in the vertical direction. For example, when the number of intra-prediction modes available for the current coding block is 25, the current coding block is set to use 16 horizontal intra-prediction modes and 9 vertical intra-prediction modes.

[0210] The number of intra-prediction modes available for the current coding block can be determined by comparing the width or height of the current coding block with a preset threshold. Here, the threshold can be signaled via the upper-layer header. For example, the value obtained by applying logarithm to the threshold (Log2) can be signaled via the upper-layer header. Alternatively, the means for encoding and the means for decoding can derive the threshold under the same conditions. Here, a threshold can be set for each of the width and height, or the same value can be used for both width and height. For example, when the threshold for width is 32 and the width of the current coding block is less than the threshold, the current coding block uses only 1 / 2N of the number N of intra-prediction modes in the horizontal direction. For example, when the number of directional prediction modes in the horizontal direction is 33, the current coding block uses 17 directional prediction modes in the horizontal direction.

[0211] Regardless of the shape of the current coding block, the intra-prediction modes available for the current coding block can include non-directional intra-prediction modes (or non-angular prediction modes). Conversely, the number of directional prediction modes available for the current coding block (i.e., angular prediction modes) can vary depending on the shape of the current coding block. As the number of intra-prediction modes available for the current coding block decreases or increases, the number of directional prediction modes available for the current coding block also decreases or increases.

[0212] The direction prediction modes available for the current coding block can be determined based on per-integer or similar patterns. Alternatively, the available direction prediction modes for the current coding block can be determined by dividing the entire direction prediction mode portion (N-1 parts) by the number N of direction prediction modes to be used. (The above has already been referenced.) Figures 13 to 16 This has been described, but its detailed description will be omitted.

[0213] The encoding apparatus can encode information indicating whether to adjust the number or type of intra-prediction modes according to the shape of the prediction block. The encoded information can be sent to the decoding apparatus via an upper-layer header. Here, the information can be a single flag, but is not limited to this. The decoding apparatus can pre-determine whether to adjust the number or type of intra-prediction modes for each shape of the prediction block based on the flag information.

[0214] Even if the information encoded in the upper-layer header indicates that the number of available intra-prediction modes is adjusted according to the shape of the prediction block, intra-prediction of the current coding block is performed using either conventional methods or by adjusting the number of available intra-prediction modes according to the shape of the prediction block. Therefore, when the information encoded in the upper-layer header indicates that the number of available intra-prediction modes is adjusted according to the shape of the prediction block, the means for encoding can further encode information on a per-prediction-block basis indicating whether to use the conventional method (i.e., using a fixed number of intra-prediction modes) or to use a method that adjusts the number of available intra-prediction modes according to the shape of the prediction block. Here, the encoded information can be a single flag, but is not limited to this.

[0215] Figure 12 The main description focuses on the encoding process, and in the decoding process, the number of intra-prediction modes available for the current decoded target block can be adjusted. The decoding apparatus can adjust the number of available intra-prediction modes for the current decoded block based on information signaled in the bitstream, by considering the size and shape of the current decoded block or the pattern of intra-prediction modes used by adjacent blocks.

[0216] When the number of intra prediction modes available for the current coding block is determined, the means for encoding determines the intra prediction mode of the current coding block from the available intra prediction modes and encodes the information thereon. The method for encoding / decoding the intra prediction modes of the current block will be described in detail below.

[0217] Figure 17 This is a flowchart illustrating the process of encoding the optimal intra-prediction mode for the current coding block.

[0218] Reference Figure 17 First, the encoding apparatus can determine the MPM candidate for the current coding block in step S1701. Here, the encoding apparatus can set the quantized direction prediction mode (or the angle of the quantized direction prediction mode) as an MPM candidate by considering that the number of direction prediction modes available for the current coding block is different from the number of coding blocks with direction prediction modes available for the current coding block in adjacent blocks.

[0219] For example, Figure 18 This is a diagram illustrating an example of setting up MPM candidates. Figure 18 The diagram shows the use of three MPM candidates. Figure 18 In the example shown, L can be the intra prediction mode with the highest occurrence frequency among the neighboring blocks to the left of the current coding block, or it can be the intra prediction mode of the neighboring block (or any neighboring block) at a predetermined position to the left of the current coding block. A can be the intra prediction mode with the highest occurrence frequency among the neighboring blocks to the top of the current coding block, or it can be the intra prediction mode of the neighboring block (or any neighboring block) at a predetermined position to the top of the current coding block.

[0220] L, L-1, L+1, and A can indicate the index of the intra-prediction mode. However, when the number of directional prediction modes available to the current coding block is different from the number of directional prediction modes available to neighboring blocks, the directional prediction modes used by neighboring blocks may not be used by the current coding block. For example, among the intra-prediction modes available to the current coding block, mode 18 represents a horizontal prediction mode, while among the directional prediction modes available to neighboring blocks, mode 18 represents a top-left prediction mode instead of a horizontal one.

[0221] To resolve this mismatch, when a non-directional prediction mode is assigned to an MPM candidate, the index information is used in its entirety. When a directional prediction mode is assigned to an MPM candidate, a prediction angle corresponding to the directional prediction mode is assigned. When a quantization angle is set to an MPM candidate, the encoding apparatus determines the intra-prediction mode of the current coding block based on whether the prediction angle of the best directional prediction mode for the current coding block is equal to the quantization angle included in the MPM candidate. Therefore, when the MPM candidate is a non-directional prediction mode, the index of an intra-prediction mode such as L, L-1, L+1, A, etc., is used as the MPM candidate. Conversely, when the MPM candidate is a directional prediction mode, the angle of the intra-prediction mode, such as L', (L-1)', (L+1)', A', etc., is used as the MPM candidate.

[0222] When the current coding block cannot use a directional prediction mode corresponding to the prediction angle of an adjacent block, quantization can be performed. This quantization reduces the prediction angle of the adjacent block to the prediction angle most similar to the prediction angle of the directional mode that can be used for the current prediction block. Therefore, when the MPM candidate is a directional prediction mode, MPM candidates representing the quantized angle of the directional prediction mode, such as L', (L-1)', (L+1)', A', etc., are used.

[0223] For example, Figure 19 and 20 This is a diagram illustrating an example of a quantitative prediction perspective. Figure 20 The diagram shows the directional prediction patterns that can be used for neighboring blocks close to the current coded block. Figure 19 The directional prediction modes available for the current coding block are shown. See the comparison diagram. Figure 19 and Figure 20 They discovered that... Figure 20 The directional prediction mode indicated by the dashed line is unavailable for the current coded block. Therefore, when encoding adjacent blocks using the directional prediction mode indicated by the dashed line, the prediction angle of the directional prediction mode indicated by the dashed line is transformed into the prediction angle of the most similar prediction mode among the directional prediction modes available for the current block, and the transformed angle is set as an MPM candidate.

[0224] In the above embodiments, it is described that the prediction angle is set as an MPM candidate for the direction prediction mode by taking into account that the number of intra prediction modes available for the current coding block is different from the number of intra prediction modes available for adjacent blocks.

[0225] As another example, when the number of intra-prediction modes available for the current coding block is equal to the number of intra-prediction modes available for neighboring blocks, the MPM candidate also indicates the index of the intra-prediction mode with respect to the directional prediction mode. Alternatively, even when the number of intra-prediction modes available for the current coding block is different from the number available for neighboring blocks, the MPM candidate is set to indicate the index of the intra-prediction mode with respect to the directional prediction mode. In this case, the directional prediction mode of the closed block can be quantized (or transformed) to the index of the mode with the most similar direction available in the directional prediction module of the current block.

[0226] In relation to Figure 18 In one embodiment, MPM candidates can be derived based on the intra-prediction mode of neighboring blocks that are not adjacent to the current coding block, according to the size, shape, or decoding state of the current coding block or neighboring blocks adjacent to the current coding block.

[0227] For example, Figure 21 This is a diagram illustrating an example of deriving MPM candidates from neighboring blocks that are not adjacent to the current coded block.

[0228] When the height of each of the top adjacent blocks (e.g., blocks in a rectangle whose width is greater than its height) adjacent to the current coding block in the direction from the top of the current coding block is shorter than the height of the current coding block, the means for encoding predicts that the intra prediction mode of the top adjacent blocks is different from the intra prediction mode of the current coding block. Alternatively, when the intra prediction mode of the top adjacent blocks of the current coding block is one of the vertical prediction modes, the means for encoding predicts that the intra prediction mode of the top adjacent blocks is different from the intra prediction mode of the current coding block.

[0229] In this case, the means for encoding may consider deriving additional MPM candidates from at least one of the blocks adjacent to the current encoded block, i.e., the left, top-left, top-right, and bottom-left adjacent blocks. Alternatively, the means for encoding may derive additional MPM candidates from blocks adjacent to adjacent blocks rather than adjacent to the current encoded block. For example, in Figure 21 In the example shown, the means for encoding can derive MPM candidates based on the second top block (i.e., the second top block) or blocks closer to the top, rather than blocks adjacent to the top of the current encoded block (i.e., the first top block). Alternatively, the means for encoding can consider MPM candidates using only intra-prediction modes of adjacent blocks in a specific direction rather than the top direction.

[0230] Furthermore, when the width of each of the left-hand adjacent blocks (e.g., rectangular blocks with a height greater than their width) adjacent to the current coding block in the left direction is shorter than the width of the current coding block, the means for encoding predicts that the intra-prediction mode of the left-hand adjacent blocks is different from the intra-prediction mode of the current coding block. Alternatively, when the intra-prediction mode of the left-hand adjacent block of the current coding block is one of the horizontal prediction modes, the means for encoding predicts that the intra-prediction mode of the left-hand adjacent blocks is different from the intra-prediction mode of the current coding block.

[0231] In this case, the means for encoding may consider deriving additional MPM candidates from at least one of the blocks adjacent to the current encoded block, i.e., the top, top-left, top-right, and bottom-left adjacent blocks. Alternatively, the means for encoding may derive additional MPM candidates from blocks adjacent to adjacent blocks rather than adjacent to the current encoded block. For example, in Figure 21 In the example shown, the means for encoding can derive MPM candidates based on the second left block (i.e., the second left-hand block) or blocks further to the left, rather than the block adjacent to the left of the current coded block (i.e., the first left-hand block). Alternatively, the means for encoding can consider MPM candidates using only the intra-prediction modes of blocks adjacent in a specific direction rather than the left-hand direction.

[0232] When MPM candidates for the current coding block are determined, the intra-prediction mode of the current coding block is compared with the MPM candidates, and it is determined whether there is an MPM candidate with the same intra-prediction mode as the current coding block. Based on the determination result, the means for encoding can encode the information indicating whether there is an MPM candidate with the same intra-prediction mode as the current coding block in step S1702. For example, when there is an MPM candidate with the same intra-prediction mode as the current coding block, the information is encoded as true. When there is no MPM candidate with the same intra-prediction mode as the current coding block, the information is encoded as false.

[0233] When it is determined in step S1703 that there is an MPM candidate with the same intra-prediction mode as the current coding block, in step S1704, the means for encoding can encode the index information of the MPM candidate that specifies the same intra-prediction mode as the current coding block in the MPM candidates.

[0234] Conversely, when it is determined in step S1703 that there are no MPM candidates that are the same as the intra-prediction mode of the current coding block, in step S1705, the means for encoding encodes the intra-prediction mode that is best for the current coding block among the intra-prediction modes other than those set as MPM candidates. Specifically, from all intra-prediction modes available for the current coding block, intra-prediction modes set as MPM candidates are excluded, and then enough bits to represent the remaining intra-prediction modes are allocated such that the intra-prediction mode corresponding to the current coding block is encoded among the remaining prediction modes.

[0235] When allocating bits in the encoding of the remaining intra-prediction modes, a fixed number of bits are allocated to represent the remaining intra-prediction modes. Alternatively, the remaining intra-prediction modes are divided into N groups, and the bits allocated to each group are set differently. For example, when the number of available intra-prediction modes for the current coding block is 67 and the number of MPM candidates is 6, the number of remaining intra-prediction modes is 61. Here, when the remaining intra-prediction modes are divided into two groups, A and B, 16 intra-prediction modes are allocated to group A, and 45 intra-prediction modes are allocated to group B. Here, a tag indicating which group the intra-prediction modes of the current coding block belong to can be encoded. The intra-prediction modes of the current coding block are encoded by allocating four bits to group A. Group B is further divided into two subgroups, B-1 and B-2. 19 intra-prediction modes are allocated to group B-1, and 26 intra-prediction modes are allocated to group B-2. The intra-prediction modes of the current coding block are encoded by allocating 5 bits to group B-1 and 6 bits to group B-2. Encoded information can be encoded and sent to a device that decodes the bitstream.

[0236] Next, the intra-prediction mode for decoding the current decoded block by the device used for decoding will be described.

[0237] Figure 22 This is a flowchart illustrating the process of decoding the intra-prediction mode of the current decoded block.

[0238] Reference Figure 22 First, the decoding apparatus can determine the MPM candidates for the current decoded block in step S2201. As in the above encoding process, the decoding apparatus can determine the MPM candidates for the current decoded block by considering the intra-prediction modes of blocks close to the current decoded block.

[0239] Next, in step S2202, the means for decoding can decode information from the bitstream indicating whether there is an MPM candidate with the same intra-prediction mode as the current decoded block. This information can be a flag, but is not limited to it.

[0240] Based on this information, when it is determined in step S2203 that there is an MPM candidate with the same intra-prediction mode as the current decoding block, the device for decoding can decode the index information of the MPM candidate with the same intra-prediction mode as the current decoding block in the specified MPM candidate.

[0241] Conversely, when it is determined in step S2203 that there is no MPM candidate with the same intra-prediction mode as the current decoded block, in step S2205, the device for decoding decodes the remaining prediction mode information indicating the best prediction mode for the current decoded block among the remaining intra-prediction modes other than the intra-prediction modes set as MPM candidates.

[0242] In the above embodiments, the MPM candidate is used to determine the intra-prediction mode of the current encoding / decoding block. However, the intra-prediction mode of the current encoding / decoding block can be determined without using the MPM candidate. In this case, the information specifying the intra-prediction mode of the current encoding / decoding block can be sent to the means for decoding in the bitstream.

[0243] A coded block can be divided into one or more prediction blocks, and each prediction block can be further divided into one or more partial blocks (or partial prediction blocks) through an additional partitioning process. Here, different intra-prediction modes can be used to decode the partial blocks. Therefore, multiple intra-prediction modes can be used to encode / decode a prediction block. As mentioned above, using two or more intra-prediction modes to encode / decode a prediction block is referred to as using "multiple intra-prediction modes" to encode / decode a prediction block.

[0244] The following section will describe in detail an example of encoding / decoding the current block using multiple intra-frame prediction modes.

[0245] Figure 23 This is a diagram illustrating an example of determining the optimal partition shape for the current coding block. One or more prediction blocks may be included in the coding block. In this embodiment, the current coding block may represent one of the prediction blocks included in the coding block. In this embodiment, the block generated by partitioning the current coding block is referred to as a "partial block".

[0246] The encoding apparatus can determine the optimal partial block partition shape for the current encoded block. Specifically, the encoding apparatus can perform RDO on all partition shapes available for the current encoded block, and then determine the optimal partition shape. The partition shapes available for the current encoded block can be preset in both the encoding and decoding apparatus.

[0247] For example, Figure 24 An example of the partition shapes that can be used in the current coding block is shown.

[0248] exist Figure 24In the diagram, block 2401 shows an example of the partition shape when the current coding block is a square, and blocks 2402 and 2403 show examples of the partition shape when the current coding block is a non-square shape.

[0249] The current coded block can be divided into multiple partial blocks based on at least one straight line present in blocks 2401, 2402, or 2403.

[0250] like Figure 24 As shown in the example, the dividing line that divides the current coding block into multiple regions can be a straight line parallel or perpendicular to the width or height of the current coding block, or it can be a straight line defining an acute or obtuse angle with respect to the width or height of the current coding block. Figure 24 In the example shown, there are 18 dividing lines (i.e., 18 dividing shapes) in block 2401, and 20 dividing lines (i.e., 20 dividing shapes) in blocks 2402 and 2403. However, the dividing shape of the current coded block is not limited to the described example. The current coded block can be divided into multiple partial blocks by straight lines or diagonals not described in the embodiments.

[0251] according to Figure 24 In the example shown, the current coded block can be divided into rectangular, triangular, or trapezoidal partial blocks, etc.

[0252] The encoding apparatus can assign an intra-prediction mode to each partial block for multiple partition shapes available for the current coding block, and in step S2301, the partition shape with the minimum RD cost value can be determined by RDO as the optimal partition shape for the current coding block. Here, the encoding apparatus can adjust the number or type of available partition shapes according to the size or shape of the current coding block. For example, as the size of the current coding block increases, the number of partition shapes available for the current coding block decreases.

[0253] In step S2302, the means for encoding can determine the intra prediction mode for each part block. Specifically, the means for encoding can assign an intra prediction mode for each part block to multiple partition shapes available for the current coding block, and then determine the intra prediction mode with the minimum RD cost value as the optimal intra prediction mode for each part block through RDO.

[0254] When determining the intra prediction mode for each partial block, the encoding apparatus calculates the RD cost value via RDO by applying all available intra prediction modes to the partial block, and determines the intra prediction mode with the minimum RD cost value as the intra prediction mode for the partial block. As another example, the encoding apparatus can calculate the RD cost value via RDO by applying some of all available intra prediction modes to the partial block, and determine the intra prediction mode with the minimum RD cost value as the intra prediction mode for the partial block. Here, some intra prediction modes applicable to the partial block can be set equally in both the encoding and decoding apparatus.

[0255] As another example, some intra-prediction modes may include at least one of the intra-prediction modes of neighboring blocks adjacent to the current coding block and preset additional intra-prediction modes. For example, when the intra-prediction mode of a neighboring block is a non-directional mode, RDO is performed using all non-directional modes, with some directional prediction modes (e.g., vertical direction prediction mode, horizontal direction prediction mode, etc.) as candidates with high selection frequency. Alternatively, when the intra-prediction mode of a neighboring block is a directional mode, RDO is performed using all non-directional prediction modes, the intra-prediction mode of the neighboring block, and intra-prediction modes with a similar direction to the intra-prediction mode of the neighboring block (e.g., intra-prediction modes with a difference between the intra-prediction modes of the neighboring blocks equal to or less than a threshold), etc., as candidates.

[0256] The encoding apparatus can perform intra-prediction on the current coding block using an intra-prediction mode for each partial block. Here, when the current coding block is divided diagonally, the dividing line does not correspond to pixel boundaries, resulting in overlapping pixels (i.e., overlapping regions) between partial blocks.

[0257] For example, Figure 25 This is a diagram illustrating an example of overlapping regions based on the partition shape of the current coded block.

[0258] exist Figure 25 In the cases of boxes 2501 and 2502 shown, the dividing lines correspond to pixel boundaries, so that no overlapping areas occur between partial blocks. However, in the cases of blocks 2503 to 2505, there are portions where the dividing lines do not correspond to pixel boundaries (i.e., portions that pass through pixels), and there are overlapping pixels (i.e., overlapping areas) between partial blocks.

[0259] As described above, when there is an overlapping region between partial blocks, the predicted value of the pixels included in the overlapping region is obtained from the average of the predicted values ​​generated as the result of intra-prediction of the partial block including the overlapping region, or from linear interpolation of the predicted values. For example, assuming the current coding block is divided into a first partial block and a second partial block, the predicted value of the pixels included in both the first and second partial blocks in a common manner is determined to be the average of a first predicted value calculated using the intra-prediction mode of the first partial block and a second predicted value calculated using the intra-prediction mode of the second partial block, or a value obtained by linear interpolation of the first and second predicted values.

[0260] As another example, an intra-prediction mode that includes one of the partial blocks containing overlapping regions can be used to generate predicted values ​​for pixels included in the overlapping region. Here, within a partial block, the intra-prediction mode to be used can be determined based on preset priorities between partial blocks, preset priorities between intra-prediction modes, the position of pixels included in the overlapping region, etc. For example, a higher-priority intra-prediction mode among the partial blocks containing overlapping regions can be used to generate predicted values ​​for pixels included in the overlapping region.

[0261] Next, in the apparatus used for encoding, a method for encoding multiple intra-prediction modes of the current coding block will be described.

[0262] Figure 26 This is a flowchart illustrating a method for encoding multiple intra-prediction modes of the current coding block.

[0263] In this embodiment, the encoding apparatus can generate combined index information by combining index information used to identify the intra-prediction mode of each partial block.

[0264] For example, Figure 27 This is a diagram illustrating an example of generating combined index information.

[0265] Suppose the current encoded block is divided into two partial blocks, in Figure 27 In this context, intra-prediction mode 1 indicates the intra-prediction mode of the first block, and intra-prediction mode 2 indicates the intra-prediction mode of the second block. Here, the first and second blocks can be divided according to the encoding / decoding order, and can be determined based on whether they include pixels at predetermined positions, whether they are close to pixels at predetermined positions, etc. For example, the first block could be a portion including the top-left pixel of the current coded block.

[0266] Assuming that the first and second blocks can use N intra-prediction modes (e.g., the first block can use intra-prediction modes A1 to A(N-1), and the second block can use intra-prediction modes B1 to B(N-1)), the combination index information can indicate a combination of one of the intra-prediction modes that the first block can use and one of the intra-prediction modes that the second block can use. For example, index 1 can indicate that the intra-prediction mode of the first block is A1 and the intra-prediction mode of the second block is B1.

[0267] exist Figure 27 The document describes the use of N composite indexes combining A1 to A(N-1) and B1 to B(N-1), but more or fewer composite indexes can be used. When constructing composite indexes, prediction patterns with high usage frequency (such as non-directional prediction patterns, vertical prediction patterns, horizontal prediction patterns, etc.) are assigned to low-index information, while prediction patterns with low usage frequency, such as directional prediction patterns, are assigned to high-index information.

[0268] Reference Figure 26 First, in step S2601, the encoding means encodes information indicating whether multi-mode prediction is used on the current coding block. Here, the information can be a single flag, but is not limited to it. This information indicates whether using a single intra-prediction mode or multiple intra-prediction modes is optimal for the current coding block.

[0269] When multi-mode prediction is used on the current coding block in step S2602, information indicating the optimal partition shape of the current coding block is encoded in step S2603.

[0270] Furthermore, in step S2604, the means for encoding encodes combined index information indicating the optimal intra-prediction mode assigned to each partial block.

[0271] When multi-mode prediction is not used for the current coding block in step S2602, in step S2605, the device used for encoding encodes the intra-prediction mode of the current coding block.

[0272] The intra-prediction mode on the current coding block can be encoded using the MPM candidates of the current coding block. (Already referenced...) Figure 17 and Figure 18 The encoding of the intra-prediction mode of the current coding block using MPM candidates is described in detail, so its description will be omitted.

[0273] Figure 28 This is a flowchart illustrating a method for decoding multiple intra-prediction modes of the current coded block.

[0274] First, in step S2801, the decoding device decodes information indicating whether multi-mode prediction is used on the current decoded block. Here, the information can be a single flag, but is not limited to it. This information indicates whether using a single intra-prediction mode or multiple intra-prediction modes is optimal for the current decoded block.

[0275] When the information indicates that multi-mode prediction is used for the current decoded block in step S2802 (e.g., the flag indicates "true"), the information indicating the optimal partition shape of the current decoded block is decoded in step S2803.

[0276] Furthermore, in step S2804, the means for decoding can decode the combined index information indicating the optimal intra-prediction mode assigned to each partial block.

[0277] When the combined index information is decoded, the decoding device assigns multiple intra-frame prediction modes specified by the combined index information to each block.

[0278] Alternatively, in step S2802, when the information indicates that multi-mode prediction is not used for the current decoded block (e.g., the flag indicates "false"), in step S2805, the means for decoding decodes the intra-prediction mode used for the current decoded block.

[0279] The intra-prediction mode of the current decoded block can be decoded using the MPM candidates of the current decoded block. (Already referenced...) Figure 18 and Figure 22 The decoding of the intra-prediction mode of the current decoded block using MPM candidates is described in detail, so its description will be omitted.

[0280] exist Figure 26 and Figure 28 The text describes encoding / decoding multiple intra-prediction modes by combining indices. As another example, encoding / decoding multiple intra-prediction modes can be performed by encoding / decoding the intra-prediction mode for each partial block. Another embodiment of encoding / decoding multiple intra-prediction modes will be described in detail below.

[0281] Figure 29 This is another flowchart illustrating the process of encoding multiple intra-prediction modes. For ease of description, in this embodiment, the intra-prediction modes of each partial block are referred to as the primary prediction mode and the sub-prediction mode. Here, the terms primary prediction mode and sub-prediction mode are used for convenient identification of the intra-prediction modes of each partial block.

[0282] Optionally, the primary prediction mode and the secondary prediction mode can be determined by considering factors such as the size, position, shape, and intra-prediction mode of the secondary blocks. For example, assuming the current coding block is divided into two blocks, the intra-prediction mode of the larger secondary block is called the primary prediction mode, while the intra-prediction mode of the other secondary block is called the secondary prediction mode.

[0283] Furthermore, blocks using the primary prediction mode are called primary blocks, and blocks using the secondary prediction mode are called secondary blocks.

[0284] Reference Figure 29 First, in step S2901, the encoding apparatus encodes information indicating whether multi-mode prediction is used on the current coding block. Here, the information can be a single flag, but is not limited to it. This information indicates whether using a single intra-prediction mode or multiple intra-prediction modes is optimal for the current coding block.

[0285] When multi-mode prediction is used on the current coding block in step S2902, information indicating the optimal partition shape of the current coding block is encoded in step S2903.

[0286] Furthermore, the encoding apparatus can encode the master prediction mode in step S2904. Here, MPM candidates can be used to encode the master prediction mode. The method for using MPM candidates is as described in reference [reference needed]. Figure 18 The adjacent blocks used to set MPM candidates can be determined based on the position of the current coded block or the position of the main block. As another example, the encoding apparatus can encode the main prediction mode as is.

[0287] Next, in step S2905, the encoding means encodes the sub-prediction modes. For example, the encoding means may encode index information for a specified sub-prediction mode. Here, the encoding means may reassign the indexes to each intra-prediction mode available for the sub-blocks by considering the primary prediction mode. Specifically, since the prediction modes between sub-blocks are likely to be similar to each other, when considering the primary prediction mode, the encoding means reassigns the indexes to the intra-prediction modes available for the sub-prediction blocks in the order of the highest probability of being selected as the sub-prediction mode.

[0288] For example, Figure 30 This is a diagram illustrating an example of reassigning indexes to intra-prediction modes that can be used for sub-prediction blocks. (See diagram for example.) Figure 30 As shown in the example, the encoding apparatus can assign indices from 0 to N-1 to intra-prediction modes A0 to A(N-1). The encoding apparatus and the decoding apparatus can reassign the indices of the intra-prediction modes using the same rules.

[0289] The prediction modes assigned to the various sub-prediction mode candidates A0 to A(N-1) can vary depending on the primary prediction mode. For example, when the primary prediction mode is a non-directional mode, it is highly likely that the sub-prediction modes will also be selected as non-directional prediction modes. Therefore, the encoding apparatus can assign non-directional prediction modes to low indices and directional prediction modes to high indices.

[0290] Conversely, when the primary prediction mode is a directional mode, it is highly likely that the secondary prediction mode will also be selected as a directional prediction mode. Therefore, the encoding apparatus can assign the primary prediction mode or an intra-prediction mode similar to the primary prediction mode to a low index, and can assign the remaining directional and non-directional prediction modes to a high index.

[0291] As another example, similar to the master prediction mode, the sub-prediction mode can also be encoded using MPM candidate pairs, or it can be encoded as is. Alternatively, the encoding apparatus can encode the difference between the master prediction mode and the sub-prediction mode. In this case, the decoding apparatus can use the master prediction mode and the difference to decode the sub-prediction mode.

[0292] When multi-mode prediction is not used for the current coding block in step S2902, the means for encoding can encode the intra-prediction mode of the current coding block in step S2906.

[0293] The intra-prediction mode of the current coding block can be encoded using the MPM candidates of the current coding block. (Already referenced...) Figure 17 and Figure 18 The encoding of the intra-prediction mode of the current coding block using MPM candidates is described in detail, so its description will be omitted.

[0294] Figure 31 This is another flowchart illustrating the process of decoding multiple intra-frame prediction modes.

[0295] First, in step S3101, the decoding device decodes information indicating whether multi-mode prediction is used on the current decoding block. Here, the information can be a single flag, but is not limited to it. This information indicates whether using a single intra-prediction mode or multiple intra-prediction modes is optimal for the current decoding block.

[0296] When multi-mode prediction is used on the current decoded block in step S3102, information indicating the optimal partition shape for the current decoded block is decoded in step S3103.

[0297] Furthermore, in step S3104, the decoding apparatus decodes the primary prediction mode. Here, MPM candidates can be used to decode the primary prediction mode. The method for using MPM candidates is as described in reference [reference needed]. Figure 18The adjacent blocks used to set the MPM candidate can be determined based on the position of the current decoded block or the position of the main block. As another example, the information to be decoded from the bitstream can be the master prediction mode encoded as is.

[0298] Next, the decoding apparatus can decode the sub-prediction mode in step S3105. For example, the decoding apparatus can decode the index of a specified sub-prediction mode. Here, the decoding apparatus can reassign the index to each intra-prediction mode available for the sub-block by considering the primary prediction mode. Specifically, since the prediction modes between sub-blocks are likely to be similar to each other, when considering the primary prediction mode, the decoding apparatus reassigns the index to the intra-prediction modes available for the sub-prediction block in order of the highest probability of being selected as the sub-prediction mode. (See also...) Figure 30 This has been described, therefore, a detailed description will be omitted.

[0299] As another example, similar to the main prediction mode, MPM candidates can also be used to decode the sub-prediction mode. Alternatively, the information to be decoded from the bitstream can indicate the sub-prediction mode as is. Alternatively, the decoding apparatus can decode the difference between the main prediction mode and the sub-prediction mode. In this case, the decoding apparatus can use the main prediction mode and the difference to decode the sub-prediction mode.

[0300] When multi-mode prediction is not used for the current decoded block in step S3102, in step S3106, the device used for decoding decodes the intra-prediction mode of the current decoded block.

[0301] The intra-prediction mode of the current decoding block can be decoded using the MPM candidate for the current decoding block. (Already referenced...) Figure 18 and Figure 22 The decoding of the intra-prediction mode of the current decoded block using MPM candidates is described in detail, so its description will be omitted.

[0302] Although the exemplary method of the present invention is represented as a series of operations for clarity, the order of the steps is not limited thereto. If necessary, the illustrated steps may be performed simultaneously or in different orders. To implement the method according to the present invention, additional steps may be added to the illustrative steps, some steps may be excluded from the illustrative steps, or additional steps may be included.

[0303] The various embodiments of the present invention are not intended to list all possible combinations, but rather to illustrate representative aspects of the invention. The descriptions in the various embodiments can be applied independently or in combination of two or more.

[0304] Furthermore, various embodiments of the present invention can be implemented by hardware, firmware, software, or a combination thereof. Hardware implementation can be achieved by using at least one selected from a group of application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, etc.

[0305] The scope of this invention includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations of methods according to various embodiments to be performed on a device or computer, and includes non-transitory computer-readable media storing such software or instructions that are executed on a device or computer.

[0306] Regarding the implementation methods including the above embodiments, the following technical solutions are also disclosed.

[0307] Solution 1. A method for decoding an image, the method comprising: The decoding indicates whether the current decoded block is divided into two partial blocks. The partitioning information includes at least one of the following: symmetric binary tree (SBT) partitioning information indicating whether the current decoded block is divided into two symmetric-shaped partial blocks and asymmetric binary tree (ASBT) partitioning information indicating whether the current decoded block is divided into two asymmetric-shaped partial blocks. When the partitioning information indicates that the current decoded block is divided into two partial blocks, the decoding indication provides information about the partitioning direction of the current decoded block; and The current decoding block is divided into two partial blocks according to the division direction.

[0308] Option 2. As described in Option 1, wherein the division of direction indicates one of the horizontal and vertical directions.

[0309] Option 3. The method described in Option 1 further includes: The most probable mode (MPM) candidate for the current decoding block is determined based on the intra prediction modes of neighboring blocks closest to the current decoding block; Decoding indicates whether there is information about MPM candidates with the same intra-prediction mode as the current decoded block; and Based on this information, the intra-prediction mode of the current decoding block can be derived.

[0310] Option 4. The method as described in Option 3, wherein the number of intra prediction modes available for the current decoding block is variably determined based on the size, shape, or intra prediction modes of adjacent blocks of the current decoding block.

[0311] Option 5. The method described in Option 3, wherein MPM candidates are determined based on the usage frequency of intra-prediction modes in adjacent blocks.

[0312] Scheme 6. The method as described in Scheme 3, wherein when the number of intra-prediction modes available for the current decoding block is different from the number of intra-prediction modes available for adjacent blocks, the MPM candidate indicates the angle of the intra-prediction mode.

[0313] Option 7. A method for decoding an image, the method comprising: Decoding indicates whether multiple intra-frame prediction modes are used for the current decoding block; When it is determined that multiple intra-prediction modes will be used, the decoding indicates the partitioning shape of the current decoded block; and Decode information about the intra-prediction mode of the portions of the blocks included in the current decoded block.

[0314] Option 8. The method as described in Option 7, wherein the information regarding the intra-prediction mode of a partial block includes combination index information indicating a combination of intra-prediction modes of the partial block.

[0315] Option 9. The method described in Option 7, wherein the current decoding block is divided based on a dividing line that is either a straight line or a diagonal line.

[0316] Option 10. A method for encoding an image, the method comprising: The encoding indicates whether the current coded block is divided into two partial blocks. This partitioning information includes at least one of SBT partitioning information indicating whether the current coded block is divided into two symmetrically shaped partial blocks and ASBT partitioning information indicating whether the current coded block is divided into two asymmetrically shaped partial blocks; and When the partitioning information indicates that the current coding block is divided into two partial blocks, the coding indication provides information on the partitioning direction of the current coding block.

[0317] Option 11. The method as described in Option 10, wherein the division direction indicates one of the horizontal and vertical directions.

[0318] Option 12. The method as described in Option 10 further includes: The most probable mode (MPM) candidate for the current coding block is determined based on the intra-prediction mode of neighboring blocks closest to the current coding block. Determine whether the intra-prediction mode of the current coding block is the same as the MPM candidate; and The encoding indicates whether there is information about MPM candidates that are the same as the intra-prediction mode of the current coding block.

[0319] Option 13. The method as described in Option 12, wherein the number of intra prediction modes available for the current coding block is variably determined based on the shape, size, or intra prediction modes of adjacent blocks.

[0320] Option 14. The method as described in Option 12, wherein MPM candidates are determined based on the usage frequency of intra-prediction modes in adjacent blocks.

[0321] Scheme 15. The method as described in Scheme 12, wherein when the number of intra prediction modes available for the current coding block is different from the number of intra prediction modes available for adjacent blocks, the MPM candidate indicates the angle of the intra prediction mode.

[0322] Option 16. A method for encoding an image, the method comprising: The encoding indicates whether multiple intra-frame prediction modes are used for the current coding block; When it is determined that multiple intra-prediction modes will be used, the coding indicates information about the partition shape of the current coding block; and Encode information about the intra-prediction mode of the portions of the current coding block.

[0323] Option 17. The method as described in Option 16, wherein the information regarding the intra-prediction mode of a partial block includes combination index information indicating a combination of intra-prediction modes of the partial block.

[0324] Option 18. The method described in Option 16, wherein the current coding block is divided based on a dividing line that is either a straight line or a diagonal line.

[0325] Industrial applicability This invention can be used to encode / decode images.

Claims

1. An image decoding apparatus, comprising: Memory; as well as At least one processor connected to the memory, the at least one processor being configured to: Determine the intra-prediction mode for the current block; Generate the prediction block of the current block based on the intra-frame prediction mode; and Reconstruct the current block based on the predicted block. Based on the size information of the current block, the intra-prediction mode of the current block is determined differently. The size information of the current block refers to the ratio of its width to its height. Based on the ratio, the number of horizontal intra-frame prediction modes or the number of vertical intra-frame prediction modes that can be applied to the current block are determined differently. Specifically, when the ratio indicates that the current block is rectangular and its height is greater than its width, there are more intra-frame prediction modes in the horizontal direction.

2. An image encoding apparatus, comprising: Memory; as well as At least one processor connected to the memory, the at least one processor being configured to: Determine the intra-prediction mode for the current block; Generate the prediction block of the current block based on the intra-frame prediction mode; and The current block is encoded based on the predicted block. The intra-prediction mode of the current block is determined differently based on the size information of the current block. The size information of the current block refers to the ratio of its width to its height. Based on the ratio, the number of horizontal intra-frame prediction modes or the number of vertical intra-frame prediction modes that can be applied to the current block are determined differently. Specifically, when the ratio indicates that the current block is rectangular and its height is greater than its width, there are more intra-frame prediction modes in the horizontal direction.

3. An apparatus for transmitting a bit stream, comprising: At least one processor, the at least one processor being configured to obtain a bitstream generated by an image encoding method executed by an image encoding device; as well as A transmitter configured to transmit the bit stream. The image encoding method includes: Determine the intra-prediction mode for the current block; Generate the prediction block of the current block based on the intra-frame prediction mode; and The current block is encoded based on the predicted block. Based on the size information of the current block, the intra-prediction mode of the current block is determined differently. The size information of the current block refers to the ratio of its width to its height. Based on the ratio, the number of horizontal intra-frame prediction modes or the number of vertical intra-frame prediction modes that can be applied to the current block are determined differently. Specifically, when the ratio indicates that the current block is rectangular and its height is greater than its width, there are more intra-frame prediction modes in the horizontal direction.

Citation Information

Patent Citations

  • Image processing device and image processing method

    US20130343648A1

  • Method and apparatus for image encoding and decoding using intra prediction

    US20150288980A1