Video decoding method and device and video encoding method and device

By utilizing the prediction modes of the left, top, and right neighboring blocks of the current block, the most probable mode is determined and the intra-frame mode set is expanded, thus solving the problem of low efficiency in intra-frame prediction mode selection and improving the performance of video encoding and decoding.

CN111819845BActive Publication Date: 2024-09-03SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980017820.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-03-08
Filing Date
2019-03-07
Publication Date
2024-09-03
Estimated Expiration
2039-03-07

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies are inefficient in intra-frame prediction mode selection when processing high-resolution or high-quality images, making it difficult to effectively utilize prediction mode information from neighboring blocks.

Method used

By using the prediction modes of the left, top, and right neighboring blocks of the current block, the most probable mode (MPM) and the expanded intra-mode set are determined, thereby improving the selection efficiency of intra-prediction modes.

Benefits of technology

It improves the selection accuracy and coding efficiency of intra-frame prediction modes, reduces the number of bits used, and enhances the performance of video encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111819845B_ABST
    Figure CN111819845B_ABST
Patent Text Reader

Abstract

A method and apparatus for decoding a video are provided, wherein, during a video encoding and decoding process, MPM mode information indicating whether a most probable mode (MPM) of a current block will be used, extended intra mode set information indicating whether an extended intra mode set configured based on the MPM mode will be used, and an intra prediction mode of the current block is determined based on the MPM mode information and the extended intra mode set information, wherein the MPM mode of the current block is determined based on two or more of a prediction mode of a left neighboring block adjacent to the left side of the current block, a prediction mode of an upper neighboring block adjacent to the upper side of the current block, and a prediction mode of a right neighboring block adjacent to the right side of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a video decoding method and a video decoding device, and more specifically, to an image encoding method and a device and an image decoding method and a device, wherein intra-frame prediction is performed by using a most probable mode (MPM) based on a neighboring block on the right side of a current block and neighboring blocks on the left and above the current block and an extended intra-frame mode set configured based on the MPM. Background Art

[0002] Image data is encoded by a codec based on a specific data compression standard (eg, Moving Picture Experts Group (MPEG) standard), and then stored in a recording medium or transmitted through a communication channel in the form of a bit stream.

[0003] According to the development and release of hardware capable of reproducing and storing high-resolution or high-quality image content, there is an increasing demand for codecs for efficiently encoding or decoding high-resolution or high-quality image content. The encoded image content can be reproduced by decoding. Recently, methods for efficiently compressing high-resolution or high-quality image content have been implemented. For example, it has been proposed that image compression technology can be effectively implemented by dividing the process of encoding an image according to an arbitrary method or manipulating the process of data.

[0004] As one of the techniques for manipulating data, it is common that two or more most probable modes (MPMs) determined based on neighboring blocks on the left and above of a current block are used for intra prediction, and other modes are encoded and signaled under the same conditions. Summary of the invention

[0005] Technical issues

[0006] A method and apparatus are provided, wherein during video encoding and video decoding processing, MPM information indicating whether a most probable mode (MPM) of a current block is used, extended intra mode set information indicating whether an extended intra mode set configured based on the MPM is used, and intra prediction is performed by using an intra prediction mode of the current block determined based on the MPM information and the extended intra mode set information, wherein the MPM of the current block is determined based on a prediction mode of a left neighboring block adjacent to the left side of the current block, a prediction mode of an upper neighboring block adjacent to the upper side of the current block, and a prediction mode of a right neighboring block adjacent to the right side of the current block.

[0007] Solution to the problem

[0008] In order to solve the technical problem, a video decoding method according to the present disclosure includes: obtaining a most probable mode (MPM) information indicating whether to use a current block; obtaining an extended intra mode set information indicating whether to use an extended intra mode set configured based on the MPM; and determining an intra prediction mode of the current block based on the MPM information and the extended intra mode set information, wherein the MPM of the current block is determined based on at least two of a prediction mode of a left neighboring block adjacent to the left side of the current block, a prediction mode of an upper neighboring block adjacent to the upper side of the current block, and a prediction mode of a right neighboring block adjacent to the right side of the current block.

[0009] In order to solve the technical problem, the video decoding device according to the present disclosure includes: a memory; and at least one processor, connected to the memory and configured to: obtain MPM information indicating whether to use the MPM of the current block; obtain extended intra-frame mode set information indicating whether to use the extended intra-frame mode set configured based on the MPMS; and determine the intra-frame prediction mode of the current block based on the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is determined based on at least two of the prediction mode of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block.

[0010] In order to solve the technical problem, the video encoding method according to the present disclosure includes: performing intra-frame prediction on the current block to generate MPM information indicating whether to use the MPM of the current block; generating extended intra-frame mode set information indicating whether to use the extended intra-frame mode set configured based on the MPMS; and encoding the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is determined based on at least two of the prediction mode of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block.

[0011] In order to solve the technical problem, the video encoding device according to the present disclosure includes at least one processor connected to a memory, and the at least one processor is configured to: perform intra-frame prediction on a current block to generate MPM information indicating whether to use the MPM of the current block; generate extended intra-frame mode set information indicating whether to use an extended intra-frame mode set configured based on the MPMS; and encode the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is determined based on at least two of the prediction mode of a left neighboring block adjacent to the left side of the current block, the prediction mode of an upper neighboring block adjacent to the upper side of the current block, and the prediction mode of a right neighboring block adjacent to the right side of the current block.

[0012] Disclosure of beneficial effects

[0013] During video encoding and video decoding processing, MPM information indicating whether to use the most probable mode (MPM) of the current block is obtained, extended intra-frame mode set information indicating whether to use the extended intra-frame mode set configured based on the MPM is obtained, and the current block is predicted by using the intra-frame prediction mode of the current block determined based on the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is based on at least two of the prediction modes of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block. Therefore, when configuring the MPM, the right neighboring block is also considered, so that the efficiency of the MPM is improved. When performing intra-frame prediction, the accuracy of the prediction can be improved by compensating for the situation where the MPM is selected instead of the correct mode. The efficiency of mode coding can be improved by allocating fewer bits to various intra-frame modes than traditional MPMs and taking intra-frame modes as candidates. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.

[0015] Figure 2 is a flowchart of an image decoding method according to an embodiment.

[0016] Figure 3 A process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding device according to an embodiment, is illustrated.

[0017] Figure 4 A process of determining at least one coding unit by splitting a non-square coding unit, performed by an image decoding device according to an embodiment, is illustrated.

[0018] 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 device according to an embodiment, is illustrated.

[0019] Figure 6 A method of determining a specific coding unit from among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0020] Figure 7 An order in which a plurality of coding units are processed when an image decoding device determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.

[0021] Figure 8A 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 specific order, performed by an image decoding device according to an embodiment, is illustrated.

[0022] Fig. 9 A process of determining at least one coding unit by splitting a first coding unit, performed by an image decoding device according to an embodiment, is illustrated.

[0023] 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 device splits a first coding unit satisfies a specific condition, shapes into which the second coding unit can be split are limited.

[0024] Fig.11 A process of splitting a square coding unit when division shape pattern information cannot indicate that the square coding unit is split into four square coding units, performed by an image decoding device according to an embodiment, is illustrated.

[0025] Fig.12 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of splitting a coding unit.

[0026] 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.

[0027] 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.

[0028] Fig.15 It is illustrated that a plurality of coding units are determined based on a plurality of specific data units included in a picture according to an embodiment.

[0029] Fig.16 A processing block serving as a criterion for determining an order of reference coding units included in a picture according to an embodiment is illustrated.

[0030] Fig.17 is a block diagram of a video encoding apparatus according to an embodiment.

[0031] Fig.18 is a flowchart of a video encoding method according to an embodiment.

[0032] Fig.19 is a block diagram of a video decoding apparatus according to an embodiment.

[0033] Fig. 20 is a flowchart of a video decoding method according to an embodiment.

[0034] Fig.21 A diagram for describing a maximum coding unit and an encoding order of coding units included in the maximum coding unit.

[0035] Fig.22a shows the intra prediction method according to whether the neighboring blocks are reconstructed, and Figure 22b An improved algorithm for the case where a right neighboring block adjacent to the right side of the current block is available is shown.

[0036] Fig.23 An embodiment of intra prediction mode direction is shown.

[0037] Fig.24a shows the bilinear prediction mode using the left neighboring block and the upper neighboring block, Figure 24b shows a bilinear prediction mode using an upper neighboring block and a right neighboring block, and Fig.24c A bilinear prediction mode using left and right neighboring blocks is shown.

[0038] Fig.25 An example of multiple 4-tap filters for intra prediction is shown.

[0039] Fig.26 Another example of multiple 4-tap filters for intra prediction is shown.

[0040] Fig.27a shows an example of a 4-tap filter for intra prediction, and Figure 27b Another example of a 4-tap filter for intra prediction is shown.

[0041] Fig.28 An example of boundary filtering of a prediction block is shown.

[0042] Fig.29a shows the block index included in the coding unit, Fig.29b shows an example of the scanning order of coding units, Fig.29c Another example of a scanning order in a block diagram showing a coding unit, and Fig.29d A block diagram showing coding blocks indicating blocks included in a coding unit is shown.

[0043] Fig.30a A block showing application of a Split Unit Coding Order (SUCO) that changes the coding order from right to left, Fig.30b shows the scanning order of the coding units applying SUCO, Fig.30c shows an example of a coding block diagram, Fig.30d shows an example of a coding unit including a current block, and Fig.30e A block diagram illustrating a coding unit including a current block to which SUCO is applied.

[0044] Fig.31a shows possible intra mode sets (PIMS) when the left neighboring block and the upper neighboring block of the current block are available, Fig.31b shows the PIMS when the right neighboring block and the upper neighboring block of the current block are available, and Fig.31c The PIMS is shown when the left neighboring block, the upper neighboring block, and the right neighboring block of the current block are all available.

[0045] Fig.32a shows the syntax of the flag indicating whether to use the most probable mode (MPM) and PIMS, and Figure 32b The syntax of PIMS is shown.

[0046] Fig.33 An example of multi-parameter intra prediction is shown.

[0047] Fig.34a An example of a syntax showing multi-parameter prediction for intra prediction, and Fig.34b An example of the syntax of a multi-parameter prediction based on an availability check is shown.

[0048] Fig.35a shows an example of filtered reference samples for multi-combined intra prediction, and Fig.35b An example of applying multi-combination intra prediction is shown.

[0049] Fig.36a An example of a syntax showing multiple combined intra predictions for intra prediction, and Fig.36b An example of the syntax of multiple combined intra prediction according to availability check is shown.

[0050] Best Mode

[0051] According to an embodiment of the present disclosure, a video decoding method may include: obtaining a most probable mode (MPM) information indicating whether to use a current block; obtaining an extended intra mode set information indicating whether to use an extended intra mode set configured based on the MPM; and determining an intra prediction mode of the current block based on the MPM information and the extended intra mode set information, wherein the MPM of the current block is determined based on at least two of a prediction mode of a left neighboring block adjacent to the left side of the current block, a prediction mode of an upper neighboring block adjacent to the upper side of the current block, and a prediction mode of a right neighboring block adjacent to the right side of the current block.

[0052] According to an embodiment, when the MPM information indicates that the MPM is used, a mode in the MPM may be determined as the intra-frame prediction mode of the current block, when the MPM information indicates that the MPM is not used and the extended intra-frame mode set information indicates that the extended intra-frame mode set is used, a mode in the extended intra-frame mode set may be determined as the intra-frame prediction mode of the current block, and when the MPM information indicates that the MPM is not used and the extended intra-frame mode set information indicates that the extended intra-frame mode set is not used, one of the intra-frame prediction modes not included in the MPM and the extended intra-frame mode set may be determined as the intra-frame prediction mode of the current block.

[0053] According to an embodiment, when the MPM of the current block includes intra prediction modes of left, upper, and right neighboring blocks, the extended intra mode set may be configured by using the MPM of the current block.

[0054] According to an embodiment, when the MPM of the current block includes intra prediction modes of left and upper neighboring blocks, the extended intra mode set may be configured by using the MPM of the current block and the prediction mode of the right neighboring block.

[0055] According to an embodiment, when the preset number of the MPMs of the current block is two and the left neighboring block, the upper neighboring block and the right neighboring block are all available, the MPM of the current block can be determined by using the prediction modes of two blocks among the left neighboring block, the upper neighboring block and the right neighboring block.

[0056] According to an embodiment, when the preset number of the MPMs of the current block is two, the right neighboring block is available, and only one of the left neighboring block and the upper neighboring block is available, the MPM of the current block can be determined by using the prediction mode of the right neighboring block and the prediction mode of one block available among the upper neighboring block and the right neighboring block.

[0057] According to an embodiment, when the left neighboring block, the upper neighboring block and the right neighboring block are all available and the prediction modes of the left neighboring block, the upper neighboring block and the right neighboring block are different directional modes, the extended intra-frame mode set may include an intra-frame prediction mode whose index is increased by N from the index of the intra-frame prediction mode of the left neighboring block, an intra-frame prediction mode whose index is decreased by N from the index of the intra-frame prediction mode of the left neighboring block, an intra-frame prediction mode whose index is increased by M from the index of the intra-frame prediction mode of the upper neighboring block, an intra-frame prediction mode whose index is decreased by M from the index of the intra-frame prediction mode of the upper neighboring block, an intra-frame prediction mode whose index is increased by L from the index of the intra-frame prediction mode of the right neighboring block, and an intra-frame prediction mode whose index is decreased by L from the index of the intra-frame prediction mode of the right neighboring block, and N, M and L may be integers other than zero.

[0058] According to an embodiment, the extended intra mode set may be configured according to the type of the MPM.

[0059] According to an embodiment, when the preset number of the MPMs of the current block is two and the MPMs are a DC mode and a bilinear mode, the extended intra mode set may include a planar mode, a horizontal mode, a vertical mode, and a diagonal mode.

[0060] According to an embodiment, when the preset number of the MPMs of the current block is two and the MPMs are a DC mode and a directional mode, the extended intra-frame mode set may include a bilinear mode, a planar mode, and an intra-frame prediction mode whose index is increased by 1 from the index of the directional mode, an intra-frame prediction mode whose index is increased by 2 from the index of the directional mode, an intra-frame prediction mode whose index is decreased by 1 from the index of the directional mode, an intra-frame prediction mode whose index is decreased by 2 from the index of the directional mode, a first default mode and a second default mode, and the first default mode and the second default mode may be preset intra-frame prediction modes.

[0061] According to an embodiment, the first default mode and the second default mode may be determined from a list sequentially listing intra prediction modes having a statistically high probability of being selected.

[0062] According to an embodiment, when the preset number of the MPMs of the current block is two and the MPMs are a first direction mode and a second direction mode, the extended intra-frame mode set may include an intra-frame prediction mode whose index is increased by 1 from the index of the first direction mode, an intra-frame prediction mode whose index is decreased by 1 from the index of the first direction mode, an intra-frame prediction mode whose index is increased by 1 from the index of the second direction mode, an intra-frame prediction mode whose index is decreased by 1 from the index of the second direction mode, a horizontal mode, a vertical mode, a DC mode and a bilinear mode.

