Video decoding method and apparatus, and video encoding method and apparatus
By determining the internal prediction mode of brightness blocks relative to the current color block in the video coding and decoding, the problem of low intramed prediction efficiency when the color prediction mode is the direct mode is solved. decoding.
Patent Information
- Application Number
- CN202411528311.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-08-24
- Filing Date
- 2019-08-23
- Publication Date
- 2025-01-24
AI Technical Summary
In video encoding and decoding processing, it is difficult for the prior art to effectively utilize the relationship between the luminance block and the chrominance block, especially when the chrominance prediction mode is in the direct mode, there is a lack of efficient intra prediction method.
By determining the brightness block of the brightness sample point point at the lower right position at the lower right position of the current color block, the internal prediction mode based on the brightness block of the brightness block is determined Perform in -frame predictions.
The efficiency of video coding and decoding has been improved, and the compression and decoding process of image data is optimized through more accurate internal prediction mode.
Smart Images

Figure CN119363975A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of August 23, 2019, application number 201980055900.7, and invention name “Video decoding method and device, and video encoding method and device”. Technical Field
[0002] The present disclosure relates to a video decoding method and a video decoding device, and more particularly, to a video encoding method and a device and a video decoding method and a device for performing chroma prediction on a current chroma block by using a prediction mode of a luminance block, wherein the luminance block includes luminance samples corresponding to chroma samples at a lower right position relative to a center of the current chroma block. Background Art
[0003] Image data is encoded by a codec according to a preset data compression standard (eg, Moving Picture Experts Group (MPEG) standard), and then stored in a recording medium or transmitted in the form of a bit stream through a communication channel.
[0004] With the development and popularization of hardware capable of reproducing and storing high-resolution or high-definition image content, the demand for codecs that efficiently encode or decode high-resolution or high-definition image content has increased. The encoded image content can be decoded and then reproduced. Recently, methods for effectively compressing such high-resolution or high-definition image content have been used. For example, a method for randomly dividing an image to be encoded or a process for rendering data has been proposed so that image compression technology can be effectively implemented.
[0005] As one of techniques for rendering data, when a chroma prediction mode is a direct mode (DM), a prediction mode of one luma block corresponding to one chroma block is generally used. Summary of the invention
[0006] Technical issues
[0007] A method and apparatus are provided, wherein during video encoding and decoding processes, the method and apparatus determine a luma block including luma samples corresponding to chroma samples at a lower right position relative to a center of a current chroma block, determine a chroma intra prediction mode of the current chroma block based on the determined intra prediction mode of the luma block, and perform intra prediction on the current chroma block based on the determined chroma intra prediction mode.
[0008] Solution
[0009] In order to solve the technical problem, according to the present disclosure, a video decoding method includes: obtaining chroma intra-frame prediction mode information about a current chroma block; when the chroma intra-frame prediction mode information indicates a direct mode (DM), determining a luminance block including luminance samples corresponding to chroma samples at a lower right position relative to the center of the current chroma block; based on the determined intra-frame prediction mode of the luminance block, determining the chroma intra-frame prediction mode of the current chroma block; and performing intra-frame prediction on the current chroma block based on the determined chroma intra-frame prediction mode.
[0010] In order to solve this technical problem, according to the present disclosure, a video decoding device includes: a memory; and at least one processor connected to the memory, wherein the at least one processor is configured to: obtain chroma intra-frame prediction mode information about a current chroma block; when the chroma intra-frame prediction mode information indicates a direct mode (DM), determine a luminance block including luminance samples corresponding to chroma samples at a lower right position relative to the center of the current chroma block; based on the determined intra-frame prediction mode of the luminance block, determine the chroma intra-frame prediction mode of the current chroma block; and based on the determined chroma intra-frame prediction mode, perform intra-frame prediction on the current chroma block.
[0011] In order to solve the technical problem, according to the present invention, a video encoding method includes: determining a luminance block including luminance samples corresponding to chrominance samples at a lower right position relative to the center of a current chrominance block; determining a chrominance intra-frame prediction mode of the current chrominance block based on the determined intra-frame prediction mode of the luminance block; performing intra-frame prediction on the current chrominance block based on the determined chrominance intra-frame prediction mode; and generating chrominance intra-frame prediction mode information about the current chrominance block.
[0012] In order to solve this technical problem, according to the present disclosure, a video encoding device includes: at least one processor connected to a memory, wherein the at least one processor is configured to: determine a luminance block including luminance samples corresponding to chrominance samples at a lower right position relative to the center of a current chrominance block; determine a chrominance intra-frame prediction mode of the current chrominance block based on the determined intra-frame prediction mode of the luminance block; perform intra-frame prediction on the current chrominance block based on the determined chrominance intra-frame prediction mode; and generate chrominance intra-frame prediction mode information about the current chrominance block.
[0013] Beneficial Effects
[0014] During video encoding and decoding processing, chroma intra prediction mode information about a current chroma block is obtained, and when the chroma intra prediction mode information indicates a direct mode (DM), a luminance block including luminance samples corresponding to chroma samples at a lower right position relative to the center of the current chroma block is determined, a chroma intra prediction mode of the current chroma block is determined based on the determined intra prediction mode of the luminance block, and intra prediction is performed on the current chroma block based on the determined chroma intra prediction mode. Therefore, encoding efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic block diagram of an image decoding device according to an embodiment is shown.
[0016] Figure 2 A flowchart of an image decoding method according to an embodiment is shown.
[0017] 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.
[0018] 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.
[0019] 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.
[0020] Figure 6 A method of determining a preset coding unit from among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0021] 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.
[0022] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units when coding units cannot be processed in a preset order, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0023] 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.
[0024] Fig.10It is shown that shapes into which the second coding unit may be split are restricted when a second coding unit having a non-square shape determined when an image decoding apparatus splits a first coding unit satisfies a preset condition according to an embodiment.
[0025] Fig.11 A process of splitting a square coding unit when division shape pattern information indicates that the square coding unit is not split into four square coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0026] Fig.12 It is shown that a processing order among a plurality of coding units may be changed according to a process of dividing the coding units according to an embodiment.
[0027] 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 such that a plurality of coding units are determined according to an embodiment is illustrated.
[0028] Fig.14 Depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.
[0029] Fig.15 It is illustrated that a plurality of coding units are determined based on a plurality of preset data units included in a picture according to an embodiment.
[0030] Fig.16 A processing block serving as a unit for determining an order of determining reference coding units included in a picture according to an embodiment is illustrated.
[0031] Fig.17 A block diagram of a video encoding apparatus according to an embodiment is shown.
[0032] Fig.18 A flowchart of a video encoding method according to an embodiment is shown.
[0033] Fig.19 A block diagram of a video decoding apparatus according to an embodiment is shown.
[0034] Fig. 20 A flowchart of a video decoding method according to an embodiment is shown.
[0035] Fig.21 A diagram for describing a method of performing chroma prediction on a current chroma block based on a prediction mode of a luma block including luma samples corresponding to chroma samples at a lower right position with respect to a center of the current chroma block according to an embodiment is shown.
[0036] Fig. 22A diagram for describing a method of determining a prediction mode of a chroma block according to another embodiment is shown.
[0037] Fig.23 A diagram for describing a method of determining a prediction mode of a chroma block according to another embodiment is shown.
[0038] Fig.24 A diagram for describing a method of predicting chrominance samples by using luma samples according to another embodiment is shown.
[0039] Fig.25 A diagram for describing a method of dividing a luminance block and a chrominance block according to an embodiment is shown.
[0040] Fig.26 A diagram for describing a method of dividing a luminance block and a chrominance block according to another embodiment is shown.
[0041] Fig. 27 A diagram for describing a method of dividing a luminance block and a chrominance block according to another embodiment is shown.
[0042] Fig.28a shows the maximum coding unit at the picture boundary, Fig.28b A method of dividing a block until coding units that do not cross picture boundaries are obtained is shown.
[0043] Fig.29 A diagram for describing prediction and transformation of a rectangular block located at a picture boundary is shown.
[0044] Fig.30 A diagram for describing a method of performing motion compensation using neighboring blocks when only a skip mode is allowed for a block of a specific size according to an embodiment is shown.
[0045] Fig.31a shows the luminance block and chrominance block in 4:4:4YUV color format, Fig.31b shows the luminance block and chrominance block in 4:2:2YUV color format, Fig.31c Luma blocks and chroma blocks in 4:2:0 YUV color format are shown.
[0046] Best Mode for Carrying Out the Invention
[0047] According to an embodiment of the present disclosure, a video decoding method includes: obtaining chroma intra-frame prediction mode information about a current chroma block; when the chroma intra-frame prediction mode information indicates a direct mode (DM), determining a luminance block including luminance samples corresponding to chroma samples at a lower right position relative to the center of the current chroma block; based on the determined intra-frame prediction mode of the luminance block, determining the chroma intra-frame prediction mode of the current chroma block; and performing intra-frame prediction on the current chroma block based on the determined chroma intra-frame prediction mode.
[0048] The chroma sample at the lower right position relative to the center of the current chroma block can be a chroma sample located at 1 / 2 of the width of the current chroma block on the right side and 1 / 2 of the height of the current chroma block on the lower side from the chroma sample at the upper left position of the current chroma block.
[0049] The chroma intra prediction mode information may indicate one of prediction modes including a planar mode, a direct current (DC) mode, a vertical mode, a horizontal mode, or a DM.
[0050] The current chrominance block and the determined luminance block are divided into different tree structures.
[0051] The luma region corresponding to the current chroma block may include a plurality of luma blocks.
[0052] According to an embodiment of the present invention, a video encoding method includes: determining a luminance block including luminance samples corresponding to chrominance samples at a lower right position relative to the center of the current chrominance block from N luminance blocks corresponding to the current chrominance block; determining a chrominance intra-frame prediction mode of the current chrominance block based on the determined intra-frame prediction mode of the luminance block; performing intra-frame prediction on the current chrominance block based on the determined chrominance intra-frame prediction mode; and generating chrominance intra-frame prediction mode information about the current chrominance block.
[0053] The chroma sample at the lower right position relative to the center of the current chroma block can be a chroma sample located at 1 / 2 of the width of the current chroma block on the right side and 1 / 2 of the height of the current chroma block on the lower side from the chroma sample at the upper left position of the current chroma block.
[0054] The chroma intra prediction mode information may include one of prediction modes including a planar mode, a direct current (DC) mode, a vertical mode, a horizontal mode, or a direct mode (DM).
[0055] The current chrominance block and the determined luma block may be divided into different tree structures.
[0056] The luma region corresponding to the current chroma block may include a plurality of luma blocks.
[0057] According to an embodiment of the present disclosure, a video decoding device includes: a memory; and at least one processor connected to the memory, wherein the at least one processor is configured to: obtain chroma intra-frame prediction mode information about a current chroma block; when the chroma intra-frame prediction mode information indicates direct current (DM), determine a luminance block including luminance samples corresponding to chroma samples at a lower right position relative to the center of the current chroma block; based on the determined intra-frame prediction mode of the luminance block, determine the chroma intra-frame prediction mode of the current chroma block; and based on the determined chroma intra-frame prediction mode, perform intra-frame prediction on the current chroma block.
[0058] The chroma sample at the lower right position relative to the center of the current chroma block can be a chroma sample located at 1 / 2 of the width of the current chroma block on the right side and 1 / 2 of the height of the current chroma block on the lower side from the chroma sample at the upper left position of the current chroma block.
[0059] The chroma intra prediction mode information may include one prediction mode including a planar mode, a direct current (DC) mode, a vertical mode, a horizontal mode, or a direct mode (DM).
[0060] The current chrominance block and the determined luma block may be divided into different tree structures.
[0061] The luma region corresponding to the current chroma block may include a plurality of luma blocks. DETAILED DESCRIPTION
[0062] The advantages and features of the present disclosure and methods of achieving the advantages and features will be more fully described with reference to the accompanying drawings, in which embodiments of the present disclosure are shown. However, the present disclosure can be implemented in many different forms and should not be construed as limited to the embodiments set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be thorough and complete and will fully convey the concept of the present disclosure to those of ordinary skill in the art.
[0063] The terms used herein will be briefly described and the disclosed embodiments will be described in detail.
[0064] The terms used herein are those common terms currently widely used in the art in view of the functions in the present disclosure, but these terms may vary according to the intentions of those skilled in the art, precedents, or new technologies in the art. In addition, some of the terms used herein may be arbitrarily selected by the applicant, and in such cases, these terms are defined in detail below. Therefore, the specific terms used herein should be defined based on their unique meanings and the entire context of the present disclosure.
[0065] It is to be understood that singular forms include plural references unless the context clearly dictates otherwise.
[0066] It should be understood that, unless the context clearly specifies otherwise, when a part “includes” a certain component, the part does not exclude another component but may further include another component.
[0067] In addition, the term "unit" used here refers to a software component or a hardware component that performs a specific task. However, the term "unit" is not limited to software or hardware. A "unit" may be configured to operate in an addressable storage medium or to one or more processors. Therefore, as an example, a "unit" may include components, processes, functions, properties, programs, subroutines, program code segments, drivers, firmware, microcodes, circuits, data, databases, data structures, tables, arrays, and variables such as software components, object-oriented software components, class components, and task components. The functions provided by components and "units" may be combined into fewer parts and "units", or may be further separated into other components and "units".
[0068] According to an embodiment of the present disclosure, a "unit" may include a processor and a memory. The term "processor" should be broadly interpreted to include a general-purpose processor, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a controller, a microcontroller, a state machine, etc. In some cases, a "processor" may refer to an application-specific semiconductor (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), etc. The term "processor" may refer to a combination of processing devices, such as, for example, a combination of a DSP and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors in conjunction with a DSP core, or a combination of any other such configurations.
[0069] The term "memory" should be interpreted broadly to include any electronic component capable of storing electronic information. The term "memory" may refer to various types of processor-readable media, such as random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage devices, registers, etc. When the processor can read information from the memory and / or write information to the memory, the memory can be considered to be in electronic communication with the processor. Memory integrated into the processor is in electronic communication with the processor.
[0070] Hereinafter, an “image” may indicate a still image of a video, or may indicate a dynamic image such as a moving image, that is, a video itself.
[0071] Hereinafter, "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.
[0072] 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.
[0073] The present disclosure will now be described more fully with reference to the accompanying drawings so that those skilled in the art can perform the present disclosure without any difficulty. In addition, in order to clearly describe the present disclosure, parts irrelevant to the description of the present disclosure will be omitted in the accompanying drawings.
[0074] In the following, reference will be made to Figures 1 to 16 An image encoding device and an image decoding device, and an image encoding method and an image decoding method according to an embodiment are described. Figures 3 to 16 A method for determining a data unit of an image according to an embodiment is described. Figures 17 to 21 A video encoding / decoding method according to an embodiment is described, wherein in the video encoding / decoding method, a luma block including luma samples corresponding to chroma samples at a lower right position relative to a center of a current chroma block is determined, a chroma intra prediction mode of the current chroma block is determined based on the determined intra prediction mode of the luma block, and intra prediction is performed on the current chroma block based on the determined chroma intra prediction mode. Fig. 22 and Fig.23 A video encoding / decoding method for determining a chroma prediction mode of a chroma block according to another embodiment is described. Fig.24 A video encoding / decoding method is described by using luma samples to predict chroma samples. Figure 25 to Figure 27 Describes the method of dividing the luminance block and the chrominance block. Fig.28a , Fig.28b and Fig.29 Describes a method for processing the maximum coding unit at the boundary of the picture. Fig.30 The motion compensation method according to the embodiment is described below. Figures 31a to 31c Describes the size of luma and chroma blocks according to the color format.
[0075] In the following, reference will be made to Figure 1 and Figure 2 A method and apparatus for adaptively selecting a context model based on coding units of various shapes according to an embodiment of the present disclosure are described.
[0076] Figure 1 A schematic block diagram of an image decoding device according to an embodiment is shown.
[0077] 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.
[0078] The receiver 110 may receive a bitstream. The bitstream includes information of an image encoded by the image encoding device described below. In addition, the bitstream may be sent from the image encoding device. The image encoding device and the image decoding device 100 may be connected via wired or wireless, and the receiver 110 may receive the bitstream via wired or wireless. 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.
[0079] Will refer to Figure 2 The operation of the image decoding apparatus 100 is described in detail.
[0080] Figure 2 A flowchart of an image decoding method according to an embodiment is shown.
[0081] According to an embodiment of the present disclosure, the receiver 110 receives a bit stream.
[0082] The image decoding apparatus 100 obtains a binary bit string corresponding to a division shape pattern of a coding unit from a bit stream (operation 210). The image decoding apparatus 100 determines a division rule of the coding unit (operation 220). In addition, based on at least one of the binary bit string corresponding to the division shape pattern and the division rule, the image decoding apparatus 100 divides the coding unit into a plurality of coding units (operation 230). According to the ratio of the width to the height of the coding unit, the image decoding apparatus 100 may determine an allowable first range of the size of the coding unit in order to determine the division rule. According to the division shape pattern of the coding unit, the image decoding apparatus 100 may determine an allowable second range of the size of the coding unit in order to determine the division rule.
[0083] Hereinafter, the division of coding units will be described in detail according to an embodiment of the present disclosure.
[0084] 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)). Compared to the maximum coding unit (CTU), there is a maximum coding block (coding tree block (CTB)) in concept.
[0085] A maximum coding block (CTB) represents an N×N block including N×N samples (where N is an integer). Each color component may be divided into one or more maximum coding blocks.
[0086] When a picture has 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 a syntax structure for encoding the picture and samples of the picture.
[0087] One maximum coding block (CTB) may be divided into M×N coding blocks including M×N samples (M and N are integers).
[0088] 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 the luma samples and the 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 a color plane separated according to color components, the coding unit includes a syntax structure for encoding the picture and the samples of the picture.
[0089] 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 represents a data structure including a (maximum) coding block including corresponding samples and a syntax structure corresponding to the (maximum) coding block. However, because a person skilled in the art understands that a (maximum) coding unit or a (maximum) coding block represents a block of a preset size including a preset 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 specification without distinction.
[0090] 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 the bitstream. The shape of each maximum coding unit may be a square shape of the same size. However, the embodiment is not limited thereto.
[0091] 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.
[0092] 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 represent 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.
[0093] 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 the brightness coding block that can be divided into two can be determined variably. Conversely, 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.
[0094] In addition, the maximum coding unit may be hierarchically divided into coding units based on the division shape pattern information obtained from the bitstream. At least one of information indicating whether to perform four divisions, information indicating whether to perform multi-division, division direction information, and division type information may be obtained from the bitstream as the division shape pattern information.
[0095] For example, the information indicating whether to perform four-split may indicate whether the current coding unit is divided into four (QUAD_SPLIT).
[0096] When the current coding unit is not divided into four, the information indicating whether to perform multi-split may indicate whether the current coding unit is no longer split (NO_SPLIT) or is divided into two / three.
[0097] When the current coding unit is split into two or three, the split direction information indicates that the current coding unit is split in one direction of a horizontal direction and a vertical direction.
[0098] When the current coding unit is split in a horizontal direction or a vertical direction, the split type information indicates whether the current coding unit is split into two or three.
[0099] The split mode of the current coding unit may be determined according to the split direction information and the split type information. The split mode when the current coding unit is split into two in the horizontal direction may be determined as a two-horizontal split mode (SPLIT_BT_HOR), the split mode when the current coding unit is split into three in the horizontal direction may be determined as a three-horizontal split mode (SPLIT_TT_HOR), the split mode when the current coding unit is split into two in the vertical direction may be determined as a two-vertical split mode (SPLIT_BT_VER), and the split mode when the current coding unit is split into three in the vertical direction may be determined as a three-vertical split mode (SPLIT_TT_VER).
[0100] The image decoding device 100 may obtain the division shape pattern information from a binary bit string 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 a binary bit string.
[0101] The coding unit may be smaller than the maximum coding unit or the same as 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 size of 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 may not be distinguished from the coding unit. Reference will be made to Figures 3 to 16 The division of coding units is described in detail.
[0102] In addition, one or more prediction blocks for prediction may be determined from a coding unit. A prediction block may be the same as or smaller than a coding unit. In addition, one or more transform blocks for transformation may be determined from a coding unit. A transform block may be the same as or smaller than a coding unit.
[0103] The shapes and sizes of the transform block and the prediction block may be unrelated to each other.
[0104] 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.
[0105] 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 transform 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, above, upper right, right side, and lower right side of the current block.
[0106] 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.
[0107] 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, a ratio of width to height, or a size of a coding unit.
[0108] 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.
[0109] 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 ratio of the width to the height 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, and 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.
[0110] 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.
[0111] 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 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 is performed". 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 that divide the width and height of the coding unit equally into two. The image decoding device 100 may obtain a coding unit of 128×128 size from a maximum coding unit of 256×256 size 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 “do not perform division” for a minimum coding unit.
[0112] 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 split the square coding unit, whether to split the square coding unit vertically, whether to split the square coding unit horizontally, 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 determine not to divide the coding unit 310a having the same size as the current coding unit 300 based on the division shape pattern information indicating that division is not performed, or may determine the coding units 310b, 310c, 310d, 310e or 310f divided based on the division shape pattern information indicating a preset division method.
[0113] Reference Figure 3 According 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 direction and the horizontal direction 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 square coding unit is not limited to the above method, and the division shape pattern information may indicate various methods. The preset division method for dividing the square coding unit will be described in detail below with respect to various embodiments.
[0114] 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.
[0115] 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. Based on the division shape mode information, the image decoding apparatus 100 may determine whether to divide the non-square current coding unit or to divide the non-square current coding unit by using a preset division method. 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 that a coding unit 410 or a coding unit 460 having the same size as the current coding unit 400 or 450 is not to be divided based on the division shape pattern information indicating that division is not performed, or determine the 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 preset division method. The preset division method for dividing the non-square coding unit will be described in detail with respect to various embodiments below.
[0116] 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.
[0117] 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 current coding unit 400 or 450 along a direction in which the long side of the current coding unit 400 or 450 is split considering the shape of the current coding unit 400 or 450.
[0118] 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 an 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.
[0119] According to an embodiment, the ratio of the width to the height of the current coding unit 400 or 450 may be 4:1 or 1:4. When the ratio of the width to the height is 4:1, because the width length is longer than the height length, the block shape information may be a horizontal direction. When the ratio of the width to the height is 1:4, because the width length is shorter than the height length, the block shape information may be a vertical direction. The image decoding apparatus 100 may determine to divide the current coding unit into an odd number of blocks based on the division shape mode information. In addition, the image decoding apparatus 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 a vertical direction, the image decoding apparatus 100 may determine the coding units 430a to 430c by dividing the current coding unit 400 in a horizontal direction. In addition, when the current coding unit 450 is in a horizontal direction, the image decoding apparatus 100 may determine the coding units 480a to 480c by dividing the current coding unit 450 in a vertical direction.
[0120] 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 of the determined coding units may have the same size. For example, a preset coding unit 430b or coding unit 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 units determined by dividing the current coding unit 400 or 450 may have a variety of sizes, and in some cases, all of the odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.
[0121] 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 apply a preset restriction to 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 a coding unit 480b that is located at a center position among three coding units 430a, 430b, and 430c or 480a, 480b, and 480c generated when the current coding unit 400 or 450 is divided to be different from a decoding process of other coding units 430a and 430c or 480a and 480c. For example, unlike other coding units 430a and 430c or 480a and 480c, the image decoding apparatus 100 may limit the coding unit 430b or the coding unit 480b at the center position to be no longer divided or to be divided only a preset number of times.
[0122] 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.
[0123] 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 and the division shape mode information. According to an embodiment, when the division shape mode 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 between before and after the coding unit is divided. 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 structures of the first coding unit, the second coding unit, and the third coding unit follow the above description.
[0124] 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, 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 (e.g., 510) of various shapes 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 units (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.
[0125] Reference Figure 5 , the preset coding units (e.g., coding units located at the center position, or square coding units) in the odd number of 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, the square third coding unit 520c in the odd number of third coding units 520b, 520c, and 520d may be divided into a plurality of fourth coding units in the horizontal direction. The non-square fourth coding unit 530b or 530d in the plurality of fourth coding units 530a, 530b, 530c, and 530d may be further divided into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d may be further divided into an odd number of coding units. A method that may be used to recursively divide a coding unit will be described below with respect to various embodiments.
[0126] According to an embodiment, the image decoding apparatus 100 may divide each of the third coding unit 520a or 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 preset restriction on a preset 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 settable number of times.
[0127] Reference Figure 5 , the image decoding apparatus 100 may limit the third coding unit 520c at the center position among the odd 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 preset 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 preset 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.
[0128] According to an embodiment, the image decoding apparatus 100 may obtain split shape pattern information for splitting the current coding unit from a preset position in the current coding unit.
[0129] Figure 6 A method of determining a preset coding unit from among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0130] Reference Figure 6 , the division shape mode information of the current coding unit 600 or 650 may be obtained from a sample at a preset 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 preset position in the current coding unit 600 from which at least one piece of division shape mode information may be obtained is not limited to Figure 6, and may include various positions (e.g., top, bottom, left, right, top left, bottom left, top right, bottom right, etc.) included in the current coding unit 600. The image decoding apparatus 100 may obtain the division shape pattern information from a preset position and may determine whether to divide the current coding unit into coding units of various shapes and sizes or not to divide the current coding unit.
[0131] According to an embodiment, when the current coding unit is divided into a preset 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.
[0132] 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 preset position.
[0133] 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 middle coding unit 620b or the middle 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 preset 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.
[0134] 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.
[0135] 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 splitting 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. The method of determining the coding unit at a preset 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.
[0136] 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 preset 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.
[0137] 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 respective sizes 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 middle 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 preset position. However, the above-described 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 preset 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 preset position by comparing the size of the coding unit determined based on the coordinates of the preset sample points may be used.
[0138] 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 respective sizes 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.
[0139] According to an embodiment, the image decoding apparatus 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding apparatus 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 apparatus 100 may determine the width of the middle coding unit 660b as xf-xe. The image decoding apparatus 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 apparatus 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 apparatus 100 may determine a coding unit having a size different from that of other coding units based on the determined widths and heights 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 preset 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 preset 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 preset position by comparing the size of the coding unit determined based on the coordinates of the preset sample points may be used.
[0140] However, the position of the sample considered for 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.
[0141] According to an embodiment, the image decoding apparatus 100 may select a coding unit at a preset 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 has a non-square shape in which the width is longer than the height, the image decoding apparatus 100 may determine a coding unit at a preset position in the horizontal direction. That is, the image decoding apparatus 100 may determine one of the coding units at different positions in the horizontal direction and impose restrictions on the coding unit. When the current coding unit has a non-square shape in which the height is longer than the width, the image decoding apparatus 100 may determine a coding unit at a preset position in the vertical direction. That is, the image decoding apparatus 100 may determine one of the coding units at different positions in the vertical direction and impose restrictions on the coding unit.
[0142] 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 preset position among the even-numbered coding units. The image decoding apparatus 100 may determine the even-numbered coding units by dividing (dividing into two) the current coding unit, and may determine the coding unit at the preset position by using information about the positions of the even-numbered coding units. The operations related thereto may be the same as those already described above with respect to Figure 6 The operation of determining a coding unit at a preset position (eg, a center position) among odd-numbered coding units is described in detail, and thus a detailed description thereof is not provided here.
[0143] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, a coding unit at a preset position among the plurality of coding units may be determined using preset information about the coding unit at a preset position in a division operation. For example, the image decoding apparatus 100 may determine a coding unit at a center position among the plurality of coding units determined by dividing the current coding unit using at least one of block shape information and division shape pattern information stored in samples included in an intermediate coding unit in a division operation.
[0144] 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 at which 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 various types of information may be used to determine the coding unit at the center position.
[0145] According to an embodiment, preset information for identifying a coding unit at a preset position may be obtained from preset samples included in a coding unit to be determined. Figure 6 , the image decoding apparatus 100 may determine a coding unit at a preset 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 preset position in the current coding unit 600 (e.g., a sample at a center position of the current coding unit 600). That is, the image decoding apparatus 100 may determine a sample at a preset position by considering a block shape of the current coding unit 600, determine a coding unit 620b including a sample for which preset 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 preset 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 preset information may be obtained, and may impose a preset restriction on a coding unit 620b including the sample 640. However, the position of the sample from which preset information may be obtained is not limited to the above-mentioned position, and may include any position of the sample included in the coding unit 620b to be determined for restriction.
[0146] According to an embodiment, the position of the sample at which the preset 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 the preset 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 and the height of the current coding unit in half as a sample at which the preset information can be obtained by using at least one of the information about the width of the current coding unit and 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 adjacent to the boundary for dividing the long side of the current coding unit in half as a sample at which the preset information can be obtained.
[0147] According to an embodiment, when the current coding unit is divided into a plurality of coding units, the image decoding device 100 may use the division shape pattern information to determine the coding unit at a preset position in the plurality of coding units. According to an embodiment, the image decoding device 100 may obtain the division shape pattern information from the sample at the preset position in the coding unit, and may divide the plurality of coding units generated by dividing the current coding unit by using the division shape pattern information obtained from the sample at the preset 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 obtained from the sample at the preset 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.
[0148] 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 preset block (eg, the current coding unit).
[0149] 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.
[0150] 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 a vertical direction, determine the second coding units 730a and 730b by dividing the first coding unit 700 in a horizontal direction, or determine the second coding units 750a to 750d by dividing the first coding unit 700 in a vertical direction and a horizontal direction.
[0151] 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 according to a preset order (e.g., a raster scan order or a zigzag scan order 750e), wherein the preset order is to process the coding units in one row and then process the coding units in the next row.
[0152] 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 recursively divide each of the determined plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to the division method of the first coding unit 700. Like this, 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 dividing the first coding unit 700 in a vertical direction, and may determine to divide each of the second coding units 710a and 710b independently or not to divide each of the second coding units 710a and 710b.
[0153] 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.
[0154] 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 divided coding units may be determined based on the processing order of the coding units immediately before being divided. 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 being split is not limited to the above example, and various methods may be used to independently process coding units that are split and determined to be various shapes in a preset order.
[0155] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units when coding units may not be processed in a preset order, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0156] 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.
[0157] According to an embodiment, the image decoding apparatus 100 may determine whether to split any coding unit 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 preset 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 and the division shape mode: the first coding unit 800, the second coding units 810a and 810b, or the third coding units 820a and 820b, and 820c to 820e. For example, the coding unit located on the right side 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 preset 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 the preset order.
[0158] 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 preset order, and the condition is related to whether at least one of the width and height of the second coding units 810a and 810b will be 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 when the height of the left second coding unit 810a of a non-square shape is divided in half may satisfy the condition. Because the boundary of the third coding units 820c to 820e determined when the right second coding unit 810b is divided into three coding units cannot 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 to be 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 preset restriction on the coding unit at a preset position in the divided coding unit, and the restriction or the preset position has been described above with respect to various embodiments, so a detailed description thereof will not be provided here.
[0159] 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.
[0160] 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 has a square shape 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).
[0161] 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 preset order, and the condition is related to whether at least one of the width and height of the first coding unit 900 will be divided in half along the 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 square 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 meet the condition for processing in a preset order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square 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 meet the condition for processing in a preset order. When the condition is not satisfied as described above, the image decoding apparatus 100 may decide 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 decision 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 preset restriction on the coding unit at a preset position in the divided coding unit. The restriction or the preset position has been described above with respect to various embodiments, so a detailed description thereof will not be provided here.
[0162] According to an embodiment, the image decoding apparatus 100 may determine coding units of various shapes by splitting the first coding unit.
[0163] 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.
[0164] Fig.10 It is shown that according to an embodiment, when a second coding unit having a non-square shape determined when an image decoding apparatus splits a first coding unit satisfies a predetermined condition, shapes into which the second coding unit may be split are restricted.
[0165] 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. Like this, based on the division shape pattern information of each of the second coding units 1010a and 1010b or 1020a and 1020b, 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. 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 restrict the right second coding unit 1010b from being 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.
[0166] 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 splitting the first coding unit 1000 in the horizontal direction. 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 restrict another second coding unit (e.g., the lower second coding unit 1020b) from being split in the vertical direction in which the upper second coding unit 1020a is split for the above-mentioned reason.
[0167] Fig.11 A process of splitting a square coding unit when division shape pattern information indicates that the square coding unit is not split into four square coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0168] 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 second 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.
[0169] 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 preset order, and this division method may correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.
[0170] 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, 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.
[0171] 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.
[0172] Fig.12 It is shown that a processing order among a plurality of coding units may be changed according to a process of dividing the coding units according to an embodiment.
[0173] According to an embodiment, the image decoding apparatus 100 may divide the first coding unit 1200 based on the division shape mode information. When the block shape indicates a square shape and the division shape mode information indicates that the first coding unit 1200 is divided in at least one of the horizontal direction and the vertical direction, the image decoding apparatus 100 may determine the second coding units 1210a and 1210b, or 1220a and 1220b 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 can be independently divided based on the division shape pattern information of each coding unit. For example, 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 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.
[0174] According to an embodiment, the image decoding apparatus 100 may process the coding units in a preset order. Figure 7 The operation of processing the encoding units in a preset 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 shape into which the first coding unit 1200 is divided.
[0175] 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 the third coding units 1216a, 1216b, 1216c and 1216d can be processed 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.
[0176] 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 the third coding units 1226a, 1226b, 1226c and 1226d can be processed 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.
[0177] 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 1226a, 1226b, 1226c, and 1226d split from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b finally show the same shape of coding units split from the first coding unit 1200. Like this, by recursively splitting the coding units in different ways based on the split shape pattern information, even if the coding units are finally determined to be the same shape, the image decoding apparatus 100 can process a plurality of coding units in different orders.
[0178] 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 so that a plurality of coding units are determined according to an embodiment is illustrated.
[0179] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a preset criterion. For example, the preset 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 divided current coding unit, 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 deeper depth.
[0180] 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 deeper depth by dividing the 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.
[0181] According to an embodiment, the image decoding device 100 can determine the second coding unit 1312 or 1322 and the third coding unit 1314 or 1324 of a deeper depth 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 in which the height is longer than the width, or may be represented as "2:NS_HOR" indicating a non-square shape in which the width is longer than the height).
[0182] The image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by splitting at least one of the width and 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 splitting 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 splitting the first coding unit 1310 in horizontal and vertical directions.
[0183] According to an embodiment, the image decoding apparatus 100 may determine the second coding unit 1302, 1312, or 1322 by splitting at least one of the width and 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 splitting 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 splitting the first coding unit 1320 in horizontal and vertical directions.
[0184] 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 and 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.
[0185] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by splitting at least one of the width and 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 splitting 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 splitting the second coding unit 1312 in vertical and horizontal directions.
[0186] According to an embodiment, the image decoding apparatus 100 may determine the third coding unit 1304, 1314, or 1324 by splitting at least one of the width and 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 splitting 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 splitting the second coding unit 1322 in vertical and horizontal directions.
[0187] 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 a 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 a 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.
[0188] 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.
[0189] Fig.14 Depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for distinguishing coding units according to an embodiment are illustrated.
[0190] 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, 1404a and 1404b, and 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.
[0191] 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 (e.g., 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 deeper than the depth D of the first coding unit 1400.
[0192] 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 whose height is longer than the width in the 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 whose width is longer than the height in the vertical direction based on the division shape pattern information.
[0193] According to an embodiment, the depths of the second coding units 1412a and 1412b and the second coding units 1414a, 1414b, and 1414c, or the second coding units 1422a and 1422b and the second coding units 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 length of their long sides. For example, since the length of the side of the square second coding units 1412a and 1412b is 1 / 2 of the length of the long side of the first coding unit 1410 having a non-square shape having a height longer than a width, the depth of the square second coding units 1412a and 1412b is D+1 which is 1 deeper than the depth D of the non-square first coding unit 1410.
[0194] 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 deeper than the depth D of the non-square first coding unit 1410. The image decoding apparatus 100 may determine the depths of the coding units split from the first coding unit 1420 having a non-square shape having a width longer than a height by using the above-described method of determining the depths of the coding units split from the first coding unit 1410 .
[0195] According to an embodiment, when the divided odd-numbered coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for identifying the divided 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 divided odd-numbered 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 adjacent to the coding unit 1414b may increase by 2 and may therefore 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 divided odd-numbered coding units do not have equal sizes based on whether there is discontinuity in the PID for identifying the divided coding units.
[0196] 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 having a rectangular shape whose height is longer than its width. The image decoding apparatus 100 may use a PID indicating each coding unit in order to identify the respective coding units. According to an embodiment, the PID may be obtained from a sample point at a preset position of each coding unit (e.g., an upper left sample point).
[0197] According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a preset position among 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 having a height longer than a 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 divided odd-numbered coding units to determine a coding unit at a center position among the divided odd-numbered coding units. The image decoding apparatus 100 may determine the coding unit 1414b having a PID corresponding to an intermediate value among the PIDs of the coding units as a coding unit at a center position among the coding units 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 of the coding unit 1414b 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 adjacent to the coding unit 1414b may increase 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 including coding units having sizes different from those 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 the coding unit at a preset position (e.g., the coding unit at the center position) among the odd number of coding units has a size different from that of the 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 of the encoding unit at the preset position and the size or position are not limited to the above examples, and various PIDs and various positions and sizes of the encoding unit may be used.
[0198] According to an embodiment, the image decoding apparatus 100 may use a preset data unit in which a coding unit starts to be recursively divided.
[0199] Fig.15 It is illustrated that a plurality of coding units are determined based on a plurality of preset data units included in a picture according to an embodiment.
[0200] According to an embodiment, a preset data unit may be defined as a data unit that starts recursively splitting a coding unit by using split shape pattern information. That is, the preset data unit may correspond to a coding unit for determining a highest depth of a plurality of coding units split from a current picture. In the following description, for ease of explanation, a preset data unit is referred to as a reference data unit.
[0201] According to an embodiment, the reference data unit may have a preset size and a preset 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.
[0202] 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 the quadtree structure.
[0203] 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.
[0204] 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.
[0205] 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 will not be provided here.
[0206] 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 previously determined based on a preset 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 each slice, slice segment, or maximum coding unit is a data unit (e.g., a data unit having a size equal to or smaller than a slice) that satisfies a preset condition 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.). The image decoding apparatus 100 may determine the size and shape of the reference data unit for each data unit that satisfies the preset condition by using a PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from a bitstream according to each data unit having a relatively small size, 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 sizes and shapes of the reference coding units corresponding to the PID for identifying the sizes and shapes of the reference coding units may be predetermined. That is, the image decoding apparatus 100 may determine at least one of the sizes and shapes of the reference coding units included in the data unit serving as the unit for obtaining the PID by selecting at least one of the predetermined sizes and shapes of the reference coding units based on the PID.
[0207] 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 pattern information.
[0208] Fig.16 A processing block serving as a unit for determining an order of determining reference coding units included in a picture according to an embodiment is illustrated.
[0209] According to an embodiment, the image decoding device 100 may determine one or more processing blocks divided from a picture. A processing block is a data unit including one or more reference coding units divided from a picture, and the one or more reference coding units included in the processing block may be determined according to a specific order. That is, the determination order of the one or more reference coding units determined in each processing block may correspond to one of the various types of orders for determining the reference coding units, and may vary according to the processing block. The determination order of the reference coding units determined for each processing block may be one of various orders (e.g., raster scanning order, zigzag scanning, N-shaped scanning, upper right diagonal scanning, horizontal scanning, and vertical scanning), but is not limited to the scanning order mentioned above.
[0210] According to an embodiment, the image decoding apparatus 100 may obtain processing block size information and may determine the size of one or more processing blocks included in the picture. The image decoding apparatus 100 may obtain processing block size information from a bitstream and may determine the size of one or more processing blocks included in the picture. The size of the processing block may be a preset size of a data unit indicated by the processing block size information.
[0211] According to an embodiment, the receiver 110 of the image decoding device 100 may obtain processing block size information from the bitstream according to each specific data unit. For example, the processing block size information may be obtained from the bitstream according to data units such as an image, a sequence, a picture, a slice, a slice segment, a parallel block, or a parallel block group. That is, the receiver 110 may obtain processing block size information from the bitstream according to each of the various data units, and the image decoding device 100 may determine the size of one or more processing blocks divided from the picture by using the obtained processing block size information. The size of the processing block may be an integer multiple of the size of the reference coding unit.
[0212] According to an embodiment, the image decoding apparatus 100 may determine the sizes of the processing blocks 1602 and 1612 included in the picture 1600. For example, the image decoding apparatus 100 may determine the sizes of the processing blocks based on processing block size information obtained from a bitstream. Fig.16 According to an embodiment, the image decoding apparatus 100 may determine the width of the processing blocks 1602 and 1612 to be four times the width of the reference coding unit, and may determine the height of the processing blocks 1602 and 1612 to be four times the height of the reference coding unit. The image decoding apparatus 100 may determine the determination order of one or more reference coding units in one or more processing blocks.
[0213] According to an embodiment, the image decoding apparatus 100 may determine the processing blocks 1602 and 1612 included in the picture 1600 based on the size of the processing blocks, and may determine a determination order of one or more reference coding units in the processing blocks 1602 and 1612. According to an embodiment, the operation of determining the reference coding unit may include determining the size of the reference coding unit.
[0214] According to an embodiment, the image decoding apparatus 100 may obtain determination order information of one or more reference coding units included in one or more processing blocks from a bitstream, and may determine a determination order for one or more reference coding units based on the obtained determination order information. The determination order information may be defined as an order or direction for determining the reference coding units in the processing block. That is, the determination order of the reference coding units may be determined independently for each processing block.
[0215] According to an embodiment, the image decoding apparatus 100 may obtain the determination order information of the reference coding unit from the bitstream according to each specific data unit. For example, the receiver 110 may obtain the determination order information of the reference coding unit from the bitstream according to each data unit (such as an image, a sequence, a picture, a slice, a slice segment, a tile, a tile group, or a processing block). Because the determination order information of the reference coding unit indicates the order of the reference coding unit in the processing block, the determination order information may be obtained for each specific data unit including an integer number of processing blocks.
[0216] According to an embodiment, the image decoding apparatus 100 may determine one or more reference coding units based on the determined order.
[0217] According to an embodiment, the receiver 110 may obtain the determination order information of the reference coding unit from the bitstream as the information related to the processing blocks 1602 and 1612, and the image decoding apparatus 100 may determine the determination order of one or more reference coding units included in the processing blocks 1602 and 1612, and determine one or more reference coding units included in the picture 1600 based on the determination order. Fig.16, the image decoding apparatus 100 may respectively determine determination orders 1604 and 1614 of one or more reference coding units in the processing blocks 1602 and 1612. For example, when determination order information of the reference coding units is obtained for each processing block, different types of determination order information of the reference coding units may be obtained for the processing blocks 1602 and 1612. When the determination order 1604 of the reference coding units in the processing block 1602 is a raster scan order, the reference coding units included in the processing block 1602 may be determined according to the raster scan order. On the contrary, when the determination order 1614 of the reference coding units in another processing block 1612 is a reverse raster scan order, the reference coding units included in the processing block 1612 may be determined according to the reverse raster scan order.
[0218] According to an embodiment, the image decoding apparatus 100 may decode the determined one or more reference coding units. The image decoding apparatus 100 may decode the image based on the reference coding units determined as described above. The method of decoding the reference coding units may include various image decoding methods.
[0219] 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.
[0220] Hereinafter, a method for determining a division rule according to an embodiment of the present disclosure will be described in detail.
[0221] 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. 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 parallel block header, and a parallel block group header. The image decoding apparatus 100 may determine a division rule differently according to a frame, a slice, a parallel block, a temporal layer, a maximum coding unit, or a coding unit.
[0222] 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, ratio of width to height, and direction of the coding unit. The image encoding device and the image decoding device 100 may predetermine the division rule based on the block shape of the coding unit. However, the embodiment is not limited thereto. The image decoding device 100 may determine the division rule based on information obtained from the bit stream received from the image encoding device.
[0223] 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 the shape of the coding unit as a square. In addition, when the width length and height length of the coding unit are different, the image decoding apparatus 100 may determine the shape of the coding unit as a non-square.
[0224] The size of the coding unit may include various sizes such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8 to 256×256. The size of the coding unit may be classified based on the length of the long side, the length of the short side, or the area of the coding unit. The image decoding device 100 may apply the same division rule to the coding units classified into the same group. For example, the image decoding device 100 may classify the coding units whose long sides are the same length as the coding units of the same size. In addition, the image decoding device 100 may apply the same division rule to the coding units whose long sides are the same length.
[0225] The ratio of the width to the height 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.
[0226] 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.
[0227] The division rule determined based on the size of the coding unit may be a division rule predetermined between the image encoding apparatus 2200 and the image decoding apparatus 100. Also, the image decoding apparatus 100 may determine the division rule based on information obtained from a bitstream.
[0228] 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.
[0229] In addition, the image decoding apparatus 100 may determine the division rule so that the coding units generated via different division paths do not have the same block shape. However, the embodiment is not limited thereto, and the coding units generated via different division paths have different decoding processing orders. Fig.12 The decoding process order is described, so its details will not be provided again.
[0230] In the following, reference will be made to Figures 17 to 20 A video encoding or decoding method and apparatus according to an embodiment of the present disclosure is described in detail, wherein a luminance block including luminance samples corresponding to chrominance samples at a lower right position relative to the center of a current chrominance block is determined, a chrominance intra-frame prediction mode of the current chrominance block is determined based on the determined intra-frame prediction mode of the luminance block, and intra-frame prediction is performed on the current chrominance block based on the determined chrominance intra-frame prediction mode.
[0231] Fig.17 A block diagram of a video encoding apparatus according to an embodiment is shown.
[0232] The video encoding apparatus 1700 according to an embodiment may include a memory 1710 and at least one processor 1720 connected to the memory 1710. The operation of the video encoding apparatus 1700 according to an embodiment may be performed as a separate processor or may be performed under the control of a central processor. In addition, the memory 1710 of the video encoding apparatus 1700 may store data received from the outside, data generated by the processor (e.g., chroma intra prediction mode information about a current chroma block, etc.).
[0233] The processor 1720 of the video encoding device 1700 may be configured to determine a luma block including luma samples corresponding to chroma samples at a lower right position relative to the center of a current chroma block, determine a chroma intra-frame prediction mode of the current chroma block based on the determined intra-frame prediction mode of the luma block, perform intra-frame prediction on the current chroma block based on the determined chroma intra-frame prediction mode, and generate chroma intra-frame prediction mode information about the current chroma block.
[0234] In the following, reference will be made to Fig.18The specific operations of the video encoding method are described in detail, wherein the video encoding device 1700 according to the embodiment determines a luminance block including luminance samples corresponding to chrominance samples at a lower right position relative to the center of a current chrominance block, determines a chrominance intra-frame prediction mode of the current chrominance block based on the determined intra-frame prediction mode of the luminance block, performs intra-frame prediction on the current chrominance block based on the determined chrominance intra-frame prediction mode, and generates chrominance intra-frame prediction mode information about the current chrominance block.
[0235] Fig.18 A flowchart of a video encoding method according to an embodiment is shown.
[0236] Reference Fig.18 , in operation S1810, the video encoding apparatus 1700 may determine a luma block including luma samples corresponding to chroma samples at a lower right position with respect to a center of a current chroma block.
[0237] According to an embodiment, the chroma sample at the lower right position relative to the center of the current chroma block may be a chroma sample that is located at 1 / 2 of the width of the current chroma block on the right side and 1 / 2 of the height of the current chroma block on the lower side from the chroma sample at the upper left position of the current chroma block. In detail, when the upper left position of the current chroma block is (0, 0), the width and height of the current chroma block are W and H, respectively, and the right direction and the lower direction are positive directions, the chroma sample may be a sample located at (W / 2, H / 2).
[0238] According to another embodiment, a luma block including luma samples corresponding to chroma samples at an upper left position relative to the center of the current chroma block may be determined. Specifically, when the upper left position of the current chroma block is (0, 0), the width and height of the current chroma block are W and H, respectively, and the lower right direction is the positive direction, the chroma samples may be samples located at ((W / 2)-1, (H / 2)-1).
[0239] According to an embodiment, the current chrominance block and the determined luminance block may be divided into different tree structures. Figure 25 to Figure 27 Describes the tree structure into which luma and chroma blocks are divided.
[0240] According to an embodiment, a luma region corresponding to a current chroma block may include a plurality of luma blocks.
[0241] According to another embodiment, the luma region corresponding to the current chroma block may include a portion of the luma block.
[0242] In operation S1830, the video encoding apparatus 1700 may determine a chroma intra prediction mode of a current chroma block based on the determined intra prediction mode of the luma block.
[0243] In operation S1850, the video encoding apparatus 1700 may perform intra prediction on the current chroma block based on the determined chroma intra prediction mode.
[0244] In operation S1870, the video encoding apparatus 1700 may generate chroma intra prediction mode information about a current chroma block.
[0245] According to an embodiment, the chroma intra prediction mode information may indicate one of prediction modes including a planar mode, a direct current (DC) mode, a vertical mode, a horizontal mode, and a direct mode (DM).
[0246] According to an embodiment, when the intra prediction mode of the current chroma block is the same as the determined intra prediction mode of the luma block, the chroma intra prediction mode information may indicate DM.
[0247] According to an embodiment, the chroma intra prediction mode information may be determined by calculating a sum of transform differences (SATD) or rate distortion optimization (RDO) and then signaled.
[0248] Fig.19 and Fig. 20 are a block diagram of a video decoding apparatus according to an embodiment and a flowchart of a video decoding method according to an embodiment corresponding to the above-mentioned video encoding apparatus and video encoding method, respectively.
[0249] Fig.19 A block diagram of a video decoding apparatus according to an embodiment is shown.
[0250] According to an embodiment, the video decoding apparatus 1900 may include a memory 1910 and at least one processor 1920 connected to the memory 1910. According to the present embodiment, the operation of the video decoding apparatus 1900 may be performed as a separate processor or may be performed under the control of a central processor. In addition, the memory 1910 of the video decoding apparatus 1900 may store data received from the outside, data generated by the processor (e.g., chroma intra prediction mode information about the current chroma block, etc.).
[0251] The processor 1920 of the video decoding device 1900 can be configured to obtain chroma intra-frame prediction mode information about the current chroma block, and when the chroma intra-frame prediction mode information indicates DM, determine a luminance block including luminance samples corresponding to the chroma samples at a lower right position relative to the center of the current chroma block, determine the chroma intra-frame prediction mode of the current chroma block based on the determined intra-frame prediction mode of the luminance block, and perform intra-frame prediction on the current chroma block based on the determined chroma intra-frame prediction mode.
[0252] In the following, reference will be made to Fig. 20The specific operation of the video decoding method is described in detail, wherein the video decoding device 1900 according to the embodiment obtains chroma intra-frame prediction mode information about the current chroma block, and when the chroma intra-frame prediction mode information indicates DM, determines a luminance block including luminance samples corresponding to the chroma samples at the lower right position relative to the center of the current chroma block, determines the chroma intra-frame prediction mode of the current chroma block based on the determined intra-frame prediction mode of the luminance block, and performs intra-frame prediction on the current chroma block based on the determined chroma intra-frame prediction mode.
[0253] Fig. 20 A flowchart of a video decoding method according to an embodiment is shown.
[0254] Reference Fig. 20 In operation S2010, the video decoding apparatus 1900 may obtain chroma intra prediction mode information about a current chroma block.
[0255] According to an embodiment, the chroma intra prediction mode information may indicate one of prediction modes including a planar mode, a DC mode, a vertical mode, a horizontal mode, and DM.
[0256] In operation S2030, when the chroma intra prediction mode information indicates DM, the video decoding apparatus 1900 may determine a luma block including luma samples corresponding to chroma samples at a lower right position with respect to the center of the current chroma block.
[0257] According to an embodiment, the chroma sample at the lower right position relative to the center of the current chroma block may be a chroma sample that is located at 1 / 2 of the width of the current chroma block on the right side and 1 / 2 of the height of the current chroma block on the lower side from the chroma sample at the upper left position of the current chroma block. In detail, when the upper left position of the current chroma block is (0, 0), the width and height of the current chroma block are W and H, respectively, and the right direction and the lower direction are positive directions, the chroma sample may be a sample located at (W / 2, H / 2).
[0258] According to another embodiment, a luma block including luma samples corresponding to chroma samples at an upper left position relative to the center of the current chroma block may be determined. Specifically, when the upper left position of the current chroma block is (0, 0), the width and height of the current chroma block are W and H, respectively, and the right and lower directions are positive directions, the chroma samples may be samples located at ((W / 2)-1, (H / 2)-1).
[0259] According to an embodiment, the current chrominance block and the determined luma block may be divided into different tree structures.
[0260] According to an embodiment, a luma region corresponding to a current chroma block may include a plurality of luma blocks.
[0261] According to another embodiment, the luma region corresponding to the current chroma block may include a portion of the luma block.
[0262] In operation S2050, the video decoding apparatus 1900 may determine a chroma intra prediction mode of a current chroma block based on the determined intra prediction mode of the luma block.
[0263] According to an embodiment, when the chroma intra prediction mode information indicates DM, the chroma intra prediction mode may be the same as an intra prediction mode of a luma block including luma samples corresponding to chroma samples at a lower right position with respect to the center of the current chroma block.
[0264] In operation S2070, the video decoding apparatus 1900 may perform intra prediction on the current chroma block based on the determined chroma intra prediction mode.
[0265] According to the embodiment, the following will refer to Fig.21 A method is described for determining a luma block including luma samples corresponding to chroma samples at a lower right position relative to a center of a current chroma block, determining a chroma intra prediction mode of the current chroma block based on the determined intra prediction mode of the luma block, and performing intra prediction on the current chroma block based on the determined chroma intra prediction mode.
[0266] Fig.21 A diagram for describing a method of performing chroma prediction on a current chroma block based on a prediction mode of a luma block including luma samples corresponding to chroma samples at a lower right position with respect to a center of the current chroma block according to an embodiment is shown.
[0267] Reference Fig.21 , the left chroma block 2120 may correspond to the left luminance region 2110 including five luminance blocks 2111, 2112, 2113, 2114, and 2115, and the right chroma block 2140 may correspond to the right luminance region 2130 including two luminance blocks 2131 and 2132. The prediction mode of each of the chroma blocks may be determined from the luminance region corresponding to each of the chroma blocks. In detail, in the left luminance region 2110 corresponding to the left chroma block 2120, a luminance block 2114 including a luminance block 2150 corresponding to a chroma sample at a lower right position from the center of the left chroma block 2120 may be determined, and the prediction mode of the left chroma block 2120 may be determined based on the prediction mode of the luminance block 2114. In addition, in the case of the right chroma block 2140, in the right luminance area 2130 corresponding to the right chroma block 2140, a lower luminance block 2132 including luminance samples corresponding to the chroma samples at the lower right position from the center of the right chroma block 2140 can be determined, and the prediction mode of the right chroma block 2140 can be determined based on the prediction mode of the lower luminance block 2132.
[0268] Fig. 22 A diagram for describing a method of determining a prediction mode of a chroma block according to another embodiment is shown.
[0269] Reference Fig. 22 , the prediction mode of the chroma block 2220 may be determined by using a luma block including luma samples corresponding to chroma samples at a specific position in a luma region 2210 corresponding to the chroma block 2220 having an aspect ratio of 1:2, wherein the luma region 2210 includes a first luma block 2211, a second luma block 2212, a third luma block 2213, a fourth luma block 2214, and a fifth luma block 2215. For example, when the prediction mode of the chroma block 2220 is DM, the chroma prediction mode may be determined by using a luma block determined from the luma region 2210 corresponding to the chroma block 2220. In detail, in the luminance area 2230 to which DM is applied, the first luminance block 2211, the second luminance block 2212, the third luminance block 2213, the fourth luminance block 2214, and the fifth luminance block 2215 may be candidate luminance blocks of DM, and one luminance block may be determined from the candidate luminance blocks, wherein the first luminance block 2211 includes a first luminance sample 2231 corresponding to a chrominance sample at an upper left position of the chrominance block 2220, and the second luminance block 2212 includes a first luminance sample 2231 corresponding to a chrominance sample at an upper left position relative to the center of the chrominance block 2220. The third luminance block 2214 includes a third luminance sample 2234 corresponding to the chroma sample located at the lower right position relative to the 1 / 2 point on the left side of the chroma block 2220, the fourth luminance block 2213 includes a fourth luminance sample 2233 corresponding to the chroma sample at the lower left position of the 1 / 4 point on the right side of the chroma block 2220, and the fifth luminance block 2215 includes a fifth luminance sample 2235 corresponding to the chroma sample at the lower right position of the chroma block 2220.
[0270] According to another embodiment, when the width and height of the chroma block are the same as each other, in a luma area including all luma blocks corresponding to the chroma block, the candidate luma block for DM may be a luma block including luma samples corresponding to the four corners of the chroma block and the center position of the chroma block.
[0271] According to another embodiment, as in Fig. 22 As shown in , when the aspect ratio is 1:2, in a luminance area including all luminance blocks corresponding to chrominance blocks, the candidate luminance blocks of DM may be luminance blocks including luminance samples corresponding to chrominance samples at the center position of the upper side of the chrominance block, the center position of the chrominance block, and the center position of the lower side of the chrominance block.
[0272] Fig.23A diagram for describing a method of determining a prediction mode of a chroma block according to another embodiment is shown.
[0273] Reference Fig.23 , the prediction mode of the chroma block 2320 may be determined by using a luma block including luma samples corresponding to chroma samples at a specific position in a luma region 2310 corresponding to the chroma block 2320 having an aspect ratio of 2:1, wherein the luma region 2310 includes a first luma block 2311, a second luma block 2312, a third luma block 2313, a fourth luma block 2314, and a fifth luma block 2315. For example, when the prediction mode of the chroma block 2320 is DM, the chroma prediction mode may be determined by using luma blocks determined from all luma blocks 2310 corresponding to the chroma block 2320. In detail, in the luminance area 2330 to which DM is applied, the first luminance block 2311, the second luminance block 2312, the third luminance block 2313, and the fifth luminance block 2315 may be candidate luminance blocks for DM, and one luminance block may be determined from the candidate luminance blocks, wherein the first luminance block 2311 includes a first luminance sample 2331 corresponding to a chrominance sample at an upper left position of the chrominance block 2320, the second luminance block 2312 includes a first luminance sample 2331 corresponding to a chrominance sample at a 1 / 4 point on the lower side of the chrominance block 2320, and the second luminance block 2313 includes a first luminance sample 2331 corresponding to a chrominance sample at a 1 / 4 point on the lower side of the chrominance block 2320. The third luminance block 2313 includes a fourth luminance sample 2334 corresponding to the chroma sample at the lower right position relative to the center of the upper side of the chroma block 2320, and the fifth luminance block 2315 includes a fifth luminance sample 2335 corresponding to the chroma sample at the upper right position at the 3 / 4 point on the lower side of the chroma block 2320.
[0274] According to another embodiment, as in Fig.23 As shown in , when the aspect ratio is 2:1, the candidate luma block for DM may be a luma block including luma samples corresponding to the chroma samples at the center position of the left side of the chroma block, the center position of the chroma block, and the center position of the right side of the chroma block.
[0275] According to another embodiment, when DM is applied to an inter-frame slice, a luminance block to which inter-frame prediction is applied and a luminance block to which intra-frame prediction is applied may be included together in a luminance region corresponding to a chrominance block. In this case, when an intra-frame prediction mode cannot be derived from a candidate luminance block for DM including a luminance sample corresponding to a chrominance sample at a specific position, a specific intra-frame prediction mode (e.g., a DC mode, a planar mode, or a similar mode) may be set as a candidate prediction mode for DM according to a default setting. In addition, when a prediction mode of a candidate luminance block for DM including a luminance sample corresponding to a chrominance sample at a specific position is an inter-frame prediction mode, a candidate prediction mode for DM may be set to an inter-frame prediction mode. In this case, the candidate prediction mode for DM may include both an intra-frame prediction mode or an inter-frame prediction mode.
[0276] According to another embodiment, when a plurality of luma blocks correspond to a chroma block in an inter-frame strip, a prediction mode of the chroma block may be determined by using a prediction mode of a luma block including luma samples corresponding to a specific position (center, upper left, upper right, lower left, or lower right position) of the chroma block. For example, when a prediction mode of a luma block including luma samples corresponding to a center of a chroma block of size W:H (a position (W / 2, H / 2) obtained by moving W / 2 to the right and H / 2 downward from an upper left position (0,0) of the chroma block) is an intra-frame prediction mode, prediction may be performed on the chroma block by using the intra-frame prediction mode of the luma block without change. As another example, when a prediction mode of a luma block including luma samples corresponding to a center position of the chroma block is an inter-frame prediction mode, prediction may be performed on the chroma block by using motion information of the luma block without change.
[0277] According to another embodiment, when multiple luma blocks correspond to chroma blocks in an inter-frame slice, the prediction mode of the chroma block may be separately signaled. In this case, the prediction mode independent of the luma block may be transmitted and the prediction mode may be derived based on the luma block.
[0278] According to another embodiment, when the candidate luma blocks for DM are determined as luma blocks respectively including luma samples corresponding to chroma samples at four corners and a center of a chroma block, the order of DM candidates may be determined according to the ratio of the chroma blocks.
[0279] In detail, assuming that the luma sample corresponding to the chroma sample at the center position of the chroma block is the first luma sample, the luma sample corresponding to the chroma sample at the upper left position of the chroma block is the second luma sample, the luma sample corresponding to the chroma sample at the upper right position of the chroma block is the third luma sample, the luma sample corresponding to the chroma sample at the lower left position of the chroma block is the fourth luma sample, and the luma sample corresponding to the chroma sample at the lower right position of the chroma block is the fifth luma sample, when the width and height of the chroma block are the same as each other, the candidate luma block for the DM mode can be determined in the order of the first luma sample, the second luma sample, the third luma sample, the fourth luma sample, and the fifth luma sample. In addition, when the width of the chroma block is greater than the height of the chroma block, the candidate luma block for DM may be determined in the order of the second luma sample, the third luma sample, the first luma sample, the fourth luma sample, and the fifth luma sample, and when the height of the chroma block is greater than the width of the chroma block, the candidate luma block for DM may be determined in the order of the second luma sample, the fourth luma sample, the first luma sample, the third luma sample, and the fifth luma sample. That is, the candidate luma block for DM may be adaptively determined according to the ratio of the chroma block.
[0280] According to another embodiment, the positions of luma samples of the candidate luma blocks determined for DM, the order of selecting luma samples, and the number of positions of luma samples may be changed according to the size, ratio, and area of the chroma blocks.
[0281] According to another embodiment, the candidate luminance block for DM may be determined by using the predetermined positions of the chrominance samples as they are, and may also be determined by using positions obtained by averaging some of the predetermined positions of the chrominance samples as candidate positions.
[0282] According to another embodiment, when luma blocks respectively including luma samples corresponding to chroma samples at two or more locations corresponding to the chroma block have different prediction modes, the chroma prediction mode may be determined as the DC mode.
[0283] According to another embodiment, when the chroma prediction mode is DM, the DC mode or the planar mode may be set to be always used. When a plurality of luminance blocks included in a luminance region corresponding to a chroma block have various intra prediction modes, the DC mode or the planar mode may effectively reduce the average value of the prediction error.
[0284] According to another embodiment, prediction is performed on the one chroma block based on a prediction mode used in a plurality of luminance blocks included in a luminance region corresponding to the one chroma block, and transformation may be performed on the one chroma block regardless of the luminance block. In addition, the prediction mode of the luminance region may be an intra-frame prediction mode or an inter-frame prediction mode. The order in which chroma prediction is performed may depend on the order in which the luminance blocks are encoded. Alternatively, chroma prediction may be performed in a top-to-bottom or left-to-right order regardless of the encoding order of the luminance blocks.
[0285] According to another embodiment, a method may be used in which, in addition to a luma block in which a plurality of luma samples included in a luma region corresponding to the chroma block are located as a candidate for a DM for the chroma block, the chroma block is divided into sub-chroma blocks, and then chroma prediction is performed on the sub-chroma blocks by using a prediction mode of a luma block included in a luma region corresponding to each of the sub-chroma blocks.
[0286] According to another embodiment, the chroma block may be uniformly divided into predetermined unit sub-chroma blocks, and chroma prediction may be performed on the sub-chroma blocks by using prediction mode information of a luminance region corresponding to each of the sub-chroma blocks. In detail, chroma prediction may be performed on the sub-chroma blocks based on a prediction mode of an 8×8 luminance region corresponding to a 4×4 sub-chroma block in a 4:2:0 color format. However, when it is determined that the chroma blocks perform a separate prediction mode, a predetermined prediction mode may be performed without using prediction information of the luminance region.
[0287] According to another embodiment, in an inter-frame strip, when a chroma block is a sub-block prediction mode for inter-frame prediction, a prediction mode of a region in a luminance region corresponding to the chroma block may be used, wherein the prediction mode is an inter-frame prediction mode. In detail, when a central region of a luminance region corresponding to a chroma block is an inter-frame prediction mode, motion information of the central region may be determined as representative motion information. Thereafter, in a case where a chroma block is divided into predetermined sub-chroma blocks and prediction mode information of a plurality of luminance blocks corresponding to each of the sub-chroma blocks is used, when motion information exists in a luminance region corresponding to each of the sub-chroma blocks, inter-frame prediction may be performed on the sub-chroma blocks by using the motion information. When motion information does not exist in a luminance region corresponding to each of the sub-chroma blocks, inter-frame prediction may be performed on the sub-chroma blocks by using the representative motion information.
[0288] According to another embodiment, in an inter slice, when a luminance block corresponding to a chrominance block includes a plurality of sub-luminance blocks and the sub-luminance blocks are used together for intra prediction and inter prediction, a prediction mode of the sub-chrominance block may be determined based on a prediction mode of the sub-luminance block corresponding to the sub-chrominance block. Therefore, inter prediction and intra prediction may be used simultaneously in units of sub-blocks in one chrominance block.
[0289] Fig.24 A diagram for describing a method of predicting chrominance samples by using luma samples according to another embodiment is shown.
[0290] Linear model (LM) chroma mode or cross-component intra prediction refers to a method of calculating a linear model using information of luma pixels and chroma pixels and predicting chroma samples from reconstructed luma samples using the calculated linear model. In detail, the linear model is calculated by the relationship between the encoded or reconstructed luma samples around the current luma block corresponding to the current chroma block and the encoded or reconstructed chroma samples around the current chroma block, and the chroma samples of the current chroma block are predicted by applying the encoded or reconstructed luma samples of the current luma block to the calculated linear model.
[0291] Reference Fig.24 , when the luma region 2410 corresponding to the chroma block 2420 includes a plurality of luma blocks 2411, 2412, 2413, 2414, and 2415, encoding performance may vary depending on which luma block is selected to calculate a linear model.
[0292] In this specification, the "multi-LM chroma" mode refers to a method of calculating multiple linear models by dividing the area based on the luminance sample value and dividing the luminance block into each area, and the "single LM chroma" mode refers to a method of calculating a single linear model for all luminance blocks.
[0293] According to an embodiment, when the number of luminance blocks included in the luminance region corresponding to the chrominance block is 3 or more, it may be determined that the multi-LM chrominance mode is to be used, and when the number of luminance blocks included in the luminance region corresponding to the chrominance block is less than 3, it may be determined that the single LM chrominance mode is to be used. Alternatively, when the number of luminance blocks included in the luminance region corresponding to the chrominance block is 2 or more, it may be determined that the multi-LM chrominance mode is to be used, and when the number of luminance blocks included in the luminance region corresponding to the chrominance block is less than 3, it may be determined that the single LM chrominance mode is to be used.
[0294] According to another embodiment, when referring to the above Fig. 22 and Fig.23 When three or more of the candidate luma blocks for DM described above select different modes, it may be determined to use the multi-LM chroma mode. Otherwise, it may be determined to use the single LM chroma mode.
[0295] According to another embodiment, the LM chroma mode prediction method can be determined by comparing the intra-frame prediction modes corresponding to two or more positions of the luminance partition area corresponding to the chroma partition area. For example, the intra-frame prediction mode corresponding to the upper left position of the luminance partition area corresponding to the current partition area and the intra-frame prediction mode corresponding to the upper right position of the luminance partition area corresponding to the current partition area are compared with each other. When the two intra-frame prediction modes are the same as each other, a single LM chroma mode can be used, and when the two intra-frame prediction modes are different from each other, it can be determined to use multiple LM chroma modes. In this method, the LM chroma mode is determined based on the number of luminance partition areas corresponding to the chroma partition area and the prediction mode of the luminance partition area without transmitting a flag with a signal. In addition, the area to which the LM chroma mode is applied may vary according to the division information of the luminance block. In detail, referring to Fig.24 , when there are five luma blocks 2411 , 2412 , 2413 , 2414 , and 2415 included in the luma region 2410 corresponding to the current chroma block 2420 , the LM chroma mode may be applied by dividing the chroma block 2430 into two sub-blocks 2431 and 2432 .
[0296] According to another embodiment, the region to which the multi-LM chroma mode is applied may be determined according to split information of the luma block.
[0297] According to another embodiment, the LM chroma mode may be applied based on the size of the block. For example, when the size of the block is greater than N×M, the multi-LM chroma mode may be applied, and when the size of the block is less than or equal to N×M, the single LM chroma mode may be applied.
[0298] According to another embodiment, the LM chroma mode may be determined by comparing the range of the histogram of the luma samples. For example, when the minimum value of the luma sample is X and the maximum value of the luma sample is Y, in the case of (YX)>TH (threshold), the multi-LM chroma mode may be applied, and in the case of (YX)<=TH, the single LM chroma mode may be applied. For example, when the bit depth is 10 bits and K is 2, TH may be (1<<10)>>2=256.
[0299] Fig.25 A diagram for describing a method of dividing a luminance block and a chrominance block according to an embodiment is shown.
[0300] Reference Fig.25, the left tree structure 2510 shows a method of dividing the luma block 2530, and the right tree structure 2520 shows a method of dividing the chroma block 2540 corresponding to the luma block 2530. In detail, until the first division, the chroma blocks 2521, 2522, and 2523 are divided in the same method as the luma blocks 2511, 2512, and 2513, but thereafter, the chroma blocks 2524, 2525, 2526, and 2527 and the luma blocks 2514, 2515, 2516, 2517, 2518, and 2519 are divided in different methods. In addition, according to those tree structures, the luminance area corresponding to the chrominance block 2524 includes a portion of the upper side of the two luminance blocks 2514 and 2515, the luminance area corresponding to the chrominance block 2525 includes a portion of the lower side of the two luminance blocks 2514 and 2515, the chrominance block 2526 includes two luminance blocks 2518 and 2519, and the chrominance block 2527 corresponds to the luminance block 2517. Fig.25 , a luminance region corresponding to a chrominance block may include a plurality of luminance blocks or may include a portion of a luminance block. In addition, one luminance block may correspond to a chrominance block.
[0301] According to an embodiment, when the luminance block and the chrominance block are divided according to different methods, a constraint condition may be imposed so that the size of the luminance block is always smaller than the size of the chrominance block.
[0302] Fig.26 A diagram for describing a method of dividing a luminance block and a chrominance block according to another embodiment is shown.
[0303] Reference Fig.26 , the left tree structure 2610 shows a method of dividing the luma block 2630, and the right tree structure 2620 shows a method of dividing the chroma block 2640 corresponding to the luma block 2630. In detail, until the first division, the chroma blocks 2621, 2622, and 2623 are divided in the same method as the luma blocks 2611, 2612, and 2613, but thereafter, only the luma blocks 2614, 2615, 2616, 2617, 2618, and 2619 are divided without dividing the chroma blocks.
[0304] Fig. 27 A diagram for describing a method performed on a luminance block and a chrominance block according to another embodiment is shown.
[0305] Reference Fig. 27, a left tree structure 2710 shows a method of dividing a luma block 2730, and a right tree structure 2720 shows a method of dividing a chroma block 2740 corresponding to the luma block 2730. In detail, chroma blocks 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, and 2729 are divided in the same way as luma blocks 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, and 2719.
[0306] According to an embodiment, when the luminance block and the chrominance block are divided in the same method, additional signal transmission for the division of the chrominance block may not be performed. That is, it may be determined that the same division method as the luminance block is used for the chrominance block.
[0307] According to an embodiment, it may be set so that the size of the luminance block corresponding to the chrominance block is not less than the size of the chrominance block. For example, when the size of the luminance block is M and the size of the chrominance block corresponding to the luminance block is N, it may be set to always satisfy N<=M.
[0308] According to an embodiment, within a specific range, a flag may be used to determine whether a method for dividing a luminance block corresponding to a chrominance block is used as a method for dividing a chrominance block, and in other cases, a selected method or a predetermined method may be determined as a method for dividing a chrominance block. For example, when the size of the luminance block is 16×16 to 32×32, a flag indicating whether the method for dividing the chrominance block is the same as the method for dividing the luminance block may be transmitted. When the flag is not transmitted, the division of the chrominance block may be performed in the same manner as the method for dividing the luminance block. Optionally, when the value of the last transmitted flag is 0, the division of the chrominance block may be performed in the same manner as the method for dividing the luminance block, and when the value of the last transmitted flag is 1, the division of the chrominance block may no longer be performed.
[0309] According to another embodiment, by determining the minimum size of the chroma block, it can be determined that there is no block whose size is less than the minimum size. The minimum size of the chroma block can be determined based on the size of the block or the length of one side of the block. For example, when the minimum size of one side of the chroma block is 4, the size of the chroma block is 8×8, and the size of the luminance block corresponding to the chroma block is 16×16, because the length of one side of the chroma block becomes less than 4, the ternary tree method in which the block is divided into three blocks is not allowed for the chroma block. In this case, the ternary tree method can be allowed for the luminance block, and when the luminance block of 16×16 size is divided according to the ternary tree method, the chroma block of 8×8 size corresponding to the 16×16 luminance block can be used unchanged without dividing without a flag. However, when the method for dividing the chroma block is the same as the method for dividing the luminance block, the ternary tree method may not be allowed even for the luminance block.
[0310] According to another embodiment, when the size of the minimum coding unit is 4, even in the process of dividing the chrominance block, it can be set so that the minimum size is 4. For example, in the 4:2:0YUV color format, the size of the chrominance block corresponding to the luminance block of 4×4 size is 2×2, but when the division structure of the chrominance block is different from the division structure of the luminance block, the minimum size of the chrominance block can be determined to be 4×4. In this case, parameters related to the division can be used for the luminance block and the chrominance block respectively.
[0311] When information about the minimum block size is transmitted by signal and signal transmission of the size of the minimum coding unit is performed based on the pixels of the picture, in the case of a chroma block, the minimum size of the chroma block can be determined according to the degree of subsampling of the chroma block compared to the luminance block or the color format. In detail, when the color format is a 4:2:0YUV color format and the size of the minimum coding unit is determined to be 4 based on the pixels of the picture, in the luminance component Y, since the size of the luminance block is the same as the pixels of the picture, 4, which is the size of the minimum coding unit, is determined as the minimum size of the luminance block, and division can be performed. In the chroma components U and V, since the size of the chroma block is 1 / 2 of the pixels of the picture, 8, which is twice the size of the minimum coding unit, is determined as the minimum size of the chroma block, and division can be performed. In detail, when the color format is log 2:0YUV color format and the size of the minimum coding unit is determined to be 4 based on the pixels of the picture, in the luminance component Y, since the size of the luminance block is the same as the pixels of the picture, 4, which is the size of the minimum coding unit, is determined as the minimum size of the chroma block, and division can be performed. 2 When the size of the minimum coding unit is transmitted as a unit signal and the value obtained therefrom is 2, the luminance block can be divided based on 2, and the chrominance block can be divided based on 3 (a value obtained by adding 1 to the value obtained by transmitting the signal).
[0312] Also, regardless of subsampling, when the size of the minimum coding unit is 4, splitting may be performed on both the luma component and the chroma component by setting the minimum block size to 4.
[0313] According to another embodiment, in context modeling of chroma block division, division information of luma block may be used. In detail, the context model may vary according to the number of sub-coding units used to construct the luma block corresponding to the current chroma block. For example, context modeling may be performed by distinguishing between a case where the number of sub-coding units is 4 or more and a case where the number of sub-coding units is less than 4.
[0314] According to an embodiment, quadtree, binary tree, and ternary tree structures may be differently applied according to the size or ratio of a block.
[0315] For example, when the aspect ratio of the block is greater than a specific ratio, a specific tree structure may not be applied. In detail, when the ratio of the block is greater than 1:N (where N is an integer greater than or equal to 1), the affine mode, decoder-side motion vector refinement (DMVR), a mode for deriving a prediction mode from the decoding side, position-dependent intra prediction (PDPC), LM chroma mode, multiple transform selection, adaptive motion vector resolution (AMVR), a method of dividing luminance blocks and chrominance blocks separately in inter-frame slices, or prediction in sub-block units may not be used.
[0316] As another example, when the size of the block is larger than M×N, the specific mode may not be applied. In detail, when the size of the block is larger than 32×32, the intra mode may not be applied.
[0317] As another example, when the length (width or height) of one side of the block is equal to or less than a specific length, a specific mode may not be applied. In detail, when the length of one side of the block is equal to the minimum coding unit size (e.g., 4), prediction in sub-block units may not be performed, and when the length of one side of the block is equal to or less than the size of the sub-block, prediction in sub-block units may not be performed.
[0318] As another example, when the length of one side of the block is equal to or less than a specific length, in a multiple transform selection in which one of a plurality of transform types in the horizontal direction and the vertical direction is selected during transform, a fixed transform type may be determined as a transform type in the corresponding direction. In this case, since there is only one transform type, explicit signaling may be omitted. The fixed transform type may be determined from DCT 2 or a transform similar to DCT 2 or DST 7 or a transform similar to DST 7.
[0319] Fig.28a shows the maximum coding unit at the boundary of the picture, Fig.28b A method of dividing a block until coding units that do not cross the boundary of a picture are obtained is shown.
[0320] Reference Fig.28a, the size of the border area of the picture may be different from the size of the maximum coding unit (coding tree unit (CTU)). That is, the maximum coding unit (CTU) and the picture may not be aligned. In this case, Fig.28b As shown in , the largest coding unit (CTU) is divided into multiple coding units.
[0321] Reference Fig.28b In HEVC, the largest coding unit (CTU) that crosses the boundary of the picture is quadtree-divided until a coding unit that does not cross the boundary of the picture is obtained. Thereafter, the coding unit that does not cross the picture can be encoded, and the coding unit outside the picture may not be encoded.
[0322] In addition to quadtree partitioning, when various types of partitioning methods such as binary tree partitioning and ternary tree partitioning are used, various methods of partitioning a maximum coding unit (CTU) at a boundary of a picture may also be used.
[0323] According to an embodiment, a binary tree and a ternary tree structure may be applied to a block having a specific size or smaller. For example, only a quadtree structure may be allowed for a block having a size of 128×128 (or 64×64) or larger, and only a binary tree and a ternary tree structure may be allowed for a block having a size of 64×64 (or 32×32) or smaller. The maximum size of a block for which a binary tree and a ternary tree structure are allowed may be determined based on information about the maximum size transmitted by a signal. That is, based on the information transmitted by a signal, a binary tree and a ternary tree structure from the same level or depth may be allowed.
[0324] According to an embodiment, the encoding mode may be applied differently according to the size of the encoding unit at the boundary of the picture. Prediction or residual encoding may be performed according to the size of the encoding unit. For example, when the size of the encoding unit is large, the probability that the predicted image matches the image of the current block is high, and thus a mode for transmission without residual data may be selected for a block having a large size, and when the size of the encoding unit is small, the image is more likely to be complex because the size of the encoding unit is small, and thus the encoding unit may be further divided without signaling a flag, instead of not transmitting residual data.
[0325] Fig.29 A diagram for describing prediction and transformation on a rectangular block located at the boundary of a picture is shown.
[0326] Reference Fig.29According to an embodiment, when the size of a block located at the boundary of a picture is not a power of 2, for example, when the block is a 48×32-sized block 2910, only a mode for transmission without residual data (skip mode, cbf=0, etc.) may be selected. In addition, the sizes of the prediction unit and the transform unit may be different from each other. For example, in order to transform a 48×32-sized block 2910, the 48×32-sized block 2910 may be divided into a 32×32-sized block 2920 and a 16×32-sized block 2930 without signaling a flag.
[0327] According to another embodiment, when the size of a block located at a boundary of a picture is not a power of 2, for example, when the block is a 48×32-sized block 2910, the 48×32-sized block 2910 may be divided without signaling a flag so that the size of the 48×32-sized block 2910 is a power of 2. In this case, the sizes of the prediction unit and the transform unit are the same as each other.
[0328] According to another embodiment, when the size of a block located at a boundary of a picture having a specific size (e.g., a size of 64×64 or larger) is not a power of 2, a mode for transmission without residual data may be selected, and when the size of a block located at a boundary of a picture having a size smaller than 64×64 is not a power of 2, the block may be divided without signaling a flag so that the size of the block is a power of 2.
[0329] According to another embodiment, whether to allow unconditional residual coding may be determined based on the size of the coding unit located at the boundary of the picture. For example, it may be set so that when the size of the coding unit is 64×64 or larger, residual coding is not performed, and when the size of the coding unit is less than 64×64, residual coding is performed.
[0330] According to another embodiment, when both a quadtree structure and a binary tree structure are used to divide a coding unit located at a boundary of a picture, a flag that distinguishes the quadtree structure from the binary tree structure may be transmitted by a signal. In this case, the resolution of the image may be considered. Specifically, when a binary tree structure is selected by a flag and the coding unit is divided by the maximum depth of the binary tree structure, but the resolution is not suitable for the resolution of the picture, the selection of the binary tree structure may be restricted. Therefore, since there is no need to consider signal transmission for the binary tree structure, when only the quadtree and binary tree structures are selected by a flag, the quadtree structure may be selected without separate signal transmission.
[0331] According to another embodiment, when the coding unit is located at the boundary of the lower right corner of the picture, the coding unit may be divided only into a binary tree structure. Specifically, the coding unit may include only square blocks and rectangular blocks with an aspect ratio of 1:2 or 2:1. For example, when the M×M square block is first binary-tree divided in the horizontal direction and the two divided M×M / 2 rectangular blocks are placed at the boundary of the picture, the binary tree division may be further performed in the vertical direction. On the other hand, when the binary tree division is first performed in the vertical direction, the divided blocks may be further divided in the horizontal direction.
[0332] Fig.30 A diagram for describing a method of performing motion compensation using neighboring blocks when only a skip mode is allowed for a block of a specific size according to an embodiment is shown.
[0333] Reference Fig.30 , for a block of 4×4 size, only skip mode is allowed, and motion compensation is performed together with the adjacent blocks, so that the memory bandwidth can be reduced. Specifically, when the size of the current block 3020 of the current picture 3000 is 4×4, the size of the upper adjacent block 3010 is 8×8, and the current block 3020 is in the skip mode using the motion information of the upper adjacent block 3010, motion compensation can be performed on the block 3001 of 8×12 size including the upper adjacent block 3010 of 8×8 size and the current block 3020 of 4×4 size. The result of performing the motion compensation may be used as a reference block 3002. The reference block 3002 may include an upper adjacent reference block 3040 corresponding to the upper adjacent block 3010, a current reference block 3050 corresponding to the current block 3020, and a right adjacent reference block 3060. In addition, in this case, the current block 3020 may derive a skip mode candidate (or a merge mode candidate) only from blocks located on the left and upper sides. This is because motion compensation is performed under the assumption that the right neighboring reference block 3060 located on the right is not in the skip mode.
[0334] Fig.31a shows the luma and chroma blocks in 4:4:4 YUV color format, Fig.31b shows luma and chroma blocks in 4:2:2 YUV color format, and Fig.31c Luma and chroma blocks are shown in 4:2:0 YUV color format.
[0335] Reference Fig.31a , luminance blocks and chrominance blocks have the same size and shape. Fig.31b , the chrominance block has a ratio of 1 / 2 of the luminance block. Fig.31c , the luminance block and the chrominance block have blocks of the same shape.
[0336] exist Fig.31bIn the 4:2:2YUV color format of HEVC, the chroma block, which is 1 / 2 of the luminance block, only supports square blocks (which have a ratio of 1:1) in the quadtree structure in the existing HEVC, and therefore the chroma block is divided into square blocks and then processed. However, in addition to the quadtree structure, by using a binary tree structure or a ternary tree structure, blocks with various ratios such as 1:2, 1:4, etc. can be processed. Therefore, even in the 4:2:2YUV color format, there is no need to process the luminance block and the chroma block differently. That is, the chroma block can be processed unchanged without dividing the chroma block into a square shape and processing the divided blocks.
[0337] According to an embodiment, when transform is performed on a chroma block for an M×N luma block in a 4:2:2 YUV color format, rectangular transform may be performed on an M / 2×N or M×N / 2 chroma block.
[0338] According to an embodiment, when transform is performed on a chroma block for an M×N luminance block in a 4:2:2 YUV color format, transform may be performed on two M / 2×N / 2 chroma blocks, respectively.
[0339] According to another embodiment, when a transformation is performed on a chroma block for an M×N luminance block in a 4:2:2YUV color format, within the chroma block range of 2×2 to 32×32, at a specific size, a rectangular transformation may be performed on an M / 2×N or M×N / 2 chroma block, and in other cases, the transformation may be performed on two M / 2×N / 2 chroma blocks, respectively.
[0340] According to another embodiment, for a chroma block of size 128×64 or 64×128, transformation may be performed on two chroma blocks of size 64×64.
[0341] According to another embodiment, a 2:1 or 1:2 Hadamard transform may be performed on a chroma block of size 128×64 or 64×128, and then one 64×64 transform may be performed thereon.
[0342] According to another embodiment, a restriction may be imposed on the partitioning so that chroma blocks of size 128×64 or 64×128 are not generated.
[0343] According to another embodiment, two 64x2 or 2x64 transforms may be performed on chroma blocks of 128x2 or 2x128 size.
[0344] According to another embodiment, two 64×1 or 1×64 transforms may be performed on a chroma block of size 128×2 or 2×128. That is, transform in one direction may be performed.
[0345] According to another embodiment, a restriction may be imposed on the partitioning such that 128x2 or 2x128 chroma blocks are not generated.
[0346] The present disclosure has been specifically shown and described with reference to the embodiments of the present disclosure. In this regard, it will be appreciated by those skilled in the art that various changes in form and detail may be made thereto without departing from the scope of the present disclosure. Therefore, the embodiments should be considered in a descriptive sense only, and not for limiting purposes. The scope of the present disclosure is not limited by the detailed description of the present disclosure, but by the appended claims, and all differences within the scope will be interpreted as included in the present disclosure.
[0347] In addition, the above-mentioned embodiments of the present disclosure may be written as a program executable on a computer, and may be implemented in a general-purpose digital computer that executes the program by using a computer-readable recording medium. Examples of computer-readable recording media include magnetic storage media (e.g., ROM, floppy disks, hard disks, etc.), optical recording media (e.g., CD-ROMs or DVDs), etc.
Claims
1. A video decoding method, comprising: Obtain information about an intra prediction mode of a current chroma block from a bitstream; Obtaining an intra prediction mode of a sample at a lower right position in a current luminance block corresponding to the current chrominance block, wherein the current luminance block is divided into at least two lower-layer luminance blocks, and the at least two lower-layer luminance blocks include a lower-layer luminance block including the sample at the lower right position; Determine the intra-prediction mode of the current chroma block using the intra-prediction mode of the sample at the lower right position and the information; and Using the intra prediction mode of the current chroma block, performing intra prediction on the current chroma block, wherein the sample point at the lower right position is a sample point at a position that is 1 / 2 of the width of the current luminance block in the right direction from the position of the upper left sample point in the current luminance block and 1 / 2 of the height of the current luminance block in the downward direction from the position of the upper left sample point in the current luminance block, The current chroma block has one of a square shape and a non-square shape.
2. A video encoding method, comprising: generating information about an intra prediction mode of a current chroma block; Obtaining an intra prediction mode of a sample at a lower right position in a current luminance block corresponding to the current chrominance block, wherein the current luminance block is divided into at least two lower-layer luminance blocks, and the at least two lower-layer luminance blocks include a lower-layer luminance block including the sample at the lower right position; Determine the intra prediction mode of the current chroma block using the intra prediction mode of the sample at the lower right position and the information; and generating a bitstream including the information on the intra prediction mode of the current chroma block by performing intra prediction on the current chroma block using the intra prediction mode of the current chroma block, wherein the sample point at the lower right position is a sample point at a position that is 1 / 2 of the width of the current luminance block in the right direction from the position of the upper left sample point in the current luminance block and 1 / 2 of the height of the current luminance block in the downward direction from the position of the upper left sample point in the current luminance block, The current chroma block has one of a square shape and a non-square shape.
3. An apparatus for sending a bit stream, wherein: The device comprises: At least one processor is configured to execute the video encoding method according to claim 2 to generate a bit stream, wherein the bit stream is to be sent to a decoding device.