Video encoding method and video decoding method
By dividing the image into blocks of various shapes and determining the size of the encoding unit and block based on the bitstream information, the problem of degradation of image quality in the prior art is solved, and more efficient video encoding and decoding is achieved.
Patent Information
- Application Number
- CN202510242208.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-01-30
- Filing Date
- 2020-01-30
- Publication Date
- 2025-05-13
AI Technical Summary
The existing video encoding technology uses a uniform square encoding unit to cause image quality degradation of the reconstructed image when processing high-resolution images.
By dividing the image into blocks of various shapes, a new video encoding and decoding method is adopted to determine the maximum and minimum sizes of the encoding unit and block using the information obtained from the bitstream to determine whether to divide the current block three times.
The efficiency of video encoding and decoding is improved, the amount of bits to block ratio information is reduced, and the image quality of high-resolution images is improved.
Smart Images

Figure CN119996691A_ABST
Abstract
Description
[0001] This application is a divisional application of a patent application with application date of January 30, 2020, application number 202080012039.9, and title “Video Encoding Method and Video Decoding Method”.
[0002] This application is a continuation-by-law of PCT international application No. PCT / KR2020 / 001418 filed in the Korean Intellectual Property Office on January 30, 2020, which is based on and claims the priority of U.S. provisional application No. 62 / 798,565 filed on January 30, 2019, the disclosure of which is incorporated herein by reference in its entirety. Technical Field
[0003] The present disclosure relates to the field of encoding and decoding images, and more particularly, to a method and apparatus for encoding and decoding videos by dividing images into blocks of various shapes. Background Art
[0004] In a general compression method, a square coding unit is determined by a recursive division process in which whether to divide a coding unit included in a picture is determined when determining the size of the coding unit, and then the coding unit is evenly divided into four coding units of the same size. However, recently, image quality degradation of a reconstructed image caused by using coding units having a uniform square shape for a high-resolution image has become a problem. Therefore, a method and apparatus for dividing a high-resolution image into coding units of various shapes have been proposed.
[0005] The present disclosure provides an encoding method and apparatus and a decoding method and apparatus for efficiently signaling a syntax element regarding the size of a coding unit of various shapes. Summary of the invention
[0006] A method and apparatus for encoding and decoding a video by dividing an image into blocks of various shapes are provided. According to one or more embodiments, a technical problem is to efficiently signal information about a block division method between a video encoding apparatus and a video decoding apparatus so that the encoded video is decoded by using blocks divided from an image into blocks of various shapes.
[0007] According to an aspect of the present disclosure, a video decoding method includes: determining a maximum size of a coding unit and a minimum size of the coding unit by using information about a maximum size of a coding unit obtained from a bitstream; obtaining information about a maximum size of a block allowed to be divided into three and information about a minimum size of a block allowed to be divided into three from a bitstream; determining a maximum size of a block allowed to be divided into three by using the maximum size of the coding unit and the information about the maximum size of the block allowed to be divided into three; determining a minimum size of a block allowed to be divided into three by using the minimum size of the coding unit and the information about the minimum size of the block allowed to be divided into three; determining whether to divide a current block into three based on the maximum size of the block allowed to be divided into three and the minimum size of the block allowed to be divided into three; and decoding a block generated by dividing the current block into three.
[0008] The step of determining a maximum size of a block allowed to be divided into three may include: determining the maximum size of the block allowed to be divided into three based on a value obtained by subtracting information about the maximum size of the block allowed to be divided into three from the maximum size of the coding unit, and the step of determining a minimum size of the block allowed to be divided into three may include: determining the minimum size of the block allowed to be divided into three based on a value obtained by adding the minimum size of the coding unit to the information about the minimum size of the block allowed to be divided into three.
[0009] When the size of the current block is larger than a maximum size of a block allowed to be divided into three or smaller than a minimum size of a block allowed to be divided into three, the current block may not be allowed to be divided into three.
[0010] The video decoding method may also include: obtaining information about a maximum size of a second coding unit having an aspect ratio of 1:4 from a bitstream; determining the maximum size of the second coding unit based on a value obtained by subtracting the information about the maximum size of the second coding unit from the maximum size of the coding unit; and decoding the second coding unit by using the maximum size of the second coding unit.
[0011] The video decoding method may further include: obtaining information about a minimum size of a coding unit from a bitstream; and determining the minimum size of the coding unit based on a value obtained by adding 2 to a value indicated by the information about the minimum size of the coding unit.
[0012] The video decoding method may further include determining a maximum size of a first coding unit having a block having an aspect ratio of 1:1 to be the same as a maximum size of the coding unit.
[0013] The video decoding method may also include: obtaining information about a minimum size of a coding unit from a bitstream; determining a maximum size of a block allowed to be divided into three based on a value obtained by subtracting information about a maximum size of a block allowed to be divided into three from a maximum size of the coding unit; determining a minimum size of a block allowed to be divided into three based on a value obtained by adding information about the minimum size of a block allowed to be divided into three to the minimum size of the coding unit; determining whether to divide a current block into three based on the maximum size of the block allowed to be divided into three and the minimum size of the block allowed to be divided into three; and decoding a block generated by dividing the current block into three.
[0014] According to an aspect of the present disclosure, a video decoding device includes: an obtainer configured to obtain information about a maximum size of a block allowed to be divided into three and information about a minimum size of the block allowed to be divided into three from a bitstream; and a decoder configured to perform the following operations: determine the maximum size of a coding unit by using the information about the maximum size of the coding unit obtained from the bitstream, determine the maximum size of the block allowed to be divided into three by using the maximum size of the coding unit and the information about the maximum size of the block allowed to be divided into three, determine the minimum size of the block allowed to be divided into three by using the minimum size of the coding unit and the information about the minimum size of the block allowed to be divided into three, determine whether to divide a current block into three based on the maximum size of the block allowed to be divided into three and the minimum size of the block allowed to be divided into three, and decode a block generated by dividing the current block into three.
[0015] The maximum size of a block allowed to be divided into three may be determined based on a value obtained by subtracting information about the maximum size of a block allowed to be divided into three from the maximum size of a coding unit, and the minimum size of a block allowed to be divided into three may be determined based on a value obtained by adding information about the minimum size of a block allowed to be divided into three to the minimum size of a coding unit.
[0016] When the size of the current block is larger than a maximum size of a block allowed to be divided into three or smaller than a minimum size of a block allowed to be divided into three, the current block may not be allowed to be divided into three.
[0017] The obtainer may also be configured to obtain information about a maximum size of a second coding unit having an aspect ratio of 1:4 in the block from a bitstream, and the decoder may also be configured to determine the maximum size of the second coding unit based on a value obtained by subtracting the information about the maximum size of the second coding unit from the maximum size of the coding unit, and decode the second coding unit by using the maximum size of the second coding unit.
[0018] The obtainer may be further configured to obtain information about the minimum size of the coding unit from the bitstream, and the decoder may be further configured to determine the minimum size of the coding unit based on a value obtained by adding 2 to a value indicated by the information about the minimum size of the coding unit.
[0019] According to an aspect of the present disclosure, a video encoding method includes: determining a maximum size of a coding unit, a minimum size of a coding unit, a maximum size of a block allowed to be divided into three, and a minimum size of a block allowed to be divided into three; determining whether to divide a current block into three based on the maximum size of the block allowed to be divided into three and the minimum size of the block allowed to be divided into three, and encoding a block generated by dividing the current block into three; encoding information about the maximum size of the coding unit based on the maximum size of the coding unit; encoding information about the maximum size of the block allowed to be divided into three by using the maximum size of the coding unit and the maximum size of the block allowed to be divided into three; and encoding information about the minimum size of the block allowed to be divided into three by using the minimum size of the coding unit and the minimum size of the block allowed to be divided into three.
[0020] The video encoding method may also include: encoding information about a maximum size of a block allowed to be divided into three, based on a value obtained by subtracting a maximum size of a block allowed to be divided into three from a maximum size of a coding unit; and encoding information about a minimum size of a block allowed to be divided into three, based on a value obtained by subtracting a minimum size of a block allowed to be divided into three from a minimum size of a coding unit.
[0021] In the video encoding method, when the size of the current block is larger than a maximum size of a block allowed to be divided into three or smaller than a minimum size of a block allowed to be divided into three, the current block may not be allowed to be divided into three.
[0022] The information about the minimum size of the block allowed to be divided into three parts may correspond to a difference between the minimum size of the coding unit and the minimum size of the block allowed to be divided into three parts.
[0023] The decoder may be further configured to determine a maximum size of a first coding unit having a block having an aspect ratio of 1:1 to be the same as a maximum size of the coding unit.
[0024] A computer-readable recording medium has recorded thereon a program for implementing the video decoding method according to the embodiment on a computer.
[0025] A computer-readable recording medium has recorded thereon a program for implementing the video encoding method according to the embodiment on a computer.
[0026] According to one or more embodiments of the present disclosure, a video encoding device and a video decoding device can perform encoding and decoding by setting information about the maximum size or minimum size of various blocks. This is because the amount of bits used to encode and decode information about the maximum size and the minimum size of blocks for each block ratio and information about the maximum size and the minimum size of blocks according to division shapes can be reduced.
[0027] However, according to an embodiment, the effects that can be achieved by the encoding and decoding method using parallel blocks and pictures and the encoding and decoding device using parallel blocks and pictures are not limited to those described above, and a person of ordinary skill in the art can clearly understand other effects that are not mentioned from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other aspects, features and advantages of certain embodiments of the present disclosure will become more apparent from the following description taken in conjunction with the accompanying drawings, in which: Figure 1 is a schematic block diagram of an image decoding device according to an embodiment; Figure 2 is a flowchart of an image decoding method according to an embodiment; Figure 3 illustrating a process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding apparatus according to an embodiment; Figure 4 illustrating a process of determining at least one coding unit by splitting a non-square coding unit, performed by an image decoding apparatus according to an embodiment; Figure 5 A process of dividing a coding unit based on at least one of block shape information and division shape mode information, performed by an image decoding apparatus according to an embodiment, is illustrated; Figure 6 A method of determining a specific coding unit from among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated; Figure 7 1. illustrates an order in which a plurality of coding units are processed when an image decoding apparatus determines a plurality of coding units by dividing a current coding unit according to an embodiment; Figure 8 illustrating a process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding apparatus when coding units cannot be processed in a specific order according to an embodiment; Fig. 9 illustrating a process of determining at least one coding unit by splitting a first coding unit, performed by an image decoding apparatus according to an embodiment; Fig.10It is shown that when a second coding unit having a non-square shape determined by splitting a first coding unit by an image decoding apparatus satisfies a specific condition, a shape into which the second coding unit may be split is restricted according to an embodiment; Fig.11 illustrates a process of splitting a square coding unit performed by an image decoding apparatus when division shape pattern information cannot indicate that the square coding unit is split into four square coding units according to an embodiment; Fig.12 It is shown that the processing order between a plurality of coding units can be changed according to the process of dividing the coding units according to an embodiment; Fig.13 illustrating a process of determining a depth of a coding unit as a shape and a size of the coding unit change when the coding unit is recursively split so that a plurality of coding units are determined according to an embodiment; Fig.14 illustrates a depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for distinguishing a coding unit according to an embodiment; Fig.15 Determining a plurality of coding units based on a plurality of specific data units included in a picture according to an embodiment is shown; Fig.16 is a block diagram of an image encoding and decoding system according to an embodiment; Fig.17 is a block diagram of a video decoding device according to an embodiment; Fig.18 is a flowchart of a video decoding method according to an embodiment; Fig.19 is a block diagram of a video encoding apparatus according to an embodiment; Fig. 20 is a flowchart of a video encoding method according to an embodiment; Fig.21 shows the shapes of blocks that are allowed in a block partition tree structure according to an embodiment; Fig. 22 showing information about a maximum size and a minimum size of a block determined according to a block ratio according to an embodiment; Fig.23 shows information about a maximum size and a minimum size of a block determined according to a block ratio according to another embodiment; Fig.24 shows information about a maximum size and a minimum size of a block determined according to a block ratio according to another embodiment; Fig.25 shows syntax elements for signaling information about the maximum and minimum sizes of blocks according to an embodiment; Fig.26 Show according to Fig.25 A relationship equation for determining the size / number of the maximum block and the size / number of the minimum block determined by the syntax element of; Fig. 27 Show according to Fig.25 A relational equation for determining a maximum size and a minimum size of a block according to a block ratio of a syntax element of; Fig.28 Show according to Fig.25 A relation equation for determining a maximum size and a minimum size of a block on which a split unit coding unit (SUCO) is performed of a syntax element of; Fig.29 shows syntax elements for signaling information about a maximum size and a minimum size of a block according to another embodiment; Fig.30 Show according to Fig.29 A relationship equation for determining the size / number of the maximum block and the size / number of the minimum block determined by the syntax element of ; and Fig.31 Show according to Fig.29 The syntax element of is used to determine the relationship equation between the maximum size and the minimum size of the block according to the block ratio. DETAILED DESCRIPTION
[0029] Since the present disclosure allows various changes and many examples, specific embodiments will be described in detail in the drawings and in the written description. However, this is not intended to limit the present disclosure to a specific mode of practice, and it will be understood that all changes, equivalents and substitutions that do not depart from the spirit and technical scope of the present disclosure are included in the present disclosure.
[0030] In the description of the embodiments, when it is considered that the specific detailed explanation of the related art may unnecessarily obscure the essence of the present disclosure, the specific detailed explanation of the related art is omitted. In addition, the numbers (e.g., first, second, etc.) used in the description of the specification are merely identifier codes for distinguishing one element from another element.
[0031] Furthermore, in the present specification, it will be understood that when elements are “connected” or “coupled” to each other, the elements may be directly connected or coupled to each other, but may alternatively be connected or coupled to each other through intermediate elements between the elements, unless otherwise specified.
[0032] In this specification, with respect to an element represented as a "unit" or a "module", two or more elements may be combined into one element, or one element may be divided into two or more elements according to subdivided functions. In addition, each element described below may additionally perform some or all of the functions performed by another element in addition to its own main function, and some of the main functions of each element may be completely performed by another component.
[0033] Furthermore, in this specification, an “image” or a “screen” may refer to a still image or a moving image of a video, that is, the video itself.
[0034] In addition, in this specification, "sample" means data assigned to a sampling position of an image, that is, data to be processed. For example, a pixel value of an image in a spatial domain and a transform coefficient on a transform area may be a sample. A unit including at least one such sample may be defined as a block.
[0035] Also, in the present specification, a 'current block' may mean a block of a maximum coding unit, a coding unit, a prediction unit, or a transformation unit of a current image to be encoded or decoded.
[0036] In the present specification, a motion vector in a list 0 direction may mean a motion vector indicating a block in a reference picture included in list 0, and a motion vector in a list 1 direction may mean a motion vector indicating a block in a reference picture included in list 1. In addition, a unidirectional motion vector may mean a motion vector indicating a block in a reference picture included in list 0 or list 1, and a bidirectional motion vector may mean that a motion vector includes a motion vector in a list 0 direction and a motion vector in a list 1 direction.
[0037] In the following, reference will be made to Figures 1 to 16 The image encoding device and the image decoding device as well as the image encoding method and the image decoding method according to the embodiment are described. Figures 3 to 16 A method for determining a data unit of an image according to an embodiment is described, and reference will be made to Figures 17 to 28 A video encoding / decoding method using tiles and tile groups according to an embodiment is described.
[0038] In the following, reference will be made to Figure 1 and Figure 2 A method and apparatus for adaptive selection based on various shapes of coding units according to an embodiment of the present disclosure are described.
[0039] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.
[0040] The image decoding apparatus 100 may include a receiver 110 and a decoder 120. The receiver 110 and the decoder 120 may include at least one processor. In addition, the receiver 110 and the decoder 120 may include a memory storing instructions to be executed by the at least one processor.
[0041] The receiver 110 may receive a bitstream. The bitstream includes information of an image encoded by the image encoding device 1900 described later. In addition, the bitstream may be sent from the image encoding device 1900. The image encoding device 1900 and the image decoding device 100 may be connected by wire or wirelessly, and the receiver 110 may receive the bitstream by wire or wirelessly. The receiver 110 may receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoder 120 may reconstruct the image based on the information obtained from the received bitstream. The decoder 120 may obtain syntax elements for reconstructing the image from the bitstream. The decoder 120 may reconstruct the image based on the syntax elements.
[0042] Will refer to Figure 2 The operation of the image decoding apparatus 100 is described in detail.
[0043] Figure 2 is a flowchart of an image decoding method according to an embodiment.
[0044] According to an embodiment of the present disclosure, the receiver 110 receives a bit stream.
[0045] The image decoding apparatus 100 obtains a binary bit string corresponding to a division shape pattern of a coding unit from a bitstream (operation 210). The image decoding apparatus 100 determines a division rule of the coding unit (operation 220). In addition, the image decoding apparatus 100 divides the coding unit into a plurality of coding units based on at least one of the binary bit string corresponding to the division shape pattern and the division rule (operation 230). The image decoding apparatus 100 may determine an allowable first range of the size of the coding unit according to the aspect ratio of the coding unit in order to determine the division rule. The image decoding apparatus 100 may determine an allowable second range of the size of the coding unit according to the division shape pattern of the coding unit in order to determine the division rule.
[0046] Hereinafter, the division of coding units will be described in detail according to an embodiment of the present disclosure.
[0047] First, a picture may be divided into one or more slices or one or more tiles. A slice or a tile may be a sequence of one or more maximum coding units (coding tree units (CTUs)). There is a maximum coding block (coding tree block (CTB)) conceptually comparable to the maximum coding unit (CTU).
[0048] A maximum coding block (CTB) represents an N×N block including N×N samples (N is an integer). Each color component can be divided into one or more maximum coding blocks.
[0049] When a picture includes three sample arrays (sample arrays for Y component, Cr component and Cb component), the maximum coding unit (CTU) includes a maximum coding block of luma samples, two corresponding maximum coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When the picture is a monochrome picture, the maximum coding unit includes a maximum coding block of monochrome samples and a syntax structure for encoding monochrome samples. When the picture is a picture encoded in a color plane separated according to color components, the maximum coding unit includes the picture and a syntax structure for encoding samples of the picture.
[0050] One maximum coding block (CTB) may be divided into M×N coding blocks including M×N samples (M and N are integers).
[0051] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) includes a coding block of luma samples, two corresponding coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When the picture is a monochrome picture, the coding unit includes a coding block of monochrome samples and a syntax structure for encoding monochrome samples. When the picture is a picture encoded in color planes separated according to color components, the coding unit includes the picture and a syntax structure for encoding the samples of the picture.
[0052] As described above, the maximum coding block and the maximum coding unit are conceptually distinguished from each other, and the coding block and the coding unit are conceptually distinguished from each other. That is, the (maximum) coding unit refers to a data structure including a (maximum) coding block containing corresponding samples and a syntax element corresponding to the (maximum) coding block. However, because a person of ordinary skill in the art understands that a (maximum) coding unit or a (maximum) coding block refers to a block of a specific size including a specific number of samples, unless otherwise described, the maximum coding block and the maximum coding unit or the coding block and the coding unit are mentioned in the following description without distinction.
[0053] The image may be divided into maximum coding units (CTUs). The size of each maximum coding unit may be determined based on information obtained from a bitstream. The shape of each maximum coding unit may be a square shape of the same size. However, the present disclosure is not limited thereto.
[0054] For example, information about the maximum size of the luma coding block may be obtained from the bitstream. For example, the maximum size of the luma coding block indicated by the information about the maximum size of the luma coding block may be one of 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, and 256×256.
[0055] For example, information about the luminance block size difference and the maximum size of the luminance coding block that can be divided into two may be obtained from the bitstream. The information about the luminance block size difference may refer to the size difference between the luminance maximum coding unit and the maximum luminance coding block that can be divided into two. Therefore, when the information about the maximum size of the luminance coding block that can be divided into two obtained from the bitstream and the information about the luminance block size difference are combined with each other, the size of the luminance maximum coding unit may be determined. The size of the chrominance maximum coding unit may be determined by using the size of the luminance maximum coding unit. For example, when the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chrominance block may be half the size of the luminance block, and the size of the chrominance maximum coding unit may be half the size of the luminance maximum coding unit.
[0056] According to an embodiment, since information about the maximum size of a brightness coding block that can be divided into two is obtained from a bitstream, the maximum size of a brightness coding block that can be divided into two can be variably determined. In contrast, the maximum size of a brightness coding block that can be divided into three can be fixed. For example, the maximum size of a brightness coding block that can be divided into three in an I picture can be 32×32, and the maximum size of a brightness coding block that can be divided into three in a P picture or a B picture can be 64×64.
[0057] In addition, the maximum coding unit may be hierarchically split into coding units based on the split shape pattern information obtained from the bitstream. At least one of information indicating whether to perform four-partitioning, information indicating whether to perform multi-partitioning, split direction information, or split type information may be obtained from the bitstream as the split shape pattern information.
[0058] For example, the information indicating whether to perform four-division may indicate whether the current coding unit is to be four-divided (QUAD_SPLIT) or not to be four-divided.
[0059] When the current coding unit is not four-divided, the information indicating whether to perform multi-split may indicate whether the current coding unit will no longer be split (NO_SPLIT) or will be two-divided / three-divided.
[0060] When the current coding unit is two-partitioned or three-partitioned, the split direction information indicates that the current coding unit is split in one direction of a horizontal direction and a vertical direction.
[0061] When the current coding unit is split in the horizontal direction or the vertical direction, the split type information indicates whether the current coding unit is split into two or three.
[0062] The split mode of the current coding unit may be determined according to the split direction information and the split type information. When the current coding unit is split into two in the horizontal direction, the split mode may be determined as a horizontal two-split mode (SPLIT_BT_HOR), when the current coding unit is split into three in the horizontal direction, the split mode may be determined as a horizontal three-split mode (SPLIT_TT_HOR), when the current coding unit is split into two in the vertical direction, the split mode may be determined as a vertical two-split mode (SPLIT_BT_VER), and when the current coding unit is split into three in the vertical direction, the split mode may be determined as a vertical three-split mode SPLIT_TT_VER.
[0063] The image decoding device 100 may obtain a binary bit string of the division shape pattern information from the bit stream. The form of the bit stream received by the image decoding device 100 may include a fixed-length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The binary bit string is information of a binary number. The binary bit string may include at least one bit. The image decoding device 100 may obtain the division shape pattern information corresponding to the binary bit string based on the division rule. The image decoding device 100 may determine whether to divide the coding unit into four, whether to not divide the coding unit, the division direction, and the division type based on one binary bit string.
[0064] The coding unit may be smaller than or equal to the maximum coding unit. For example, since the maximum coding unit is a coding unit having the maximum size, the maximum coding unit is one of the coding units. When the division shape pattern information about the maximum coding unit indicates that division is not performed, the coding unit determined in the maximum coding unit has the same size as the maximum coding unit. When the division shape pattern information about the maximum coding unit indicates that division is performed, the maximum coding unit may be divided into coding units. In addition, when the division shape pattern information about the coding unit indicates that division is performed, the coding unit may be divided into smaller coding units. However, the division of the image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. Reference will be made to Figures 3 to 16 The division of coding units is described in detail.
[0065] In addition, one or more prediction blocks for prediction may be determined from the coding unit. The prediction block may be equal to or smaller than the coding unit. In addition, one or more transform blocks for transformation may be determined from the coding unit. The transform block may be equal to or smaller than the coding unit.
[0066] The shapes and sizes of the transform block and the prediction block may be unrelated to each other.
[0067] In another embodiment, prediction may be performed by using a coding unit as a prediction unit. In addition, transformation may be performed by using a coding unit as a transformation block.
[0068] Will refer to Figures 3 to 16 The division of the coding unit is described in detail. The current block and the neighboring block of the present disclosure may indicate one of the maximum coding unit, the coding unit, the prediction block, and the transformation block. In addition, the current block of the current coding unit is a block currently being decoded or encoded or a block currently being divided. The neighboring block may be a block reconstructed before the current block. The neighboring block may be adjacent to the current block in space or time. The neighboring block may be located at one of the lower left, left side, upper left, upper, upper right, right side, and lower right side of the current block.
[0069] Figure 3 A process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0070] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N. Here, N may be a positive integer. The block shape information is information indicating at least one of a shape, a direction, an aspect ratio, or a size of a coding unit.
[0071] The shape of the coding unit may include a square and a non-square. When the width length and height length of the coding unit are the same (that is, when the block shape of the coding unit is 4N×4N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a square. The image decoding apparatus 100 may determine the shape of the coding unit as a non-square.
[0072] When the width and height of the coding unit are different from each other (that is, when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding apparatus 100 may determine the aspect ratio in the block shape information of the coding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, or 32:1. In addition, the image decoding apparatus 100 may determine whether the coding unit is in the horizontal direction or in the vertical direction based on the width length and height length of the coding unit. In addition, the image decoding apparatus 100 may determine the size of the coding unit based on at least one of the width length, height length, or area of the coding unit.
[0073] According to an embodiment, the image decoding apparatus 100 may determine the shape of the coding unit by using the block shape information, and may determine the division method of the coding unit by using the division shape pattern information. That is, the coding unit division method indicated by the division shape pattern information may be determined based on the block shape indicated by the block shape information used by the image decoding apparatus 100.
[0074] The image decoding device 100 may obtain the division shape pattern information from the bitstream. However, the embodiment is not limited thereto, and the image decoding device 100 and the image encoding device 1900 may determine the pre-agreed division shape pattern information based on the block shape information. The image decoding device 100 may determine the pre-agreed division shape pattern information for the maximum coding unit or the minimum coding unit. For example, the image decoding device 100 may determine the division shape pattern information for the maximum coding unit as four divisions. In addition, the image decoding device 100 may determine the division shape pattern information about the minimum coding unit as "no division". Specifically, the image decoding device 100 may determine the size of the maximum coding unit to be 256×256. The image decoding device 100 may determine the pre-agreed division shape pattern information to be four divisions. Four divisions are division shape patterns in which the width and height of the coding unit are both divided into two equal parts. The image decoding device 100 may obtain a coding unit of a size of 128×128 from a maximum coding unit of a size of 256×256 based on the division shape pattern information. In addition, the image decoding device 100 may determine the size of the minimum coding unit to be 4×4. The image decoding apparatus 100 may obtain division shape pattern information indicating “no division” for a minimum coding unit.
[0075] According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding apparatus 100 may determine whether to not split the square coding unit, whether to vertically split the square coding unit, whether to horizontally split the square coding unit, or whether to split the square coding unit into four coding units based on the split shape mode information. Figure 3 , when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may not divide the coding unit 310a having the same size as the current coding unit 300 based on the division shape pattern information indicating non-division, or may determine the coding unit 310b, 310c, 310d, 310e or 310f divided based on the division shape pattern information indicating a specific division method.
[0076] Reference Figure 3According to an embodiment, the image decoding apparatus 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that division is performed in the vertical direction. The image decoding apparatus 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that division is performed in the horizontal direction. The image decoding apparatus 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the division shape pattern information indicating that division is performed in the vertical and horizontal directions. According to an embodiment, the image decoding apparatus 100 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that three divisions are performed in the vertical direction. The image decoding apparatus 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that three divisions are performed in the horizontal direction. However, the division method of the coding unit having a square shape is not limited to the above method, and the division shape pattern information may indicate various methods. A specific partitioning method for partitioning the square coding unit will be described in detail below with respect to various embodiments.
[0077] Figure 4 A process of determining at least one coding unit by splitting a non-square coding unit, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0078] According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding apparatus 100 may determine whether to not split the non-square current coding unit or whether to split the non-square current coding unit by using a specific splitting method based on the splitting shape pattern information. Figure 4 , when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding apparatus 100 may determine a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 based on the division shape pattern information indicating non-division, or determine coding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c divided based on the division shape pattern information indicating a specific division method. A specific division method for dividing a non-square coding unit will be described in detail below with respect to various embodiments.
[0079] According to an embodiment, the image decoding apparatus 100 may determine a splitting method of a coding unit by using splitting shape pattern information, and in this case, the splitting shape pattern information may indicate the number of one or more coding units generated by splitting the coding unit. Figure 4 When the division shape pattern information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the division shape pattern information.
[0080] According to an embodiment, when the image decoding apparatus 100 splits the non-square current coding unit 400 or 450 based on the split shape pattern information, the image decoding apparatus 100 may split the current coding unit considering the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding apparatus 100 may determine a plurality of coding units by splitting the long side of the current coding unit 400 or 450 considering the shape of the current coding unit 400 or 450.
[0081] According to an embodiment, when the division shape pattern information indicates that the coding unit is divided (three-divided) into an odd number of blocks, the image decoding apparatus 100 may determine the odd number of coding units included in the current coding unit 400 or 450. For example, when the division shape pattern information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding apparatus 100 may divide the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.
[0082] According to an embodiment, the aspect ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the aspect ratio is 1:4, because the width length is longer than the height length, the block shape information may be a horizontal direction. When the aspect ratio is 4:1, because the width length is shorter than the height length, the block shape information may be a vertical direction. The image decoding device 100 may determine the current coding unit to be divided into an odd number of blocks based on the division shape mode information. In addition, the image decoding device 100 may determine the division direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is in the vertical direction, the image decoding device 100 may determine the coding units 430a to 430c by dividing the current coding unit 400 in the horizontal direction. In addition, when the current coding unit 450 is in the horizontal direction, the image decoding device 100 may determine the coding units 480a to 480c by dividing the current coding unit 450 in the vertical direction.
[0083] According to an embodiment, the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and not all determined coding units may have the same size. For example, a specific coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have a size different from that of other coding units 430a and 430c or 480a and 480c. That is, the coding unit determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, all odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.
[0084] According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of blocks, the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and further, may impose a specific restriction on at least one of the odd number of coding units generated by dividing the current coding unit 400 or 450. Figure 4 , the image decoding apparatus 100 may set a decoding process for a coding unit 430b or 480b that is located at the center of three coding units 430a, 430b, and 430c or 480a, 480b, and 480c generated by dividing the current coding unit 400 or 450 to be different from a decoding process of other coding units 430a and 430c or 480a or 480c. For example, unlike other coding units 430a and 430c or 480a and 480c, the image decoding apparatus 100 may restrict the coding unit 430b or 480b at the center position from being further divided or divided only a specific number of times.
[0085] Figure 5 A process of splitting a coding unit based on at least one of block shape information and division shape pattern information, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0086] According to an embodiment, the image decoding apparatus 100 may determine whether to divide the square first coding unit 500 into coding units or not to divide the square first coding unit 500 based on at least one of the block shape information or the division shape pattern information. According to an embodiment, when the division shape pattern information indicates that the first coding unit 500 is divided in the horizontal direction, the image decoding apparatus 100 may determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The first coding unit, the second coding unit, and the third coding unit used according to the embodiment are terms for understanding the relationship before and after dividing the coding unit. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit follows the above description.
[0087] According to an embodiment, the image decoding apparatus 100 may determine whether to split the determined second coding unit 510 into coding units or not to split the determined second coding unit 510 based on the division shape pattern information. Figure 5 , the image decoding apparatus 100 may split the non-square second coding unit 510 determined by splitting the first coding unit 500 into one or more third coding units 520a, or 520b, 520c, and 520d based on the split shape pattern information, or may not split the non-square second coding unit 510. The image decoding apparatus 100 may obtain the split shape pattern information, and may obtain a plurality of second coding units of various shapes (for example, the second coding unit 510) by splitting the first coding unit 500 based on the obtained split shape pattern information, and may split the second coding unit 510 by using the split method of the first coding unit 500 based on the split shape pattern information. According to an embodiment, when the first coding unit 500 is split into the second coding unit 510 based on the split shape pattern information of the first coding unit 500, the second coding unit 510 may also be split into the third coding unit 520a, or 520b, 520c, and 520d based on the split shape pattern information of the second coding unit 510. That is, the coding unit may be recursively split based on the split shape pattern information of each coding unit. Thus, a square coding unit may be determined by splitting a non-square coding unit, and a non-square coding unit may be determined by recursively splitting a square coding unit.
[0088] Reference Figure 5, a specific coding unit (e.g., a coding unit at a center position or a square coding unit) among the odd-numbered third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 may be recursively divided. According to an embodiment, a square third coding unit 520c among the odd-numbered third coding units 520b, 520c, and 520d may be divided into a plurality of fourth coding units in the horizontal direction. A non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d may be divided into a plurality of coding units again. For example, a non-square fourth coding unit 530b or 530d may be divided into an odd-numbered coding unit again. A method that can be used to recursively divide coding units will be described below with respect to various embodiments.
[0089] According to an embodiment, the image decoding apparatus 100 may divide each of the third coding units 520a, 520b, 520c, and 520d into coding units based on the division shape pattern information. In addition, the image decoding apparatus 100 may determine not to divide the second coding unit 510 based on the division shape pattern information. According to an embodiment, the image decoding apparatus 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding apparatus 100 may impose a specific restriction on a specific third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding apparatus 100 may limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d to no longer be divided or to be divided a set number of times.
[0090] Reference Figure 5 , the image decoding apparatus 100 may limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, to be divided by using a specific division method (e.g., only divided into four coding units or divided by using the division method of the second coding unit 510), or to be divided only a specific number of times (e.g., only divided n times (where n>0)). However, the limitation on the third coding unit 520c at the center position is not limited to the above example, and may include various limitations for decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.
[0091] According to an embodiment, the image decoding apparatus 100 may obtain split shape pattern information for splitting the current coding unit from a specific position in the current coding unit.
[0092] Figure 6 A method of determining a specific coding unit from among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0093] Reference Figure 6 , the division shape mode information of the current coding unit 600 or 650 may be obtained from a sample at a specific position (e.g., a sample 640 or 690 at a center position) among a plurality of samples included in the current coding unit 600 or 650. However, the specific position in the current coding unit 600 where the division shape mode information can be obtained is not limited to Figure 6 , and may include various positions (e.g., upper, lower, left, right, upper left, lower left, upper right, and lower right positions) included in the current coding unit 600. The image decoding apparatus 100 may obtain the division shape pattern information from a specific position, and may determine whether to divide the current coding unit into coding units having various shapes and various sizes or not to divide the current coding unit.
[0094] According to an embodiment, when the current coding unit is divided into a specific number of coding units, the image decoding apparatus 100 may select one of the coding units. As will be described below with respect to various embodiments, various methods may be used to select one of the plurality of coding units.
[0095] According to an embodiment, the image decoding apparatus 100 may split a current coding unit into a plurality of coding units, and may determine a coding unit at a specific position.
[0096] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a center position among the odd-numbered coding units using information indicating the positions of the odd-numbered coding units. Figure 6, the image decoding apparatus 100 may determine the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding apparatus 100 may determine the intermediate coding unit 620b or the intermediate coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding apparatus 100 may determine the coding unit 620b of the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of specific samples included in the coding units 620a, 620b, and 620c. In detail, the image decoding apparatus 100 may determine the coding unit 620b at the center position by determining the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.
[0097] According to an embodiment, the information indicating the positions of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture. According to an embodiment, the information indicating the positions of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include information indicating the width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and the width or height may correspond to the information indicating the difference between the coordinates of the coding units 620a, 620b, and 620c in the picture. That is, the image decoding apparatus 100 may determine the coding unit 620b at the center position by directly using the information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture or by using the information about the width or height of the coding unit corresponding to the difference between the coordinates.
[0098] According to an embodiment, information indicating the position of the upper left sample point 630a of the upper coding unit 620a may include coordinates (xa, ya), information indicating the position of the upper left sample point 630b of the middle coding unit 620b may include coordinates (xb, yb), and information indicating the position of the upper left sample point 630c of the lower coding unit 620c may include coordinates (xc, yc). The image decoding apparatus 100 may determine the middle coding unit 620b by using the coordinates of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c. For example, when the coordinates of the upper left sample points 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the sample point 630b at the center position may be determined as the coding unit at the center position among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the upper left sample points 630a, 630b, and 630c may include coordinates indicating absolute positions in the picture, or coordinates (dxb, dyb) indicating the relative position of the upper left sample point 630b of the middle coding unit 620b relative to the position of the upper left sample point 630a of the upper coding unit 620a and coordinates (dxc, dyc) indicating the relative position of the upper left sample point 630c of the lower coding unit 620c relative to the position of the upper left sample point 630a of the upper coding unit 620a may be used. A method of determining a coding unit at a specific position by using the coordinates of the sample points included in the coding unit as information indicating the positions of the sample points is not limited to the above method, and may include various arithmetic methods capable of using the coordinates of the sample points.
[0099] According to an embodiment, the image decoding apparatus 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select one of the coding units 620a, 620b, and 620c based on a specific criterion. For example, the image decoding apparatus 100 may select a coding unit 620b having a size different from that of other coding units from among the coding units 620a, 620b, and 620c.
[0100] According to an embodiment, the image decoding apparatus 100 may determine the width or height of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya) as information indicating the position of the upper left sample point 630a of the upper coding unit 620a, the coordinates (xb, yb) as information indicating the position of the upper left sample point 630b of the middle coding unit 620b, and the coordinates (xc, yc) as information indicating the position of the upper left sample point 630c of the lower coding unit 620c. The image decoding apparatus 100 may determine the size of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the image decoding apparatus 100 may determine the width of the upper coding unit 620a as the width of the current coding unit 600. The image decoding apparatus 100 may determine the height of the upper coding unit 620a as yb-ya. According to an embodiment, the image decoding apparatus 100 may determine the width of the intermediate coding unit 620b as the width of the current coding unit 600. The image decoding apparatus 100 may determine the height of the intermediate coding unit 620b as yc-yb. According to an embodiment, the image decoding apparatus 100 may determine the width or height of the lower coding unit 620c by using the width or height of the current coding unit 600 or the width or height of the upper coding unit 620a and the intermediate coding unit 620b. The image decoding apparatus 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 620a to 620c. Referring to Figure 6 , the image decoding apparatus 100 may determine the intermediate coding unit 620b having a size different from the sizes of the upper coding unit 620a and the lower coding unit 620c as the coding unit at the specific position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units performed by the image decoding apparatus 100 corresponds only to an example of determining the coding unit at the specific position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the specific position by comparing the size of the coding unit determined based on the coordinates of the specific sample points may be used.
[0101] The image decoding apparatus 100 may determine the width or height of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd) as information indicating the position of the upper left sample point 670a of the left coding unit 660a, the coordinates (xe, ye) as information indicating the position of the upper left sample point 670b of the middle coding unit 660b, and the coordinates (xf, yf) as information indicating the position of the upper left sample point 670c of the right coding unit 660c. The image decoding apparatus 100 may determine the size of each of the coding units 660a, 660b, and 660c by using the coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the coding units 660a, 660b, and 660c.
[0102] According to an embodiment, the image decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the width or height of the left coding unit 660a and the middle coding unit 660b. The image decoding device 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 660a to 660c. Referring to Figure 6 , the image decoding apparatus 100 may determine the middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as the coding unit at the specific position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units, performed by the image decoding apparatus 100, corresponds only to an example of determining the coding unit at the specific position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the specific position by comparing the size of the coding unit determined based on the coordinates of the specific sample points may be used.
[0103] However, the position of the sample considered in determining the position of the coding unit is not limited to the above-mentioned upper left position, and information on arbitrary positions of the samples included in the coding unit may be used.
[0104] According to an embodiment, the image decoding apparatus 100 may select a coding unit at a specific position from an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, when the current coding unit is a non-square shape having a height and a width longer than the height, the image decoding apparatus 100 may determine a coding unit at a specific position along the horizontal direction. That is, the image decoding apparatus 100 may determine one of the coding units at different positions along the horizontal direction and impose restrictions on the coding unit. When the current coding unit is a non-square shape having a width and a height longer than the width, the image decoding apparatus 100 may determine a coding unit at a specific position along the vertical direction. That is, the image decoding apparatus 100 may determine one of the coding units at different positions along the vertical direction and may impose restrictions on the coding unit.
[0105] According to an embodiment, the image decoding apparatus 100 may use information indicating respective positions of even-numbered coding units to determine a coding unit at a specific position among the even-numbered coding units. The image decoding apparatus 100 may determine the even-numbered coding units by dividing (dividing) the current coding unit, and may determine the coding unit at the specific position by using information about the positions of the even-numbered coding units. Operations related thereto may be similar to those already described above with respect to Figure 6 The operation of determining a coding unit at a specific position (eg, a center position) among odd-numbered coding units described in detail corresponds, and thus a detailed description thereof is not provided here.
[0106] According to an embodiment, when a non-square current coding unit is split into a plurality of coding units, specific information about a coding unit at a specific position may be used in a split operation to determine a coding unit at a specific position among the plurality of coding units. For example, the image decoding apparatus 100 may determine a coding unit at a center position among the plurality of coding units determined by splitting the current coding unit using at least one of block shape information or split shape pattern information stored in samples included in an intermediate coding unit in a split operation.
[0107] Reference Figure 6, the image decoding apparatus 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the division shape pattern information, and may determine the coding unit 620b at the center position among the plurality of coding units 620a, 620b, and 620c. In addition, the image decoding apparatus 100 may determine the coding unit 620b at the center position in consideration of the position where the division shape pattern information is obtained. That is, the division shape pattern information of the current coding unit 600 may be obtained from the sample point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the division shape pattern information, the coding unit 620b including the sample point 640 may be determined as the coding unit at the center position. However, information for determining the coding unit at the center position is not limited to the division shape pattern information, and the coding unit at the center position may be determined using various types of information.
[0108] According to an embodiment, specific information for identifying a coding unit at a specific position may be obtained from a specific sample point included in a coding unit to be determined. Figure 6 , the image decoding apparatus 100 may determine a coding unit at a specific position (e.g., a coding unit at a center position of the divided coding units) among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, using division shape pattern information obtained from a sample at a specific position in the current coding unit 600 (e.g., a sample at a center position of the divided coding unit 600). That is, the image decoding apparatus 100 may determine a sample at a specific position by considering a block shape of the current coding unit 600, determine a coding unit 620b including a sample for which specific information (e.g., division shape pattern information) may be obtained from among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may impose specific restrictions on the coding unit 620b. Referring to Figure 6 According to an embodiment, in a decoding operation, the image decoding apparatus 100 may determine a sample 640 at a center position of a current coding unit 600 as a sample from which specific information may be obtained, and may impose a specific restriction on a coding unit 620b including the sample 640. However, the position of the sample from which specific information may be obtained is not limited to the above-mentioned position, and may include any position of a sample included in the coding unit 620b to be determined as subject to restriction.
[0109] According to an embodiment, the position of the sample at which specific information can be obtained may be determined based on the shape of the current coding unit 600. According to an embodiment, the block shape information may indicate whether the current coding unit has a square shape or a non-square shape, and the position of the sample at which specific information can be obtained may be determined based on the shape. For example, the image decoding apparatus 100 may determine a sample located on a boundary for dividing at least one of the width or the height of the current coding unit in half as a sample at which specific information can be obtained by using at least one of the information about the width of the current coding unit or the information about the height of the current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding apparatus 100 may determine one of the samples including the boundary for dividing the long side of the current coding unit in half as a sample at which predetermined information can be obtained.
[0110] According to an embodiment, when a current coding unit is divided into a plurality of coding units, the image decoding device 100 may use division shape pattern information to determine a coding unit at a specific position in the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain division shape pattern information from a sample at a specific position in the coding unit, and divide a plurality of coding units generated by dividing the current coding unit by using the division shape pattern information, wherein the division shape pattern information is obtained from a sample at a specific position in each of the plurality of coding units. That is, the coding unit may be recursively divided based on the division shape pattern information, wherein the division shape pattern information is obtained from a sample at a specific position in each coding unit. As has been described above, Figure 5 An operation of recursively splitting the coding unit is described, and thus a detailed description thereof will not be provided here.
[0111] According to an embodiment, the image decoding apparatus 100 may determine one or more coding units by splitting a current coding unit, and may determine an order in which to decode the one or more coding units based on a specific block (for example, the current coding unit).
[0112] Figure 7 An order in which a plurality of coding units are processed when an image decoding apparatus determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.
[0113] According to an embodiment, based on the division shape pattern information, the image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, determine the second coding units 730a and 730b by dividing the first coding unit 700 in the horizontal direction, or determine the second coding units 750a to 750d by dividing the first coding unit 700 in the vertical direction and the horizontal direction.
[0114] Reference Figure 7 , the image decoding apparatus 100 may determine to process the second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction in a horizontal direction order 710c. The image decoding apparatus 100 may determine to process the second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction in a vertical direction order 730c. The image decoding apparatus 100 may determine to process the second coding units 750a to 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions in a specific order (for example, in a raster scan order or a zigzag scan order 750e), wherein the coding units in one row are processed in the specific order and then the coding units in the next row are processed.
[0115] According to an embodiment, the image decoding apparatus 100 may recursively divide the coding unit. Figure 7 , the image decoding apparatus 100 may determine a plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d by dividing the first coding unit 700, and may recursively divide each of the determined plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d. A division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to a division method of the first coding unit 700. In this way, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may be independently divided into a plurality of coding units. Referring to Figure 7 , the image decoding apparatus 100 may determine the second coding units 710a and 710b by splitting the first coding unit 700 in a vertical direction, and may determine whether to independently split or not split each of the second coding units 710a and 710b.
[0116] According to an embodiment, the image decoding apparatus 100 may determine the third coding units 720a and 720b by splitting the left second coding unit 710a in a horizontal direction, and may not split the right second coding unit 710b.
[0117] According to an embodiment, the processing order of the coding units may be determined based on the operation of dividing the coding units. In other words, the processing order of the coding units after the division may be determined based on the processing order of the coding units immediately before the division. The image decoding apparatus 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Since the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b may be processed in a vertical direction order 720c. Since the left second coding unit 710a and the right second coding unit 710b are processed in a horizontal direction order 710c, the right second coding unit 710b may be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in a vertical direction order 720c. The operation of determining the processing order of coding units based on the coding units before splitting is not limited to the above example, and coding units split and determined to be various shapes may be independently processed in a specific order using various methods.
[0118] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding apparatus, is illustrated when coding units cannot be processed in a predetermined order according to an embodiment.
[0119] According to an embodiment, the image decoding apparatus 100 may determine that the current coding unit is split into an odd number of coding units based on the obtained division shape pattern information. Figure 8 , the square first coding unit 800 may be divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b may be independently divided into third coding units 820a and 820b and 820c to 820e. According to an embodiment, the image decoding apparatus 100 may determine a plurality of third coding units 820a and 820b by dividing the left second coding unit 810a in the horizontal direction, and may divide the right second coding unit 810b into an odd number of third coding units 820c to 820e.
[0120] According to an embodiment, the image decoding apparatus 100 may determine whether any coding unit is split into an odd number of coding units by determining whether the third coding units 820a and 820b and 820c to 820e can be processed in a specific order. Figure 8, the image decoding apparatus 100 may determine the third coding units 820a and 820b and 820c to 820e by recursively dividing the first coding unit 800. The image decoding apparatus 100 may determine whether any one of the following coding units is divided into an odd number of coding units based on at least one of the block shape information or the division shape pattern information: the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a and 820b and 820c to 820e. For example, the right second coding unit 810b of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a specific order (for example, a zigzag scanning order 830), and the image decoding device 100 can determine whether the third coding units 820c, 820d and 820e determined by dividing the right second coding unit 810b into an odd number of coding units meet the conditions for processing in a specific order.
[0121] According to an embodiment, the image decoding apparatus 100 may determine whether the third coding units 820a and 820b and 820c to 820e included in the first coding unit 800 satisfy a condition for processing in a specific order, and the condition is related to whether at least one of the width or height of the second coding units 810a and 810b is divided in half along the boundary of the third coding units 820a and 820b and 820c to 820e. For example, the third coding units 820a and 820b determined by dividing the height of the left second coding unit 810a of a non-square shape in half may satisfy the condition. Because the boundary of the third coding units 820c to 820e determined by dividing the right second coding unit 810b into three coding units fails to divide the width or height of the right second coding unit 810b in half, it may be determined that the third coding units 820c to 820e do not satisfy the condition. When the condition is not satisfied as described above, the image decoding apparatus 100 may determine that the scanning order is discontinuous, and may determine that the right second coding unit 810b is divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may impose a specific restriction on the coding unit at a specific position in the divided coding unit. The restriction or the specific position has been described above with respect to various embodiments, and therefore a detailed description thereof is not provided.
[0122] Fig. 9 A process of determining at least one coding unit by splitting a first coding unit, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0123] According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 900 based on the division shape pattern information obtained by the receiver 110. The square first coding unit 900 may be divided into four square coding units, or may be divided into a plurality of non-square coding units. Fig. 9 , when the first coding unit 900 is a square coding unit and the division shape pattern information indicates that the first coding unit 900 is divided into non-square coding units, the image decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units. In detail, when the division shape pattern information indicates that an odd number of coding units is determined by dividing the first coding unit 900 in a horizontal direction or a vertical direction, the image decoding apparatus 100 may divide the square first coding unit 900 into an odd number of coding units (for example, second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in a vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in a horizontal direction).
[0124] According to an embodiment, the image decoding apparatus 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition for processing in a specific order, and the condition is related to whether at least one of the width or height of the first coding unit 900 is divided in half along a boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Fig. 9 , because the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the first coding unit 900 in the vertical direction do not divide the width of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not satisfy the condition for processing in a specific order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the first coding unit 900 in the horizontal direction do not divide the height of the first coding unit 900 in half, it can be determined that the first coding unit 900 does not satisfy the condition for processing in a predetermined order. When the condition is not satisfied as described above, the image decoding apparatus 100 may determine that the scanning order is not continuous, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may impose a specific restriction on the coding unit at a specific position in the divided coding unit. The restriction or the specific position has been described above with respect to various embodiments, and thus a detailed description thereof is not provided.
[0125] According to an embodiment, the image decoding apparatus 100 may determine coding units of various shapes by splitting the first coding unit.
[0126] Reference Fig. 9 , the image decoding apparatus 100 may divide the square first coding unit 900 or the non-square first coding unit 930 or 950 into coding units of various shapes.
[0127] Fig.10 It is shown that according to an embodiment, when a second coding unit having a non-square shape determined by splitting a first coding unit by an image decoding apparatus satisfies a specific condition, shapes into which the second coding unit may be split are restricted.
[0128] According to an embodiment, the image decoding apparatus 100 may determine to divide the square first coding unit 1000 into non-square second coding units 1010a and 1010b, or 1020a and 1020b, based on the division shape pattern information obtained by the receiver 110. The second coding units 1010a and 1010b, or 1020a and 1020b may be independently divided. In this way, the image decoding apparatus 100 may determine to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b into a plurality of coding units or not to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b, based on the division shape pattern information of each of the second coding units 1010a and 1010b, or 1020a and 1020b. According to an embodiment, the image decoding apparatus 100 may determine the third coding units 1012a and 1012b by splitting the non-square left second coding unit 1010a determined by splitting the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second coding unit 1010a is split in the horizontal direction, the image decoding apparatus 100 may limit the right second coding unit 1010b to not be split in the horizontal direction in which the left second coding unit 1010a is split. When the third coding units 1014a and 1014b are determined by splitting the right second coding unit 1010b in the same direction, since the left second coding unit 1010a and the right second coding unit 1010b are independently split in the horizontal direction, the third coding units 1012a and 1012b, or 1014a and 1014b may be determined. However, this case has the same effect as the case where the image decoding apparatus 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on the division shape pattern information, and may be inefficient in terms of image decoding.
[0129] According to an embodiment, the image decoding apparatus 100 may determine the third coding units 1022a and 1022b, or 1024a and 1024b, by vertically splitting the non-square second coding unit 1020a or 1020b determined by horizontally splitting the first coding unit 1000. However, when the second coding unit (e.g., the upper second coding unit 1020a) is split in the vertical direction, the image decoding apparatus 100 may limit another second coding unit (e.g., the lower second coding unit 1020b) to not be split in the vertical direction in which the upper second coding unit 1020a is split for the above-mentioned reason.
[0130] Fig.11 A process of splitting a square coding unit performed by an image decoding apparatus when division shape pattern information cannot indicate that a square coding unit is split into four square coding units according to an embodiment is illustrated.
[0131] According to an embodiment, the image decoding apparatus 100 may determine the second coding units 1110a and 1110b, or 1120a and 1120b, etc. by dividing the first coding unit 1100 based on the division shape pattern information. The division shape pattern information may include information about various methods of dividing the coding unit, but the information about the various division methods may not include information for dividing the coding unit into four square coding units. According to such division shape pattern information, the image decoding apparatus 100 may not divide the square first coding unit 1100 into four square coding units 1130a, 1130b, 1130c, and 1130d. The image decoding apparatus 100 may determine the non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc. based on the division shape pattern information.
[0132] According to an embodiment, the image decoding apparatus 100 may independently divide the non-square second coding units 1110a and 1110b, or 1120a and 1120b, etc. Each of the second coding units 1110a and 1110b, or 1120a and 1120b, etc. may be recursively divided in a specific order, and the division method may correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.
[0133] For example, the image decoding apparatus 100 may determine square third coding units 1112a and 1112b by dividing the left second coding unit 1110a in the horizontal direction, and may determine square third coding units 1114a and 1114b by dividing the right second coding unit 1110b in the horizontal direction. In addition, the image decoding apparatus 100 may determine square third coding units 1116a, 1116b, 1116c, and 1116d by dividing both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction. In this case, coding units having the same shape as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0134] As another example, the image decoding apparatus 100 may determine the third coding units 1122a and 1122b of the square shape by dividing the upper second coding unit 1120a in the vertical direction, and may determine the third coding units 1124a and 1124b of the square shape by dividing the lower second coding unit 1120b in the vertical direction. In addition, the image decoding apparatus 100 may determine the third coding units 1126a, 1126b, 1126c, and 1126d of the square shape by dividing both the upper second coding unit 1120a and the lower second coding unit 1120b in the vertical direction. In this case, a coding unit having the same shape as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0135] Fig.12 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of dividing the coding units.
[0136] According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 1200 based on the division shape pattern information. When the block shape is a square shape and the division shape pattern information indicates that the first coding unit 1200 is divided in at least one of the horizontal direction or the vertical direction, the image decoding apparatus 100 may determine the second coding units 1210a and 1210b, or 1220a and 1220b, etc. by dividing the first coding unit 1200. Fig.12, the non-square second coding units 1210a and 1210b, or 1220a and 1220b determined by dividing the first coding unit 1200 only in the horizontal direction or the vertical direction may be independently divided based on the division shape pattern information of each coding unit. For example, the image decoding device 100 may determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and may determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. As has been described above, Fig.11 An operation of dividing the second coding units 1210a and 1210b, or 1220a and 1220b is described, and thus a detailed description thereof will not be provided here.
[0137] According to an embodiment, the image decoding apparatus 100 may process the coding units in a specific order. Figure 7 The operation of processing the encoding units in a predetermined order is described, and thus a detailed description thereof will not be provided here. Fig.12 , the image decoding apparatus 100 may determine four square third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d by dividing the square first coding unit 1200. According to an embodiment, the image decoding apparatus 100 may determine a processing order of the third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d based on a division method of the first coding unit 1200.
[0138] According to an embodiment, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can process the third coding units 1216a, 1216b, 1216c and 1216d in the following processing order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.
[0139] According to an embodiment, the image decoding device 100 can determine the third coding units 1226a, 1226b, 1226c and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c and 1226d in the following processing order 1227: first, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.
[0140] Reference Fig.12 , square third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d may be determined by dividing the second coding units 1210a and 1210b, and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b determined by splitting the first coding unit 1200 in the vertical direction are different from the second coding units 1220a and 1220b determined by splitting the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d and the third coding units 1226a, 1226b, 1226c, and 1226d split from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b ultimately show the same shape of coding units split from the first coding unit 1200. In this way, by recursively splitting the coding units in different ways based on the split shape pattern information, even if the coding units are ultimately determined to be the same shape, the image decoding apparatus 100 may process a plurality of coding units in different orders.
[0141] Fig.13 A process of determining a depth of a coding unit as a shape and a size of a coding unit change when a coding unit is recursively split to determine a plurality of coding units according to an embodiment is illustrated.
[0142] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a specific criterion. For example, the specific criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being divided is 2n (n>0) times the length of the long side of the current coding unit after being divided, the image decoding device 100 may determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before being divided. In the following description, a coding unit with an increased depth is represented as a coding unit of a lower depth.
[0143] Reference Fig.13 According to an embodiment, the image decoding apparatus 100 may determine a second coding unit 1302 and a third coding unit 1304 of a lower depth by dividing a square first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may be represented as "0: SQUARE"). Assuming that the size of the square first coding unit 1300 is 2N×2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 into 1 / 2 may have a size of N×N. In addition, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 into 1 / 2 may have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1304 are 1 / 4 of the width and height of the first coding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302 whose width and height are 1 / 2 of the width and height of the first coding unit 1300 may be D+1, and the depth of the third coding unit 1304 whose width and height are 1 / 4 of the width and height of the first coding unit 1300 may be D+2.
[0144] According to an embodiment, the image decoding device 100 can determine the second coding unit 1312 or 1322 of the lower depth, and the third coding unit 1314 or 1324 by dividing the non-square first coding unit 1310 or 1320 based on block shape information indicating a non-square shape (for example, the block shape information may be represented as "1: NS_VER" indicating a non-square shape having a width and a height longer than the width, or may be represented as "2: NS_HOR" indicating a non-square shape having a height and a width longer than the height).
[0145] The image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by dividing at least one of the width or the height of the first coding unit 1310 having a size of N×2N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1322 having a size of N×N / 2 by dividing the first coding unit 1310 in a horizontal direction, or may determine the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1310 in horizontal and vertical directions.
[0146] According to an embodiment, the image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by dividing at least one of the width or the height of the first coding unit 1320 having a size of 2N×N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1320 in a vertical direction, or may determine the second coding unit 1322 having a size of N×N / 2 by dividing the first coding unit 1320 in horizontal and vertical directions.
[0147] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width or the height of the second coding unit 1302 having a size of N×N. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2×N / 2, the third coding unit 1314 having a size of N / 4×N / 2, or the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1302 in the vertical direction and the horizontal direction.
[0148] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width or the height of the second coding unit 1312 having a size of N / 2×N. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1312 in a horizontal direction, or may determine the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1312 in a vertical direction and a horizontal direction.
[0149] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by dividing at least one of the width or the height of the second coding unit 1322 having a size of N×N / 2. That is, the image decoding apparatus 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1322 in a vertical direction, or may determine the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1322 in vertical and horizontal directions.
[0150] According to an embodiment, the image decoding apparatus 100 may split the square coding unit 1300, 1302, or 1304 in a horizontal direction or a vertical direction. For example, the image decoding apparatus 100 may determine the first coding unit 1310 having a size of N×2N by splitting the first coding unit 1300 having a size of 2N×2N in a vertical direction, or may determine the first coding unit 1320 having a size of 2N×N by splitting the first coding unit 1300 in a horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by splitting the first coding unit 1300 having a size of 2N×2N in a horizontal direction or a vertical direction may be the same as the depth of the first coding unit 1300.
[0151] According to an embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 of the width and height of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322 whose width and height are 1 / 2 of the width and height of the first coding unit 1310 or 1320 may be D+1, and the depth of the third coding unit 1314 or 1324 whose width and height are 1 / 4 of the width and height of the first coding unit 1310 or 1320 may be D+2.
[0152] Fig.14 Depth that may be determined based on the shape and size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.
[0153] According to an embodiment, the image decoding apparatus 100 may determine second coding units of various shapes by dividing the square first coding unit 1400. Fig.14 , the image decoding apparatus 100 may determine the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d by dividing the first coding unit 1400 in at least one of the vertical direction and the horizontal direction based on the division shape pattern information. That is, the image decoding apparatus 100 may determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d based on the division shape pattern information of the first coding unit 1400.
[0154] According to an embodiment, the depths of the second coding units 1402a and 1402b, the second coding units 1404a and 1404b, and the second coding units 1406a, 1406b, 1406c, and 1406d determined based on the division shape pattern information of the square first coding unit 1400 may be determined based on the lengths of their long sides. For example, since the length of the side of the square first coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b may have the same depth, for example, D. However, when the image decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c and 1406d based on the division shape pattern information, because the length of the side of the square second coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 of the length of the side of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c and 1406d can be D+1, which is 1 lower than the depth D of the first coding unit 1400.
[0155] According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1412a and 1412b and 1414a, 1414b, and 1414c by dividing the first coding unit 1410 having a width and a height longer than the width in a horizontal direction based on the division shape pattern information. According to an embodiment, the image decoding apparatus 100 may determine a plurality of second coding units 1422a and 1422b and 1424a, 1424b, and 1424c by dividing the first coding unit 1420 having a height and a width longer than the height in a vertical direction based on the division shape pattern information.
[0156] According to an embodiment, the depths of the second coding units 1412a and 1412b and 1414a, 1414b and 1414c, or 1422a and 1422b and 1424a, 1424b and 1424c, determined based on the division shape pattern information of the non-square first coding unit 1410 or 1420, may be determined based on the lengths of their long sides. For example, since the lengths of the sides of the square second coding units 1412a and 1412b are 1 / 2 of the lengths of the long sides of the non-square shaped first coding unit 1410 having a width and a height longer than the width, the depths of the square second coding units 1412a and 1412b are D+1, which is 1 lower than the depth D of the non-square first coding unit 1410.
[0157] In addition, the image decoding apparatus 100 may divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division shape pattern information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are 1 / 2 of the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c may be D+1 which is 1 lower than the depth D of the non-square first coding unit 1410. The image decoding apparatus 100 may determine the depth of the coding unit split from the first coding unit 1420 having a non-square shape having a height and a width longer than the height by using the above-described method of determining the depth of the coding unit split from the first coding unit 1410 .
[0158] According to an embodiment, when the odd-numbered split coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for identifying the split coding units based on a size ratio between the coding units. Fig.14 , the width of the coding unit 1414b at the center position among the odd-numbered divided coding units 1414a, 1414b, and 1414c may be equal to the width of the other coding units 1414a and 1414c and its height may be twice the height of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the center position may include two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the center position is 1 based on the scanning order, the PID of the coding unit 1414c located at a position adjacent to the coding unit 1414b may increase by 2 and may thus be 3. That is, there may be discontinuity in the PID value. According to an embodiment, the image decoding apparatus 100 may determine whether the odd-numbered divided coding units do not have equal sizes based on whether there is discontinuity in the PID for identifying the divided coding units.
[0159] According to an embodiment, the image decoding apparatus 100 may determine whether to use a specific splitting method based on a PID value for identifying a plurality of coding units determined by splitting a current coding unit. Fig.14, the image decoding apparatus 100 may determine even-numbered coding units 1412a and 1412b or odd-numbered coding units 1414a, 1414b, and 1414c by dividing the first coding unit 1410 into a rectangular shape having a width and a height longer than the width. The image decoding apparatus 100 may use a PID indicating a corresponding coding unit in order to identify the corresponding coding unit. According to an embodiment, the PID may be obtained from a sample point at a specific position of each coding unit (e.g., an upper left sample point).
[0160] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a specific position in the divided coding units by using a PID for distinguishing coding units. According to an embodiment, when the division shape pattern information of the first coding unit 1410 having a rectangular shape with a width and a height longer than the width indicates that the coding unit is divided into three coding units, the image decoding apparatus 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 may assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding apparatus 100 may compare the PIDs of the odd-numbered divided coding units to determine a coding unit at a center position in the coding units. The image decoding apparatus 100 may determine the coding unit 1414b corresponding to the PID and the intermediate value in the PID of the coding unit as the coding unit at the center position in the coding unit determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for distinguishing the divided coding units based on a size ratio between the coding units. Fig.14, the width of the coding unit 1414b generated by dividing the first coding unit 1410 may be equal to the width of the other coding units 1414a and 1414c, and the height thereof may be twice the height of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located at the adjacent position to the coding unit 1414b may be increased by 2 and thus may be 3. When the PID is not uniformly increased as described above, the image decoding apparatus 100 may determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units include coding units having sizes different from sizes of other coding units. According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may divide the current coding unit in such a manner that a coding unit at a specific position (for example, a coding unit at a center position) among the odd number of coding units has a size different from sizes of other coding units. In this case, the image decoding apparatus 100 may determine the coding units at the center position having different sizes by using the PIDs of the coding units. However, the PID and the size or position of the coding unit at a specific position are not limited to the above examples, and various PIDs and various positions and sizes of the coding unit may be used.
[0161] According to an embodiment, the image decoding apparatus 100 may use a specific data unit in which recursive splitting of a coding unit starts.
[0162] Fig.15 It is illustrated that a plurality of coding units are determined based on a plurality of specific data units included in a picture according to an embodiment.
[0163] According to an embodiment, a specific data unit may be defined as a data unit for recursively dividing a coding unit starting by using division shape pattern information. That is, the specific data unit may correspond to a coding unit for determining a highest depth of a plurality of coding units divided from a current picture. In the following description, for ease of explanation, the specific data unit is referred to as a reference data unit.
[0164] According to an embodiment, the reference data unit may have a specific size and a specific size shape. According to an embodiment, the reference coding unit may include M×N samples. Here, M and N may be equal to each other and may be an integer represented as a power of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of coding units.
[0165] According to an embodiment, the image decoding apparatus 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding apparatus 100 may divide the plurality of reference data units divided from the current picture by using the division shape pattern information of each reference data unit. The operation of dividing the reference data unit may correspond to the division operation using a quadtree structure.
[0166] According to an embodiment, the image decoding apparatus 100 may predetermine a minimum size allowed for a reference data unit included in the current picture. Therefore, the image decoding apparatus 100 may determine various reference data units having a size equal to or larger than the minimum size, and may determine one or more coding units by using the division shape pattern information with reference to the determined reference data unit.
[0167] Reference Fig.15 , the image decoding apparatus 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) that can include one or more reference coding units.
[0168] According to an embodiment, the receiver 110 of the image decoding apparatus 100 may obtain at least one of reference coding unit shape information and reference coding unit size information for each of various data units from a bitstream. Figure 3 The operation of dividing the current coding unit 300 describes the operation of dividing the square reference coding unit 1500 into one or more coding units, and the above has been about Figure 4 The operation of splitting the current coding unit 400 or 450 describes an operation of splitting the non-square reference coding unit 1502 into one or more coding units. Therefore, a detailed description thereof is not provided again.
[0169] According to an embodiment, the image decoding apparatus 100 may determine the size and shape of the reference coding unit using a PID for identifying the size and shape of the reference coding unit according to some data units predetermined based on a specific condition. That is, the receiver 110 may obtain only a PID for identifying the size and shape of the reference coding unit for each slice, slice segment, tile, tile group, or maximum coding unit from a bitstream, wherein the slice, slice segment, tile, tile group, or maximum coding unit is a data unit (e.g., a data unit having a size equal to or smaller than a slice) among various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) that satisfies a predetermined condition. The image decoding apparatus 100 may determine the size and shape of the reference coding unit for each data unit that satisfies the specific condition by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained from a bitstream according to each data unit having a relatively small size and are used, the efficiency of using the bitstream may not be high, and therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information. In this case, at least one of the size or shape of the reference coding unit corresponding to the PID for identifying the size and shape of the reference coding unit may be predetermined. That is, the image decoding apparatus 100 may determine at least one of the size or shape of the reference coding unit included in the data unit used as the unit for obtaining the PID by selecting at least one of the size or shape of the reference coding unit predetermined based on the PID.
[0170] According to an embodiment, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the picture may include one or more reference coding units, and the coding unit may be determined by recursively dividing each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit may be obtained by dividing the maximum coding unit n times based on a quadtree structure. That is, according to various embodiments, the image decoding device 100 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and the reference coding unit may be divided based on at least one of the block shape information and the division shape mode information.
[0171] According to an embodiment, the image decoding device 100 may obtain block shape information indicating the shape of the current coding unit or division shape pattern information indicating the division method of the current coding unit from the bitstream, and may use the obtained information. The division shape pattern information may be included in the bitstream associated with various data units. For example, the image decoding device 100 may use the division shape pattern information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a parallel block header, or a parallel block group header. In addition, the image decoding device 100 may obtain a syntax element corresponding to the block shape information or the division shape pattern information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element.
[0172] Hereinafter, a method for determining a division rule according to an embodiment of the present disclosure will be described in detail.
[0173] The image decoding apparatus 100 may determine a division rule of an image. The division rule may be predetermined between the image decoding apparatus 100 and the image encoding apparatus 1900. The image decoding apparatus 100 may determine a division rule of an image based on information obtained from a bitstream. The image decoding apparatus 100 may determine a division rule based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, or a tile group header. The image decoding apparatus 100 may determine a division rule differently according to a frame, a slice, a tile, a temporal layer, a maximum coding unit, or a coding unit.
[0174] The image decoding device 100 may determine the division rule based on the block shape of the coding unit. The block shape may include the size, shape, aspect ratio, and direction of the coding unit. The image decoding device 100 may predetermine the division rule based on the block shape information of the coding unit. However, the present disclosure is not limited to this. The image decoding device 100 may determine the division rule of the image based on information obtained from the received bit stream.
[0175] The shape of the coding unit may include a square and a non-square. When the width length and height length of the coding unit are the same, the image decoding apparatus 100 may determine that the shape of the coding unit is a square. In addition, when the width length and height length of the coding unit are different, the image decoding apparatus 100 may determine that the shape of the coding unit is a non-square.
[0176] The size of the coding unit may include various sizes, such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, ... and up to 256×256. The size of the coding unit may be classified based on the length of the long side of the coding unit, the length of the short side of the coding unit, or the area of the coding unit. The image decoding apparatus 100 may apply the same division rule to the coding units classified into the same group. For example, the image decoding apparatus 100 may classify coding units having the same long side length as having the same size. In addition, the image decoding apparatus 100 may apply the same division rule to coding units having the same long side length.
[0177] The aspect ratio of the coding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, 1:32, etc. In addition, the direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the width length of the coding unit is longer than the height length of the coding unit. The vertical direction may indicate a case where the width length of the coding unit is shorter than the height length of the coding unit.
[0178] The image decoding apparatus 100 may adaptively determine the division rule based on the size of the coding unit. The image decoding apparatus 100 may determine the allowable division shape mode differently based on the size of the coding unit. For example, the image decoding apparatus 100 may determine whether to allow division based on the size of the coding unit. The image decoding apparatus 100 may determine the division direction according to the size of the coding unit. The image decoding apparatus 100 may determine the allowable division type according to the size of the coding unit.
[0179] The division rule determined based on the size of the coding unit may be a division rule predetermined in the image decoding apparatus 100. Also, the image decoding apparatus 100 may determine the division rule based on information obtained from a bitstream.
[0180] The image decoding apparatus 100 may adaptively determine a split rule based on a location of a coding unit. The image decoding apparatus 100 may adaptively determine a split rule based on a location of a coding unit in an image.
[0181] In addition, the image decoding apparatus 100 may determine a division rule so that the coding units generated via different division paths do not have the same block shape. However, the present disclosure is not limited thereto, and the coding units generated via different division paths may have the same block shape. The coding units generated via different division paths may have different decoding processing orders. Fig.12 The decoding process order has been described, so its details are not provided.
[0182] Fig.16 It is a block diagram of an image encoding and decoding system.
[0183] The encoding end 1610 of the image encoding and decoding system 1600 transmits an encoded bit stream of an image, and the decoding end 1650 outputs a reconstructed image by receiving and decoding the bit stream. Here, the decoding end 1650 may have a similar configuration to the image decoding apparatus 100.
[0184] At the encoding end 1610, the prediction encoder 1615 outputs a reference image via inter-frame prediction and intra-frame prediction, and the transformer and quantizer 1620 quantizes the residual data between the reference image and the current input image into quantized transform coefficients and outputs the quantized transform coefficients. The entropy encoder 1625 transforms the quantized transform coefficients by encoding the quantized transform coefficients, and outputs the transformed quantized transform coefficients as a bit stream. The quantized transform coefficients are reconstructed into data in the spatial domain via the inverse quantizer and inverse transformer 1630, and the data in the spatial domain is output as a reconstructed image via the deblocking filter 1635 and the loop filter 1640. The reconstructed image can be used as a reference image of the next input image via the prediction encoder 1615.
[0185] The encoded image data in the bit stream received by the decoding end 1650 is reconstructed as residual data in the spatial domain via the entropy decoder 1655 and the inverse quantizer and inverse transformer 1660. When the residual data and the reference image output from the prediction decoder 1675 are combined, the image data in the spatial domain is configured, and the deblocking filter 1665 and the loop filter 1670 can output a reconstructed image about the current original image by filtering the image data in the spatial domain. The reconstructed image can be used by the prediction decoder 1675 as a reference image for the next original image.
[0186] The loop filter 1640 of the encoding end 1610 performs loop filtering by using filter information input according to user input or system setting. The filter information used by the loop filter 1640 is output to the entropy encoder 1625 and is sent to the decoding end 1650 together with the encoded image data. The loop filter 1670 of the decoding end 1650 can perform loop filtering based on the filter information input from the decoding end 1650.
[0187] In the following, reference will be made to Figures 17 to 20 A method and apparatus for encoding or decoding a video by using blocks of various sizes and various shapes divided from a picture according to an embodiment of the present specification is described.
[0188] Fig.17 is a block diagram of a video decoding apparatus according to an embodiment.
[0189] Reference Fig.17 , the video decoding apparatus 1700 according to an embodiment may include an obtainer 1710 and a decoder 1720 .
[0190] The video decoding apparatus 1700 may obtain a bitstream generated as a result of encoding an image, determine a position of a block divided from a picture based on information included in the bitstream, and decode blocks such as a maximum coding unit and a coding unit.
[0191] The video decoding apparatus 1700 according to an embodiment may include a central processor (not shown) for controlling the obtainer 1710 and the decoder 1720. Alternatively, the obtainer 1710 and the decoder 1720 may be operated by their own processors (not shown), respectively, and the processors may operate systematically so that the video decoding apparatus 1700 operates as a whole. Alternatively, the obtainer 1710 and the decoder 1720 may be controlled under the control of an external processor (not shown) of the video decoding apparatus 1700.
[0192] The video decoding apparatus 1700 may include at least one data memory (not shown) storing input and output data of the obtainer 1710 and the decoder 1720. The video decoding apparatus 1700 may include a memory controller (not shown) for controlling data input and output of the data memory.
[0193] The video decoding device 1700 can perform image decoding operations including prediction by operating in connection with an internal video decoding processor or an external video decoding processor so as to reconstruct an image via image decoding. When not only a separate processor but also a central processing device or a graphics processing device includes an image decoding processing module, the internal video decoding processor of the video decoding device 1700 according to an embodiment can perform basic image decoding operations.
[0194] The video decoding device 1700 may be included in the above-mentioned image decoding device 100. For example, the obtainer 1710 may be included in Figure 1 The decoder 1720 may be included in the receiver 110 of the image decoding apparatus 100, and the decoder 1720 may be included in the decoder 120 of the image decoding apparatus 100.
[0195] The obtainer 1710 receives a bitstream generated as a result of encoding an image. The bitstream may include information about a current slice. The current slice is one of the one or more slices included in the picture, and may include one or more parallel blocks. A parallel block may include one or more maximum coding units. The decoder 1720 may determine the position of the current block in the picture based on the information obtained by the obtainer 1710. The current block is a block generated when the image is divided according to a tree structure, and may correspond to a maximum coding unit, a coding unit, or a transform unit, for example. The decoder 1720 may decode one or more parallel blocks included in the current slice according to a coding order. In this regard, the decoder 1720 may decode one or more blocks included in the current parallel block.
[0196] The size of each block may be represented by the "height x width" of a rectangle. In addition, the shape of the block may be represented by the aspect ratio of the block, i.e., "height:width". The decoder 1720 may determine blocks of various shapes and sizes based on syntax elements, and decode samples included in each of the blocks.
[0197] The obtainer 1710 according to an embodiment may determine the current block based on the block shape information and / or the information about the partition shape mode included in at least one of the sequence parameter set, the picture parameter set, the video parameter set, the slice header, and the slice segment header. In addition, the decoder 1720 may obtain a syntax element corresponding to the block shape information or the information about the partition shape mode from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may determine the current block using the obtained syntax element.
[0198] The obtainer 1710 according to an embodiment may obtain information about a maximum size of a block allowed to be divided into three and information about a minimum size of a block allowed to be divided into three from a bitstream.
[0199] The obtainer 1710 according to an embodiment may obtain information about a maximum size of a coding unit supportable by the video decoding apparatus 1700 and information about a minimum size of the coding unit from a bitstream.
[0200] The decoder 1720 according to an embodiment may determine the maximum size of a coding unit by using information about the maximum size of a coding unit obtained from a bitstream. The decoder 1720 according to an embodiment may determine the minimum size of a coding unit by using information about the minimum size of a coding unit obtained from a bitstream.
[0201] The decoder 1720 may determine the maximum size of a block allowed to be divided into three by using the maximum size of the coding unit and information about the maximum size of the block allowed to be divided into three. In addition, the decoder 1720 may determine the minimum size of a block allowed to be divided into three by using the minimum size of the coding unit and information about the minimum size of the block allowed to be divided into three.
[0202] The decoder 1720 may determine whether to perform three-partitioning on the current block based on the maximum size of the block allowed to be divided into three and the minimum size of the block allowed to be divided into three. When the current block is divided into three accordingly, the decoder 1720 may decode the block generated by performing three-partitioning on the current block. In detail, the decoder 1720 may determine the prediction block by performing prediction on the block generated by the three-partitioning. When the prediction mode of the block generated by the three-partitioning is not the skip mode, the residual block may be generated by performing inverse quantization and inverse transformation on the block generated by the three-partitioning. The decoder 1720 may determine the reconstructed block of the block generated by the three-partitioning by combining the prediction block and the residual block.
[0203] For example, when the prediction mode of the current block is the intra mode, the decoder 1720 may determine reference samples among samples of spatially neighboring blocks located in an intra prediction direction by using intra prediction information of the current block, and determine prediction samples corresponding to the current block by using the reference samples.
[0204] For example, when the prediction mode of the current block is the inter mode, the decoder 1720 may reconstruct the current block by using the motion vector of the current block. The decoder 1720 may determine a reference block in a reference picture by using the motion vector of the current block, and determine a prediction sample corresponding to the current block from the reference samples included in the reference block.
[0205] When the prediction mode of the current block is not the skip mode, the video decoding apparatus 1700 may parse the transform coefficients of the current block from the bitstream and obtain residual samples by performing inverse quantization and inverse transformation on the transform coefficients. The decoder 1720 may determine the reconstructed samples of the current block by combining the prediction samples of the current block and the residual samples of the current block.
[0206] The decoder 1720 according to an embodiment may reconstruct a tile including one or more maximum coding units by reconstructing a block included in the maximum coding unit. In addition, the decoder 1720 may reconstruct a slice including one or more tiles and reconstruct a picture including one or more slices.
[0207] In the following, reference will be made to Fig.18 A video decoding method for decoding blocks of various sizes and various shapes divided from a picture, performed by the video decoding apparatus 1700 according to an embodiment, is described.
[0208] Fig.18 is a flowchart of a video decoding method according to an embodiment.
[0209] In operation 1810, the decoder 1720 according to an embodiment may determine the maximum size of the coding unit by using information about the maximum size of the coding unit obtained from the bitstream. For example, the obtainer 1710 may obtain the information about the maximum size of the coding unit from a sequence parameter set.
[0210] In operation 1820, the obtainer 1710 according to an embodiment may obtain information about a maximum size of a block allowed to be divided into three and information about a minimum size of a block allowed to be divided into three from a bitstream. The information about the maximum size of a block allowed to be divided into three obtained according to an embodiment may indicate a difference between a maximum size of a coding unit and a maximum size of a block allowed to be divided into three.
[0211] The information about the minimum size of a block allowed to be divided into three obtained according to an embodiment may indicate the difference between the minimum size of the coding unit and the minimum size of the block allowed to be divided into three. The minimum size of the coding unit may be set in advance. In detail, the information about the minimum size of a block allowed to be divided into three may indicate a value obtained by subtracting 2 from the difference between the minimum size of the coding unit and the minimum size of the block allowed to be divided into three. For example, because the size of the minimum block is 4×4, the size of the minimum block to which three partitions can be applied may be 16×4. Therefore, the information about the minimum size of a block allowed to be divided into three may be defined as a value obtained by subtracting 2 from the difference between the minimum size of the coding unit and the minimum size of the block allowed to be divided into three, so that the minimum size of the block allowed to be divided into three is not set to a value less than 16.
[0212] The decoder 1720 may determine the maximum size of the coding unit based on the information about the maximum size of the coding unit obtained from the bitstream. In operation 1830, the decoder 1720 according to an embodiment may determine the maximum size of the block allowed to be divided into three by using the maximum size of the coding unit and the information about the maximum size of the block allowed to be divided into three.
[0213] The decoder 1720 may determine the minimum size of the coding unit based on the information about the minimum size of the coding unit obtained from the bitstream. In operation 1840, the decoder 1720 according to an embodiment may determine the minimum size of a block allowed to be divided into three by using the minimum size of the coding unit and the information about the minimum size of the block allowed to be divided into three.
[0214] In detail, the decoder 1720 according to an embodiment may determine the maximum size of a block allowed to be divided into three, based on a value obtained by subtracting information about the maximum size of a block allowed to be divided into three from the maximum size of a coding unit.
[0215] In detail, the decoder 1720 according to an embodiment may determine the minimum size of a block allowed to be divided into three, based on a value obtained by adding information about the minimum size of a block allowed to be divided into three to the minimum size of a coding unit.
[0216] In operation S1850, the decoder 1720 according to the embodiment may determine whether to divide the current block into three parts based on the maximum size of the block allowed to be divided into three parts and the minimum size of the block allowed to be divided into three parts. When the size of the current block is larger than the maximum size of the block allowed to be divided into three parts or smaller than the minimum size of the block allowed to be divided into three parts, the current block is not allowed to be divided into three parts.
[0217] In operation S1860, when the current block is allowed to be three-partitioned, the decoder 1720 according to an embodiment may decode a block generated by three-partitioning the current block.
[0218] The obtainer 1710 according to an embodiment may obtain information about the maximum size of the coding unit having an aspect ratio of 1:4 of the block from the bitstream. The information about the maximum size of the coding unit having an aspect ratio of 1:4 obtained according to an embodiment may indicate a difference between the maximum size of the coding unit and the maximum size of the coding unit having a block ratio of 1:4.
[0219] The decoder 1720 according to an embodiment may determine the maximum size of the third coding unit based on a value obtained by subtracting information about the maximum size of the coding unit having a block ratio of 1:4 from the maximum size of the coding unit. The decoder 1720 may determine the coding unit having a block ratio of 1:4 by using the maximum size of the coding unit having a block ratio of 1:4, and decode the coding unit having a block ratio of 1:4.
[0220] The obtainer 1710 according to another embodiment may obtain information about a minimum size of a supportable coding unit. According to another embodiment, the decoder 1720 may determine the maximum size of a first coding unit having an aspect ratio of a block of 1:1 to be the same as the maximum size of the coding unit.
[0221] The decoder 1720 according to another embodiment may determine the minimum size of the coding unit supportable by the video decoding apparatus 1700, based on a value obtained by adding 2 to the information about the minimum size of the coding unit.
[0222] The decoder 1720 according to another embodiment may determine a coding unit having a size equal to or smaller than the maximum size and equal to or larger than the minimum size at a block ratio of 1:1 by using a maximum size of a coding unit having a block ratio of 1:1 and a minimum size of a block having a block ratio of 1:1. The decoder 1720 according to another embodiment may decode a coding unit having a block ratio of 1:1.
[0223] The decoder 1720 according to another embodiment may determine a coding unit having a size equal to or smaller than the maximum size and equal to or larger than the minimum size at a block ratio of 1:4 by using the maximum size of the coding unit having a block ratio of 1:4 and the minimum size of the block having a block ratio of 1:4. The decoder 1720 according to another embodiment may decode the coding unit having a block ratio of 1:4.
[0224] The obtainer 1710 according to another embodiment may obtain, from a bitstream, information about a maximum size of a first coding unit having a block aspect ratio of 1:1, information about a minimum size of a coding unit having a block ratio of 1:1, information about a maximum size of a block allowed to be divided into three, and information about a minimum size of a block allowed to be divided into three.
[0225] The information about the maximum size of the first coding unit with an aspect ratio of 1:1 of the block obtained according to another embodiment may indicate the difference between the maximum size of the coding unit and the maximum size of the coding unit with a block ratio of 1:1. The information about the minimum size of the coding unit with a block ratio of 1:1 obtained according to another embodiment may indicate the difference between the maximum size of the coding unit with a block ratio of 1:1 and the minimum size of the coding unit with a block ratio of 1:1. The information about the maximum size of the block allowed to be divided into three obtained according to another embodiment may indicate the difference between the maximum size of the coding unit with a block ratio of 1:1 and the maximum size of the block allowed to be divided into three. The information about the minimum size of the block allowed to be divided into three obtained according to another embodiment may indicate the difference between the minimum size of the coding unit with a block ratio of 1:1 and the minimum size of the block allowed to be divided into three.
[0226] Therefore, the decoder 1720 according to another embodiment may determine the maximum size of a block allowed to be divided into three based on a value obtained by subtracting information about the maximum size of a block allowed to be divided into three from the maximum size of a coding unit having a block ratio of 1:1.
[0227] The decoder 1720 according to another embodiment may determine the minimum size of a block allowed to be divided into three, based on a value obtained by adding information about the minimum size of a block allowed to be divided into three and the minimum size of a coding unit having a block ratio of 1:1.
[0228] The decoder 1720 according to another embodiment may determine whether to divide the current block into three parts based on the maximum size of the block allowed to be divided into three parts and the minimum size of the block allowed to be divided into three parts. When the size of the current block is less than or equal to the maximum size of the block allowed to be divided into three parts and equal to or greater than the minimum size, the decoder 1720 according to another embodiment may decode the block generated by dividing the current block into three parts.
[0229] In the following, reference will be made to Fig.19 A video encoding apparatus for encoding a picture by dividing the picture into blocks of various sizes and shapes and transmitting information on a maximum size and a minimum size of the blocks according to the block shape is described.
[0230] Fig.19 is a block diagram of a video encoding apparatus according to an embodiment.
[0231] Reference Fig.19 , the video encoding apparatus 1900 according to an embodiment may include a block encoder 1910 and an information encoder 1920 .
[0232] The block encoder 1910 according to an embodiment may divide a picture into coding units to encode the picture, and divide the picture into one or more coding units using different processors, wherein each processor may encode the coding unit. The information encoder 1920 may output syntax elements corresponding to a plurality of pieces of encoding information generated as a result of the encoding in the form of a bitstream.
[0233] The video encoding apparatus 1900 according to an embodiment may include a central processor (not shown) for controlling the block encoder 1910 and the information encoder 1920. Alternatively, the block encoder 1910 and the information encoder 1920 may be operated by their own processors (not shown), respectively, and the processors may operate systematically so that the video encoding apparatus 1900 operates as a whole. Alternatively, the block encoder 1910 and the information encoder 1920 may be controlled under the control of an external processor (not shown) of the video encoding apparatus 1900.
[0234] The video encoding apparatus 1900 may include at least one data memory (not shown) storing input and output data of the block encoder 1910 and the information encoder 1920. The video encoding apparatus 1900 may include a memory controller (not shown) for controlling data input and output of the data memory.
[0235] The video encoding device 1900 can perform image encoding operations including prediction by operating in connection with an internal video encoding processor or an external video encoding processor to encode an image. When not only a separate processor but also a central processing device or a graphics processing device includes an image encoding processing module, the internal video encoding processor of the video encoding device 1900 according to an embodiment can perform basic image encoding operations.
[0236] The block encoder 1910 according to an embodiment may divide a picture into a plurality of maximum coding units, and divide each maximum coding unit into blocks having various sizes and various shapes for encoding.
[0237] For example, when the prediction mode of the current block is the intra mode, the block encoder 1910 may determine reference samples among samples of spatially neighboring blocks located in an intra prediction direction by using intra prediction information of the current block, and determine prediction samples corresponding to the current block by using the reference samples.
[0238] For example, when the prediction mode of the current block is the skip mode, the block encoder 1910 may determine a motion vector for predicting the current block. The block encoder 1910 may determine a reference block in a reference picture and determine a motion vector indicating the reference block from the current block. In the skip mode, the residual block may not need to be encoded.
[0239] For example, when the prediction mode of the current block is the inter mode, the block encoder 1910 may determine a motion vector for predicting the current block. The block encoder 1910 may determine a reference block in a reference picture, and determine a motion vector indicating the reference block from the current block. The block encoder 1910 may determine residual samples between the current blocks from the reference samples included in the reference block, and generate quantized transform coefficients by performing transform and quantization on the residual samples based on the transform unit.
[0240] The current block is a block generated when the image is divided according to the tree structure, and may correspond to, for example, a maximum coding unit, a coding unit, or a transformation unit. The block encoder 1910 may encode blocks included in a picture according to an encoding order.
[0241] The information encoder 1920 may output a bitstream including information about the size of a block having various shapes, which is determined as a result of encoding the block.
[0242] For example, the information encoder 1920 may add the block shape information and / or the information about the partition shape mode to at least one of a sequence parameter set (SPS), a picture parameter set (PPS), a video parameter set (VPS), and a slice header. In addition, the information encoder 1920 may generate a bitstream by encoding a syntax element corresponding to the block shape information or the information about the partition shape mode according to each maximum coding unit, each reference coding unit, or each processing block.
[0243] The block encoder 1910 according to an embodiment may determine a maximum size of a coding unit, a minimum size of a coding unit, a maximum size of a block allowed to be divided into three, and a minimum size of a block allowed to be divided into three.
[0244] The block encoder 1910 according to an embodiment may determine whether to three-partition a current block and encode a block generated by three-partitioning the current block based on a maximum size of a block allowed to be three-partitioned and a minimum size of a block allowed to be three-partitioned.
[0245] The information encoder 1920 according to an embodiment may encode information about the maximum size of the coding unit based on the maximum size of the coding unit. The information encoder 1920 according to an embodiment may encode information about the maximum size of the block allowed to be divided into three by using the maximum size of the coding unit and the maximum size of the block allowed to be divided into three. The information encoder 1920 according to an embodiment may encode information about the minimum size of the block allowed to be divided into three by using the minimum size of the coding unit and the minimum size of the block allowed to be divided into three. The minimum size of the coding unit according to the embodiment may be set in advance.
[0246] In the following, reference will be made to Fig. 20 The following process is described: the video encoding apparatus 1900 performs video encoding so that a picture is encoded by using blocks of various sizes and shapes and a maximum size of each block shape and information about the maximum size are signaled.
[0247] Fig. 20 is a flowchart of a video encoding method according to an embodiment.
[0248] In operation 210, the block encoder 1910 according to an embodiment may determine a maximum size of a coding unit, a minimum size of a coding unit, a maximum size of a block allowed to be divided into three, and a minimum size of a block allowed to be divided into three. When the size of the current block is larger than the maximum size of the block allowed to be divided into three or smaller than the minimum size of the block allowed to be divided into three, the current block is not allowed to be divided into three.
[0249] In operation S2020, the block encoder 1910 according to an embodiment may determine whether to divide the current block into three parts based on the maximum size of the block allowed to be divided into three parts and the minimum size of the block allowed to be divided into three parts. When the current block is divided into three parts, the block encoder 1910 according to an embodiment may encode the blocks generated by dividing the current block into three parts.
[0250] In operation 2030, the information encoder 1920 according to an embodiment may encode information about the maximum size of the coding unit based on the maximum size of the coding unit. For example, the information encoder 1920 may add information about the maximum size of the coding unit and information about the minimum size of the coding unit to the sequence parameter set.
[0251] In operation 2040, the information encoder 1920 according to an embodiment may encode information about the maximum size of a block allowed to be divided into three by using the maximum size of the coding unit and the maximum size of the block allowed to be divided into three. According to an embodiment, the information about the maximum size of the block allowed to be divided into three may indicate a difference between the maximum size of the coding unit and the maximum size of the block allowed to be divided into three.
[0252] In operation 2050, the information encoder 1920 according to an embodiment may encode information about the minimum size of a block allowed to be divided into three by using the minimum size of the coding unit and the minimum size of the block allowed to be divided into three. According to an embodiment, the information about the minimum size of the block allowed to be divided into three may indicate a difference between the minimum size of the coding unit and the minimum size of the block allowed to be divided into three.
[0253] The block encoder 1910 according to an embodiment may determine a maximum size of a third coding unit having a block aspect ratio of 1:4, and perform encoding by performing prediction on coding units having a block aspect ratio of 1:4.
[0254] The block encoder 1910 according to an embodiment may determine a coding unit having a size equal to or smaller than the maximum size and equal to or larger than the minimum size at a block ratio of 1:1 based on a maximum size of a coding unit having a block ratio of 1:1 and a minimum size of a block having a block ratio of 1:1. The block encoder 1910 according to an embodiment may encode a coding unit having a block ratio of 1:1 by performing prediction on the coding unit having a block ratio of 1:1.
[0255] The block encoder 1910 according to another embodiment may determine a coding unit having a size equal to or smaller than the maximum size and equal to or larger than the minimum size with a block ratio of 1:2 based on the maximum size of the coding unit with a block ratio of 1:2 and the minimum size of the block with a block ratio of 1:2. The block encoder 1910 according to an embodiment may encode the coding unit with a block ratio of 1:2 by performing prediction on the coding unit with a block ratio of 1:2.
[0256] The block encoder 1910 according to another embodiment may determine a coding unit having a size equal to or smaller than the maximum size and equal to or larger than the minimum size at a block ratio of 1:4 based on a maximum size of a coding unit having a block ratio of 1:4 and a minimum size of a block having a block ratio of 1:4. The block encoder 1910 according to an embodiment may encode a coding unit having a block ratio of 1:4 by performing prediction on the coding unit having a block ratio of 1:4.
[0257] According to another embodiment, the information encoder 1920 may encode information about the maximum size of the third coding unit whose aspect ratio is 1:4 so as to indicate a difference between the maximum size of the coding unit and the maximum size of the coding unit whose block ratio is 1:4.
[0258] The block encoder 1910 according to another embodiment may determine the maximum size of the first coding unit having an aspect ratio of the block of 1:1 to be the same as the maximum size of the coding unit.
[0259] The information encoder 1920 according to another embodiment may encode the information about the minimum size of the coding unit to indicate a value obtained by subtracting 2 from a logarithmic scale value of the minimum size of the coding unit.
[0260] The block encoder 1910 according to another embodiment may determine whether to divide the current block into three parts based on the maximum size of the block allowed to be divided into three parts and the minimum size of the block allowed to be divided into three parts. When the size of the current block is less than or equal to the maximum size of the block allowed to be divided into three parts and equal to or greater than the minimum size, the block encoder 1910 according to another embodiment may encode the block generated by three-division by performing prediction on the block generated by three-division of the current block.
[0261] According to another embodiment, the information encoder 1920 may encode information about a maximum size of a block allowed to be divided into three, so as to indicate a difference between a maximum size of a coding unit having a block ratio of 1:1 and a maximum size of a block allowed to be divided into three.
[0262] According to another embodiment, the information encoder 1920 may encode information about the minimum size of a block allowed to be divided into three, so as to indicate a difference between the minimum size of a coding unit having a block ratio of 1:1 and the minimum size of a block allowed to be divided into three.
[0263] In the video encoding apparatus 1900 and the video decoding apparatus 1700, according to an embodiment, the allowable aspect ratio of the block may be set differently according to the size and division shape of the block. Hereinafter, the aspect ratio of the block will be referred to as a block ratio. Therefore, in the video encoding apparatus 1900 and the video decoding apparatus 1700, the allowable block size may be set differently according to the block ratio.
[0264] In addition, there may be a dependency between blocks having different block ratios. For example, the minimum size of a block having a block ratio of 1:2 or 2:1 is larger than the size of a block having a block ratio of 1:1. In detail, when the minimum size of a block having a block ratio of 1:1 is 4×4, the minimum size of a block having a block ratio of 1:2 or 2:1 needs to be 8×4 or 4×8. In other words, the size of the long side of a block having a block ratio of 1:2 or 2:1 is 8, and the size of the long side of a block having a block ratio of 1:1 is 4. By using such a feature, the video encoding device 1900 and the video decoding device 1700 according to an embodiment can signal information about the maximum size and the minimum size of a block for each block ratio by using the fact that there is a relationship between multiple pieces of information about different block ratios.
[0265] In addition, once only one of the long side and the short side of a block of a specific block ratio is identified, the length of the remaining side can be automatically determined according to the block ratio. Therefore, in the following disclosure, the size of a block of a specific block ratio will be referred to as the size of the long side of the block. For example, when the size of a block of a block ratio of 1:2 or 2:1 is 8×4 or 4×8, the size of a block of a block ratio of 1:2 or 2:1 will be referred to as 8.
[0266] In the following, reference will be made to Fig.21 describes the permissible block sizes in terms of block size and partition shape, and Figure 22 to Figure 24 Information about a maximum size and a minimum size of a block according to a block ratio that may be signaled between the video encoding apparatus 1900 and the video decoding apparatus 1700 is shown.
[0267] Fig.21 The shapes of blocks that are allowable in the block partition tree structure according to an embodiment are shown.
[0268] The video encoding apparatus 1900 according to an embodiment may set the maximum allowable size and the minimum allowable size of a block differently according to a block ratio. Therefore, the video decoding apparatus 1700 according to an embodiment may also set the maximum allowable size and the minimum allowable size of a block differently according to a block ratio.
[0269] When the block ratio is 1:1, the maximum size of a block is 128, and its minimum size is 4. Therefore, the allowable shape of a block may be 128×128, 64×64, 32×32, 16×16, 8×8, or 4×4.
[0270] When the block ratio is 1:2, the maximum size of the allowed block is 128, and its minimum size is 8. Therefore, the allowable shapes of the block can be 128×64, 64×128, 64×32, 32×64, 32×16, 16×32, 16×8, 8×16, 8×4, or 4×8.
[0271] When the block ratio is 1:4, the maximum allowable size of the block is 64, and the minimum allowable size thereof is 16. Therefore, the allowable shape of the block may be 64×16, 16×64, 32×8, 8×32, 16×4, or 4×16.
[0272] When the block ratio is 1:8, the maximum allowable size of the block is 64, and the minimum allowable size thereof is 32. Therefore, the allowable shape of the block may be 64×8, 8×64, 32×4, or 4×32.
[0273] The video encoding apparatus 1900 according to an embodiment may differently set the available size of a block according to a division shape. Therefore, the video decoding apparatus 1700 according to an embodiment may differently set the available size of a block according to a division shape.
[0274] The maximum size of a block allowing binary partitioning may be 128, and the minimum size thereof may be 8. Therefore, shapes of blocks that can be generated by binary partitioning may include a combination of 128×64 and 128×64, ..., a combination of 8×4 and 8×4, and a combination of 4×4 and 4×4.
[0275] The maximum size of a block allowing three partitions may be 64, and the minimum size thereof may be 16. Therefore, shapes of blocks that can be generated by three partitions may include 16×64, a combination of 32×64 and 16×64, ..., and a combination of 4×4, 8×4, and 4×4.
[0276] The following will refer to Figure 22 to Figure 24 The video encoding apparatus 1900 and the video decoding apparatus 1700 according to the embodiment use signals to transmit Fig.21 Various embodiments of the maximum size and minimum size of a block for each block ratio. The information about the maximum size and minimum size of a block for each block ratio described below may be included in a sequence header, a picture header, etc. In the following, according to Figure 22 to Figure 24 In the embodiments of the present invention, pieces of information about the maximum size and the minimum size of a block for each block ratio may be encoded to indicate values obtained by converting the maximum size and the minimum size, respectively, into a logarithmic scale. The information about the maximum size of a block, the information about the minimum size, etc. transmitted according to each embodiment may be encoded / decoded into an unsigned exponential Golomb code, a unary code, etc.
[0277] Fig. 22 Information about the maximum size and the minimum size of a block determined according to a block ratio according to an embodiment is shown. The video encoding apparatus 1900 according to an embodiment may encode the maximum size and the minimum size of a block according to a block ratio or a partitioning method as a difference from the minimum size of a supportable block.
[0278] When the maximum allowable size of a supportable block is 128 and the minimum size thereof is 4 in the video encoding apparatus 1900 according to an embodiment, the maximum size of a block having a block ratio of 1:1 may also be 128 and the minimum size thereof may also be 4. In this case, according to an embodiment, information about the minimum size of a block having a block ratio of 1:1 may be encoded to indicate 0 (ie, 2-2). According to an embodiment, information about the maximum size of a block having a block ratio of 1:1 may be encoded to indicate 5 (ie, 7-2). In other words, since a value obtained by subtracting the minimum size supportable by the video encoding apparatus 1900 from the maximum size and the minimum size of a block having a block ratio of 1:1 is set, a plurality of pieces of information about the maximum size and the minimum size of a block having a block ratio of 1:1 may be encoded to indicate 5 and 0, respectively, instead of 7 and 2. Therefore, the video decoding apparatus 1700 according to an embodiment may recognize in advance internal information that the maximum size of a supportable block is 128 and the minimum size thereof is 4. Therefore, when the value of the obtained information about the minimum size of the block with a block ratio of 1:1 indicates 0, the video decoding apparatus 1700 may determine that the minimum size of the block with a block ratio of 1:1 is 4 by decoding 2 (=0+2) from 0 and inversely converting the value 2 (i.e., the logarithmic scale) into 4. Similarly, when the value of the obtained information about the maximum size of the block with a block ratio of 1:1 indicates 1, the video decoding apparatus 1700 may determine that the maximum size of the block with a block ratio of 1:1 is 128 by decoding 7 (=5+2) from 5 and inversely converting the value 7 (i.e., the logarithmic scale) into 128.
[0279] As another example, when the maximum size of a block supportable in the video encoding device 1900 is 128 and the minimum size thereof is 4, the maximum size of a block with a block ratio of 1:1 may be 64 and the minimum size thereof may also be 8. In this case, according to an embodiment, information about the minimum size of a block with a block ratio of 1:1 may be encoded to indicate 1 (i.e., 3-2). According to an embodiment, information about the maximum size of a block with a block ratio of 1:1 may be encoded to indicate 4 (i.e., 6-2). Therefore, when the value of the obtained information about the minimum size of a block with a block ratio of 1:1 indicates 1, the video decoding device 1700 may determine that the minimum size of a block with a block ratio of 1:1 is 8 by decoding 1 to obtain 3 (=1+2) and inversely converting the value 3 (i.e., logarithmic scale) to 8. Similarly, when the value of the information obtained about the maximum size of a block with a block ratio of 1:1 indicates 4, the video decoding device 1700 can determine that the maximum size of a block with a block ratio of 1:1 is 64 by decoding 6 (=4+2) from 4 and inversely converting the value 6 (i.e., logarithmic scale) into 64.
[0280] When the maximum size of a block that can be supported in the video encoding device 1900 according to another embodiment is 128 and the minimum size thereof is 4, the maximum size of a block with a block ratio of 1:2 may be 128 and the minimum size thereof may also be 8. In this case, according to an embodiment, information about the minimum size of a block with a block ratio of 1:2 may be encoded to indicate 0 (ie, 3-3). According to an embodiment, information about the maximum size of a block with a block ratio of 1:2 may be encoded to indicate 5 (ie, 7-2). In other words, information about the maximum size of a block with a block ratio of 1:2 may be encoded to indicate a value obtained by subtracting the minimum size supportable by the video encoding device 1900 from the maximum size of a block with a block ratio of 1:2. Here, since the minimum block with a block ratio of 1:2 is 4×8 or 8×4, the minimum size of a block with a block ratio of 1:2 is only 8, which is larger than the size of the minimum supportable block 4×4 (ie, the minimum size of the block 4). Therefore, information about the minimum size of a block with a block ratio of 1:2 may be encoded to indicate 0 (=3-3). Therefore, when the value of the obtained information about the minimum size of the block with a block ratio of 1:2 indicates 0, the video decoding apparatus 1700 may determine that the minimum size of the block with a block ratio of 1:2 is 8 by decoding 3 (=0+3) from 0 and inversely converting the value 3 (i.e., the logarithmic scale) into 8. Similarly, when the value of the obtained information about the maximum size of the block with a block ratio of 1:2 indicates 5, the video decoding apparatus 1700 may determine that the maximum size of the block with a block ratio of 1:2 is 128 by decoding 7 (=5+2) from 5 and inversely converting the value 7 (i.e., the logarithmic scale) into 128.
[0281] For similar reasons to the fact that the minimum size of a block with a block ratio of 1:2 is only 8, the minimum block with a block ratio of 1:4 is 4×16 or 16×4, and therefore the minimum size of a block with a block ratio of 1:4 is only 16 (4 on a logarithmic scale) which is greater than 4. Similarly, the minimum block with a block ratio of 1:8 is 4×32 or 32×4, and therefore the minimum size of a block with a block ratio of 1:8 is only 32 (5 on a logarithmic scale) which is greater than 4.
[0282] When the maximum size of a supportable block is 128 and the minimum size thereof is 4 in the video encoding apparatus 1900 according to an embodiment, the maximum size of a block allowed to be divided into two may also be 128 and the minimum size thereof may be 8. In this case, according to an embodiment, information about the minimum size of a block allowed to be divided into two may be encoded to indicate 0 (ie, 3-3). According to an embodiment, information about the maximum size of a block allowed to be divided into two may be encoded to indicate 5 (ie, 7-2). In other words, information about the maximum size of a block allowed to be divided into two may be encoded to indicate a value obtained by subtracting the minimum size supportable by the video encoding apparatus 1900 from the maximum size of a block allowed to be divided into two. On the other hand, since the size of the supportable minimum block is 4×4, the minimum block allowed to be divided into two is only 4×8 or 8×4, that is, the minimum size of a block allowed to be divided into two is only 8. Therefore, information about the minimum size of a block allowed to be divided into two may be encoded as 0 (=3-3). Therefore, when the value of the obtained information about the minimum size of the block allowed to be divided into two indicates 0, the video decoding device 1700 can determine that the minimum size of the block allowed to be divided into two is 8 by decoding 3 (=0+3) from 0 and inversely converting the value 3 (i.e., the logarithmic scale) into 8. Similarly, when the value of the obtained information about the maximum size of the block allowed to be divided into two indicates 5, the video decoding device 1700 can determine that the maximum size of the block allowed to be divided into two is 128 by decoding 7 (=5+2) from 5 and inversely converting the value 7 (i.e., the logarithmic scale) into 128.
[0283] For similar reasons as described above that the minimum size of a block allowed to be partitioned by two is only 8 (3 on a logarithmic scale), the minimum size of a block allowed to be partitioned by three is only 16 (4 on a logarithmic scale).
[0284] Fig.23 Information about the maximum size and the minimum size of a block determined according to a block ratio according to another embodiment is shown. The video encoding apparatus 1900 according to an embodiment may encode the maximum size of a block according to a block ratio or a partitioning method as a difference from a maximum size of a supportable block, and encode the minimum size of a block according to a block ratio or a partitioning method as a difference from a minimum size of a supportable block.
[0285] When the maximum size of a supportable block is 128 and the minimum size thereof is 4 in the video encoding apparatus 1900 according to an embodiment, the maximum size of a block having a block ratio of 1:1 may also be 128 and the minimum size thereof may also be 4. In this case, according to an embodiment, information about the minimum size of a block having a block ratio of 1:1 may be encoded to indicate 0 (i.e., 2-2). According to an embodiment, information about the maximum size of a block having a block ratio of 1:1 may be encoded to indicate 0 (i.e., 7-7). In other words, a value obtained by subtracting the maximum size of a supportable block from the maximum size of a block having a block ratio of 1:1 may be encoded as information about the maximum size of a block having a block ratio of 1:1, and a value obtained by subtracting the minimum size of a supportable block from the minimum size of a block having a block ratio of 1:1 may be encoded as information about the minimum size of a block having a block ratio of 1:1. Therefore, when the value of the obtained information about the minimum size of the block with a block ratio of 1:1 indicates 0, the video decoding apparatus 1700 may determine that the minimum size of the block with a block ratio of 1:1 is 4 by decoding 2 (=0+2) from 0 and inversely converting the value 2 (i.e., the logarithmic scale) into 4. Similarly, when the value of the obtained information about the maximum size of the block with a block ratio of 1:1 indicates 1, the video decoding apparatus 1700 may determine that the maximum size of the block with a block ratio of 1:1 is 128 by decoding 7 (=7-0) from 0 and inversely converting the value 7 (i.e., the logarithmic scale) into 128.
[0286] When the maximum size of a block supportable in the video encoding device 1900 according to an embodiment is 128 and the minimum size thereof is 4, the maximum size of a block with a block ratio of 1:1 may be 64 and the minimum size thereof may also be 8. In this case, according to an embodiment, information about the minimum size of a block with a block ratio of 1:1 may be encoded to indicate 1 (i.e., 3-2). According to an embodiment, information about the maximum size of a block with a block ratio of 1:1 may be encoded to indicate 1 (i.e., 7-6). Therefore, when the value of the obtained information about the minimum size of a block with a block ratio of 1:1 indicates 1, the video decoding device 1700 may determine that the minimum size of a block with a block ratio of 1:1 is 8 by decoding 3 (=1+2) from 1 and inversely converting the value 3 (i.e., logarithmic scale) into 8. Similarly, when the value of the information obtained about the maximum size of a block with a block ratio of 1:1 indicates 1, the video decoding device 1700 can determine that the maximum size of a block with a block ratio of 1:1 is 64 by decoding 6 (=7-1) from 1 and inversely converting the value 6 (i.e., logarithmic scale) into 64.
[0287] When the maximum size of a block that can be supported in the video encoding device 1900 according to another embodiment is 128 and the minimum size thereof is 4, the maximum size of a block with a block ratio of 1:2 may be 64 and the minimum size thereof may also be 8. In this case, according to an embodiment, information about the minimum size of a block with a block ratio of 1:2 may be encoded to indicate 0 (i.e., 3-3). According to an embodiment, information about the maximum size of a block with a block ratio of 1:2 may be encoded to indicate 1 (i.e., 7-6). Therefore, when the value of the obtained information about the minimum size of a block with a block ratio of 1:2 indicates 0, the video decoding device 1700 may determine that the minimum size of a block with a block ratio of 1:2 is 8 by decoding 3 (=3-0) from 0 and inversely converting the value 3 (i.e., logarithmic scale) to 8. Similarly, when the value of the information obtained about the maximum size of a block with a block ratio of 1:2 indicates 1, the video decoding device 1700 can determine that the maximum size of a block with a block ratio of 1:2 is 64 by decoding 6 (=7-1) from 1 and inversely converting the value 6 (i.e., logarithmic scale) into 64.
[0288] Similarly, when the maximum size of a block with a block ratio of 1:2 is 64 and the minimum size thereof is 16, information about the minimum size of the block with a block ratio of 1:2 may indicate 1 (=4-3), and information about the maximum size of the block with a block ratio of 1:2 may indicate 1 (i.e., 7-6).
[0289] As another example, when the maximum size of a block having a block ratio of 1:4 is 64 and the minimum size thereof is 16, the minimum size of the block having a block ratio of 1:4 is only 16. Therefore, information about the minimum size of a block having a block ratio of 1:4 may indicate 0 (=4-4), and information about the maximum size of a block having a block ratio of 1:4 may indicate 1 (i.e., 7-6).
[0290] According to another embodiment, since the maximum size of a block allowed to be divided into two is 128 and the minimum size thereof is 8, the information about the minimum size of a block allowed to be divided into two may indicate 0 (i.e., 3-3), and the information about the maximum size of a block allowed to be divided into two may indicate 0 (i.e., 7-7).
[0291] According to another embodiment, since the maximum size of a block allowed to be divided into three is 64 and the minimum size thereof is 16, the information about the minimum size of a block allowed to be divided into three may indicate 0 (i.e., 4-4), and the information about the maximum size of a block allowed to be divided into three may indicate 1 (i.e., 7-6).
[0292] Fig.24Information about the maximum size and the minimum size of a block determined according to a block ratio according to another embodiment is shown. The video encoding apparatus 1900 may encode information about the maximum size of a block according to a block ratio or a division shape to indicate a difference from a maximum size of a supportable block or a difference from a maximum size of a block having another block ratio. The video encoding apparatus 1900 may encode information about the minimum size of a block to indicate a difference from a minimum size of a supportable block or a difference from a minimum size of a block having another block ratio.
[0293] When the maximum size of a block that can be supported in the video encoding apparatus 1900 according to another embodiment is 128 and the minimum size thereof is 4, the maximum size and the minimum size of a block having a block ratio of 1:1 may be 128 and 4, respectively, the maximum size and the minimum size of a block having a block ratio of 1:2 may be 64 and 4, respectively, and the maximum size and the minimum size of a block having a block ratio of 1:4 may be 64 and 8, respectively. In a logarithmic scale, the maximum size and the minimum size of a block having a block ratio of 1:1 may be 7 and 2, respectively, the maximum size and the minimum size of a block having a block ratio of 1:2 may be 6 and 2, respectively, and the maximum size and the minimum size of a block having a block ratio of 1:4 may be 6 and 2, respectively.
[0294] The block ratio decreases as N in the block ratio 1: N increases. In this case, the maximum size of a block with a small block ratio cannot be larger than the maximum size of a block with a relatively large block ratio, and the minimum size of a block with a small block ratio cannot be smaller than the minimum size of a block with a relatively large block ratio.
[0295] Therefore, the video encoding apparatus 1900 may encode information about the minimum size of a block having a block ratio of 1:2 to indicate 0 (ie, 2-2), and encode information about the maximum size of a block having a block ratio of 1:2 to indicate 1 (ie, 7-6). In addition, the video encoding apparatus 1900 may encode information about the minimum size of a block having a block ratio of 1:4 to indicate 0 (ie, 3-3), and encode information about the maximum size of a block having a block ratio of 1:4 to indicate 0 (ie, 6-6).
[0296] Therefore, when the value of the obtained information about the minimum size of the block with a block ratio of 1:2 indicates 0, the video decoding apparatus 1700 may determine that the minimum size of the block with a block ratio of 1:2 is 4 by decoding 2 (=2-0) from 0 and inversely converting the value 2 (i.e., the logarithmic scale) to 4. Similarly, when the value of the obtained information about the maximum size of the block with a block ratio of 1:2 indicates 1, the video decoding apparatus 1700 may determine that the maximum size of the block with a block ratio of 1:2 is 64 by decoding 6 (=7-1) from 1 and inversely converting the value 6 (i.e., the logarithmic scale) to 64.
[0297] Similarly, when the value of the obtained information about the minimum size of the block with a block ratio of 1:4 indicates 0, the video decoding apparatus 1700 may determine that the minimum size of the block with a block ratio of 1:4 is 8 by decoding 3 (=3-0) from 0 and inversely converting the value 3 (i.e., the logarithmic scale) into 8. Similarly, when the value of the obtained information about the maximum size of the block with a block ratio of 1:4 indicates 0, the video decoding apparatus 1700 may determine that the maximum size of the block with a block ratio of 1:4 is 64 by decoding 6 (=6-0) from 0 and inversely converting the value 6 (i.e., the logarithmic scale) into 64.
[0298] Therefore, the video encoding apparatus 1900 and the video decoding apparatus 1700 according to various embodiments can signal information about the maximum size and the minimum size of a block for each block ratio by using the dependency between the maximum size and the minimum size of a block according to different block ratios. Similarly, information about the maximum size and the minimum size of a block according to a division shape can be signaled by using the dependency on the maximum size and the minimum size of a supportable block. Therefore, the amount of bits used to encode / decode information about the maximum size and the minimum size of a block can be reduced, and thus information about the maximum size or the minimum size of various blocks can be set for encoding / decoding.
[0299] In the following, reference will be made to Figures 25 to 31 Various embodiments of syntax elements for signaling information about the maximum size and the minimum size of a block for each block ratio and information about the maximum size and the minimum size of a block according to a division shape are described. The video encoding apparatus 1900 may Figures 25 to 31 The illustrated syntax element format encodes information about the maximum size and the minimum size of a block for each block ratio and information about the maximum size and the minimum size of a block according to a division shape to output a bitstream. The video decoding apparatus 1700 may obtain the syntax element from the bitstream, and decode information about the maximum size and the minimum size of a block for each block ratio and information about the maximum size and the minimum size of a block according to a division shape from the obtained syntax element.
[0300] Fig.25 Syntax elements for signaling information about the maximum and minimum sizes of blocks according to an embodiment are shown.
[0301] Fig.25The sequence parameter set semantics (seq_parameter_set_rbsp) shown in FIG. 1 may include syntax elements log2_ctu_size_minus2, log2_diff_ctu_max_11_cb, log2_diff_max_11_min_11_cb_size, log2_diff_max_11_max_12_cb_size, log2_diff_min_11_min_12_cb_size_minus1, log2_diff_max_11_max_12_cb_size, x_12_max_14_cb_size, log2_diff_min_12_min_14_cb_size_minus1, log2_diff_max_11_max_tt_cb_size, log2_diff_min_11_min_tt_cb_size_minus2, log2_diff_ctu_size_max_suco_cb_size, and log2_diff_max_suco_min_suco_cb_size. The syntax element may indicate a value obtained by logarithmically scaling the size of a block.
[0302] log2_ctu_size_minus2 may indicate a maximum size of a block supported by the video encoding apparatus 1900 and the video decoding apparatus 1700, that is, a size of a maximum coding unit. "_minus2" indicates that 2 is subtracted from a value of an actual maximum size, and since the minimum size of a block is 4 (2 in a logarithmic scale), a value obtained by subtracting 2 from the maximum size of the block may be encoded as a syntax element. For example, when the maximum size of a block is 128×128, the logarithmic scale is 7 and log2_ctu_size_minus2 may be 5.
[0303] log2_diff_ctu_max_11_cb may indicate information about the maximum size of a block (coding unit) with a block ratio of 1:1. In detail, log2_diff_ctu_max_11_cb is information indicating the absolute value of the difference between the maximum size of a supportable block and the maximum size of a block with a block ratio of 1:1. According to an embodiment, when the value of log2_diff_ctu_max_11_cb for a current block with a block ratio of 1:1 is less than the size of a maximum coding unit, the maximum coding unit may be implicitly allowed to be quadtree-divided until the maximum coding unit becomes the size of the current block. As another example, log2_diff_ctu_max_11_cb may not be sent, and the maximum size of a block with a block ratio of 1:1 may be set to be the same as the size of the maximum coding unit. According to an embodiment, when the size of the maximum coding unit is 7 in a logarithmic scale and the maximum size of a block with a block ratio of 1:1 is 7, log2_diff_ctu_max_11_cb may indicate a value of 0.
[0304] log2_diff_max_11_min_11_cb_size may indicate information about a minimum size of a block having a block ratio of 1: 1. In detail, log2_diff_max_11_min_11_cb_size may indicate a difference between a maximum size and a minimum size of a block having a block ratio of 1: 1. For example, when a maximum size of a block having a block ratio of 1: 1 is 7 in a logarithmic scale and a minimum size of a block having a block ratio of 1: 1 is 2 in a logarithmic scale, log2_diff_max_11_min_11_cb_size may indicate a value of 5.
[0305] log2_diff_max_11_max_12_cb_size may indicate information about a maximum size of a block having a block ratio of 1:2 or 2:1. In detail, log2_diff_max_11_max_12_cb_size may indicate a difference between a maximum size of a block having a block ratio of 1:1 and a maximum size of a block having a block ratio of 1:2. For example, when the maximum size of a block having a block ratio of 1:1 is 7 in a logarithmic scale and the maximum size of a block having a block ratio of 1:2 is 6 in a logarithmic scale, log2_diff_max_11_max_12_cb_size may indicate a value of 1.
[0306] log2_diff_min_11_min_12_cb_size_minus1 may indicate information about the minimum size of a block having a block ratio of 1:2 or 2:1. In detail, log2_diff_min_11_min_12_cb_size_minus1 may indicate the difference between the minimum size of a block having a block ratio of 1:1 and the minimum size of a block having a block ratio of 1:2. In addition, since the minimum size of a block having a block ratio of 1:1 needs to be larger than the minimum size of a block having a block ratio of 1:2, there may be at least a difference of 1 in a logarithmic scale. Therefore, the information about the minimum size of a block having a block ratio of 1:2 may indicate a value obtained by subtracting 1 from the difference between the minimum size of a block having a block ratio of 1:1 and the minimum size of a block having a block ratio of 1:2 via “minus1”. For example, when the minimum size of a block having a block ratio of 1:1 is 2 in a logarithmic scale and the minimum size of a block having a block ratio of 1:2 is 3 in a logarithmic scale, log2_diff_min_11_min_12_cb_size_minus1 may indicate a value of 0.
[0307] log2_diff_max_12_max_14_cb_size may indicate information about a maximum size of a block having a block ratio of 1:4 or 4:1. In detail, log2_diff_max_12_max_14_cb_size may indicate a difference between a maximum size of a block having a block ratio of 1:2 or 2:1 and a maximum size of a block having a block ratio of 1:4 or 4:1. For example, when the maximum size of a block having a block ratio of 1:2 or 2:1 is 6 in a logarithmic scale and the maximum size of a block having a block ratio of 1:4 or 4:1 is 5 in a logarithmic scale, log2_diff_max_12_max_14_cb_size may indicate a value of 1.
[0308] log2_diff_min_12_min_14_cb_size_minus1 may indicate information about the minimum size of a block having a block ratio of 1:4 or 4:1. In detail, log2_diff_min_12_min_14_cb_size_minus1 may indicate the difference between the minimum size of a block having a block ratio of 1:2 or 2:1 and the minimum size of a block having a block ratio of 1:4 or 4:1. Because the minimum size of a block having a block ratio of 1:4 or 4:1 needs to be larger than the minimum size of a block having a block ratio of 1:2 or 2:1, the following premise may exist: there is at least a difference of 1 in the logarithmic scale. Therefore, log2_diff_min_12_min_14_cb_size_minus1 may indicate a value obtained by subtracting 1 from the difference between the minimum size of a block having a block ratio of 1:2 or 2:1 and the minimum size of a block having a block ratio of 1:4 or 4:1 via "minus1". For example, when the minimum size of a block having a block ratio of 1:2 or 2:1 is 3 in a logarithmic scale, and the minimum size of a block having a block ratio of 1:4 or 4:1 is 4 in a logarithmic scale, log2_diff_min_12_min_14_cb_size_minus1 may indicate a value of 0.
[0309] log2_diff_max_11_max_tt_cb_size may indicate information about the maximum size of a block allowed to be divided into three. In detail, log2_diff_max_11_max_tt_cb_size may indicate the difference between the maximum size of a block having a block ratio of 1:1 and the maximum size of a block allowed to be divided into three. For example, when the maximum size of a block having a block ratio of 1:1 is 7 in a logarithmic scale and the maximum size of a block allowed to be divided into three is 6 in a logarithmic scale, log2_diff_max_11_max_tt_cb_size may indicate a value of 1.
[0310] log2_diff_min_11_min_tt_cb_size_minus2 may indicate information about the minimum size of a block allowed to be divided into three. In detail, log2_diff_min_11_min_tt_cb_size_minus2 may indicate the difference between the minimum size of a block with a block ratio of 1:1 and the minimum size of a block allowed to be divided into three. Because the minimum size of a block allowed to be divided into three needs to have a value at least two steps larger than the minimum size of a block with a block ratio of 1:1, the following premise may exist: there may be at least a difference of 2 in the logarithmic scale. Therefore, log2_diff_min_11_min_tt_cb_size_minus2 may indicate a value obtained by subtracting 2 from the difference between the minimum size of a block with a block ratio of 1:1 and the minimum size of a block allowed to be divided into three via "minus2". For example, when the minimum size of a block having a block ratio of 1:1 is 2 in a logarithmic scale and the minimum size of a block allowed to be divided into three is 4 in a logarithmic scale, log2_diff_min_11_min_tt_cb_size_minus2 may indicate a value of 0. As another example, information about the minimum size of a block allowed to be divided into three may be encoded by using a difference between a maximum size of a block allowed to be divided into three and a minimum size of a block allowed to be divided into three.
[0311] log2_diff_ctu_size_max_suco_cb_size may indicate information about a maximum size of a block that allows a split unit coding unit (SUCO). In detail, log2_diff_ctu_size_max_suco_cb_size may indicate a difference between a maximum size of a block having a block ratio of 1:1 and a maximum size of a block that allows SUCO. For example, when the maximum size of a block having a block ratio of 1:1 is 7 in a logarithmic scale and the maximum size of a block that allows SUCO is 6 in a logarithmic scale, log2_ctu_size_max_suco_cb_size may indicate a value of 1.
[0312] log2_diff_max_suco_min_suco_cb_size may indicate information about the minimum size of a SUCO-allowed block. In detail, log2_diff_max_suco_min_suco_cb_size may indicate a difference between a maximum size and a minimum size of a SUCO-allowed block. For example, when the maximum size of a SUCO-allowed block is 6 in a logarithmic scale and the minimum size of a SUCO-allowed block is 4 in a logarithmic scale, log2_diff_max_suco_min_suco_cb_size may indicate a value of 2.
[0313] The video decoding device 1700 according to an embodiment may obtain a syntax element from the Fig.25 syntax, and determine the maximum size and minimum size of various blocks from the syntax element via the relational equations described below with reference to Fig.26 and Fig. 27 .
[0314] Fig.26 FIG. shows relational equations for determining the size / number of the maximum block and the size / number of the minimum block determined from the syntax element according to Fig.25 .
[0315] The video decoding device 1700 according to an embodiment may add 2 to the information on the maximum size of the coding unit (log2_ctu_size_minus2 + 2) to determine the logarithmic scale value (CtbLog2SizeY) of the maximum size of the luminance blocks that can be supported. The video decoding device 1700 according to an embodiment may determine the maximum size (CtbSizeY) of the luminance blocks by bit-shifting the logarithmic scale value of the maximum size of the luminance blocks that can be supported to the left by 1 (1<<CtbLog2SizeY).
[0316] The video decoding device 1700 according to an embodiment may determine the logarithmic scale value (MinCbLog2SizeY) of the minimum size of the luminance blocks that can be supported as 2. The video decoding device 1700 may determine the minimum size (MinCbSizeY) of the luminance blocks by bit-shifting the logarithmic scale value of the minimum size of the luminance blocks that can be supported to the left by 1 (1<<MinCbLog2SizeY).
[0317] The video decoding device 1700 according to an embodiment may determine the number of blocks of the maximum size (maximum coding unit) and the number of blocks of the minimum size (minimum coding unit) present in the current picture by using the syntax elements pic_width_in_luma_samples and pic_height_in_luma_samples obtained from the sequence parameter set. pic_width_in_luma_samples indicates information on the number of luminance samples arranged in one row in the width direction of the picture, and pic_height_in_luma_samples indicates information on the number of luminance samples arranged in one row in the height direction of the picture.
[0318] The video decoding apparatus 1700 may determine the number of luma maximum coding units arranged in one row in the width direction of the picture (PicWidthInCtbsY) by rounding a value obtained by dividing information about the number of luma samples arranged in one row in the width direction of the picture by the maximum size of the luma block (Ceil(pic_width_in_luma_samples÷CtbSizeY)).
[0319] The video decoding apparatus 1700 may determine the number of luma maximum coding units arranged in one row in the height direction of the picture (PicHeightInCtbsY) by rounding a value obtained by dividing information about the number of luma samples arranged in one row in the height direction of the picture by the maximum size of the luma block (Ceil(pic_height_in_luma_samples÷CtbSizeY)).
[0320] The video decoding apparatus 1700 may calculate the maximum brightness coding units by multiplying the number of maximum brightness coding units arranged in one row in the width direction of the picture by the number of maximum brightness coding units arranged in one row in the height direction of the picture (PicWidthInCtbsY PicHeightInCtbsY), determine the number of luma maximum coding units included in the picture (PicSizeInCtbsY).
[0321] The video decoding apparatus 1700 may determine the number of luma minimum coding units arranged in one row in the width direction of the picture (PicWidthInMinCbsY) by dividing information about the number of luma samples arranged in one row in the width direction of the picture by the minimum size of a luma block (pic_width_in_luma_samples / MinCbSizeY).
[0322] The video decoding apparatus 1700 may determine the number of luma minimum coding units arranged in one row in the height direction of the picture (PicHeightInMinCbsY) by dividing information about the number of luma samples arranged in one row in the height direction of the picture by the minimum size of a luma block (pic_height_in_luma_samples / MinCbSizeY).
[0323] The video decoding apparatus 1700 may calculate the number of luminance minimum coding units arranged in one row in the width direction of the picture by multiplying the number of luminance minimum coding units arranged in one row in the height direction of the picture (PicWidthInMinCbsY PicHeightInMinCbsY), to determine the number of luma minimum coding units included in the picture (PicSizeInMinCbsY).
[0324] The video decoding apparatus 1700 may calculate the number of luma samples arranged in one line in the width direction of the picture by multiplying the information about the number of luma samples arranged in one line in the height direction of the picture (pic_width_in_luma_samples pic_height_in_luma_samples) to determine the number of luma samples included in the picture (PicSizeInSamplesY).
[0325] The video decoding apparatus 1700 may determine the number of chroma samples arranged in one line in the width direction of the picture (PicWidthInSamplesC) by dividing information about the number of luma samples arranged in one line in the width direction of the picture by the width of the chroma sub-block (pic_width_in_luma_samples / SubWidthC).
[0326] The video decoding apparatus 1700 may determine the number of chroma samples arranged in one line in the height direction of the picture (PicHeightInSamplesC) by dividing information about the number of luma samples arranged in one line in the height direction of the picture by the height of the chroma sub-block (pic_height_in_luma_samples / SubHeightC).
[0327] Fig. 27 Show according to Fig.25 The syntax element of is used to determine the relationship equation between the maximum size and the minimum size of the block according to the block ratio.
[0328] The video decoding apparatus 1700 may determine a logarithmic scale value (MaxCbLog2Size11Ratio) of a maximum size of a block having a block ratio of 1:1 by subtracting information about a maximum size of a block having a block ratio of 1:1 (CtbLog2SizeY-log2_diff_ctu_max_11_cb_size) from a logarithmic scale value of a maximum size of a supportable luma block.
[0329] The video decoding apparatus 1700 may determine a logarithmic scale value (MinCbLog2Size11Ratio) of a minimum size of a block having a block ratio of 1:1 by subtracting information about a minimum size of a block having a block ratio of 1:1 (MaxCbLog2Size11Ratio - log2_diff_max_11_min_11_cb_size) from a logarithmic scale value of a maximum size of a block having a block ratio of 1:1.
[0330] The video decoding apparatus 1700 may determine a logarithmic scale value (MaxCbLog2Size12Ratio) of a maximum size of a block having a block ratio of 1:2 by subtracting information about a maximum size of a block having a block ratio of 1:2 (MaxCbLog2Size11Ratio - log2_diff_max_11_max_12_cb_size) from a logarithmic scale value of a maximum size of a block having a block ratio of 1:1.
[0331] The video decoding apparatus 1700 may determine a logarithmic scale value (MinCbLog2Size12Ratio) of a minimum size of a block having a block ratio of 1:2 by adding a logarithmic scale value of a minimum size of a block having a block ratio of 1:1 to information about a minimum size of a block having a block ratio of 1:2 and then adding 1 to the result (MinCbLog2Size11Ratio + log2_diff_min_11_min_12_cb_size_minus1 + 1).
[0332] The video decoding apparatus 1700 may determine a logarithmic scale value (MaxCbLog2Size14Ratio) of a maximum size of a block having a block ratio of 1:4 by subtracting information about a maximum size of a block having a block ratio of 1:4 (MaxCbLog2Size12Ratio - log2_diff_max_12_max_14_cb_size) from a logarithmic scale value of a maximum size of a block having a block ratio of 1:2.
[0333] The video decoding apparatus 1700 may determine a logarithmic scale value (MinCbLog2Size14Ratio) of the minimum size of a block having a block ratio of 1:4 by adding the logarithmic scale value of the minimum size of a block having a block ratio of 1:2 to information about the minimum size of a block having a block ratio of 1:4 and then adding 1 to the result (MinCbLog2Size12Ratio + log2_diff_min_12_min_14_cb_size_minus1 + 1).
[0334] The video decoding apparatus 1700 may determine a logarithmic scale value (MaxTtLog2Size) of a maximum size of a block allowed to be divided into three by subtracting information about a maximum size of a block allowed to be divided into three (MaxCbLog2Size11Ratio - log2_diff_max_11_max_tt_cb_size) from a logarithmic scale value of a maximum size of a block having a block ratio of 1:1.
[0335] The video decoding apparatus 1700 may determine a logarithmic scale value (MinTtLog2Size) of a minimum size of a block allowed to be divided into three by adding a logarithmic scale value of a minimum size of a block having a block ratio of 1:1, information about a logarithmic scale value of a minimum size of a block allowed to be divided into three, and 2 (MinCbLog2Size11Ratio +log2_diff_min_11_min_tt_cb_size_minus2 + 2).
[0336] Fig.28 Show according to Fig.25 The relationship equation of the syntax elements is used to determine the maximum size and the minimum size of the block for performing SUCO.
[0337] The video decoding apparatus 1700 may determine a logarithmic scale value (MaxSucoLog2Size) of the maximum size of a SUCO-enabled block by subtracting information about the maximum size of a SUCO-enabled block (CtbLog2SizeY - log2_diff_ctu_size_max_suco_cb_size) from a logarithmic scale value of the maximum size of a supportable luma block.
[0338] The video decoding apparatus 1700 may determine a logarithmic scale value (MinSucoLog2Size) of the minimum size of the SUCO allowed block by subtracting information about the minimum size of the SUCO allowed block (MaxSucoLog2Size - log2_diff_max_suco_min_suco_cb_size) from the logarithmic scale value of the maximum size of the SUCO allowed block.
[0339] In the following, reference will be made to Figure 29 to Figure 31 An embodiment in which the maximum size and the minimum size of a block for each block ratio are determined by the video decoding apparatus 1700 according to another embodiment by using a syntax element obtained from a sequence parameter set is described.
[0340] Fig.29 Syntax elements for signaling information about the maximum and minimum sizes of blocks according to another embodiment are shown.
[0341] Fig.29 The sequence parameter semantics shown in may include syntax elements log2_ctu_size_minus5, log2_min_cb_size_minus2, log2_diff_ctu_max_14_cb_size, log2_diff_ctu_max_tt_cb_size, and log2_diff_min_cb_min_tt_cb_size_minus2. The syntax elements may indicate values obtained by logarithmically scaling the size of a block.
[0342] log2_ctu_size_minus5 may indicate a maximum size of a block supported by the video encoding apparatus 1900 and the video decoding apparatus 1700, that is, a size of a maximum coding unit. "_minus5" may indicate that 5 is subtracted from a value of an actual maximum size. For example, when the maximum size of a block is 128×128, the logarithmic scale is 7 and log2_ctu_size_minus5 may be 2.
[0343] log2_min_cb_size_minus2 may indicate a minimum size of a block supported by the video encoding apparatus 1900 and the video decoding apparatus 1700, that is, a size of a minimum coding unit. In detail, log2_min_cb_size_minus2 may be information indicating a value obtained by subtracting 2 from the minimum size of a supportable block. For example, when the minimum size of the maximum coding unit is 2 in a logarithmic scale, log2_min_cb_size_minus2 may indicate a value of 2.
[0344] log2_diff_ctu_max_14_cb_size may indicate information about a maximum size of a block having a block ratio of 1:4. In detail, log2_diff_ctu_max_14_cb_size is information indicating a difference between a maximum size of a supportable block and a maximum size of a block having a block ratio of 1:4. For example, when the size of the maximum coding unit is 7 in a logarithmic scale and the maximum size of a block having a block ratio of 1:4 is 5 in a logarithmic scale, log2_diff_ctu_max_14_cb_size may indicate a value of 2.
[0345] log2_diff_ctu_max_tt_cb_size may indicate information about the maximum size of a block that is allowed to be trisected. Specifically, log2_diff_ctu_max_tt_cb_size is information indicating the difference between the maximum size of a supportable block and the maximum size of a block that is allowed to be trisected. For example, when the size of the largest coding unit is 7 in logarithmic scale and the maximum size of a block that is allowed to be trisected is 6 in logarithmic scale, log2_diff_ctu_max_tt_cb_size may indicate the value 1.
[0346] log2_diff_min_cb_min_tt_cb_size_minus2 may indicate information about the minimum size of a block that is allowed to be trisected. Specifically, log2_diff_min_cb_min_tt_cb_size_minus2 is information indicating the difference between the minimum size of a supportable block and the minimum size of a block that is allowed to be trisected. "_minus2" may indicate subtracting 2 from the value of the actual maximum size. For example, when the maximum size of a block that is allowed to be trisected is 6 in logarithmic scale and the minimum size of a block that is allowed to be trisected is 4 in logarithmic scale, log2_diff_min_cb_min_tt_cb_size_minus2 may indicate the value 2.
[0347] According to another embodiment, the video decoding device 1700 may obtain syntax elements from Fig.29 the syntax, and determine the maximum and minimum sizes of various blocks from the syntax elements via the relational equations described below with reference to Fig.30 and Fig.31 .
[0348] Fig.30 Illustrates the relational equations for determining the size / number of the largest block and the size / number of the smallest block determined from the syntax elements according to Fig.29 .
[0349] According to another embodiment, the video decoding device 1700 may add 5 to the information about the maximum size of a block (log2_ctu_size_minus5 + 5) to determine the logarithmic scale value of the maximum size of a supportable luma block (CtbLog2SizeY). The video decoding device 1700 may determine the maximum size of the luma block (CtbSizeY) by left bit-shifting the logarithmic scale value of the maximum size of a supportable luma block by 1 (1 << CtbLog2SizeY).
[0350] The video decoding apparatus 1700 according to another embodiment may determine the number of blocks of a maximum size (maximum coding unit) and blocks of a minimum size (minimum coding unit) present in the current picture by using syntax elements pic_width_in_luma_samples and pic_height_in_luma_samples obtained from a sequence parameter set. pic_width_in_luma_samples indicates information about the number of luma samples arranged in one row in the width direction of the picture, and pic_height_in_luma_samples indicates information about the number of luma samples arranged in one row in the height direction of the picture.
[0351] The video decoding apparatus 1700 may determine the number of luma maximum coding units arranged in one row in the width direction of the picture (PicWidthInCtbsY) by rounding a value obtained by dividing information about the number of luma samples arranged in one row in the width direction of the picture by the maximum size of the luma block (Ceil(pic_width_in_luma_samples ÷ CtbSizeY)).
[0352] The video decoding apparatus 1700 may determine the number of luma maximum coding units arranged in one row in the height direction of the picture (PicHeightInCtbsY) by rounding a value obtained by dividing information about the number of luma samples arranged in one row in the height direction of the picture by the maximum size of the luma block (Ceil(pic_height_in_luma_samples ÷ CtbSizeY)).
[0353] The video decoding apparatus 1700 may calculate the maximum brightness coding units by multiplying the number of maximum brightness coding units arranged in one row in the width direction of the picture by the number of maximum brightness coding units arranged in one row in the height direction of the picture (PicWidthInCtbsY PicHeightInCtbsY), determine the number of luma maximum coding units included in the picture (PicSizeInCtbsY).
[0354] The video decoding apparatus 1700 may determine the number of luma minimum coding units arranged in one row in the width direction of the picture (PicWidthInMinCbsY) by dividing information about the number of luma samples arranged in one row in the width direction of the picture by the minimum size of a luma block (pic_width_in_luma_samples / MinCbSizeY).
[0355] The video decoding apparatus 1700 may determine the number of luma minimum coding units arranged in one row in the height direction of the picture (PicHeightInMinCbsY) by dividing information about the number of luma samples arranged in one row in the height direction of the picture by the minimum size of the luma block (pic_height_in_luma_samples / MinCbSizeY).
[0356] The video decoding apparatus 1700 may calculate the number of luminance minimum coding units arranged in one row in the width direction of the picture by multiplying the number of luminance minimum coding units arranged in one row in the height direction of the picture (PicWidthInMinCbsY PicHeightInMinCbsY), to determine the number of luma minimum coding units included in the picture (PicSizeInMinCbsY).
[0357] The video decoding apparatus 1700 may calculate the number of luma samples arranged in one line in the width direction of the picture by multiplying the information about the number of luma samples arranged in one line in the height direction of the picture (pic_width_in_luma_samples pic_height_in_luma_samples), determines the number of luma samples included in the picture (PicSizeInSamplesY).
[0358] The video decoding apparatus 1700 may determine the number of chroma samples arranged in one row in the width direction of the picture (PicWidthInSamplesC) by dividing information about the number of luma samples arranged in one row in the width direction of the picture by the width of the chroma sub-block (pic_width_in_luma_samples / SubWidthC).
[0359] The video decoding apparatus 1700 may determine the number of chroma samples arranged in one row in the height direction of the picture (PicHeightInSamplesC) by dividing information about the number of luma samples arranged in one row in the height direction of the picture by the height of the chroma sub-block (pic_height_in_luma_samples / SubHeightC).
[0360] The video decoding device 1700 may determine the logarithmic scale value (MinCbLog2SizeY) of the minimum size of a supportable luma block as the value obtained by adding 2 to the information on the minimum size of the supportable luma block (2 + log2_min_cb_size_minus2). The video decoding device 1700 may determine the minimum size of the supportable luma block by left bit-shifting the logarithmic scale value of the minimum size of the supportable luma block by 1 (MinCbSizeY = 1<<MinCbLog2SizeY).
[0361] The video decoding device 1700 may determine the number of minimum luma coding units (PicWidthInMinCbsY) arranged in one row in the width direction of the picture by dividing the information on the number of luma samples arranged in one row in the width direction of the picture by the minimum size of the luma block (pic_width_in_luma_samples / MinCbSizeY).
[0362] The video decoding device 1700 may determine the number of minimum luma coding units (PicHeightInMinCbsY) arranged in one row in the height direction of the picture by dividing the information on the number of luma samples arranged in one row in the height direction of the picture by the minimum size of the luma block (pic_height_in_luma_samples / MinCbSizeY).
[0363] The video decoding device 1700 may determine the number of minimum luma coding units (PicSizeInMinCbsY) included in the picture by multiplying the number of minimum luma coding units arranged in one row in the width direction of the picture by the number of minimum luma coding units arranged in one row in the height direction of the picture (PicWidthInMinCbsY PicHeightInMinCbsY).
[0364] Fig.31 Shows the relational equation for determining the maximum and minimum sizes of a block according to the block ratio based on the Fig.29 syntax element.
[0365] The video decoding device 1700 may determine the logarithmic scale value (MinCbLog2Size11Ratio) of the minimum size of a block with a block ratio of 1:1 as the same as the logarithmic scale value (MinCbLog2SizeY) of the minimum size of the supportable luma block.
[0366] The video decoding apparatus 1700 may determine a logarithmic scale value (MinCbLog2Size12Ratio) of a minimum size of a block having a block ratio of 1:2 by adding 1 (MinCbLog2Size11Ratio+1) to the logarithmic scale value of the minimum size of a block having a block ratio of 1:1.
[0367] The video decoding apparatus 1700 may determine the logarithmic scale value of the minimum size of a block having a block ratio of 1:4 (MinCbLog2Size14Ratio) as a value obtained by adding 1 to the logarithmic scale value of the minimum size of a block having a block ratio of 1:2 (MinCbLog2Size12Ratio+1).
[0368] The video decoding apparatus 1700 may determine the logarithmic scale value (MaxTtLog2Size) of the maximum size of a block allowed to be divided into three to be a smaller value (Min(CtbLog2SizeY - log2_diff_ctu_max_tt_cb_size, 6)) between 6 and a value obtained by subtracting information about the maximum size of a block allowed to be divided into three from the logarithmic scale value of the maximum size of a supportable luminance block.
[0369] The video decoding apparatus 1700 may determine the logarithmic scale value (MinTtLog2Size) of the minimum size of a block allowed to be divided into three as a value obtained by adding the logarithmic scale value of the minimum size of a supportable luminance block, information about the minimum size of a block allowed to be divided into three, and 2 (MinCbLog2SizeY + log2_diff_min_cb_min_tt_cb_size_minus2 + 2).
[0370] In addition, the embodiments of the present disclosure described above may be written as a computer-executable program that may be stored in a medium.
[0371] The medium can store computer executable programs continuously, or temporarily store computer executable programs or instructions for execution or downloading. In addition, the medium can be any of a variety of recording media or storage media that combine single or multiple pieces of hardware, and the medium is not limited to media directly connected to the computer system, but can be distributed on a network. Examples of media include magnetic media (such as hard disks, floppy disks, and tapes) configured to store program instructions, optical recording media (such as CD-ROMs and DVDs), magneto-optical media (such as floppy disks), and ROM, RAM, and flash memory. Machine-readable storage media can be provided in the form of non-transitory storage media. Here, "non-transitory storage media" only means tangible devices and does not contain signals (e.g., electromagnetic waves). The term does not distinguish between situations where data is semi-permanently stored in a storage medium and situations where data is temporarily stored in a storage medium. For example, a "non-transitory storage medium" may include a buffer that temporarily stores data.
[0372] Other examples of the medium include recording media and storage media managed by an application store that distributes applications or by a website, server, or the like that provides or distributes other various types of software.
[0373] According to an embodiment, the method according to various embodiments of the present disclosure may be provided by being included in a computer program product. A computer program product is a product that can be traded between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read-only memory (CD-ROM)) or through an application store (e.g., Play Store TM ) or directly or online between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable application) may be at least temporarily generated or temporarily stored in a machine-readable storage medium (such as a memory of a manufacturer's server, an application store's server, or a relay server).
[0374] Although one or more embodiments of the present disclosure have been described with reference to the drawings, it will be understood by those skilled in the art that various changes in form and details may be made in the present disclosure without departing from the spirit and scope defined by the claims.
Claims
1. A video decoding method, comprising: determining a maximum size of the coding unit by using information about the maximum size of the coding unit obtained from the bitstream; obtaining, from a bitstream, information about a maximum size of a block allowed to be divided into three, information about a minimum size of a block allowed to be divided into three, and information about a maximum size of a coding unit having an aspect ratio of 1:4; determining a maximum size of a block allowed to be divided into three by subtracting information about a maximum size of a block allowed to be divided into three from a maximum size of a coding unit; determining a minimum size of a block allowed to be divided into three by adding the minimum size of the coding unit and information about the minimum size of the block allowed to be divided into three; determining a maximum size of a coding unit having an aspect ratio of 1:4 by subtracting information about a maximum size of a coding unit having an aspect ratio of 1:4 from a maximum size of the coding unit; Determining whether it is allowed to divide the first coding unit into three parts based on whether the width or height of the first coding unit is not greater than the maximum size of the block allowed to be divided into three parts, whether the width or height of the first coding unit is not less than the minimum size of the block allowed to be divided into three parts, whether the width or height of the first coding unit is not greater than the maximum size of the coding unit with an aspect ratio of 1:4, and whether the width or height of the first coding unit is not less than the minimum size of the coding unit with an aspect ratio of 1:4; When three-division of the first coding unit is allowed, generating a second coding unit having an aspect ratio of 1:4 by dividing the first coding unit into three and decoding the second coding unit; and When the first coding unit is not divided into smaller coding units, the first coding unit is decoded.
2. A video encoding method, comprising: Determine a maximum size of a coding unit, a minimum size of a coding unit, a maximum size of a block allowed to be divided into three, a minimum size of a block allowed to be divided into three, a maximum size of a coding unit with an aspect ratio of 1:4, and a minimum size of a coding unit with an aspect ratio of 1:4; Determining whether to allow the first coding unit to be divided into three parts based on whether the width or height of the first coding unit is not greater than the maximum size of the block allowed to be divided into three parts, whether the width or height of the first coding unit is not less than the minimum size of the block allowed to be divided into three parts, whether the width or height of the first coding unit is not greater than the maximum size of the coding unit with an aspect ratio of 1:4, and whether the width or height of the first coding unit is not less than the minimum size of the coding unit with an aspect ratio of 1:4; When the first coding unit is allowed to be divided into three, a second coding unit having an aspect ratio of 1:4 is generated by dividing the first coding unit into three and the second coding unit is encoded; When the first coding unit is not divided into smaller coding units, encoding the first coding unit; encoding information about a maximum size of the coding unit based on the maximum size of the coding unit; encoding information about a maximum size of a block allowed to be divided into three by subtracting a maximum size of a block allowed to be divided into three from a maximum size of a coding unit; and Information about the minimum size of a block allowed to be divided into three is encoded by subtracting the minimum size of the coding unit from the minimum size of the block allowed to be divided into three.
3. A method for transmitting a bit stream generated by encoding a video, the method comprising: Determine a maximum size of a coding unit, a minimum size of a coding unit, a maximum size of a block allowed to be divided into three, a minimum size of a block allowed to be divided into three, a maximum size of a coding unit with an aspect ratio of 1:4, and a minimum size of a coding unit with an aspect ratio of 1:4; Determining whether to allow the first coding unit to be divided into three parts based on whether the width or height of the first coding unit is not greater than the maximum size of the block allowed to be divided into three parts, whether the width or height of the first coding unit is not less than the minimum size of the block allowed to be divided into three parts, whether the width or height of the first coding unit is not greater than the maximum size of the coding unit with an aspect ratio of 1:4, and whether the width or height of the first coding unit is not less than the minimum size of the coding unit with an aspect ratio of 1:4; When the first coding unit is allowed to be divided into three, a second coding unit having an aspect ratio of 1:4 is generated by dividing the first coding unit into three and the second coding unit is encoded; When the first coding unit is not divided into smaller coding units, encoding the first coding unit; encoding information about a maximum size of the coding unit based on the maximum size of the coding unit; encoding information about a maximum size of a block allowed to be divided into three by subtracting a maximum size of a block allowed to be divided into three from a maximum size of a coding unit; encoding information about a minimum size of a block allowed to be divided into three by subtracting a minimum size of a coding unit from a minimum size of a block allowed to be divided into three; and A bitstream including information about a maximum size of a coding unit, information about a maximum size of a block allowed to be divided into three, and information about a minimum size of a block allowed to be divided into three is transmitted.