[0063] According to an embodiment, when the MPM of the current block includes intra-frame prediction modes of the left neighboring block and the upper neighboring block, the MPM is a DC mode and a first direction mode, and the prediction mode of the right neighboring block is a second direction mode, the extended intra-frame mode set may include a bilinear mode, a planar mode, a second direction mode, an intra-frame prediction mode whose index is increased by 1 from the index of the first direction mode, an intra-frame prediction mode whose index is decreased by 1 from the index of the first direction mode, an intra-frame prediction mode whose index is increased by 1 from the index of the second direction mode, an intra-frame prediction mode whose index is decreased by 1 from the index of the second direction mode, and a default mode, and the default mode may be a preset intra-frame prediction mode.

[0064] According to an embodiment, when the MPM of the current block includes intra-frame prediction modes of the left neighboring block and the upper neighboring block, the MPM is a first direction mode and a second direction mode, and the prediction mode of the right neighboring block is a third direction mode, the extended intra-frame mode set may include the third direction mode, an intra-frame prediction mode whose index is increased by 1 from the index of the first direction mode, an intra-frame prediction mode whose index is decreased by 1 from the index of the first direction mode, an intra-frame prediction mode whose index is increased by 1 from the index of the second direction mode, an intra-frame prediction mode whose index is decreased by 1 from the index of the second direction mode, an intra-frame prediction mode whose index is increased by 1 from the index of the third direction mode, and an intra-frame prediction mode whose index is decreased by 1 from the index of the third direction mode.

[0065] According to an embodiment of the present disclosure, a video encoding method includes: performing intra-frame prediction on a current block to generate a most probable mode (MPM) of the current block to generate MPM information indicating whether to use MPM information of the most probable mode (MPM) of the current block; generating extended intra-frame mode set information indicating whether to use an extended intra-frame mode set configured based on the MPM; and encoding the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is determined based on at least two of a prediction mode of a left neighboring block adjacent to the left side of the current block, a prediction mode of an upper neighboring block adjacent to the upper side of the current block, and a prediction mode of a right neighboring block adjacent to the right side of the current block.

[0066] According to an embodiment of the present disclosure, a video decoding device includes: a memory; and at least one processor, connected to the memory and configured to: obtain MPM information indicating whether to use a most probable mode (MPM) of a current block; obtain extended intra-frame mode set information indicating whether to use an extended intra-frame mode set configured based on the MPM; and determine an intra-frame prediction mode of the current block based on the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is determined based on at least two of a prediction mode of a left neighboring block adjacent to the left side of the current block, a prediction mode of an upper neighboring block adjacent to the upper side of the current block, and a prediction mode of a right neighboring block adjacent to the right side of the current block. DETAILED DESCRIPTION

[0067] The advantages and features of the embodiments and the methods for implementing the embodiments may be more easily understood by referring to the embodiments and the accompanying drawings. In this regard, the embodiments of the present disclosure may have different forms and should not be construed as being limited to the descriptions 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 concepts of the embodiments of the present disclosure to those of ordinary skill in the art.

[0068] Terms used in the specification will be briefly defined, and embodiments will be described in detail.

[0069] Considering the functions described in the present disclosure, the terms used here are common terms currently widely used in the art. However, these terms may have different meanings according to the intentions of those of ordinary skill in the art, precedents, or the emergence of new technologies. In addition, some terms may be arbitrarily selected by the applicant, and in this case, the meaning of the selected terms will be described in detail in the detailed description of the present disclosure. Therefore, the terms as used here must be defined not only by their simple names but also based on the meaning of the terms together with the description in the entire specification.

[0070] In the following description, a singular form includes a plural form unless the context clearly indicates otherwise.

[0071] When a component “includes” or “comprises” an element, unless there is a specific description contrary thereto, the component may further include other elements, not excluding other elements.

[0072] In the following description, terms such as "unit" indicate software or hardware components, and the "unit" performs a specific function. However, a "unit" is not limited to software or hardware. A "unit" may be formed in an addressable storage medium, or may be formed to operate one or more processors. Thus, for example, the term "unit" may refer to a component (such as a software component, an object-oriented software component, a class component, and a task component), and may include a process, a function, a property, a procedure, a subroutine, a fragment of a program code, a driver, a firmware, a microcode, a circuit, data, a database, a data structure, a table, an array, or a variable. The functions provided by components and "units" may be associated with a smaller number of components and "units", or may be divided into additional components and "units".

[0073] 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.

[0074] 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 is able to read information from and / or write information to the memory, the memory is said to be in electronic communication with the processor. Memory that is integrated into a processor is in electronic communication with the processor.

[0075] Hereinafter, an “image” may be a static image such as a still image of a video, or may be a dynamic image such as a moving image, that is, a video itself.

[0076] 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 domain may be a sample. A unit including at least one such sample may be defined as a block.

[0077] In the specification, a 'current block' may refer to 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.

[0078] Hereinafter, the embodiments will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement the embodiments. In the accompanying drawings, parts irrelevant to the description are omitted to clearly describe the present disclosure.

[0079] 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 20 , Fig.23 , Figures 24a to 24c as well as Fig.31a and Figure 32b A video decoding method for determining an intra prediction mode of a current block using a most probable mode (MPM) determined based on intra prediction modes of left neighboring blocks, upper neighboring blocks, and right neighboring blocks of the current block and an extended intra mode set configured based on the MPM according to an embodiment is described. Fig.21 , Fig.22a and Figure 22b The intra prediction method according to the coding order and whether the neighboring blocks are reconstructed is described. Figure 25 to Figure 28 The filtering method for intra prediction is described. Figures 29a to 29d and Figures 30a to 30e Describes the block diagram used for intra prediction. Figure 33 to Figure 36b Other methods of intra prediction are described.

[0080] 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 various shapes of a coding unit according to an embodiment of the present disclosure are described.

[0081] Figure 1 is a schematic block diagram of an image decoding apparatus according to an embodiment.

[0082] The image decoding device 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.

[0083] The receiver 110 may receive a bitstream. The bitstream includes information of an image encoded by the image encoding device 1700 described later. In addition, the bitstream may be sent from the image encoding device 1700. The image encoding device 1700 and the image decoding device 100 may be connected via a wired or wireless manner, and the receiver 110 may receive the bitstream via a wired or wireless manner. 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.

[0084] Will refer to Figure 2 The operation of the image decoding device 100 is described in detail.

[0085] Figure 2 is a flowchart of an image decoding method according to an embodiment.

[0086] According to an embodiment of the present disclosure, the receiver 110 receives a bit stream.

[0087] The image decoding device 100 obtains a binary bit string corresponding to the division shape pattern of the coding unit from the bit stream (operation 210). The image decoding device 100 determines the division rule of the coding unit (operation 220). In addition, the image decoding device 100 divides the coding unit into multiple coding units based on the binary bit string corresponding to the division shape pattern and at least one of the division rules (operation 230). The image decoding device 100 may determine an allowable first range of the size of the coding unit according to the aspect ratio of the coding unit in order to determine the division rule. The image decoding device 100 may determine an allowable second range of the size of the coding unit according to the division shape pattern of the coding unit in order to determine the division rule.

[0088] Hereinafter, the division of coding units will be described in detail according to an embodiment of the present disclosure.

[0089] First, a picture may be divided into one or more slices or one or more tiles. A slice or a tile may be a series 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.

[0090] A maximum coding unit (CTB) represents an N×N block including N×N samples (N is an integer). Each color component may be divided into one or more maximum coding blocks.

[0091] When a picture has three sample arrays (sample arrays for Y, Cr, and Cb components), the maximum coding unit (CTU) includes one 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.

[0092] One maximum coding block (CTB) can be divided into M×N coding blocks (M and N are integers) including M×N samples.

[0093] When a picture has sample arrays for Y, Cr, and Cb components, a coding unit (CU) includes one coding block of luma samples, two corresponding coding blocks of chroma samples, and syntax structures for encoding luma samples and chroma samples. When the picture is a monochrome picture, the coding unit includes coding blocks of monochrome samples and syntax structures for encoding monochrome samples. When the picture is a picture coded in color planes separated according to color components, the coding unit includes syntax structures for encoding the picture and samples of the picture.

[0094] As described above, the maximum coding block and the maximum coding unit are conceptually distinguished from each other, and the coding block and the coding unit are conceptually distinguished from each other. That is, the (maximum) coding unit refers to a data structure including a (maximum) coding block containing corresponding samples and a syntax structure corresponding to the (maximum) coding block. However, because a person of ordinary skill in the art understands that a (maximum) coding unit or a (maximum) coding block refers to a block of a specific size including a specific number of samples, the maximum coding block and the maximum coding unit or the coding block and the coding unit are mentioned in the following description without distinction, unless otherwise described.

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

[0096] 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.

[0097] For example, information about the luminance block size difference and the maximum size of the luminance coding block that can be divided into two can be obtained from the bitstream. The information about the luminance block size difference may refer to the size difference between the luminance maximum coding unit and the maximum luminance coding block that can be divided into two. Therefore, when the information about the maximum size of the luminance coding block that can be divided into two obtained from the bitstream and the information about the luminance block size difference are combined with each other, the size of the luminance maximum coding unit can be determined. The size of the chrominance maximum coding unit can be determined by using the size of the luminance maximum coding unit. For example, when the ratio of Y:Cb:Cr 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.

[0098] According to an embodiment, since information about the maximum size of a brightness coding block that can be divided into two is obtained from a bitstream, the maximum size of a brightness coding block that can be divided into two can be variably determined. In contrast, the maximum size of a brightness coding block that can be divided into three can be fixed. For example, the maximum size of a brightness coding block that can be divided into three in an I picture can be 32×32, and the maximum size of a brightness coding block that can be divided into three in a P picture or a B picture can be 64×64.

[0099] In addition, the maximum coding unit may be hierarchically split into coding units based on the split shape pattern information obtained from the bitstream. At least one of information indicating whether to perform four-partitioning, information indicating whether to perform multi-partitioning, split direction information, and split type information may be obtained from the bitstream as the split shape pattern information.

[0100] For example, the information indicating whether to perform four-split may indicate whether the current coding unit is divided into four (QUAD_SPLIT).

[0101] When the current coding unit is not divided into four, the information indicating whether multi-split is performed may indicate whether the current coding unit is no longer split (NO_SPLIT) or is divided into two / three.

[0102] When the current coding unit is two-partitioned or three-partitioned, the split direction information indicates that the current coding unit is split in one of a horizontal direction and a vertical direction.

[0103] When the current coding unit is split in the horizontal direction or the vertical direction, the split type information indicates whether the current coding unit is split into two or three.

[0104] 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.

[0105] 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 in binary numbers. 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.

[0106] The coding unit may be smaller than or equal to the maximum coding unit. For example, since the maximum coding unit is a coding unit having the maximum size, the maximum coding unit is one of the coding units. When the division shape pattern information about the maximum coding unit indicates that division is not performed, the coding unit determined in the maximum coding unit has the same size as the 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, division of an image is not limited thereto, and the maximum coding unit and the coding unit may not be distinguished. Reference will be made to Figures 3 to 16 The division of coding units is described in detail.

[0107] In addition, one or more prediction blocks for prediction may be determined from the coding unit. The prediction block may be the same as or smaller than the coding unit. In addition, one or more transform blocks for transformation may be determined from the coding unit. The transform block may be the same as or smaller than the coding unit.

[0108] The shapes and sizes of the transform block and the prediction block may not be related to each other.

[0109] 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.

[0110] Will refer to Figures 3 to 16 The division of the coding unit is described in detail. The current block and the neighboring block of the present disclosure may indicate one of the maximum coding unit, the coding unit, the prediction block, and the transformation block. In addition, the current block of the current coding unit is a block currently being decoded or encoded or a block currently being divided. The neighboring block may be a block reconstructed before the current block. The neighboring block may be adjacent to the current block in space or time. The neighboring block may be located at one of the lower left, left side, upper left, upper, upper right, right side, and lower right side of the current block.

[0111] Figure 3 A process of determining at least one coding unit by splitting a current coding unit, performed by an image decoding device according to an embodiment, is illustrated.

[0112] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N. Here, N may be a positive integer. The block shape information is information indicating at least one of a shape, a direction, an aspect ratio, or a size of a coding unit.

[0113] The shape of the coding unit may include a square and a non-square. When the lengths of the width and height of the coding unit are the same (ie, when the block shape of the coding unit is 4N×4N), the image decoding device 100 may determine the block shape information of the coding unit as a square. The image decoding device 100 may determine the shape of the coding unit as a non-square.

[0114] 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 device 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 device 100 may determine the aspect ratio in the block shape information of the coding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. In addition, the image decoding device 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 device 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.

[0115] According to an embodiment, the image decoding device 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 device 100.

[0116] 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 1700 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". In particular, the image decoding device 100 may determine the size of the maximum coding unit to be 256×256. The image decoding device 100 may determine the pre-agreed division shape pattern information to be four divisions. Four divisions are division shape patterns in which both the width and height of the coding unit are equally divided into two. The image decoding device 100 may obtain a coding unit of a size of 128×128 from a maximum coding unit of a size of 256×256 based on the division shape pattern information. In addition, the image decoding device 100 may determine the size of the minimum coding unit to be 4×4. The image decoding device 100 may obtain division shape pattern information indicating “no division is performed” for the minimum coding unit.

[0117] According to an embodiment, the image decoding device 100 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding device 100 may determine whether to not divide the square coding unit, whether to divide the square coding unit vertically, whether to divide the square coding unit horizontally, or whether to divide the square coding unit into four coding units based on the division 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 specific division method.

[0118] Reference Figure 3According to an embodiment, the image decoding device 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 device 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 device 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 device 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 device 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. A specific partitioning method for partitioning a square coding unit will be described in detail below with respect to various embodiments.

[0119] Figure 4 A process of determining at least one coding unit by splitting a non-square coding unit, performed by the image decoding device 100 according to an embodiment, is illustrated.

[0120] According to an embodiment, the image decoding device 100 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 100 may determine whether to not split the non-square current coding unit or whether to split the non-square current coding unit by using a specific splitting method based on the splitting shape pattern information. Figure 4 , when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding device 100 may determine that the coding unit 410 or 460 having the same size as the current coding unit 400 or 450 is not split based on the split shape pattern information indicating that splitting is not performed, or determine the coding units 420a and 420b, 440a to 440c, 470a and 470b, or 480a to 480c split based on the split shape pattern information indicating a specific splitting method. A specific splitting method for splitting a non-square coding unit will be described in detail below with respect to various embodiments.

[0121] According to an embodiment, the image decoding device 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 4When 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.

[0122] According to an embodiment, when the image decoding device 100 divides the non-square current coding unit 400 or 450 based on the division shape pattern information, the image decoding device 100 may divide the current coding unit in consideration of the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding device 100 may determine a plurality of coding units by dividing the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450.

[0123] According to an embodiment, when the image decoding device 100 splits the non-square current coding unit 400 or 450 based on the split shape pattern information, the image decoding device 100 may split the current coding unit in consideration of the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding device 100 may determine a plurality of coding units by splitting the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450.

[0124] 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 device 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 device 100 may divide the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.

[0125] According to an embodiment, the aspect ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the aspect ratio is 4:1, since the length of the width is longer than the length of the height, the block shape information may be in the horizontal direction. When the aspect ratio is 1:4, since the length of the width is shorter than the length of the height, the block shape information may be in the vertical direction. The image decoding device 100 may determine that the current coding unit is divided into an odd number of blocks based on the division shape mode information. In addition, the image decoding device 100 may determine the division direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is in the vertical direction, the image decoding device 100 may determine the coding units 430a to 430c by dividing the current coding unit 400 in the horizontal direction. In addition, when the current coding unit 450 is in the horizontal direction, the image decoding device 100 may determine the coding units 480a to 480c by dividing the current coding unit 450 in the vertical direction.

[0126] According to an embodiment, the image decoding device 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and not all determined coding units may have the same size. For example, the size of a specific coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may be different from the sizes 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 odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.

[0127] 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 device 100 may determine the odd number of coding units included in the current coding unit 400 or 450, and further, may impose a specific restriction on at least one of the odd number of coding units generated by dividing the current coding unit 400 or 450. Figure 4, the image decoding device 100 may set the decoding process of the coding unit 430b or 480b to be different from the decoding process of the other coding units 430a and 430c or 480a and 480c, wherein the coding unit 430b or 480b is located at the center of the three coding units 430a, 430b and 430c or 480a, 480b and 480c generated when the current coding unit 400 or 450 is divided. For example, unlike the other coding units 430a and 430c or 480a and 480c, the image decoding device 100 may limit the coding unit 430b or 480b at the center position to not be divided again or to be divided only a specific number of times.

[0128] 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 the image decoding device 100 according to an embodiment, is illustrated.

[0129] According to an embodiment, the image decoding device 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 device 100 may determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The first coding unit, the second coding unit, and the third coding unit used according to the embodiment are terms for understanding the relationship before and after 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.

[0130] 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 device 100 may split the non-square second coding unit 510 determined by splitting the first coding unit 500 into one or more third coding units 520a, or 520b, 520c, and 520d based on the split shape pattern information, or may not split the second coding unit 510. The image decoding device 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 unit 520a, or 520b, 520c, and 520d based on the split shape pattern information of the second coding unit 510. That is, the coding unit may be recursively split based on the split shape pattern information of each coding unit. Thus, a square coding unit may be determined by splitting a non-square coding unit, and a non-square coding unit may be determined by recursively splitting a square coding unit.

[0131] Reference Figure 5 , a specific coding unit (e.g., a coding unit at a center position or a square coding unit) among the odd 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 among the odd third coding units 520b, 520c, and 520d may be divided into a plurality of fourth coding units in the horizontal direction. A non-square fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d may be divided into a plurality of coding units again. For example, a non-square fourth coding unit 530b or 530d may be divided into an odd number of coding units again. A method that may be used to recursively divide coding units will be described below with respect to various embodiments.

[0132] According to an embodiment, the image decoding device 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 device 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 device 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 device 100 may impose a specific restriction on a specific third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 may limit the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d to no longer be divided or to be divided a set number of times.

[0133] Reference Figure 5 , the image decoding device 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 specific division method (for example, only divided into four coding units or divided by using the division method of the second coding unit 510), or to be divided only a specific number of times (for example, 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.

[0134] According to an embodiment, the image decoding device 100 may obtain split shape pattern information used to split the current coding unit from a specific position in the current coding unit.

[0135] Figure 6 A method of determining a specific coding unit from among odd-numbered coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.

[0136] Reference Figure 6 , the division shape mode information of the current coding unit 600 or 650 may be obtained from a sample at a specific position (e.g., a sample 640 or 690 at a center position) among a plurality of samples included in the current coding unit 600 or 650. However, the specific position in the current coding unit 600 where 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, and bottom right positions) included in the current coding unit 600. The image decoding device 100 may obtain the division shape pattern information from a specific position, and may determine whether to divide the current coding unit into coding units of various shapes and sizes or not to divide the current coding unit.

[0137] According to an embodiment, when the current coding unit is split into a specific number of coding units, the image decoding apparatus 100 may select one of the coding units. As will be described below with respect to various embodiments, various methods may be used to select one of a plurality of coding units.

[0138] According to an embodiment, the image decoding device 100 may split a current coding unit into a plurality of coding units, and may determine a coding unit at a specific position.

[0139] According to an embodiment, the image decoding apparatus 100 may use information indicating the positions of odd-numbered coding units to determine a coding unit at a center position among the odd-numbered coding units. Figure 6 , the image decoding device 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 device 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 device 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 specific samples included in the coding units 620a, 620b, and 620c. In detail, the image decoding device 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.

[0140] 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 device 100 can 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.

[0141] 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 device 100 may determine the middle coding unit 620b by using the coordinates of the upper left sample points 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c. For example, when the coordinates of the upper left sample points 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the sample point 630b at the center position may be determined as the coding unit at the center position among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the upper left sample points 630a, 630b, and 630c may include coordinates indicating absolute positions in the picture, or coordinates (dxb, dyb) indicating the relative position of the upper left sample point 630b of the middle coding unit 620b relative to the position of the upper left sample point 630a of the upper coding unit 620a and coordinates (dxc, dyc) indicating the relative position of the upper left sample point 630c of the lower coding unit 620c relative to the position of the upper left sample point 630a of the upper coding unit 620a may be used. A method of determining a coding unit at a specific position by using the coordinates of the sample points included in the coding unit as information indicating the positions of the sample points is not limited to the above method, and may include various arithmetic methods capable of using the coordinates of the sample points.

[0142] According to an embodiment, the image decoding device 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select one of the coding units 620a, 620b, and 620c based on a specific criterion. For example, the image decoding device 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.

[0143] According to an embodiment, the image decoding device 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 device 100 may determine the size of each of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the image decoding device 100 may determine the width of the upper coding unit 620a as the width of the current coding unit 600. The image decoding device 100 may determine the height of the upper coding unit 620a as yb-ya. According to an embodiment, the image decoding device 100 may determine the width of the intermediate coding unit 620b as the width of the current coding unit 600. The image decoding device 100 may determine the height of the intermediate coding unit 620b as yc-yb. According to an embodiment, the image decoding device 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 device 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 620a to 620c. Referring to Figure 6 , the image decoding device 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 specific position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 corresponds only to an example of determining the coding unit at the specific position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the specific position by comparing the size of the coding unit determined based on the coordinates of the specific sample points may be used.

[0144] The image decoding device 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 device 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.

[0145] According to an embodiment, the image decoding device 100 may determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 may determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 may determine the height of the middle coding unit 660b as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 may determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the width or height of the left coding unit 660a and the middle coding unit 660b. The image decoding device 100 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 660a to 660c. Referring to Figure 6 , the image decoding device 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 a specific position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 corresponds only to an example of determining the coding unit at a specific position by using the size of the coding unit determined based on the coordinates of the sample points, and thus various methods of determining the coding unit at a specific position by comparing the size of the coding unit determined based on the coordinates of the specific sample points may be used.

[0146] However, the position of the sample considered in determining the position of the coding unit is not limited to the above-mentioned upper left position, and information on arbitrary positions of the samples included in the coding unit may be used.

[0147] According to an embodiment, the image decoding device 100 may select a coding unit at a specific position from an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, when the current coding unit has a non-square shape in which the width is greater than the height, the image decoding device 100 may determine a coding unit at a specific position along the horizontal direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the horizontal direction and impose restrictions on the coding unit. When the current coding unit has a non-square shape in which the height is greater than the width, the image decoding device 100 may determine a coding unit at a specific position along the vertical direction. That is, the image decoding device 100 may determine one of the coding units at different positions along the vertical direction and may impose restrictions on the coding unit.

[0148] According to an embodiment, the image decoding device 100 may use information indicating respective positions of even-numbered coding units to determine a coding unit at a specific position among the even-numbered coding units. The image decoding device 100 may determine the even-numbered coding units by dividing (dividing) the current coding unit, and may determine the coding unit at the specific position by using information about the positions of the even-numbered coding units. 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 specific position (eg, a center position) among odd-numbered coding units described in detail corresponds, and thus a detailed description thereof is not provided here.

[0149] According to an embodiment, when a non-square current coding unit is split into a plurality of coding units, a coding unit at a specific position among the plurality of coding units may be determined using specific information about the coding unit at a specific position in a split operation. For example, the image decoding device 100 may determine a coding unit at a center position among the plurality of coding units determined by splitting the current coding unit using at least one of block shape information and split shape pattern information stored in samples included in an intermediate coding unit in a split operation.

[0150] Reference Figure 6, the image decoding device 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 device 100 may determine the coding unit 620b at the center position in consideration of the position where the division shape pattern information is obtained. That is, the division shape pattern information of the current coding unit 600 may be obtained from the sample point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the division shape pattern information, the coding unit 620b including the sample point 640 may be determined as the coding unit at the center position. However, information for determining the coding unit at the center position is not limited to the division shape pattern information, and the coding unit at the center position may be determined using various types of information.

[0151] According to an embodiment, specific information for identifying a coding unit at a specific position may be obtained from a specific sample point included in a coding unit to be determined. Figure 6 , the image decoding device 100 may use the division shape pattern information obtained from the sample at the specific position in the current coding unit 600 (for example, the sample at the center position of the current coding unit 600) to determine the coding unit at the specific position (for example, the coding unit at the center position of the divided multiple coding units) among the multiple coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. That is, the image decoding device 100 may determine the sample at the specific position by considering the block shape of the current coding unit 600, determine the coding unit 620b including the sample for which the specific information (for example, the division shape pattern information) can be obtained from the multiple coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may impose specific restrictions on the coding unit 620b. Referring to Figure 6 According to an embodiment, in a decoding operation, the image decoding device 100 may determine a sample 640 at a center position of a current coding unit 600 as a sample from which specific information may be obtained, and may impose a specific restriction on a coding unit 620b including the sample 640. However, the position of the sample from which specific information may be obtained is not limited to the above-mentioned position, and may include any position included in the coding unit 620b to be determined as a sample for restriction.

[0152] According to an embodiment, the position of the sample at which specific information can be obtained may be determined based on the shape of the current coding unit 600. According to an embodiment, the block shape information may indicate whether the current coding unit has a square shape or a non-square shape, and the position of the sample at which specific information can be obtained may be determined based on the shape. For example, the image decoding device 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 specific 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 device 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 specific information can be obtained.

[0153] 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 specific 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 specific position in the coding unit, and 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 specific position in each of the plurality of coding units. That is, the coding unit may be recursively divided based on the division shape pattern information obtained from the sample at the specific position in each coding unit. Figure 5 An operation of recursively splitting the coding unit is described, and thus a detailed description thereof will not be provided here.

[0154] According to an embodiment, the image decoding device 100 may determine one or more coding units by splitting a current coding unit, and may determine an order in which to decode the one or more coding units based on a specific block (for example, the current coding unit).

[0155] Figure 7 Illustrated is an order in which a plurality of coding units are processed when an image decoding device determines a plurality of coding units by splitting a current coding unit according to an embodiment.

[0156] According to an embodiment, the image decoding device 100 may 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 vertical and horizontal directions based on the division shape pattern information.

[0157] Reference Figure 7, the image decoding device 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 device 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 device 100 may determine to process the second coding units 750a to 750d determined by dividing the first coding unit 700 in the vertical direction and the horizontal direction in a specific order (for example, in a raster scan order or a zigzag scan order 750e) in which the coding units in one row are processed and then the coding units in the next row are processed.

[0158] According to an embodiment, the image decoding apparatus 100 may recursively divide the coding unit. Figure 7 , the image decoding device 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 and 710b, 730a and 730b, or 750a to 750d. A division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to a division method of the first coding unit 700. In this way, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may be independently divided into a plurality of coding units. Referring to Figure 7 , the image decoding device 100 may determine the second coding units 710a and 710b by splitting the first coding unit 700 in a vertical direction, and may determine whether to independently split or not split each of the second coding units 710a and 710b.

[0159] According to an embodiment, the image decoding device 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.

[0160] According to an embodiment, the processing order of the coding units may be determined based on the operation of dividing the coding units. In other words, the processing order of the coding units after the division may be determined based on the processing order of the coding units immediately before the division. The image decoding device 100 may determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Since the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b may be processed in a vertical direction order 720c. Since the left second coding unit 710a and the right second coding unit 710b are processed in a horizontal direction order 710c, the right second coding unit 710b may be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in a vertical direction order 720c. The operation of determining the processing order of coding units based on the coding units before splitting is not limited to the above example, and coding units split and determined to be various shapes may be independently processed in a specific order using various methods.

[0161] 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 specific order, performed by an image decoding device according to an embodiment, is illustrated.

[0162] According to an embodiment, the image decoding device 100 may determine whether the current coding unit is to be 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 device 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.

[0163] According to an embodiment, the image decoding device 100 may determine whether any coding unit is split into an odd number of coding units by determining whether the third coding units 820a and 820b and 820c to 820e can be processed in a specific order. Figure 8, the image decoding device 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 device 100 may determine whether any one of the following coding units is divided into an odd number of coding units: the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a and 820b and 820c to 820e based on at least one of the block shape information and the division shape mode information. For example, the right second coding unit 810b of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the multiple coding units included in the first coding unit 800 can be a specific order (for example, a zigzag scanning order 830), and the image decoding device 100 can determine whether the third coding units 820c, 820d and 820e determined by dividing the right second coding unit 810b into an odd number of coding units meet the conditions for processing in a specific order.

[0164] According to an embodiment, the image decoding device 100 may determine whether the third coding units 820a and 820b and 820c to 820e included in the first coding unit 800 satisfy a condition for processing in a specific order, and the condition is related to whether at least one of the width and height of the second coding units 810a and 810b is divided in half along the boundary of the third coding units 820a and 820b and 820c to 820e. For example, the third coding units 820a and 820b determined 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 fails to divide the width or height of the right second coding unit 810b in half, it can 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 device 100 may determine that the scanning order is discontinuous, and may determine to divide the right second coding unit 810b 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 device 100 may impose a specific restriction on the coding unit at a specific position in the divided coding unit. The restriction or the specific position has been described above with respect to various embodiments, so a detailed description thereof will not be provided here.

[0165] Fig. 9 A process of determining at least one coding unit by splitting a first coding unit, performed by an image decoding device according to an embodiment, is illustrated.

[0166] According to an embodiment, the image decoding device 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 division shape mode information indicates that the first coding unit 900 is divided into non-square coding units, the image decoding device 100 may divide the first coding unit 900 into a plurality of non-square coding units. In detail, when the division shape mode information indicates that an odd number of coding units is determined by dividing the first coding unit 900 in the horizontal direction or the vertical direction, the image decoding device 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 the vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction).

[0167] According to an embodiment, the image decoding device 100 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition for processing in a specific order, and the condition is related to whether at least one of the width and height of the first coding unit 900 is 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 satisfy the condition for processing in a specific order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the 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 satisfy the condition for processing in a specific order. When the condition is not satisfied as described above, the image decoding device 100 may determine that the scanning order is not continuous, and may determine to divide the first coding unit 900 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 device 100 may impose a specific restriction on the coding unit at a specific position in the divided coding unit. The restriction or the specific position has been described above with respect to various embodiments, so a detailed description thereof will not be provided here.

[0168] According to an embodiment, the image decoding device 100 may determine coding units of various shapes by splitting the first coding unit.

[0169] Reference Fig. 9 , the image decoding device 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.

[0170] Fig.10 It 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 device splits a first coding unit satisfies a specific condition according to an embodiment.

[0171] According to an embodiment, the image decoding device 100 may determine to divide the square first coding unit 1000 into non-square second coding units 1010a and 1010b or 1020a and 1020b based on the division shape pattern information obtained by the receiver 110. The second coding units 1010a and 1010b or 1020a and 1020b may be independently divided. In this way, based on the division shape pattern information of each of the second coding units 1010a and 1010b or 1020a and 1020b, the image decoding device 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 device 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 device 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 device 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.

[0172] According to an embodiment, the image decoding device 100 may determine the third coding units 1022a and 1022b or 1024a and 1024b by vertically splitting the non-square second coding unit 1020a or 1020b determined by horizontally splitting the first coding unit 1000. However, when the second coding unit (e.g., the upper second coding unit 1020a) is split in the vertical direction, the image decoding device 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 reasons.

[0173] Fig.11 A process of splitting a square coding unit when division shape pattern information cannot indicate that the square coding unit is split into four square coding units, performed by an image decoding device according to an embodiment, is illustrated.

[0174] According to an embodiment, the image decoding device 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 device 100 may not divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, and 1130d. The image decoding device 100 may determine the non-square second coding units 1110a and 1110b or 1120a and 1120b, etc. based on the division shape pattern information.

[0175] According to an embodiment, the image decoding device 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, 1110b, 1120a, 1120b, etc. may be recursively divided in a specific order, and the division method may correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.

[0176] For example, the image decoding device 100 may determine the square third coding units 1112a and 1112b by dividing the left second coding unit 1110a in the horizontal direction, and may determine the square third coding units 1114a and 1114b by dividing the right second coding unit 1110b in the horizontal direction. In addition, the image decoding device 100 may determine the 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.

[0177] As another example, the image decoding device 100 may determine the square third coding units 1122a and 1122b by dividing the upper second coding unit 1120a in the vertical direction, and may determine the square third coding units 1124a and 1124b by dividing the lower second coding unit 1120b in the vertical direction. In addition, the image decoding device 100 may determine the square third coding units 1126a, 1126b, 1126c, and 1126d 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.

[0178] Fig.12 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of splitting a coding unit.

[0179] According to an embodiment, the image decoding device 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 device 100 may determine the second coding units 1210a and 1210b or 1220a and 1220b, etc. by dividing the first coding unit 1200. Fig.12, the non-square second coding units 1210a and 1210b or 1220a and 1220b determined by dividing the first coding unit 1200 only in the horizontal direction or the vertical direction may be independently divided based on the division shape pattern information of each coding unit. For example, the image decoding device 100 may determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and may determine the third coding units 1226a and 1226b or 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, 1210b, 1220a, and 1220b is described, and thus a detailed description thereof will not be provided here.

[0180] According to an embodiment, the image decoding apparatus 100 may process the coding units in a specific order. Figure 7 The operations of processing the coding units in a specific order are described, and thus a detailed description thereof will not be provided here. Fig.12 , the image decoding device 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 device 100 may determine the processing order of the third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d based on the division method of the first coding unit 1200.

[0181] According to an embodiment, the image decoding device 100 may determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and may process the third coding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.

[0182] According to an embodiment, the image decoding device 100 may determine 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 may process the third coding units 1226a, 1226b, 1226c, and 1226d in the following processing order 1227: first, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.

[0183] Reference Fig.12 , square third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d can 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 dividing the first coding unit 1200 in the vertical direction are different from the second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c and 1216d and 1226a, 1226b, 1226c and 1226d divided from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b ultimately show the same shaped coding units divided from the first coding unit 1200. In this way, by recursively splitting the coding units in different ways based on the division shape pattern information, even if the coding units are finally determined to have the same shape, the image decoding apparatus 100 may process the plurality of coding units in different orders.

[0184] Fig.13 A process of determining a depth of a coding unit is illustrated as a shape and size of a coding unit changes when a coding unit is recursively split so that a plurality of coding units are determined according to an embodiment.

[0185] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a specific criterion. For example, the specific criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being divided is 2n (n>0) times the length of the long side of the current coding unit after being divided, the image decoding device 100 may determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before being divided. In the following description, a coding unit with an increased depth is represented as a coding unit of a deeper depth.

[0186] Reference Fig.13 According to an embodiment, the image decoding device 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 by 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 by 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.

[0187] According to an embodiment, the image decoding device 100 can determine a second coding unit 1312 or 1322 and a 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).

[0188] The image decoding device 100 may determine the second coding unit 1302, 1312, or 1322 by dividing 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 device 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1322 having a size of N×N / 2 by dividing the first coding unit 1310 in the horizontal direction, or may determine the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1310 in the horizontal and vertical directions.

[0189] According to an embodiment, the image decoding device 100 may determine the second coding unit 1302, 1312, or 1322 by dividing 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 device 100 may determine the second coding unit 1302 having a size of N×N or the second coding unit 1312 having a size of N / 2×N by dividing the first coding unit 1320 in a vertical direction, or may determine the second coding unit 1322 having a size of N×N / 2 by dividing the first coding unit 1320 in horizontal and vertical directions.

[0190] According to an embodiment, the image decoding device 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 device 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.

[0191] According to an embodiment, the image decoding device 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 1312 having a size of N / 2×N. That is, the image decoding device 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1312 in the horizontal direction, or may determine the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1312 in the vertical and horizontal directions.

[0192] According to an embodiment, the image decoding device 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 1322 having a size of N×N / 2. That is, the image decoding device 100 may determine the third coding unit 1304 having a size of N / 2×N / 2 or the third coding unit 1314 having a size of N / 4×N / 2 by dividing the second coding unit 1322 in the vertical direction, or may determine the third coding unit 1324 having a size of N / 2×N / 4 by dividing the second coding unit 1322 in the vertical direction and the horizontal direction.

[0193] According to an embodiment, the image decoding device 100 may split the square coding unit 1300, 1302, or 1304 in the horizontal direction or the vertical direction. For example, the image decoding device 100 may determine the first coding unit 1310 having a size of N×2N by splitting the first coding unit 1300 having a size of 2N×2N in the vertical direction, or may determine the first coding unit 1320 having a size of 2N×N by splitting the first coding unit 1300 in the 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 the horizontal direction or the vertical direction may be the same as the depth of the first coding unit 1300.

[0194] 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.

[0195] 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 between coding units according to an embodiment are illustrated.

[0196] 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 device 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 device 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.

[0197] 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-based 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-based first coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b may have the same depth, for example, D. However, when the image decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c and 1406d based on the division shape pattern information, because the length of the side of the square second coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 of the length of the side of the first coding unit 1400, the depth of the second coding units 1406a, 1406b, 1406c and 1406d can be D+1 which is 1 deeper than the depth D of the first coding unit 1400.

[0198] According to an embodiment, the image decoding device 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 device 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.

[0199] According to an embodiment, the depth of the second coding units 1412a and 1412b and 1414a, 1414b and 1414c or 1422a and 1422b and 1424a, 1424b and 1424c determined based on the division shape pattern information of the non-square first coding unit 1410 or 1420 may be determined based on the 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 of the 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.

[0200] In addition, the image decoding device 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 mode 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 device 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 .

[0201] According to an embodiment, when the odd-numbered split coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for identifying the split coding units based on a size ratio between the coding units. Fig.14 , the width of the coding unit 1414b at the center position among the odd-numbered divided coding units 1414a, 1414b, and 1414c may be equal to the width of the other coding units 1414a and 1414c and its height may be twice the height of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the center position may include two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the center position is 1 based on the scanning order, the PID of the coding unit 1414c located adjacent to the coding unit 1414b may increase by 2 and may thus be 3. That is, there may be discontinuity in the PID value. According to an embodiment, the image decoding device 100 may determine whether the odd-numbered divided coding units do not have equal sizes based on whether there is discontinuity in the PID for identifying the divided coding units.

[0202] According to an embodiment, the image decoding device 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 device 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 device 100 may use a PID indicating each coding unit in order to identify each coding unit. According to an embodiment, the PID may be obtained from a sample point at a specific position of each coding unit (e.g., an upper left sample point).

[0203] According to an embodiment, the image decoding device 100 may determine a coding unit at a specific 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 device 100 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 may compare the PIDs of the odd-numbered divided coding units to determine a coding unit at a center position among the odd-numbered divided coding units. The image decoding device 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 thereof may be twice the height of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located 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 device 100 may determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units include coding units having sizes different from those of the 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 device 100 may divide the current coding unit in such a manner that the coding unit at a specific 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 device 100 may determine the coding units at the center position having different sizes by using the PIDs of the coding units. However, the PID and the size or position of the coding unit at a specific position are not limited to the above examples, and various PIDs and various positions and sizes of the coding unit may be used.

[0204] According to an embodiment, the image decoding apparatus 100 may use a specific data unit in which a coding unit starts to be recursively split.

[0205] Fig.15 It is illustrated that a plurality of coding units are determined based on a plurality of specific data units included in a picture according to an embodiment.

[0206] According to an embodiment, a specific data unit may be defined as a data unit in which a coding unit is recursively divided starting by using division shape pattern information. That is, the specific data unit may correspond to a coding unit for determining a highest depth of a plurality of coding units divided from a current picture. In the following description, for ease of description, a specific data unit is referred to as a reference data unit.

[0207] According to an embodiment, the reference data unit may have a specific size and a specific size shape. According to an embodiment, the reference coding unit may include M×N samples. Here, M and N may be equal to each other and may be an integer represented as a power of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of coding units.

[0208] According to an embodiment, the image decoding device 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding device 100 may divide the plurality of reference data units divided from the current picture by using the division shape pattern information for each reference data unit. The operation of dividing the reference data unit may correspond to the division operation using a quadtree structure.

[0209] According to an embodiment, the image decoding device 100 may predetermine the minimum size allowed for the reference data unit included in the current picture. Therefore, the image decoding device 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.

[0210] 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.

[0211] According to an embodiment, the receiver 110 of the image decoding device 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.

[0212] According to an embodiment, the image decoding device 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 specific condition. That is, the receiver 110 may obtain only a PID for identifying the size and shape of the reference coding unit for each slice, slice segment, tile, tile group, or maximum coding unit from a bitstream, wherein each slice, slice segment, tile, tile group, or maximum coding unit is a data unit (e.g., a data unit having a size equal to or smaller than a slice) among various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) that satisfies a specific condition. The image decoding device 100 may determine the size and shape of the reference data unit for each data unit that satisfies the specific 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 sizes and shapes of the reference coding units that is predetermined based on the PID.

[0213] According to an embodiment, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the picture may include one or more reference coding units, and the coding unit may be determined by recursively dividing each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit may be obtained by dividing the maximum coding unit n times based on a quadtree structure. That is, according to various embodiments, the image decoding device 100 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and the reference coding unit may be divided based on at least one of the block shape information and the division shape mode information.

[0214] Fig.16 A processing block serving as a criterion for determining an order of reference coding units included in the picture 1600 according to an embodiment is illustrated.

[0215] 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 various types of orders for determining 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 above scanning order.

[0216] According to an embodiment, the image decoding device 100 may obtain processing block size information and may determine the size of one or more processing blocks included in a picture. The image decoding device 100 may obtain processing block size information from a bitstream and may determine the size of one or more processing blocks included in a picture. The size of the processing block may be a specific size of a data unit indicated by the processing block size information.

[0217] 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 or 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.

[0218] According to an embodiment, the image decoding device 100 may determine the size of the processing blocks 1602 and 1612 included in the picture 1600. For example, the image decoding device 100 may determine the size of the processing block based on the processing block size information obtained from the bitstream. Fig.16 According to an embodiment, the image decoding device 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 device 100 may determine the determination order of one or more reference coding units in one or more processing blocks.

[0219] According to an embodiment, the image decoding device 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 the determination order of one or more reference coding units in the processing blocks 1602 and 1612. According to an embodiment, determining the reference coding unit may include determining the size of the reference coding unit.

[0220] According to an embodiment, the image decoding device 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.

[0221] According to an embodiment, the image decoding device 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.

[0222] According to an embodiment, the image decoding device 100 may determine one or more reference coding units based on the determined order.

[0223] 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 device 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.

[0224] According to an embodiment, the image decoding device 100 may decode the determined one or more reference coding units. The image decoding device 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.

[0225] 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 a division method of the current coding unit from a bitstream, and may use the obtained information. The division shape pattern information may be included in a 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 a bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element.

[0226] Hereinafter, a method of determining a division rule according to an embodiment of the present disclosure will be described in detail.

[0227] The image decoding device 100 may determine a division rule of an image. The division rule may be predetermined between the image decoding device 100 and the image encoding device 1700. The image decoding device 100 may determine a division rule of an image based on information obtained from a bitstream. The image decoding device 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 device 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.

[0228] The image decoding device 100 may determine the division rule based on the block shape of the coding unit. The block shape may include the size, shape, aspect ratio, and direction of the coding unit. The image encoding device 1700 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 1700.

[0229] The shape of the coding unit may include a square and a non-square. When the width and height of the coding unit are the same, the image decoding device 100 may determine the shape of the coding unit as a square. In addition, when the width and height of the coding unit are different, the image decoding device 100 may determine the shape of the coding unit as a non-square.

[0230] The size of the coding unit may include various sizes such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, and up to 256×256. The size of the coding unit may be classified based on the length of the long side, 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 having the same length of the long side as having the same size. In addition, the image decoding device 100 may apply the same division rule to the coding units having the same length of the long side.

[0231] The aspect ratio of the coding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, 1:32, etc. In addition, the direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the length of the width of the coding unit is longer than the length of its height. The vertical direction may indicate a case where the length of the width of the coding unit is shorter than the length of its height.

[0232] The image decoding device 100 may adaptively determine the division rule based on the size of the coding unit. The image decoding device 100 may determine the allowable division shape mode differently based on the size of the coding unit. For example, the image decoding device 100 may determine whether the division is allowed based on the size of the coding unit. The image decoding device 100 may determine the division direction according to the size of the coding unit. The image decoding device 100 may determine the allowable division type according to the size of the coding unit.

[0233] The division rule determined based on the size of the coding unit may be a division rule determined in advance between the image encoding device 1700 and the image decoding device 100. In addition, the image decoding device 100 may determine the division rule based on information obtained from a bitstream.

[0234] The image decoding device 100 may adaptively determine a split rule based on a location of a coding unit. The image decoding device 100 may adaptively determine a split rule based on a location of a coding unit in an image.

[0235] In addition, the image decoding device 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 the same block shape. The coding units generated via different division paths may have different decoding processing orders. As has been mentioned above, Fig.12 The decoding process order is described, so its details are not provided again.

[0236] Will refer to Figures 17 to 20 A video encoding or decoding method and apparatus are described according to an embodiment for determining an intra-frame prediction mode of a current block by using an MPM of the current block and an extended intra-frame mode set configured based on the MPM, wherein the MPM of the current block is determined based on a prediction mode of a left neighboring block adjacent to the left side of the current block, a prediction mode of an upper neighboring block adjacent to the top of the current block, and a prediction mode of a right neighboring block adjacent to the right side of the current block.

[0237] Fig.17 is a block diagram of a video encoding apparatus according to an embodiment.

[0238] Intra prediction is a prediction method using only spatial references, and refers to a method of predicting a current block by referring to samples around the block to be encoded. Neighboring reference samples used for intra prediction refer to luminance values ​​reconstructed through prediction and reconstruction. Intra prediction is particularly effective for flat areas with continuity and areas with constant directivity.

[0239] The video encoding device 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 device 1700 according to the embodiment may be performed with a separate processor, or may be performed under the control of a central processor. In addition, the memory 1710 of the video encoding device 1700 may store external data, data generated by the processor (for example, MPM information and extended intra mode set information (or possible intra mode set (PIMS) information), etc.).

[0240] The processor 1720 of the video encoding device 1700 can perform intra-frame prediction on the current block to generate MPM information indicating whether to use the MPM of the current block, generate extended intra-frame mode set information indicating whether to use the extended intra-frame mode set configured based on the MPM, and encode the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is determined based on at least two of the prediction mode of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block.

[0241] In the following, reference will be made to Fig.18 The detailed operation of the video encoding method of MPM information and extended intra-frame mode set information performed by the video encoding device 1700 according to the embodiment is described, wherein the MPM information indicates whether to use the MPM of the current block determined based on the prediction mode of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block, and the extended intra-frame mode set information indicates whether to use the extended intra-frame mode set based on the MPM configuration.

[0242] Fig.18 is a flowchart of a video encoding method according to an embodiment.

[0243] Reference Fig.18 In operation S1810, the video encoding device 1700 may perform intra-frame prediction on the current block to generate MPM information indicating whether to use the MPM of the current block, wherein the MPM of the current block is determined based on at least two of the prediction mode of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block.

[0244] According to an embodiment, when a right neighboring block adjacent to the right side of a current block is pre-encoded and thus available, an MPM may be determined by using the right and upper neighboring blocks of the current block instead of the left and upper neighboring blocks of the current block.

[0245] In addition, when the left neighboring block, the upper neighboring block, and the right neighboring block of the current block are all available and the number of MPMs is fixed to 2, only the intra-frame prediction modes of two of the three blocks can be used, or the intra-frame prediction modes of two of the three blocks can be selectively used. Specifically, when the intra-frame prediction mode of the right neighboring block is available, the intra-frame prediction mode of the left neighboring block or the upper neighboring block is not available, or the intra-frame prediction modes of the left neighboring block and the upper neighboring block are the same as each other, the intra-frame prediction mode of the right neighboring block can be used as the MPM.

[0246] According to an embodiment, when the intra prediction modes of the left neighboring block, the upper neighboring block, and the right neighboring block are all different from each other, the intra prediction mode that is statistically more frequently selected in the neighboring blocks may be selected as the MPM. Alternatively, without signaling, two more similar intra prediction modes among the intra prediction modes of the three neighboring blocks may be selected as the MPM, or two intra prediction modes with smaller residual values ​​may be selected as the MPM through the sum of transform differences (SATD) or rate distortion optimization (RDO) calculation.

[0247] When referring to the following Fig.22a According to the described check of availability of reference samples, when the intra prediction modes of the left neighboring block, the upper neighboring block, and the right neighboring block are available, the number of MPMs may be changed to three and the three MPMs may be used.

[0248] In operation S1830, the video encoding device 1700 may generate extended intra mode set information indicating whether an extended intra mode set configured based on the MPM is used.

[0249] The method of increasing the number of MPMs as the number of intra prediction modes increases has limitations in improving performance. Therefore, in order to improve the efficiency of mode signaling, the PIMS that may be selected as the intra prediction mode of the current block among the intra prediction modes that are not selected as MPMs may be configured separately. Figures 31a to 31c Describes the detailed method of configuring PIMS.

[0250] In this specification, the terms "extended intra mode set" or "PIMS" have the same meaning and may be used interchangeably.

[0251] In operation S1850, MPM information and extended intra mode set information may be encoded.

[0252] According to an embodiment, the determination of the MPM and the configuration of the PIM may be determined by SATD or RDO calculation.

[0253] According to an embodiment, MPM information indicating whether the MPM is used and PIMS information indicating whether the PIMS is used may be determined through SATD or RDO calculation.

[0254] According to an embodiment, after checking the MPM information indicating whether to use the MPM, the PIMS information indicating whether to use the PIMS is checked. When the PIMS flag indicating the PIMS information is 1, the log is allocated to the PIMS. 2 (N) bits (N represents the number of candidates for PIMS) are used to perform encoding.

[0255] According to an embodiment, the PIMS may use unary coding or truncated unary coding according to the number and probability of the PIMS so that the amount of bits is reduced.

[0256] According to an embodiment, the same bits are allocated to the PIM, and encoding may be efficiently performed by using context modeling for each bit.

[0257] According to an embodiment, when an intra prediction mode other than MPM or PIMS is selected, encoding may be efficiently performed by allocating bits only to the remaining modes other than MPM and PIMS.

[0258] According to an embodiment, the block unit flag may be used like the MPM, or whether only the MPM is used or whether both the MPM and the PIM are used may be determined according to the total number of images or modes used.

[0259] According to an embodiment, a flag indicating whether PIMS is used may be transmitted in units of frames.

[0260] According to an embodiment, whether to use PIMS and the number of PIMS may be differently applied according to the size of a block.

[0261] According to the embodiment, the following reference can be made Fig.22a The described availability check results are applied differently depending on whether PIMS are used and the number of PIMS.

[0262] Fig.19 and Fig. 20 1 is a block diagram of a video decoding device according to an embodiment and a flowchart of a video decoding method according to an embodiment, both of which correspond to the above-mentioned video encoding device and video encoding method, respectively.

[0263] Fig.19 is a block diagram of a video decoding apparatus according to an embodiment.

[0264] The video decoding device 1900 according to an embodiment may include a memory 1910 and at least one processor 1920 connected to the memory 1910. The operation of the video decoding device 1900 according to the embodiment may be performed with a separate processor, or may be performed under the control of a central processor. In addition, the memory 1910 of the video decoding device 1900 may store external data, data generated by the processor (e.g., MPM information and extended intra mode set information (or PIMS information), etc.).

[0265] The processor 1920 of the video decoding device 1900 can obtain MPM information indicating whether to use the MPM of the current block, obtain extended intra-frame mode set information indicating whether to use the extended intra-frame mode set configured based on the MPM, and determine the intra-frame prediction mode of the current block based on the MPM information and the extended intra-frame mode set information, wherein the MPM of the current block is determined based on at least two of the prediction mode of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block.

[0266] Hereinafter, when the video decoding apparatus 1900 determines the intra prediction mode, reference will be made to Fig. 20 The detailed operation of a video decoding method using MPM information and extended intra-frame mode set information is described in detail, wherein the MPM information indicates whether to use an MPM based on neighboring blocks adjacent to the left, top and right sides of a current block, and the extended intra-frame mode set information indicates whether to use an extended intra-frame mode set based on an MPM configuration.

[0267] Fig. 20 is a flowchart of a video decoding method according to an embodiment.

[0268] Reference Fig. 20 In operation S2010, the video decoding device 1900 may obtain MPM information indicating whether to use the MPM of the current block, wherein the MPM of the current block is determined based on at least two of the prediction modes of the left neighboring block adjacent to the left side of the current block, the prediction mode of the upper neighboring block adjacent to the upper side of the current block, and the prediction mode of the right neighboring block adjacent to the right side of the current block.

[0269] According to an embodiment, when the left neighboring block and the upper neighboring block are available, the MPM of the current block may be determined as the intra prediction mode of the left neighboring block and the upper neighboring block.

[0270] According to an embodiment, when the right neighboring block and the upper neighboring block are available, the MPM of the current block may be determined as the intra prediction mode of the right neighboring block and the upper neighboring block.

[0271] According to an embodiment, when the left, above, and right neighboring blocks are all available and the intra prediction modes of the three neighboring blocks are different from each other, the MPM of the current block may be determined as the intra prediction modes of the three neighboring blocks.

[0272] According to an embodiment, when the left neighboring block, the upper neighboring block, and the right neighboring block are all available and there are neighboring blocks with the same intra-frame prediction mode, the MPM of the current block may be determined as the intra-frame prediction mode of the neighboring block with the same intra-frame prediction mode and the intra-frame prediction mode of other neighboring blocks. For example, when the intra-frame prediction modes of the left neighboring block and the upper neighboring block are the same as each other, the MPM of the current block may be determined as the intra-frame prediction mode of the left neighboring block and the intra-frame prediction mode of the right neighboring block.

[0273] According to an embodiment, when the preset number of MPMs of the current block is two and the left neighboring block, the upper neighboring block, and the right neighboring block are all available, the MPM of the current block may be determined by using the intra prediction modes of two blocks selected from the left neighboring block, the upper neighboring block, and the right neighboring block. The intra prediction modes of the selected two blocks may be intra prediction modes statistically more frequently selected from the neighboring blocks.

[0274] According to an embodiment, when the preset number of MPMs of the current block is two, the right neighboring block is available, and only one of the left neighboring block and the upper neighboring block is available, the MPM of the current block can be determined by using the intra-frame prediction mode of the right neighboring block and the intra-frame prediction mode of the available one of the upper neighboring block and the right neighboring block.

[0275] In operation S2030, extended intra mode set information indicating whether an extended intra mode set configured based on an MPM is used may be obtained.

[0276] According to an embodiment, when the MPM of the current block includes intra prediction modes of the left neighboring block, the upper neighboring block, and the right neighboring block, an extended intra mode set may be configured by using the MPM of the current block. Specifically, the extended intra mode set may include intra prediction modes having an index close to the index of the MPM.

[0277] According to an embodiment, when the MPM of the current block includes the intra prediction mode of the left neighboring block and the upper neighboring block, the extended intra mode set can be configured by using the MPM of the current block and the prediction mode of the right neighboring block. For example, although the MPM is determined as the intra prediction mode of the left neighboring block and the upper neighboring block, the right neighboring block having a high correlation with the mode of the current block is available. Therefore, the extended intra mode set can be configured by using the intra prediction mode of the right neighboring block.

[0278] According to an embodiment, an extended intra mode set may be configured according to the type of MPM of the current block. Specifically, the number of modes constituting the extended intra mode set may be determined differently according to a case where all MPMs are non-directional modes, a case where all MPMs are directional modes, and a case where both non-directional modes and directional modes exist. When all MPMs are non-directional modes, the extended intra mode set may include fewer modes, and may include a non-directional mode, a diagonal mode, a horizontal mode, or a vertical mode that is not included in the MPM.

[0279] According to an embodiment, when the left neighboring block, the upper neighboring block and the right neighboring block are all available and the prediction modes of the left neighboring block, the upper neighboring block and the right neighboring block are different directional modes, the extended intra-frame mode set may include an intra-frame prediction mode whose index is increased by N from the index of the intra-frame prediction mode of the left neighboring block, an intra-frame prediction mode whose index is decreased by N from the index of the intra-frame prediction mode of the left neighboring block, an intra-frame prediction mode whose index is increased by M from the index of the intra-frame prediction mode of the upper neighboring block, an intra-frame prediction mode whose index is decreased by M from the index of the intra-frame prediction mode of the upper neighboring block, an intra-frame prediction mode whose index is increased by L from the index of the intra-frame prediction mode of the right neighboring block, and an intra-frame prediction mode whose index is decreased by L from the index of the intra-frame prediction mode of the right neighboring block, wherein N, M and L may be integers other than zero.

[0280] According to an embodiment, when the preset number of MPMs of a block is two and the MPMs are a DC mode and a bilinear mode, the extended intra mode set may include a planar mode, a horizontal mode, a vertical mode, and a diagonal mode. Figures 24a to 24c Describes the bilinear mode.

[0281] According to an embodiment, when the preset number of MPMs of the current block is two and the MPMs are a DC mode and a directional mode, the extended intra mode set may include a bilinear mode, a planar mode, an intra prediction mode whose index is increased by 1 from the index of the directional mode, an intra prediction mode whose index is increased by 2 from the index of the directional mode, an intra prediction mode whose index is decreased by 1 from the index of the directional mode, an intra prediction mode whose index is decreased by 2 from the index of the directional mode, a first default mode and a second default mode, and the first default mode and the second default mode may be preset intra prediction modes. The "default mode" may be determined from a list that sequentially lists intra prediction modes with a statistically high probability of being selected. For example, when the MPM is a DC mode and an intra prediction mode with an index of 57, the extended intra mode set may include a bilinear mode, a planar mode, modes with indices 55, 56, 58 and 59, respectively, a default mode [0], and a default mode [1].

[0282] According to an embodiment, when the preset number of MPMs of the current block is two and the MPMs are the first directional mode and the second directional mode, the extended intra-frame mode set may include an intra-frame prediction mode whose index increases by 1 from the index of the first directional mode, an intra-frame prediction mode whose index decreases by 1 from the index of the first directional mode, an intra-frame prediction mode whose index increases by 1 from the index of the second directional mode, an intra-frame prediction mode whose index decreases by 1 from the index of the second directional mode, a horizontal mode, a vertical mode, a DC mode, and a bilinear mode. For example, when the MPMs are intra-frame prediction modes with indexes 30 and 40, the extended intra-frame mode set may include modes with indexes 29, 31, 39, and 41, a vertical mode, a horizontal mode, a DC mode, and a bilinear mode.

[0283] According to an embodiment, when the MPM is a DC mode and a first direction mode as intra prediction modes of a left neighboring block and an upper neighboring block, and the prediction mode of a right neighboring block that is not determined as an MPM is a second direction mode, the extended intra mode set may include a bilinear mode, a planar mode, a second direction mode, an intra prediction mode whose index increases by 1 from an index of the first direction mode, an intra prediction mode whose index decreases by 1 from an index of the first direction mode, an intra prediction mode whose index increases by 1 from an index of the second direction mode, an intra prediction mode whose index decreases by 1 from an index of the second direction mode, and a default mode. The default mode may be a preset intra prediction mode. For example, when the MPM is a DC mode and a mode with an index of 57, and the intra prediction mode of the right neighboring block is 40, the extended intra mode set may include a bilinear mode, a planar mode, modes with indexes 40, 56, 58, 39, and 41, and a default mode [0].

[0284] According to an embodiment, when the MPM is the first directional mode and the second directional mode as the intra prediction modes of the left neighboring block and the upper neighboring block, and the prediction mode of the right neighboring block not used as the MPM is the third directional mode, the extended intra mode set may include the third directional mode, the intra prediction mode whose index increases by 1 from the index of the first directional mode, the intra prediction mode whose index decreases by 1 from the index of the first directional mode, the intra prediction mode whose index increases by 1 from the index of the second directional mode, the intra prediction mode whose index decreases by 1 from the index of the second directional mode, the intra prediction mode whose index increases by 1 from the index of the third directional mode, and the intra prediction mode whose index decreases by 1 from the index of the third directional mode. For example, when the indexes of the MPM are 40 and 57, and the index of the intra prediction mode of the right neighboring block is 55, the extended intra mode set may include intra prediction modes having indexes 55, 39, 41, 53, 54, 56, 58, and 59.

[0285] In operation S2050, an intra prediction mode of the current block may be determined based on the MPM information and the extended intra mode set information.

[0286] Specifically, when the MPM information about whether to use the MPM indicates that the MPM is used, one of the intra-frame prediction modes of the MPM may be determined as the intra-frame prediction mode of the current block. When the MPM information indicates that the MPM is not used and the extended intra-frame mode set information indicates that the extended intra-frame mode set is used, one of the intra-frame prediction modes included in the extended intra-frame mode set may be determined as the intra-frame prediction mode of the current block. When the extended intra-frame mode set information indicates that the extended intra-frame mode set is not used, one of the remaining intra-frame prediction modes except the MPM and the modes included in the extended intra-frame mode set may be determined as the intra-frame prediction mode of the current block. The following will refer to Fig.32a The syntax for operation S2050 is described.

[0287] In addition to the MPM, an extended intra-frame mode set is also configured. Therefore, in intra-frame prediction, the case where the MPM other than the accurate mode is selected according to the mode coding efficiency can be supplemented so that the prediction accuracy is improved. Because the information of the right neighboring block is additionally added, candidates can be provided by allocating a small number of bits to various intra-frame prediction modes. Therefore, the mode coding efficiency can be improved.

[0288] The following will refer to Fig.21 and Fig.22a A method of determining whether a left neighboring block, an upper neighboring block, and a right neighboring block are available is described.

[0289] Fig.21 is a diagram for describing a maximum coding unit and an encoding order of coding units included in the maximum coding unit.

[0290] The maximum coding unit 2150 is divided into a plurality of coding units 2156, 2158, 2160, 2162, 2168, 2170, 2172, 2174, 2180, 2182, 2184, and 2186. The maximum coding unit 2150 corresponds to the highest node 2100 of the tree structure. The coding units 2156, 2158, 2160, 2162, 2168, 2170, 2172, 2174, 2180, 2182, 2184, and 2186 correspond to a plurality of nodes 2106, 2108, 2110, 2112, 2118, 2121, 2122, 2124, 2130, 2132, 2134, and 2136, respectively. The upper coding order flags 2102, 2114, and 2126 indicating the coding order in the tree structure correspond to arrows 2152, 2164, and 2176, respectively, and the lower coding order flags 2104, 2116, and 2128 correspond to arrows 2154, 2166, and 2178, respectively.

[0291] The upper coding order flag indicates the coding order of the two coding units located at the upper end of the four coding units divided from one coding unit. When the upper coding order flag is 0, the coding is performed in the forward direction. On the contrary, when the upper coding order flag is 1, the coding is performed in the reverse direction.

[0292] Similarly, the lower coding order flag indicates the coding order of the two coding units located at the lower end of the four coding units divided from one coding unit. When the lower coding order flag is 0, the coding is performed in the forward direction. On the contrary, when the lower coding order flag is 1, the coding is performed in the reverse direction.

[0293] For example, because the upper coding order flag 2114 is 0, the coding order of the coding units 2168 and 2170 is determined to be in the direction from left to right, that is, in the forward direction. Because the lower coding order flag 2116 is 1, the coding order of the coding units 2172 and 2174 is determined to be in the direction from right to left, that is, in the reverse direction.

[0294] According to an embodiment, the upper coding order flag and the lower coding order flag may be set to have the same value. For example, when the upper coding order flag 2102 is determined to be 1, the lower coding order flag 2104 corresponding to the upper coding order flag 2102 may also be determined to be 1. Because the values ​​of the upper coding order flag and the lower coding order flag are determined to be 1 bit, the amount of information of the coding order information is reduced.

[0295] According to an embodiment, the upper coding order flag and the lower coding order flag of the current coding unit may be determined by referring to at least one of the upper coding order flag and the lower coding order flag applied to the coding unit larger than the current coding unit. For example, the upper coding order flag 2126 and the lower coding order flag 2128 applied to the coding units 2180, 2182, 2184, and 2186 may be determined based on the lower coding order flag 2116 applied to the coding units 2172 and 2174. Therefore, the upper coding order flag 2126 and the lower coding order flag 2128 may be determined to be the same value as the coding order flag 2116. Since the values ​​of the upper coding order flag and the lower coding order flag are determined from the higher coding unit of the current coding unit, the coding order information is not obtained from the bitstream. Therefore, the amount of information of the coding order information is reduced.

[0296] According to an embodiment, whether to obtain a coding order flag for a block may be determined according to the size or depth of the block. For example, a coding order flag may be obtained only for a block of a preset size, and a coding order flag may not be obtained for blocks of other sizes. When the current block is larger than a block of a preset size, the coding order may be determined to be in a forward direction without obtaining a coding order flag. When the current block is smaller than a block of a preset size, the coding order may be determined according to a higher block of the current block without obtaining a coding order flag. The size of the block for which the coding order flag is obtained may be arbitrarily determined. For example, the size of the block for which the coding order flag is obtained may be determined to be 16×16 and 32×32.

[0297] Fig.22a An intra prediction method according to whether a neighboring block is reconstructed is shown.

[0298] According to the above reference Fig.21 The coding order described changes the position of the reference block available in the current block. The position of the currently available reference block can be classified by availability check. Specifically, the position of the currently available reference block can be classified into LR_10 2200, LR_01 2210, LR_11 2220, and LR_00 2230, where L indicates left, R indicates right, and 0 or 1 indicates whether it can be referenced.

[0299] The cases of LR_01 2210 and LR_11 2220 are embodiments not used in the related art. In particular, the case of LR_11 2220 can use more information than before. Therefore, it is necessary to improve the algorithm for the case where all left, top and right sides are available. Figure 22b Describe the improved algorithm.

[0300] The first embodiment 2200 is an intra prediction method when the upper block and the left block are reconstructed earlier than the current block 2201 according to the decoding order. In the first embodiment 2200, the upper reference sample 2202, the upper right reference sample 2203, the left reference sample 2204, and the lower left reference sample 2205 can be used for intra prediction. The first embodiment 2200 occurs in a conventional video decoding method that does not switch the decoding order, and the current block 2201 is predicted according to the conventional intra prediction method.

[0301] The second embodiment 2210 is an intra prediction method when the upper block and the right block are reconstructed earlier than the current block 2201 according to the decoding order. In the second embodiment 2210, the upper reference sample 2212, the upper left reference sample 2213, the right reference sample 2214, and the lower right reference sample 2215 can be used for intra prediction. Because the second embodiment 2210 is bilaterally symmetric with the first embodiment 2200, the intra prediction method according to the second embodiment 2210 is bilaterally symmetric with the intra prediction method according to the first embodiment 2200. For example, when the horizontal mode is applied to the current block, the left reference sample 2204 is referenced in the first embodiment 2200, and the right reference sample 2214 is referenced in the second embodiment 2210. Similarly, the intra prediction method according to other directional intra modes and planar modes of the second embodiment 2210 can also be bilaterally symmetric with the intra prediction method according to other directional intra modes and planar modes of the first embodiment 2200.

[0302] The third embodiment 2220 is an intra prediction method when the upper block, the left block, and the right block are reconstructed earlier than the current block according to the decoding order. In the third embodiment 2220, the upper reference sample 2222, the left reference sample 2223, the right reference sample 2224, the lower left reference sample 2225, and the lower right reference sample 2226 may be used for intra prediction. In the third embodiment 2220, the left reference sample 2223 and the right reference sample 2224 may be used for prediction of the current block 2221. For example, when the horizontal mode is applied to the current block 2221, the video decoding device 1900 may predict the current block 2221 by using an average or weighted average of a first reference value obtained from the left reference sample 2223 and a second reference value obtained from the right reference sample 2224.

[0303] According to another embodiment, the video decoding apparatus 1900 may predict the current block 2221 of the third embodiment 2220 by using an average value of the first intermediate prediction value of the intra prediction method according to the first embodiment 2200 and the second intermediate prediction value of the intra prediction method according to the second embodiment 2210. For example, when the horizontal mode is applied to the current block 2221, the video decoding apparatus 1900 may obtain a final prediction value of the current block 2221 according to the third embodiment 2220 based on the first intermediate prediction value obtained from the left reference sample 2204 according to the intra prediction method of the first embodiment 2200 and the second intermediate prediction value obtained from the right reference sample 2214 according to the intra prediction method of the second embodiment 2210.

[0304] According to another embodiment, the video decoding device 1900 may predict the current block 2221 of the third embodiment 2220 by using one of the first prediction value of the intra prediction method according to the first embodiment 2200 and the second prediction value of the intra prediction method according to the second embodiment 2210. For example, when the horizontal mode is applied to the current block 2221, the video decoding device 1900 may obtain the final prediction value of the current block 2221 according to the third embodiment 2220 by using one selected from the first prediction value obtained from the left reference sample 2204 by the intra prediction method according to the first embodiment 2200 and the second prediction value obtained from the right reference sample 2214 by the intra prediction method according to the second embodiment 2210.

[0305] The fourth embodiment 2230 is an intra prediction method when only the upper block, the upper left block, and the upper right block are reconstructed earlier than the current block 2231. In the fourth embodiment 2230, the upper reference sample 2232, the upper left reference sample 2233, and the upper right reference sample 2234 may be used for intra prediction. Therefore, the intra prediction method that substantially uses the left reference sample 2235, the lower left reference sample 2236, the right reference sample 2237, and the lower right reference sample 2238 may not be used in the fourth embodiment 2230. For example, because the horizontal mode uses the left reference sample or the right reference sample, the horizontal mode may not be used in the fourth embodiment 2230.

[0306] In the fourth embodiment 2230, according to the decoding order, the reference samples adjacent to the current block 2231 are only the upper reference samples 2232. In addition, because the upper left reference samples 2233 and the upper right reference samples 2234 are spatially separated from the current block, the prediction accuracy may be lower than that of the other embodiments 2200, 2210, and 2220. Therefore, the intra prediction method used in the fourth embodiment 2230 is preferably a vertical mode using the reference samples 2232 of the upper block adjacent to the current block 2231 or a directional prediction mode in a direction adjacent to the vertical mode.

[0307] However, when the left reference sample 2235, the lower left reference sample 2236, the right reference sample and the lower right reference sample 2238 are filled based on the upper reference sample 2232, the upper left reference sample 2233 and the upper right reference sample 2234, the video decoding device 1900 can predict the current block 2231 of the fourth embodiment 2230 according to the intra-frame prediction method of the third embodiment 2220.

[0308] Figure 22b An improved algorithm for the case where a right neighboring block adjacent to the right side of the current block is available is shown.

[0309] Reference Figure 22b, when LR_11 indicating that the left side, top side and right side are all available is obtained through the availability check, the extended algorithm using all left reference blocks, top reference blocks and right reference blocks is applied. When LR_01 indicating that the top side and right side are available is obtained, the extended algorithm using the top reference block and the right reference block is applied. In other cases (LR_00 and LR_10), the existing algorithm using the top reference block or the top reference block and the left reference block is applied.

[0310] Unlike the existing algorithm, since not the left reference block but the right reference block is available, an extended algorithm obtained by extending the existing algorithm in a bilaterally symmetric manner can be used. For example, a table obtained by flipping a filter or weight coefficient table left and right can be used.

[0311] According to an embodiment, in the case of LR_11, the left reference block and the right reference block are all available. Therefore, the left reference block and the right reference block can be used for more accurate prediction. Specifically, the left reference block and the right reference block can be used for prediction at the same ratio, or a weight can be calculated according to a distance (distance difference) to perform a linear combination or a nonlinear combination and use it for prediction.

[0312] The availability of the reference block may be checked by an availability check of the reference block, and the reference block may be selectively used among the available reference blocks according to the intra mode of the current block. When the reference block is selectively used, the reference block to be used without signaling may be selected by using neighboring information. Alternatively, the reference block to be used may be determined by extending the intra mode and performing RDO.

[0313] according to Figure 22b , since the prediction method is determined according to the availability check result of the reference block, the extended algorithm can be used to replace the existing algorithm without separate signaling in LR_01 and LR_11 using the right reference block.

[0314] Reference Figure 21 to Figure 22b , prediction accuracy can be improved by differently using neighboring information including right reference samples, and since information to be used can be determined by availability check and does not need to be sent by signal, encoding efficiency can be improved.

[0315] Fig.23 An embodiment of intra prediction mode direction is shown.

[0316] Specifically, Fig.23 The vertical direction 2340 as the positive direction of the Y axis and the horizontal direction 2320 as the negative direction of the X axis in the intra-frame prediction direction of the intra-frame prediction mode respectively show the vertical mode and the horizontal mode of the intra-frame prediction mode. Fig.23A diagonal direction pattern 2350 on the first quadrant as the last direction in the intra prediction direction, a diagonal direction pattern 2310 on the third quadrant as the starting direction of the direction pattern, and a diagonal pattern 2330 perpendicular to the direction of the 45-degree direction pattern 2350 are shown. Fig.23 The direction of the direction mode 2350 in the intra prediction mode may be an angle direction other than the 45 degree direction.

[0317] According to an embodiment, 67 intra prediction modes may be provided. Specifically, the intra prediction mode may include a DC mode, a plane mode, and 65 directional modes. The intra prediction modes may be classified by indicating the index of the intra prediction mode as 0 to 66 (0 is the plane mode, 1 is the DC mode, and 2 to 66 are the directional modes).

[0318] Reference Fig.23 , the mode whose index of the intra prediction mode is 2 may be a direction mode 2310 in the opposite direction to the 45 degree direction mode 2350. The mode whose index of the intra prediction mode is 34 may be a diagonal mode 2330 perpendicular to the 45 degree direction mode 2350. The mode whose index of the intra prediction mode is 66 may be an intra prediction mode of the 45 degree direction 2350. The index of the horizontal mode 2320 which is the negative direction of the x-axis may be 18. The index of the vertical mode 2340 which is the positive direction of the y-axis may be 50.

[0319] Fig.24a shows a bilinear prediction mode using the left neighboring block and the upper neighboring block, Figure 24b shows a bilinear prediction mode using an upper neighboring block and a right neighboring block, and Fig.24c A bilinear prediction mode using a left neighboring block and a right neighboring block is shown.

[0320] The "bilinear prediction mode" is an intra prediction mode that generates a boundary value of a current block from a reference block and obtains a prediction value of a current pixel of the current block by a linear combination of the boundary values, and is a mode that is often selected together with the DC mode in intra prediction.

[0321] Reference Fig.24a , when the reference sample adjacent to the left side of the current block and the reference sample adjacent to the upper side of the current block are available, a virtual first pixel is generated by using the reference sample 2401 located at the upper right side of the current block, and a virtual second pixel is generated by using the reference sample 2402 located at the lower left side of the current block. Therefore, the pixels of the right boundary of the current block (the pixels 2403 of the vertical line including the first pixel) have the value of the first pixel, and the pixels of the lower boundary of the current block (the pixels 2404 of the horizontal line including the second pixel) have the value of the second pixel. Thereafter, a prediction value of the current pixel is generated by using linear interpolation in the horizontal direction and the vertical direction.

[0322] Reference Figure 24b , when the reference sample points adjacent to the right side of the current block and the reference sample points adjacent to the top side of the current block are available, Fig.24a Symmetrically, a virtual first pixel is generated by using a reference sample 2411 located at the upper left side of the current block, and a virtual second pixel is generated by using a reference sample 2412 located at the lower right side of the current block. Therefore, the pixels at the left boundary of the current block (the pixels 2413 of the vertical line including the first pixel) have the value of the first pixel, and the pixels at the lower boundary of the current block (the pixels 2414 of the horizontal line including the second pixel) have the value of the second pixel. Thereafter, a prediction value of the current pixel is generated by using linear interpolation in the horizontal and vertical directions.

[0323] Reference Fig.24c , when all reference samples adjacent to the left side of the current block and reference samples adjacent to the right side of the current block are available, the available reference samples can be used without separately generating a left boundary value or a right boundary value. In addition, a prediction value of a pixel 2423 included in a lower horizontal line including the second pixel is generated by using reference pixels on the lower left side 2421 and the lower right side 2422.

[0324] Fig.25 An example of multiple 4-tap filters for intra prediction is shown.

[0325] In the specification, a 4-tap filter is an example of an N-tap filter, and the N-tap filter is not limited to a 4-tap filter and includes various filters such as a 7-tap filter, an 8-tap filter, a 10-tap filter, and a 12-tap filter. Hereinafter, a 4-tap filter will be described as an example.

[0326] When performing intra prediction, a 4-tap filter having different strengths according to distance (position difference) is used instead of a 4-tap filter having one strength. Therefore, a prediction block can be efficiently generated without increasing complexity and prediction accuracy can be improved.

[0327] The distance as a criterion for changing the type of filter can be determined as a relative ratio proportional to the size of the block, or in the case of a specific filter, the type of filter can be determined as an absolute distance. When the type of filter is determined by an absolute distance, the number of filters used for a block can be changed. A small number of filters can be used for small blocks, and all filters can be used for large blocks.

[0328] In addition, one filter may be applied differently according to the size of the block. For example, when the size of the block is small, a smoothing filter to be used may be selected according to the intra prediction mode of the block.

[0329] After determining the type of the filter, when the right reference sample is available, the filter can be applied by flipping the preset filter determination direction in a bilaterally symmetrical manner. When the right reference sample is available, effective prediction can be performed by applying the strength of the filter differently according to the distance from the reference sample.

[0330] Reference Fig.25 , by using the reference sample a of the upper neighboring block according to the intra prediction direction of the intra prediction mode -1 、a 0 、a 1 and a 2 To predict the sample point p of the current prediction block x,y In this case, the filter coefficient f is determined differently according to the distance from the reference sample point. k,i A filter with a strong strength is applied to samples of an area 2510 in the prediction block farthest from the reference area, an interpolation filter with a weak or weakest strength is applied to samples of an area 2530 in the prediction block close to the reference area, and a filter with a medium strength is applied to samples of an area 2520 in the prediction block located in the middle relative to the reference area.

[0331] The syntax for applying different strengths of filtering depending on the distance from the reference sample can be implemented as in Equation 1:

[0332] [Equation 1]

[0333] MULTI_4T_FILTER_OFFSET==(i<2||j<2)? 0: ((i<4||j<4)?1: ((i<8||j<8)?2: ((i<16||j<16)?3∶4)));

[0334] Wherein, i and j represent the distances from the horizontal reference sample and the vertical reference sample, respectively, and 0 to 4 represent the type of 4-tap filter.

[0335] Fig.26 Another example of multiple 4-tap filters for intra prediction is shown.

[0336] When reference samples of neighboring reference blocks adjacent to the current block exist in various directions, all reference samples may be used, or only reference samples in one or two directions may be selectively used.

[0337] Fig.26 Show Fig.25 An example of being flipped in a bilaterally symmetrical manner. When all left and right reference samples are available, reference samples may be selectively used according to an intra prediction mode of a current prediction block, and the strength of the 4-tap filter may be changed according to a distance from the selected reference sample.

[0338] Reference Fig.25 and Fig.26 , the prediction accuracy can be improved in an area close to the reference sample point by using a plurality of N-tap filters, and a prediction block with a natural pattern can be generated in an area far from the reference sample point.

[0339] Fig.27a shows an example of a 4-tap filter for intra prediction, and Figure 27b Another example of a 4-tap filter for intra prediction is shown.

[0340] Reference Fig.27a , when both the left reference samples and the right reference samples are available and the intra prediction mode of the current block is the diagonal direction mode, one of the prediction block generated by using the left reference samples and the prediction block generated by using the right reference samples may be selected and used, or the average of the two prediction blocks may be used as the prediction block.

[0341] Reference Figure 27b , as mentioned above Fig.24a , Figure 24b and Fig.24c In the described bilinear mode, when both left reference samples and right reference samples are available, a prediction block may be generated according to the intra prediction mode of the current block by using the two reference samples.

[0342] Reference Fig.27a and Figure 27b , the prediction accuracy can be improved by using reference samples in various directions for the current block.

[0343] Fig.28 An example of boundary filtering of a prediction block is shown.

[0344] In the case where a prediction block is generated according to intra prediction, when the intra prediction mode is a directional mode, there may be unused reference samples according to the mode. In this case, discontinuity may occur between the generated prediction block and the reference samples. To solve this problem, the boundary of the prediction block may be filtered by using the reference samples.

[0345] Reference Fig.28 , when the direction of the direction mode in the intra prediction mode is selected as the direction from the upper left end to the lower right end, discontinuity between the prediction block and the right reference sample may occur in the area adjacent to the right reference sample. In this case, the discontinuity pattern can be reduced by smoothing the pixel line of the prediction block adjacent to the right reference sample. Specifically, when discontinuity occurs between the right reference sample and the prediction pixel located at the lower right end of the prediction block when the prediction pixel of the prediction block is generated in the direction from the upper left side to the lower right side by using the left reference sample and the upper reference sample, the discontinuity pattern can be reduced by using the reference sample at the lower right end. -1、a 0 and a 1 Apply a filter with coefficients f k,i Conversely, when discontinuity occurs between the left reference sample and the predicted pixel located at the lower left end of the prediction block when the predicted pixels of the prediction block are generated in the direction from the upper right side to the lower left side by using the right reference sample and the upper reference sample, the predicted pixels can be filtered by using the filter with Fig.28 Filtering is applied in a bilaterally symmetric manner to resolve discontinuities.

[0346] The area to which filtering is applied may be determined as one or two pixel lines adjacent to the reference sample of the prediction block, and may be determined differently according to the size of the block and the intra mode. Since the intra prediction mode may not be a directional mode but a DC mode, discontinuity may occur. Therefore, boundary filtering may be applied.

[0347] Reference Fig.28 , the discontinuity with neighboring blocks can be reduced by using more neighboring reference samples, and the occurrence of sudden prediction deviations can be compensated by generating prediction blocks with natural patterns, so that the efficiency of the conversion is improved.

[0348] Fig.29a shows the block index included in the coding unit, Fig.29b shows an example of the scanning order of coding units, Fig.29c Another example of a scanning order in a block diagram showing a coding unit, and Fig.29d A block diagram showing coding blocks indicating blocks included in a coding unit is shown.

[0349] Reference Fig.29a , a block index may be assigned to a sample of a block included in a coding unit.

[0350] Reference Fig.29b , in the scan according to Fig.29b In the case where the order of the arrows in occurs, when the block index of the reference block for the block index 32 of the current block is 26, there is a preprocessed value available, and therefore, it can be used for prediction.

[0351] However, referring to Fig.29c , when scanning according to Fig.29c The order of the arrows in the above occurs, and when the block index 26 of the reference block of the block index 32 of the current block is not encoded or reconstructed, it may not be determined as an available area. Therefore, it is necessary to generate a coding block map because it is impossible to determine all block indexes less than 32 as available areas.

[0352] Reference Fig.29d , the coding blocks in the current coding unit are indicated by gray. By generating a block diagram indicating the coding blocks in the coding unit, even in Fig.29cIn the case of , it is also possible to determine whether the area is available for block indexes less than 32.

[0353] Fig.30a A block showing application of a Split Unit Coding Order (SUCO) that changes the coding order from right to left, Fig.30b shows the scanning order of the coding units applying SUCO, Fig.30c shows an example of a coding block diagram, Fig.30d shows an example of a coding unit including a current block, and Fig.30e A block diagram illustrating a coding unit including a current block to which SUCO is applied.

[0354] Reference Fig.30a and Fig.30b , when existing block diagrams are used to include applications Fig.30a When the coding unit of the current block of SUCO is read, only the information about the left side is read. Therefore, although the information about the right side is available, the availability check may not be performed. However, as in Fig.30b In the scanning order of , since the reconstructed value is available when the block index is read, prediction can be performed by using the block index 48 as the reference sample. Fig.30c As shown in , a coding block diagram for applying SUCO can be generated. Specifically, when Fig.30e The display shown in Fig.30d When a block map of a coding unit of a current block is obtained, a reconstructed sample value located on the right may be used through availability check.

[0355] Reference Figures 29a to 30e , because a block map can be generated and used to check the availability of reference samples, and various encoding orders can be used by checking the availability, the efficiency of prediction can be improved.

[0356] Fig.31a shows the PIMS when the left neighboring block and the upper neighboring block of the current block are available, Fig.31b shows the PIMS when the right neighboring block and the upper neighboring block of the current block are available, and Fig.31c The PIMS is shown when the left neighboring block, the upper neighboring block, and the right neighboring block of the current block are all available.

[0357] Reference Fig.31a, when the intra prediction mode of the upper neighboring block 3120 adjacent to the upper side of the current block 3110 and the intra prediction mode of the left neighboring block 3130 adjacent to the left side of the current block 3110 are respectively the vertical mode and the horizontal mode, the MPM of the current block may be determined as the vertical mode and the horizontal mode, and the PIMS 3140 may include a mode having a high correlation with the MPM and close to the MPM among the modes existing between the vertical mode and the horizontal mode. For example, the PIMS 3140 may include an intra prediction mode whose index increases by 1 from the intra prediction mode index of the vertical mode, an intra prediction mode whose index increases by 2 from the intra prediction mode index of the vertical mode, an intra prediction mode whose index decreases by 2 from the intra prediction mode index of the horizontal mode, an intra prediction mode whose index decreases by 1 from the intra prediction mode index of the horizontal mode, and an intra prediction mode whose index is rounded up by averaging the intra prediction mode indexes of the vertical mode and the horizontal mode.

[0358] Reference Fig.31b , when the intra-frame prediction mode of the upper neighboring block 3160 adjacent to the upper side of the current block 3150 and the intra-frame prediction mode of the right neighboring block 3170 adjacent to the right side of the current block 3150 are respectively a vertical mode and a horizontal mode and the left neighboring block is not available, the MPM of the current block can be determined as a vertical mode and a horizontal mode by using the intra-frame prediction mode of the right neighboring block instead of the left neighboring block, and the PIMS 3140 may include a mode that has a high correlation with the MPM and is close to the MPM among the modes existing between the vertical mode and the horizontal mode.

[0359] Reference Fig.31c , the intra prediction mode of the left neighboring block 3102 adjacent to the left side of the current block 3101, the intra prediction mode of the upper neighboring block 3103 adjacent to the upper side of the current block 3101, and the intra prediction mode of the right neighboring block 3104 adjacent to the right side of the current block 3101 are different from each other, and all intra prediction modes of the three neighboring blocks may be used to configure the PIMS 3105. For example, the PIMS 3105 may include an intra prediction mode whose index is increased or decreased by N from the index of the intra prediction mode of the left neighboring block 3102, an intra prediction mode whose index is increased or decreased by M from the index of the intra prediction mode of the upper neighboring block 3103, and an intra prediction mode whose index is increased or decreased by L from the index of the intra prediction mode of the right neighboring block 3104. N, M, and L are integers other than zero.

[0360] As another example, when some intra prediction modes of three neighboring blocks are the same, the PIMS 3105 may be configured by using two different intra prediction modes. In addition, the PIMS 3105 may be configured so that an intra prediction mode having a direction similar to the same intra prediction mode is further included in the PIMS 3105. Specifically, when the index of the intra prediction mode of the left neighboring block 3102 and the right neighboring block 3103 is 37 and the index of the intra prediction mode of the upper neighboring block 3104 is 24, the PIMS 3105 may include intra prediction modes indexed as 34, 35, 36, 38, 39, 40, 23, and 25 or modes indexed as 35, 36, 38, 39, 23, and 25, a DC mode, or a bilinear mode.

[0361] Fig.32a shows the syntax of the flag indicating whether to use MPM and PIMS, and Figure 32b The syntax of PIMS is shown.

[0362] Reference Fig.32a , when the MPM flag is 1, intra prediction can be performed by using MPM. When the MPM flag is 0, the PIMS flag can be checked. When the PIMS flag is 1, intra prediction can be performed by using N preset modes of PIMS. When the PIMS flag is 0, intra prediction can be performed in one intra prediction mode among the remaining intra prediction modes. When the number of modes in the additional mode set is N, the PIMS flag can be set by allocating log 2 (N) bits are encoded and then signaled.

[0363] Figure 32b The syntax of PIMS encoding for configuring PIMS by using the intra prediction mode (right block mode) of the right neighboring block when the right neighboring block is available is shown. For example, in addition to the intra prediction modes mpm[0] and mpm[1] of the left neighboring block and the upper neighboring block as the traditional MPM, the intra prediction mode (right block mode) of the right neighboring block is also considered to configure PIMS.

[0364] Fig.33 An example of multi-parameter intra prediction is shown.

[0365] Reference Fig.33 , multi-parameter intra prediction is a prediction method that generates a new predicted pixel value by using reference pixels or predicted pixels located on the left and upper sides of the current pixel. By using such a method, the pattern of the prediction block is smoothed to improve the efficiency of prediction. Specifically, the predicted pixel (P HEVC [i, j]), the reference pixel or predicted pixel (P MPI[i-1, j]) and the reference pixel or predicted pixel (P MPI [i, j-1]) is applied to the following equation 2 (Multi-Parameter Intra (MPI)) (i and j represent the position of the pixel) to generate a new predicted pixel (P MPI [i, j]).

[0366] [Equation 2]

[0367] P MpI [i, j] = (αP HEVC [i, j]+βP MPI [i-1, j]+γP MPI [i, j-1]+4)>>3

[0368] When right reference samples are available, multi-parameter intra prediction can be used symmetrically.

[0369] In addition, when both the left and right sides are available, pixels close to the left relative to the center can use information about the left side, and pixels close to the right can use information about the right side. In this case, when discontinuity occurs, the discontinuity can be resolved by filtering the middle area or by using information about both sides.

[0370] As another example, a prediction block may be generated by using left and right reference samples and averaged, or a prediction block with better performance may be selected and used.

[0371] Fig.34a An example of a syntax showing multi-parameter prediction for intra prediction, and Fig.34b An example of the syntax of a multi-parameter prediction based on an availability check is shown.

[0372] Reference Fig.34a , after checking whether intra prediction is applied using MPM or PIMS, when multi-parameter prediction is required (when mpi_coded is 1), multi-parameter prediction (mpi_index()) can be applied.

[0373] Reference Fig.34b As a result of the availability check, when the right reference sample is available (avail_lr == LR_01||avail_lr == LR_11), multi-parameter prediction can be symmetrically applied.

[0374] Fig.35a shows an example of filtered reference samples for multi-combined intra prediction, and Fig.35b An example of applying multi-combination intra prediction is shown.

[0375] When a new predicted pixel is generated by multi-parameter intra prediction for a current pixel, filtering may not be applied in parallel due to an infinite impulse response (IIR) method that recursively uses a new predicted pixel of a previous pixel generated by multi-parameter intra prediction for a previous pixel. Therefore, a lot of time is wasted. To solve this problem, multi-combined intra prediction in which a reference sample is first filtered may be used.

[0376] Reference Fig.35a , in the multi-combined intra prediction, the reference samples are filtered to obtain the filtered reference samples. When the direction of filtering in the upper reference sample is from left to right, the filtered reference sample may be generated by combining the current reference sample with the left sample located on the left side of the current reference sample. Similarly, when the direction of filtering in the left reference sample is from bottom to top, the filtered reference sample may be generated by combining the current reference sample with the lower sample located on the lower side of the current reference sample using weighted averaging. In addition, the direction of filtering for generating the filtered reference sample may be predetermined. Specifically, in the case of LR_00 or LR_10, filtering may be performed from left to right and may be performed from top to bottom. In the case of LR_01, filtering may be performed from right to left and may be performed from top to bottom. In the case of LR_11, the upper reference sample may be filtered by using both the left pixel and the right pixel, and the left reference sample and the right reference sample may be filtered from top to bottom.

[0377] The filtering of the reference samples may be performed according to the filtering direction, as shown in Equation 3 below:

[0378] [Equation 3]

[0379]

[0380] Among them, j in the horizontal direction represents natural numbers in ascending order from left to right, and j in the vertical direction represents natural numbers in ascending order from top to bottom.

[0381] When the filtering direction is from left to right, the current reference sample a j and the sample point a located to the left of the current reference sample point j-1 Apply weights to filter the reference samples. When the filtering direction is from top to bottom, the current reference sample a j and the sample point a located above the current reference sample point j-1 Apply weights to filter the reference samples.

[0382] On the contrary, when the filtering direction is from right to left, the current reference sample a can be used to j and the sample point a located to the right of the current reference sample point j+1Apply weights to filter the reference samples. When the filtering direction is from bottom to top, the current reference sample a j and the sample point a located below the current reference sample point j+1 Apply weights to filter the reference samples.

[0383] Reference Fig.35b , a prediction block can be generated by using existing reference samples and filtered reference samples together.

[0384] In the multi-combination intra prediction method, when the right reference sample is available, it can be used by bilaterally symmetrically flipping Fig.35a and Fig.35b When both the left and right sides are available, only one of the two sides may be selected and used according to the position of the current pixel. When the position of the current pixel is close to the left, multi-combination intra prediction may be performed by using the left reference sample. When the position of the current pixel is close to the right, multi-combination intra prediction may be performed by using the right reference sample. Multi-combination intra prediction may be performed on pixels located in the middle area by using both the left reference sample and the right reference sample. When both the left reference sample and the right reference sample are used regardless of the position of the current pixel, weights may be determined differently, and multi-combination intra prediction may be performed.

[0385] In addition, whether to use both the left reference sample and the right reference sample or one of the left reference sample and the right reference sample may be determined according to the size of the block. When the size of the block is large, one of the left reference sample and the right reference sample may be used, and when the size of the block is small, both the left reference sample and the right reference sample may be used. This is because as the size of the block is smaller, the similarity of the left reference sample and the right reference sample is higher. For example, when the size of the block is greater than 16, only the left information or the right information may be used, and when the size of the block is less than 16, both the left information and the right information may be used. For example, when the size of the block is greater than 16 when generating the upper left pixel of the block, the weight may be expressed as [upper left right] = (1 / 16) * [8 8 0], and when the block size is less than 16, the weight may be expressed as [upper left right] = (1 / 16) * [6 8 2].

[0386] Multi-combination intra prediction (MIP) may be applied to prediction pixels according to a filtering direction based on Equation 4 below.

[0387] Equation 4 is an equation for generating a prediction sample to which MIP is applied by using the filtered reference sample obtained in Equation 3.

[0388] [Equation 4]

[0389]

[0390] in, And when i or j is greater than 3, i or j is determined to be 3 and a coefficient is selected.

[0391] i and j represent the row and column numbers respectively. i ' represents the left reference sample generated by filtering according to the filtering direction using equation 3, and a j ' represents the upper reference sample generated by filtering according to the filtering direction using equation 3. a [i,j] indicates that the coefficient corresponding to the i-th row and j-th column of the corresponding matrix is ​​used when multi-combined intra prediction is applied to the pixel located at the i-th row and j-th column. p [i, j] indicates that the coefficient corresponding to the i-th row and j-th column of the corresponding matrix is ​​used when the multi-combined intra prediction is applied to the pixel located at the i-th row and j-th column, and C p [j,i] indicates that the coefficient corresponding to the jth row and ith column of the corresponding matrix is ​​used when the multi-combined intra prediction is applied to the pixel located at the ith row and jth column. For example, when the above equation is applied to the pixel located at the second row and third column, C a [i,j] is 1, C p [i,j] is 12, and C p [j,i] is 3.

[0392] The multi-combination intra prediction using Equation 4 is performed by using the predicted pixel p of the current pixel ij and the filtered left reference pixel a generated by Equation 3 i ' and the filtered upper reference pixel a j ' weights to generate new predicted pixels.

[0393] When the filtering direction is from left to right and from top to bottom, this means that a new predicted pixel is generated by using weights for the following five points: the predicted pixel p of the current pixel ij , the left reference pixel a corresponding to the row of the current pixel i , the reference pixel a located above the left reference pixel i-1 , the upper reference pixel a corresponding to the column of the current pixel j , the reference pixel a located to the left of the upper reference pixel j-1 .

[0394] In addition, when the filtering direction is from right to left and from bottom to top, the multi-combined intra prediction is performed by using the predicted pixel p of the current pixel ij , the left reference pixel a corresponding to the row of the current pixel i , the reference pixel a located below the left reference pixel i+1 , the upper reference pixel a corresponding to the column of the current pixel jand the reference pixel a located to the right of the upper reference pixel j+1 to generate new predicted pixels.

[0395] Fig.36a An example of a syntax showing multiple combined intra predictions for intra prediction, and Fig.36b An example of the syntax of multiple combined intra prediction according to availability check is shown.

[0396] Reference Fig.36a , after checking whether intra prediction is applied using MPM or PIMS, when multi-combination intra prediction is required (when mip_coded is 1), multi-combination intra prediction (mip_index()) can be applied.

[0397] Reference Fig.36b As a result of the availability check, when the right reference sample is available (avail_lr == LR_01), multi-combination intra prediction can be applied.

[0398] Various embodiments have been described above. It should be understood that a person skilled in the art may make various modifications and changes without departing from the scope of the present disclosure. Therefore, the disclosed embodiments should be considered illustrative rather than restrictive. The scope of the present disclosure should be interpreted by the appended claims, and all technical ideas within the scope of equivalents should be interpreted as falling within the scope of the present disclosure.

[0399] The above-described embodiments may be implemented as a computer program and may be realized by a general-purpose digital computer that executes the computer program by using a computer-readable recording medium. The computer-readable recording medium includes storage media such as magnetic storage media (e.g., read-only memory (ROM), floppy disk, hard disk, etc.) and optical reading media (e.g., compact disk read-only memory (CD-ROM), digital versatile disk (DVD), etc.).

Claims

1. A video decoding method, include: Obtaining an MPM flag indicating whether to use any one of a plurality of intra prediction modes included in a most probable mode MPM of a current block; When the MPM flag indicates that any intra prediction mode among the multiple intra prediction modes included in the MPM is not used, obtaining an extended intra mode flag, wherein the extended intra mode flag indicates whether to use one intra prediction mode among the multiple intra prediction modes included in the extended intra mode list as the intra prediction mode of the current block or to use one remaining intra prediction mode among the multiple remaining intra prediction modes as the intra prediction mode of the current block; configuring the extended intra mode list using the plurality of intra prediction modes included in the MPM; When the extended intra mode flag indicates that one intra prediction mode among the multiple intra prediction modes included in the extended intra mode list is used as the intra prediction mode of the current block, determining the intra prediction mode among the multiple intra prediction modes included in the extended intra mode list as the intra prediction mode of the current block; and performing intra prediction on the current block using the intra prediction mode of the current block, Wherein, when the MPM of the current block includes the intra-frame prediction mode of the left neighboring block of the current block and the intra-frame prediction mode of the upper neighboring block of the current block, one of the intra-frame prediction mode of the left neighboring block and the intra-frame prediction mode of the upper neighboring block is a DC mode and the other intra-frame prediction mode of the intra-frame prediction mode of the left neighboring block and the intra-frame prediction mode of the upper neighboring block is a first direction mode, and the intra-frame prediction mode of the right neighboring block of the current block is a second direction mode, and the extended intra-frame mode list includes a bilinear mode, a planar mode, a second direction mode, an intra-frame prediction mode with an index increased by 1 from the index of the second direction mode, and an intra-frame prediction mode with an index decreased by 1 from the index of the second direction mode.

2. A video encoding method, include: generating an MPM flag indicating whether to use any one of a plurality of intra prediction modes included in a most probable mode MPM of a current block; When the MPM flag indicates that any intra prediction mode among the plurality of intra prediction modes included in the MPM is not used, generating an extended intra mode flag, wherein the extended intra mode flag indicates whether to use one intra prediction mode among the plurality of intra prediction modes included in the extended intra mode list as the intra prediction mode of the current block or to use one remaining intra prediction mode among the plurality of remaining intra prediction modes as the intra prediction mode of the current block; configuring the extended intra mode list using the plurality of intra prediction modes included in the MPM; When the extended intra mode flag indicates that one intra prediction mode among the multiple intra prediction modes included in the extended intra mode list is used as the intra prediction mode of the current block, determining the intra prediction mode among the multiple intra prediction modes included in the extended intra mode list as the intra prediction mode of the current block; and performing intra prediction on the current block using the intra prediction mode of the current block, Wherein, when the MPM of the current block includes the intra-frame prediction mode of the left neighboring block of the current block and the intra-frame prediction mode of the upper neighboring block of the current block, one of the intra-frame prediction mode of the left neighboring block and the intra-frame prediction mode of the upper neighboring block is a DC mode and the other intra-frame prediction mode of the intra-frame prediction mode of the left neighboring block and the intra-frame prediction mode of the upper neighboring block is a first direction mode, and the intra-frame prediction mode of the right neighboring block of the current block is a second direction mode, and the extended intra-frame mode list includes a bilinear mode, a planar mode, a second direction mode, an intra-frame prediction mode with an index increased by 1 from the index of the second direction mode, and an intra-frame prediction mode with an index decreased by 1 from the index of the second direction mode.

3. A device for sending a bit stream to a decoding device, in, The device comprises: At least one unit is configured to generate and send the bit stream, wherein the bit stream is generated by the following steps: generating an MPM flag indicating whether to use any one of a plurality of intra prediction modes included in a most probable mode MPM of a current block; When the MPM flag indicates that any intra prediction mode among the plurality of intra prediction modes included in the MPM is not used, generating an extended intra mode flag, wherein the extended intra mode flag indicates whether to use one intra prediction mode among the plurality of intra prediction modes included in the extended intra mode list as the intra prediction mode of the current block or to use one remaining intra prediction mode among the plurality of remaining intra prediction modes as the intra prediction mode of the current block; configuring the extended intra mode list using the plurality of intra prediction modes included in the MPM; When the extended intra mode flag indicates that one intra prediction mode among the multiple intra prediction modes included in the extended intra mode list is used as the intra prediction mode of the current block, determining the intra prediction mode among the multiple intra prediction modes included in the extended intra mode list as the intra prediction mode of the current block; and performing intra prediction on the current block using the intra prediction mode of the current block, Wherein, when the MPM of the current block includes the intra-frame prediction mode of the left neighboring block of the current block and the intra-frame prediction mode of the upper neighboring block of the current block, one of the intra-frame prediction mode of the left neighboring block and the intra-frame prediction mode of the upper neighboring block is a DC mode and the other intra-frame prediction mode of the intra-frame prediction mode of the left neighboring block and the intra-frame prediction mode of the upper neighboring block is a first direction mode, and the intra-frame prediction mode of the right neighboring block of the current block is a second direction mode, and the extended intra-frame mode list includes a bilinear mode, a planar mode, a second direction mode, an intra-frame prediction mode with an index increased by 1 from the index of the second direction mode, and an intra-frame prediction mode with an index decreased by 1 from the index of the second direction mode.