Video encoding method and encoding device, as well as video decoding method and decoding device considering hardware design
By dividing the maximum coding unit and determining the division method of the coding unit according to the transformation size, the problem of high coding complexity in the existing technology is solved, and the efficiency and performance of image coding and decoding are improved.
Patent Information
- Application Number
- CN201980069515.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-12-21
- Filing Date
- 2019-08-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2039-08-28
AI Technical Summary
When the existing technology encodes and decodes high-resolution or high-definition images, the encoding complexity is high, and it is difficult to improve the encoding efficiency and reduce the complexity.
Generate coding units by dividing at least one of the height and width of the largest coding unit, and decide whether to perform inverse transformation or transformation based on the maximum transformation size. Binary division, vertical binary division, quadtree division and other methods are used to optimize coding. Unit size and shape.
It improves the efficiency of image encoding and decoding, reduces complexity, is suitable for pipeline data units in hardware design, and improves hardware performance.
Smart Images

Figure CN112889292B_ABST
Abstract
Description
Technical Field
[0001] The method and apparatus according to the embodiment may encode or decode an image by using coding units having various shapes included in the image. Background Art
[0002] With the development and popularization of hardware capable of reproducing and storing high-resolution or high-definition image content, the demand for codecs that effectively encode or decode high-resolution or high-definition image content has increased. The encoded image content can be decoded and then reproduced. Recently, methods for effectively compressing such high-resolution or high-definition image content are being used. For example, methods for effectively achieving image compression by dividing the processing of an image to be encoded by an arbitrary method have been implemented.
[0003] Various data units may be used to compress an image, and there may be an inclusion relationship between these data units. In order to determine the size of the data unit to be used for image compression, the data unit may be divided by using various methods, and the image may be encoded or decoded by determining the data unit optimized based on the characteristics of the image.
[0004] The data unit can be determined by recursively performing flexible tree partitioning. Flexible tree partitioning can include binary split, ternary split or quadtree splitting. In addition, by allowing square data units and non-square data units, data units optimized for encoding can be determined according to the characteristics of the image. However, because various partition shapes and various data unit shapes are used, the encoding complexity may increase. Therefore, it is necessary to improve the encoding efficiency and reduce the complexity of the image decoding / encoding method and device by using flexible tree partitioning. Summary of the invention
[0005] Technical issues
[0006] Provided are an image decoding / encoding method and apparatus, which consider the size of a pipeline data unit for hardware design, and improve encoding efficiency and reduce complexity by determining a block division method.
[0007] Technical Solution
[0008] In order to overcome the above technical problems, the video decoding method proposed in the present invention includes: generating a coding unit by dividing at least one of the height and the width of a maximum coding unit having a first size; determining whether it is allowed to generate two second coding units by dividing at least one of the height and the width of the first coding unit based on whether the height or the width of a non-square first coding unit including an outer boundary of an image in the coding unit is greater than the maximum transformation size; and decoding the second coding unit generated from the first coding unit by inverse transforming the second coding unit using the maximum transformation size.
[0009] Determining whether it is allowed to generate two second coding units by splitting at least one of the height and the width of the first coding unit may include: when the length of the height of the first coding unit is greater than the maximum transformation size and the length of the width of the first coding unit is equal to the maximum transformation size, allowing a smaller coding unit to be generated by performing horizontal binary splitting on the first coding unit; and prohibiting the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit.
[0010] Determining whether it is allowed to generate two second coding units by splitting at least one of the height and the width of the first coding unit may include: when the length of the height of the first coding unit is equal to the maximum transformation size and the length of the width of the first coding unit is greater than the maximum transformation size, allowing a smaller coding unit to be generated by performing vertical binary splitting on the first coding unit; and prohibiting the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit.
[0011] The video decoding method may further include, when the length of the height of the coding unit including the outer boundary of the image is greater than the maximum transformation size and the length of the width of the coding unit is greater than the maximum transformation size, allowing a smaller coding unit to be generated by performing quadtree partitioning on the coding unit.
[0012] The length of the height and width of the coding unit may be greater than or equal to the maximum transform size.
[0013] The generating the coding unit by splitting at least one of a height and a width of a maximum coding unit having a first size may include determining the maximum coding unit of the first size by splitting an image based on information about the size of the maximum coding unit obtained from a bitstream.
[0014] Generating the coding unit by splitting at least one of a height and a width of a maximum coding unit having a first size may include: obtaining, from a bitstream, information about a minimum size of a luma coding unit, information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing binary splitting on an intra slice, information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing binary splitting on an inter slice, information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing trifurcating splitting on an intra slice, and information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing trifurcating splitting on an inter slice; determining a maximum size of a luma coding unit generated by performing binary splitting by using the information about the minimum size of the luma coding unit and the information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing binary splitting on an intra slice, the binary splitting being determined in the intra slice; and determining a maximum size of a luma coding unit generated by performing binary splitting by using the information about the minimum size of the luma coding unit and the information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing trifurcating splitting on the intra slice. The method further comprises: determining a maximum size of a luma coding unit generated by performing three-way splitting using information about a difference between a maximum size and a minimum size of the coding unit, the three-way splitting being determined in an intra slice; determining a maximum size of a luma coding unit generated by performing a binary splitting using information about a minimum size of the luma coding unit and information about a difference between a maximum size and a minimum size of the luma coding unit generated by performing a binary splitting on an inter slice, the binary splitting being determined in an inter slice; and determining a maximum size of a luma coding unit generated by performing a three-way splitting using information about a minimum size of the luma coding unit and information about a difference between a maximum size and a minimum size of the luma coding unit generated by performing a three-way splitting on an inter slice, the three-way splitting being determined in an inter slice.
[0015] Generating the coding units by dividing at least one of a height and a width of a maximum coding unit having a first size may include: obtaining information indicating whether a luma coding unit and a chroma coding unit are separately determined from a bitstream; when the luma coding unit and the chroma coding unit are separately determined according to the obtained information, obtaining information about a difference between a maximum size and a minimum size of a chroma coding unit generated by performing binary division on an intra slice and information about a difference between a maximum size and a minimum size of a chroma coding unit generated by performing trifurcating division on the intra slice from the bitstream; determining a maximum size of the chroma coding unit generated by performing binary division by using information about a minimum size of the chroma coding unit and information about a difference between a maximum size and a minimum size of the chroma coding unit generated by performing binary division on the intra slice, the binary division being determined in the intra slice; and determining a maximum size of the chroma coding unit generated by performing trifurcating division by using information about a minimum size of the chroma coding unit and information about a difference between a maximum size and a minimum size of the chroma coding unit generated by performing trifurcating division on the intra slice, the trifurcating division being determined in the intra slice.
[0016] The video decoding method may further include: when a first coding unit in the coding units is not adjacent to an outer boundary of the image, obtaining division type information of the first coding unit; when the division type information of the first coding unit indicates a binary division, dividing the height or width of the first coding unit in half and determining two second coding units, and the depth of each second coding unit is increased by 1 compared with the depth of the first coding unit; and when the division type information of the first coding unit indicates a ternary division, dividing the height or width of the first coding unit at a ratio of 1:2:1, and determining a third coding unit and two fourth coding units, the depth of the third coding unit is increased by 1 compared with the depth of the first coding unit, and the depth of each fourth coding unit is increased by 2 compared with the depth of the first coding unit.
[0017] In order to overcome the above technical problems, the video decoding device proposed by the present invention includes: a processor, which is configured to determine a coding unit by dividing at least one of the height and the width of a maximum coding unit having a first size; based on whether the height or width of a non-square first coding unit including an outer boundary of an image in the coding unit is greater than the maximum transformation size, determine whether it is allowed to generate two second coding units by dividing at least one of the height and the width of the first coding unit; and decode the second coding unit generated from the first coding unit by inverse transforming the second coding unit using the maximum transformation size; and a memory for storing data generated by the processor.
[0018] In order to overcome the above technical problems, the video encoding method proposed in the present invention includes: determining a coding unit by dividing at least one of the height and the width of a maximum coding unit having a first size; determining whether it is allowed to generate two second coding units by dividing at least one of the height and the width of the first coding unit based on whether the height or the width of a non-square first coding unit including an outer boundary of an image in the coding unit is greater than the maximum transformation size; and encoding the second coding unit generated from the first coding unit by transforming the second coding unit using the maximum transformation size.
[0019] Determining whether it is allowed to generate two second coding units by splitting at least one of the height and the width of the first coding unit may include: when the length of the height of the first coding unit is greater than the maximum transformation size and the length of the width of the first coding unit is equal to the maximum transformation size, allowing a smaller coding unit to be generated by performing horizontal binary splitting on the first coding unit; and prohibiting the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit.
[0020] Determining whether it is allowed to generate two second coding units by splitting at least one of the height and the width of the first coding unit may include: when the length of the height of the first coding unit is equal to the maximum transformation size and the length of the width of the first coding unit is greater than the maximum transformation size, allowing a smaller coding unit to be generated by performing vertical binary splitting on the first coding unit; and prohibiting the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit.
[0021] The video encoding method may further include: when the length of the height of the coding unit including the outer boundary of the image is greater than the maximum transformation size and the length of the width of the coding unit is greater than the maximum transformation size, allowing a smaller coding unit to be generated by performing quadtree partitioning on the coding unit.
[0022] Generating the coding unit by splitting at least one of a height and a width of a maximum coding unit having a first size may include determining the maximum coding unit having the first size by splitting an image, and encoding information about the size of the maximum coding unit.
[0023] The video encoding method may further include: determining information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing the binary partition on the intra slice by using a minimum size of the luma coding unit generated by performing the binary partition and a maximum size of the luma coding unit, the binary partition may be determined in the intra slice by using a minimum size of the luma coding unit generated by performing the ternary partition and a maximum size of the luma coding unit, determining information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing the ternary partition on the intra slice by using a minimum size of the luma coding unit generated by performing the ternary partition and a maximum size of the luma coding unit, the binary partition may be determined in the inter slice by using a minimum size of the luma coding unit generated by performing the binary partition and a maximum size of the luma coding unit, determining information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing the binary partition on the inter slice, and determining information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing the ternary partition on the inter slice by using a minimum size of the luma coding unit generated by performing the ternary partition and a maximum size of the luma coding unit, the ternary partition may be determined in the inter slice by using a minimum size of the luma coding unit generated by performing the ternary partition and a maximum size of the luma coding unit.
[0024] The video encoding method may further include: outputting information about a minimum size of a luma coding unit, information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing binary splitting on an intra slice, information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing binary splitting on an inter slice, information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing ternary splitting on an intra slice, and information about a difference between a maximum size and a minimum size of a luma coding unit generated by performing ternary splitting on an inter slice in a bitstream.
[0025] The video encoding method may further include: determining information about a difference between the maximum size and the minimum size of a chroma coding unit generated by performing binary partitioning on the intra slice by using information about a minimum size of a chroma coding unit generated by performing binary partitioning and a maximum size of the chroma coding unit, which binary partitioning may be determined in an intra slice; and determining information about a difference between the maximum size and the minimum size of a chroma coding unit generated by performing three-way partitioning on the intra slice by using information about the minimum size of a chroma coding unit generated by performing three-way partitioning and a maximum size of the chroma coding unit, which three-way partitioning may be determined in an intra slice.
[0026] The video encoding method may further include: encoding information indicating whether the luma coding unit and the chroma coding unit are determined separately, and outputting the encoded information in a bitstream. The video encoding method may further include: when the luma coding unit and the chroma coding unit are determined separately, encoding information about a difference between a maximum size and a minimum size of a chroma coding unit generated by performing binary division on an intra slice and information about a difference between a maximum size and a minimum size of a chroma coding unit generated by performing ternary division on an intra slice, and outputting the encoded information in a bitstream.
[0027] The video encoding method may further include: when a first coding unit in the coding units is not adjacent to an outer boundary of the image, encoding the partition type information of the first coding unit, and outputting the encoded partition type information in the bitstream. The video encoding method may further include: dividing the height or width of the first coding unit in half, determining two second coding units, each of which has a depth increased by 1 over the depth of the first coding unit, and encoding the partition type information of the first coding unit indicating the binary partition; and dividing the height or width of the first coding unit at a ratio of 1:2:1, determining a third coding unit and two fourth coding units, the depth of the third coding unit increased by 1 over the depth of the first coding unit, and the depth of each fourth coding unit increased by 2 over the depth of the first coding unit, and encoding the partition type information of the first coding unit indicating the trifurcated partition.
[0028] In order to overcome the above technical problems, the video encoding device proposed in the present invention includes: a processor, which is configured to determine a coding unit by dividing at least one of the height and the width of a maximum coding unit having a first size; based on whether the height or the width of a non-square first coding unit including an outer boundary of an image in the coding unit is greater than the maximum transformation size, determine whether it is allowed to generate two second coding units by dividing at least one of the height and the width of the first coding unit; and encode the second coding unit generated from the first coding unit by transforming the second coding unit using the maximum transformation size; and a memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic block diagram of an image decoding device according to an embodiment is shown.
[0030] Figure 2 A flowchart of an image decoding method according to an embodiment is shown.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] Figure 6 A method of determining a preset coding unit from an odd number of coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0035] Figure 7 Detailed description is given of an order in which a plurality of coding units are processed when an image decoding apparatus determines a plurality of coding units by splitting a current coding unit according to an embodiment.
[0036] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding apparatus, is illustrated when coding units cannot be processed in a preset order according to an embodiment.
[0037] 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.
[0038] Fig.10 It is shown that according to an embodiment, when a second coding unit having a non-square shape (determined by dividing the first coding unit by an image decoding device) satisfies a preset condition, the shapes into which the second coding unit can be divided are restricted.
[0039] Fig.11 A process of splitting a square coding unit performed by an image decoding device when division shape pattern information indicates that the square coding unit is not split into four square coding units according to an embodiment is illustrated.
[0040] Fig.12 It is shown that a processing order among a plurality of coding units may be changed depending on a process of splitting the coding units according to an embodiment.
[0041] Fig.13 A process of determining a depth of a coding unit when a shape and a size of a coding unit are changed when a coding unit is recursively split such that a plurality of coding units are determined according to an embodiment is illustrated.
[0042] 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.
[0043] Fig.15 It is shown that a plurality of coding units are determined based on a plurality of preset data units included in a picture according to an embodiment.
[0044] 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 shown.
[0045] Fig.17 A block diagram of a video encoding apparatus according to an embodiment is shown.
[0046] Fig.18 A flowchart of a video encoding method according to an embodiment is shown.
[0047] Fig.19 A block diagram of a video decoding apparatus according to an embodiment is shown.
[0048] Fig. 20 A flowchart of a video decoding method according to an embodiment is shown.
[0049] Fig.21 The relationship between a maximum coding unit, a pipeline data unit, and a block according to an embodiment is shown.
[0050] Fig. 22 Three shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are shown.
[0051] Fig.23 Five shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are illustrated.
[0052] Fig.24 Seven shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are shown.
[0053] Fig.25 Nine shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of the size of the pipeline data unit according to another embodiment are shown.
[0054] Fig.26 Two shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of the size of the pipeline data unit according to an embodiment are shown.
[0055] Fig. 27 Two shapes of combinations of pipeline data units that can be determined only through quadtree partitioning or binary partitioning of a maximum coding unit in consideration of the size of the pipeline data unit according to an embodiment are shown.
[0056] Fig.28 Three shapes of combinations of pipeline data units that may be determined by quadtree partitioning, ternary partitioning, and binary partitioning of a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are shown.
[0057] Fig.29 A function for determining whether a coding unit is located at a boundary line of a pipeline data unit according to an embodiment is shown.
[0058] Fig.30 The syntax signaled through a sequence parameter set (SPS) according to an embodiment is shown. DETAILED DESCRIPTION
[0059] The advantages and features of the present invention and methods of achieving the same will be described more fully with reference to the accompanying drawings, in which embodiments of the present invention are shown. However, the present invention may be implemented in many different forms and should not be construed as limited to the embodiments set forth herein; on the contrary, these embodiments are provided so that the present invention will be thorough and complete and fully convey the concepts of the present invention to those of ordinary skill in the art.
[0060] The terms used herein will be briefly described and the disclosed embodiments will be described in detail.
[0061] Considering the functions of the terms used in the embodiments, the terms used in the embodiments are selected from the commonly used terms that are currently widely used. However, the terms may become different according to the intentions of ordinary technicians in the field, precedents, or the emergence of new technologies. In addition, in specific cases, the terms are freely selected by the applicant of the present invention, and the meanings of these terms will be described in detail in the corresponding parts of the detailed description. Therefore, the terms used in the embodiments are not only the designation of the terms, but are defined based on the meanings of the terms and contents in the entire embodiment.
[0062] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise.
[0063] It should be understood that when a specific part “includes” a specific component, the part does not exclude another component but may further include another component unless the context clearly states otherwise.
[0064] As used herein, the term "part," "module," or "unit" refers to a software or hardware component that performs a predefined function. However, the term "unit" is not limited to software or hardware. A "unit" may be configured in an addressable storage medium or configured to operate one or more processors. Thus, for example, a "unit" may include components, processes, functions, properties, procedures, subroutines, program code segments, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables such as software components, object-oriented software components, class components, and task components. The functions provided by components and "units" may be combined into fewer components and "units," or further separated into additional components and "units."
[0065] According to an embodiment of the present invention, 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 embodiments, a "processor" may represent an application-specific integrated circuit (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 a combination of a DSP and a microprocessor, a combination of multiple microprocessors, a combination of one or more microprocessors and a DSP core, or a combination of any other such configurations.
[0066] 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), nonvolatile random access memory (NVRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage devices, registers, etc. When the processor can read information from and / or write information to the memory, the memory is declared to be in electronic communication with the processor. Memory integrated into a processor is in electronic communication with the processor.
[0067] Hereinafter, “image” may indicate a still image of a video, or may indicate a dynamic image such as a moving image, that is, a video itself.
[0068] In the following, "sample" means data assigned to the sample position of the image, that is, data to be processed. For example, pixel values in the spatial domain image and transform coefficients on the transform area can be samples. A unit including at least one such sample can be defined as a block.
[0069] Also, in the specification, a 'current block' may mean a block of a maximum coding unit, a coding unit, a prediction unit, or a transform unit of a current image to be encoded or decoded.
[0070] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement these embodiments. In addition, in order to clearly describe the present invention, parts irrelevant to the description of the present invention will be omitted in the accompanying drawings.
[0071] Next, we will refer to Figures 1 to 16 An image encoding device and an image decoding device as well as an image encoding method and an image decoding method according to an embodiment are described. Figures 3 to 16 Describing a method for determining a data unit of an image, according to an embodiment, the following will refer to Figures 17 to 20 Describe the video encoding / decoding method considering hardware design, which will be referred to below Figures 21 to 28 Describe the various combinations of pipeline data units, which will be referenced below Fig.29 Describes a method for determining whether a coding unit is outside a pipeline boundary line, and according to an embodiment, the following will refer to Fig.30 A method in which the video encoding apparatus 1700 and the video decoding apparatus 1900 signal information about a maximum size and a minimum size of a block allowed based on a partition mode is described.
[0072] Next, we will refer 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.
[0073] Figure 1 A schematic block diagram of an image decoding device according to an embodiment is shown.
[0074] The image decoding apparatus 100 may include a receiver 110 and a decoder 120. The receiver 110 and the decoder 120 may include at least one processor. In addition, the receiver 110 and the decoder 120 may include a memory storing instructions to be executed by the at least one processor.
[0075] The receiver 110 may receive a bitstream. The bitstream includes information of an image encoded by the image encoding device 2200 described below. In addition, the bitstream may be transmitted from the image encoding device 2200. The image encoding device 2200 and the image decoding device 100 may be connected by wire or wirelessly, and the receiver 110 may receive the bitstream by wire or wirelessly. The receiver 110 may receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoder 120 may reconstruct the image based on 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.
[0076] Reference Figure 2 The operation of the image decoding device 100 is described in detail.
[0077] Figure 2 A flowchart of an image decoding method according to an embodiment is shown.
[0078] According to an embodiment of the present invention, the receiver 110 receives a bit stream.
[0079] The image decoding device 100 obtains a bin (binary bit) string corresponding to the division shape pattern of the coding unit from the bitstream (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 at least one of the bin strings corresponding to the division shape pattern and the division rule (operation 230). The image decoding device 100 can determine the 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 can determine the 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.
[0080] Hereinafter, the division of the coding units will be described in detail according to an embodiment of the present invention.
[0081] First, a picture can be divided into one or more slices or one or more tiles. A slice or a tile can be a sequence of one or more maximum coding units (coding tree units (CTUs)). Compared with the maximum coding unit (CTU), there is a maximum coding block (coding tree block (CTB)) in concept.
[0082] A maximum coding block (CTB) represents an NxN block (where N is an integer) comprising NxN samples. Each color component can be divided into one or more maximum coding blocks.
[0083] When a picture has three sample arrays (sample arrays of Y, Cr, and Cb components), the maximum coding unit (CTU) includes a maximum coding block of luma samples, two corresponding maximum coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When the picture is a monochrome picture, the maximum coding unit includes a maximum coding block of monochrome samples and a syntax structure for encoding monochrome samples. When the picture is a picture encoded in a color plane separated according to color components, the maximum coding unit includes a syntax structure for encoding the picture and the samples of the picture.
[0084] A maximum coding block (CTB) can be divided into MxN coding blocks, including MxN samples (M and N are integers).
[0085] When a picture has sample arrays of Y, Cr, and Cb components, a coding unit (CU) includes a coding block of luma samples, two corresponding coding blocks of chroma samples, and a syntax structure for encoding luma samples and chroma samples. When a picture is a monochrome picture, a coding unit includes a coding block of monochrome samples and a syntax structure for encoding monochrome samples. When a picture is encoded in a color plane separated according to color components, a coding unit includes a syntax structure for encoding the picture and the samples of the picture.
[0086] As described above, the maximum coding block and the maximum coding unit are conceptually distinguished, and the coding block and the coding unit are conceptually distinguished. That is, the (maximum) coding unit refers to a data structure including a (maximum) coding block (including corresponding samples) and a syntax structure corresponding to the (maximum) coding block. However, as those skilled in the art understand, a (maximum) coding unit or a (maximum) coding block refers to a block of a preset size including a preset number of samples, a maximum coding block, and a maximum coding unit, or, unless otherwise specified, a coding block and a coding unit are mentioned in the following specification without distinction.
[0087] The image may be divided into a maximum coding unit (CTU). The size of the maximum coding unit may be determined based on information obtained from the bitstream. The maximum coding unit may be in the shape of a square having the same size, but is not limited thereto. However, the embodiment is not limited thereto.
[0088] 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 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, and 256x256.
[0089] 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 and the information about the luminance block size difference obtained from the bitstream 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 Y:Cb:Cr ratio according to the color format is 4:2:0, 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.
[0090] According to an embodiment, since information about the maximum size of a binary-dividable luminance coding block is obtained from a bitstream, the maximum size of a binary-dividable luminance coding block can be variably determined. In contrast, the maximum size of a trifurcated luminance coding block can be fixed. For example, the maximum size of a trifurcated luminance coding block in an I picture can be 32x32, while the maximum size of a trifurcated luminance coding block in a P picture or a B picture can be 64x64.
[0091] In addition, the maximum coding unit can be hierarchically divided into coding units based on the division shape pattern information obtained from the bitstream. At least one of information indicating whether to perform quad division, information indicating whether to perform multi-division, division direction information, and division type information can be obtained from the bitstream as the division shape pattern information.
[0092] For example, the information indicating whether quad splitting is performed may indicate whether the current coding unit is quad split (QUAD_SPLIT).
[0093] When the current coding unit is not quad-split, the information indicating whether multi-split is performed may indicate whether the current coding unit is no longer split (NO_SPLIT) or is binary / tripartite.
[0094] When the current coding unit is binary-split or ternary-split, the split direction information indicates that the current coding unit is split in one of a horizontal direction and a vertical direction.
[0095] 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 binary-split or ternary-split.
[0096] 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 branches in the horizontal direction may be determined as a binary horizontal split mode (SPLIT_BT_HOR), the split mode when the current coding unit is split into three branches in the horizontal direction may be determined as a three-branch horizontal split mode (SPLIT_TT_HOR), the split mode when the current coding unit is split into two branches in the vertical direction may be determined as a binary vertical split mode (SPLIT_BT_VER), and the split mode when the current coding unit is split into three branches in the vertical direction may be determined as a three-branch vertical split mode (SPLIT_TT_VER).
[0097] The image decoding device 100 can obtain the division shape mode information from the bit stream and from a bin string. 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 bin string is information in the form of a binary number. The bin string may include at least one bit. The image decoding device 100 can obtain the division shape mode information corresponding to the bin string based on the division rule. The image decoding device 100 can determine whether to quadruplicate the coding unit, whether to divide the coding unit, the division direction, and the division type based on a bin string.
[0098] The coding unit may be smaller than or equal to the maximum coding unit. For example, since the maximum coding unit is a coding unit having the maximum size, the maximum coding unit is one of the coding units. When the division shape pattern information about the maximum coding unit indicates that division is not performed, the coding unit determined in the maximum coding unit has the same size as the maximum coding unit. When the division shape pattern information about the maximum coding unit indicates that division is performed, the maximum coding unit may be divided into coding units. Furthermore, 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.
[0099] 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.
[0100] The shapes and sizes of the transform block and the prediction block may be unrelated to each other.
[0101] In another embodiment, prediction may be performed by using the coding unit as a prediction block. In addition, transformation may be performed by using the coding unit as a transformation block.
[0102] Reference Figures 3 to 16 The division of the coding unit is described in detail. The current block and the adjacent block of the present invention may indicate one of the maximum coding unit, the coding unit, the prediction block and the transform block. In addition, the current block or the current coding unit may be a block currently being decoded or encoded or a block currently being divided. The adjacent block may be a block reconstructed earlier than the current block. The adjacent block may be adjacent to the current block in the spatial domain or the temporal domain. The adjacent block may be located at any one of the lower left side, the upper left side, the upper side, the upper right side, the right side and the lower right side of the current block.
[0103] 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.
[0104] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N. 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.
[0105] 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 4Nx4N), 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.
[0106] When the lengths of the width and height of the coding unit are different from each other (i.e., when the block shape of the coding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the image decoding device 100 may determine the block shape information of the coding unit as non-square. 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 the vertical direction based on the length of the width and the length of the height 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 length of the width, the length of the height, or the area of the coding unit.
[0107] According to an embodiment, the image decoding device 100 may determine the shape of the coding unit by using block shape information, and may determine the division shape of the coding unit by using division shape mode information. That is, the division method of the coding unit indicated by the division shape mode information may be determined based on the block shape indicated by the block shape information used by the image decoding device 100.
[0108] 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 2200 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 about the maximum coding unit or the minimum coding unit. For example, the image decoding device 100 may determine that the division shape pattern information about the maximum coding unit is a quadrilateral division. In addition, the image decoding device 100 may determine the division shape pattern information about the minimum coding unit as "no division is performed". Specifically, the image decoding device 100 may determine that the size of the maximum coding unit is 256x256. The image decoding device 100 may determine the pre-agreed division shape pattern information as a quadrilateral division. The quadrilateral division is a division shape pattern in which both the width and height of the coding unit are equally divided. The image decoding device 100 may obtain a coding unit of a size of 128x128 from a maximum coding unit of a size of 256x256 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 mode information indicating “do not perform division” with respect to the minimum coding unit.
[0109] 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, the decoder 120 can determine that the coding unit 310a having the same size as the current coding unit 300 is not divided based on the division shape pattern information indicating that division is not performed, or can determine that the coding unit 310b, 310c, 310d, 310e or 310f is divided based on the division shape pattern information indicating a preset division method.
[0110] refer to 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 and horizontal directions based on the division shape pattern information indicating that division is performed in the vertical and horizontal directions. According to an embodiment, the image decoding 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-branch division is 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-branch division is performed in the horizontal direction. However, the division shapes into which the square coding unit may be divided are not limited to the above method, and the division shape pattern information may indicate various methods. The preset division shapes into which the square coding unit may be divided will be described in detail below in conjunction with various embodiments.
[0111] 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.
[0112] 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 split the non-square current coding unit based on the split shape mode information, or determine whether to split the non-square current coding unit by using a preset split method. Figure 4 , when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding apparatus 100 may determine that 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 that the coding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c are split based on the split shape pattern information indicating a preset splitting method. The preset splitting method for splitting a non-square coding unit will be described in detail below in conjunction with various embodiments.
[0113] According to an embodiment, the image decoding device 100 may determine a division shape into which a coding unit is to be divided by using division shape pattern information, and in this case, the division shape pattern information may indicate the number of one or more coding units generated by dividing the coding unit. Figure 4 When the division shape pattern information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b, or 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the division shape pattern information.
[0114] 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, considering the shape of the current coding unit 400 or 450, the image decoding device 100 may determine a plurality of coding units by dividing the current coding unit 400 or 450 in a direction in which the long side of the current coding unit 400 or 450 is divided.
[0115] According to an embodiment, when the division shape pattern information indicates that the coding unit is divided (three-way division) 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.
[0116] 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, the block shape information may indicate the horizontal direction because the length of the width is longer than the length of the height. When the aspect ratio is 1:4, the block shape information may indicate the vertical direction because the length of the width is shorter than the length of the height. The image decoding device 100 may determine to divide the current coding unit into an odd number of blocks based on the division shape mode information. In addition, the image decoding 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.
[0117] 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 preset coding unit 430b or 480b from 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 unit determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, all odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.
[0118] 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 an odd number of coding units included in the current coding unit 400 or 450, and may apply a preset restriction to at least one of the odd number of coding units generated by dividing the current coding unit 400 or 450. Figure 4, the image decoding device 100 may set the decoding process of the coding unit 430b or 480b located in the middle of the three coding units 430a, 430b, and 430c or 480a, 480b, and 480c generated as the current coding unit 400 or 450 is divided to be different from the decoding process of the other coding units 430a and 430c or 480a and 480c. 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 located at the center position to no longer be divided or to be divided only a preset number of times.
[0119] 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.
[0120] According to an embodiment, the image decoding device 100 may determine whether to divide the square first coding unit 500 into coding units 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 dividing the coding unit. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It should be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit follows the above description.
[0121] According to an embodiment, the image decoding apparatus 100 may determine whether to split the determined second coding unit 510 into coding units based on the split shape pattern information. Figure 5, the image decoding device 100 may divide the non-square second coding unit 510 determined by dividing the first coding unit 500 into one or more third coding units 520a, 520b, 520c, and 520d based on the division shape mode information and at least one of the division shape mode information, or may not divide the non-square second coding unit 510. The image decoding device 100 may obtain the division shape mode information, and may obtain a plurality of second coding units (e.g., 510) of different shapes by dividing the first coding unit 500 based on the obtained division shape mode information, and may divide the second coding unit 510 by using the division method of the first coding unit 500 based on the division shape mode information. According to an embodiment, when the first coding unit 500 is divided into the second coding unit 510 based on the division shape mode information of the first coding unit 500, the second coding unit 510 may also be divided into the third coding unit (e.g., 520a, or 520b, 520c, and 520d). That is, the coding unit may be recursively divided based on the division shape mode 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.
[0122] refer to Figure 5 , the preset coding units (e.g., coding units located at the center or square coding units) in the odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 can be recursively divided. According to an embodiment, the square third coding unit 520c in the odd number of third coding units 520b, 520c, and 520d can be divided into a plurality of fourth coding units in the horizontal direction. The non-square fourth coding unit 530b or 530d in the plurality of fourth coding units 530a, 530b, 530c, and 530d can be re-divided into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d can be re-divided into an odd number of coding units. A method that can be used to recursively divide coding units will be described below in conjunction with various embodiments.
[0123] According to an embodiment, the image decoding device 100 may divide each of the third coding units 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 preset restriction on a preset third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 may limit the third coding unit 520c located at the center position among the odd number of third coding units 520b, 520c, and 520d to no longer be divided or to be divided a settable number of times.
[0124] refer to Figure 5 , the image decoding device 100 may limit the third coding unit 520c located at the center position among the odd third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, to be divided by using a preset division method (e.g., only divided into four coding units or divided using the division method of the second coding unit 510), or to be divided only a preset number of times (e.g., only divided n times (where n>0)). However, the limitation on the third coding unit 520c at the center position is not limited to the above example, and may include various limitations on decoding the third coding unit 520c located at the center position that are different from the other third coding units 520b and 520d.
[0125] According to an embodiment, the image decoding device 100 may obtain split shape pattern information for splitting the current coding unit from a preset position in the current coding unit.
[0126] Figure 6 A method of determining a preset coding unit from an odd number of coding units, performed by an image decoding apparatus according to an embodiment, is illustrated.
[0127] refer to Figure 6 , the division shape mode information of the current coding unit 600 or 650 can be obtained from a sample at a preset position (e.g., a sample 640 or 690 at a center position) among a plurality of samples included in the current coding unit 600 or 650. However, the preset position where at least one piece of division shape mode information can be obtained from the current coding unit 600 is not limited to Figure 6The image decoding device 100 may include the center position of the current coding unit 600, and may include various positions (e.g., top, bottom, left, right, upper left, lower left, upper right, lower right positions, etc.) included in the current coding unit 600. The image decoding device 100 may obtain the division shape mode information from the preset position, and may determine whether to divide the current coding unit into coding units of various shapes and sizes.
[0128] According to an embodiment, when the current coding unit is divided into a preset number of coding units, the image decoding apparatus 100 may select one of the coding units. Various methods may be used to select one of the plurality of coding units, as will be described below in conjunction with various embodiments.
[0129] 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 preset position.
[0130] According to an embodiment, the image decoding apparatus 100 may determine a coding unit located at a center position among the odd-numbered coding units using information indicating the positions of the odd-numbered coding units. Figure 6 , the image decoding 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 intermediate coding unit 620b or the intermediate coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the positions of the odd number of coding units 660a, 660b, and 660c. For example, the image decoding device 100 may determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of preset samples included in the coding units 620a, 620b, and 620c to determine the coding unit 620b at the center position. Specifically, 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 sample points 630a, 630b, and 630c of the coding units 620a, 620b, and 620c.
[0131] According to an embodiment, the information indicating the positions of the upper left corner samples 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 corner samples 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 may determine the coding unit 620b at the center position by directly using the information about the positions or coordinates of the coding units 620a, 620b, and 620c in the picture, or by using the information about the width or height of the coding unit corresponding to the difference between the coordinates.
[0132] 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 intermediate 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 intermediate 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 at the center position including the coordinates (xb, yb) of the sample point 630b 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 630a of the upper coding unit 620a, the coordinates indicating the relative position of the upper left sample point 630b of the middle coding unit 620b, and the coordinates (dxc, dyc) indicating the relative position of the upper left sample point 630c of the lower coding unit 620c may be used. The method of determining the coding unit at a preset position by using the coordinates of the sample points included in the coding unit as information indicating the positions of the sample points is not limited to the above method, and may include various arithmetic methods capable of using the coordinates of the sample points.
[0133] 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 preset 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.
[0134] 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), (xb, yb), and (xc, yc), where the coordinates (xa, ya) are information indicating the position of the upper left sample point 630a of the upper coding unit 620a, the coordinates (xb, yb) are information indicating the position of the upper left sample point 630b of the middle coding unit 620b, and the coordinates (xc, yc) are 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 corresponding sizes of the coding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating 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 middle coding unit 620b as the width of the current coding unit 600. The image decoding device 100 may determine the height of the middle 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 middle coding unit 620b. The image decoding device 100 may determine a coding unit having a size different from other coding units based on the determined width and height of the coding units 620a to 620c. Reference Figure 6 , the image decoding device 100 may determine the middle coding unit 620b having a size different from that of the upper coding unit 620a and the lower coding unit 620c as a coding unit at a preset position. However, the above-mentioned method of determining a coding unit having a size different from that of other coding units, performed by the image decoding device 100, corresponds only to an example of determining a coding unit at a preset position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining a coding unit at a preset position by comparing the size of the coding unit determined based on the coordinates of the preset sample points may be used.
[0135] 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), (xe, ye), and (xf, yf), the coordinates (xd, yd) being information indicating the position of the upper left sample point 670a of the left coding unit 660a, the coordinates (xe, ye) being information indicating the position of the upper left sample point 670b of the middle coding unit 660b, and the coordinates (xf, yf) being 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.
[0136] 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 other coding units based on the determined width or height of the coding units 660a to 660c. Reference Figure 6 , the image decoding device 100 may determine the middle coding unit 660b having a size different from the left coding unit 660a and the right coding unit 660c as the coding unit at the preset position. However, the above-mentioned method of determining the coding unit having a size different from the sizes of other coding units performed by the image decoding device 100 corresponds only to an example of determining the coding unit at the preset position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining the coding unit at the preset position by comparing the size of the coding unit determined based on the coordinates of the preset sample points may be used.
[0137] However, the position of the sample used to determine 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.
[0138] According to an embodiment, the image decoding device 100 may select a coding unit at a preset position from an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than a height, the image decoding device 100 may determine a coding unit at a preset position in the horizontal direction. That is, the image decoding device 100 may determine one of the coding units at different positions in the horizontal direction and impose restrictions on the coding unit. When the current coding unit has a non-square shape with a height greater than a width, the image decoding device 100 may determine a coding unit at a preset position in the vertical direction. That is, the image decoding device 100 may determine one of the coding units at different positions in the vertical direction and may impose restrictions on the coding unit.
[0139] According to an embodiment, the image decoding device 100 may determine a coding unit at a preset position from among the even-numbered coding units using information indicating the corresponding positions of the even-numbered coding units. The image decoding device 100 may determine the even-numbered coding units by dividing (binary dividing) the current coding unit, and may determine the coding unit at the preset position by using information about the positions of the even-numbered coding units. Operations related thereto may correspond to operations for determining a coding unit at a preset position (e.g., a center position) among the odd-numbered coding units, which have been described above with respect to Figure 6 This has been described in detail, so a detailed description thereof is not provided here.
[0140] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, a coding unit at a preset position among the plurality of coding units may be determined using preset information about the coding unit at the preset position in the division operation. For example, the image decoding apparatus 100 may determine a coding unit at a center position among the plurality of coding units determined by dividing the current coding unit using at least one of block shape information and division shape pattern information stored in samples included in the middle coding unit in the division operation.
[0141] refer to 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 from which the division shape pattern information is obtained. That is, the division shape pattern information of the current coding unit 600 may be obtained from the sample point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the division shape pattern information, the coding unit 620b including the sample point 640 may be determined as the coding unit at the center position. However, the information for determining the coding unit at the center position is not limited to the division shape pattern information, and various types of information may be used to determine the coding unit at the center position.
[0142] According to an embodiment, preset information for identifying a coding unit at a preset position may be obtained from preset samples included in a coding unit to be determined. Figure 6 , the image decoding device 100 may use the division shape pattern information obtained from the sample at the preset 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 preset position (for example, the coding unit at the center position of the multiple divided 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 preset position considering the block shape of the current coding unit 600, determine the coding unit 620b including the sample from which the preset 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 a preset restriction on the coding unit 620b. Reference Figure 6 According to an embodiment, the image decoding device 100 may determine a sample 640 at a center position of the current coding unit 600 as a sample from which preset information can be obtained, and may impose preset restrictions on the coding unit 620b including the sample 640 in a decoding operation. However, the position of the sample from which the preset information can be obtained is not limited to the above-mentioned position, and may include any position of the sample included in the coding unit 620b to be determined for restriction.
[0143] According to an embodiment, the position of the sample from which the preset information can be obtained may be determined based on the shape of the current coding unit 600. According to an embodiment, the block shape information may indicate whether the current coding unit is in a square shape or a non-square shape, and the position of the sample from which the preset information can be obtained may be determined based on the shape. For example, the image decoding device 100 may determine the sample located on the boundary for dividing at least one of the width and the height of the current coding unit as the sample from which the preset information can be obtained by using at least one of the information about the width of the current coding unit and the information about the height of the current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding device 100 may determine one of the samples including the boundary for dividing at half of the long side of the current coding unit as the sample from which the preset information can be obtained.
[0144] According to an embodiment, when the current coding unit is divided into a plurality of coding units, the image decoding device 100 may determine a coding unit at a preset position in the plurality of coding units using the division shape pattern information. According to an embodiment, the image decoding device 100 may obtain the division shape pattern information from the sample at the preset position in the coding unit, and divide the plurality of coding units generated by dividing the current coding unit by using the division shape pattern information (obtained from the sample at the preset position in each of the plurality of coding units). That is, the coding unit may be recursively divided based on the division shape pattern information obtained from the sample at the preset position in each coding unit. As has been mentioned above, Figure 5 An operation of recursively dividing the coding unit is described, and thus a detailed description thereof is not provided here.
[0145] 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 of decoding the one or more coding units based on a preset block (eg, the current coding unit).
[0146] Figure 7 Detailed description is given of an order in which a plurality of coding units are processed when an image decoding apparatus determines a plurality of coding units by splitting a current coding unit according to an embodiment.
[0147] According to an embodiment, based on the division shape pattern information, the image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 in a vertical direction, determine the second coding units 730a and 730b by dividing the first coding unit 700 in a horizontal direction, or determine the second coding units 750a, 750b, 750c and 750d by dividing the first coding unit 700 in vertical and horizontal directions.
[0148] refer to 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 the second coding units 750a to 750d determined by dividing the first coding unit 700 in the vertical direction and the horizontal direction according to a preset order (e.g., a raster scan order or a Z scan order 750e) of processing coding units in one row and then processing coding units in the next row.
[0149] 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, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to the division method of the first coding unit 700. 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. Reference Figure 7 , the image decoding device 100 may determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, and may determine to independently divide or not divide each of the second coding units 710a and 710b.
[0150] 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.
[0151] According to an embodiment, the processing order of the coding units may be determined based on the operation of dividing the coding units. In other words, the processing order of the divided coding units may be determined based on the processing order of the coding units immediately before being divided. The image decoding 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 being split is not limited to the above example, and coding units split and determined to be various shapes may be independently processed in a preset order using various methods.
[0152] Figure 8 A process of determining that a current coding unit is to be split into an odd number of coding units, performed by an image decoding apparatus, is illustrated when coding units cannot be processed in a preset order according to an embodiment.
[0153] According to an embodiment, the image decoding apparatus 100 may determine that the current coding unit is split into an odd number of coding units based on the obtained split 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, 820d, and 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.
[0154] According to an embodiment, the image decoding device 100 may determine whether to split any coding unit into an odd number of coding units by determining whether the third coding units 820a and 820b and 820c to 820e can be processed in a preset order. Figure 8, the image decoding 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 first coding unit 800, the second coding units 810a and 810b, or the third coding units 820a and 820b, and 820c to 820e is divided into an odd number of coding units based on at least one of the block shape information and the division shape mode information. For example, the coding unit located on the right side of the second coding units 810a and 810b may be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the plurality of coding units included in the first coding unit 800 may be a preset order (e.g., a Z scan order 830), and the image decoding device 100 may 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 satisfy the condition for processing in a preset order.
[0155] 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 preset order, and the condition relates to whether at least one of the width and height of the second coding units 810a and 810e 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. It may be determined that the third coding units 820c to 820e do not satisfy the condition because the boundary of the third coding units 820c to 820e determined when the right second coding unit 810b is divided into three coding units cannot be divided by half of the width or height of the right second coding unit 810b. When the condition is satisfied as described above, the image decoding device 100 may determine the disconnection of the scanning order, and may determine to divide the right second coding unit 810b into an odd number of coding units based on the result of the determination. 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 preset restriction on the coding unit at a preset position in the divided coding unit. The restriction or preset position has been described above in conjunction with various embodiments, so a detailed description thereof will not be provided here.
[0156] 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.
[0157] 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 first coding unit 900 has a square shape and the division shape pattern information indicates that the first coding unit 900 is divided into non-square coding units, the image decoding device 100 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the division shape pattern 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.
[0158] According to an embodiment, the image decoding device 100 may determine whether the second coding units 910a, 910b, and 910c and 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition for processing in a preset order, and the condition relates 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, and 910c and 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 are not divided at half the width of the first coding unit 900, it can be determined that the first coding unit 900 does not meet the conditions sufficient for processing in a preset order. In addition, because the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction are not divided at half the height of the first coding unit 900, it can be determined that the first coding unit 900 does not meet the conditions sufficient for processing in a preset order. As described above, when the conditions are not met, the image decoding device 100 may decide to disconnect the scanning order, and may determine that the first coding unit 900 will be divided into an odd number of coding units based on the result of the decision. 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 preset restriction on the coding unit at a preset position in the divided coding unit. The restriction or preset position has been described above in conjunction with various embodiments, and thus a detailed description thereof will not be provided herein.
[0159] According to an embodiment, the image decoding device 100 may determine coding units of various shapes by splitting the first coding unit.
[0160] refer to 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.
[0161] Fig.10 It is shown that according to an embodiment, when a second coding unit having a non-square shape (determined by dividing the first coding unit by an image decoding device) satisfies a preset condition, the shapes into which the second coding unit can be divided are restricted.
[0162] 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 divided independently. In this way, the image decoding device 100 may determine whether to divide each of the second coding units 1010a and 1010b or 1020a and 1020b into a plurality of coding units based on the division shape pattern information of each of the second coding units 1010a and 1010b or 1020a and 1020b. According to an embodiment, the image decoding device 100 may determine the third coding units 1012a and 1012b by dividing the non-square left second coding unit 1010a determined by dividing the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second coding unit 1010a is divided in the horizontal direction, the image decoding device 100 may restrict the right second coding unit 1010b from being divided in the horizontal direction in which the left second coding unit 1010a is divided. When the third coding units 1014a and 1014b are determined by dividing 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 divided in the horizontal direction, the third coding units 1012a and 1012b or 1014a and 1014b may be determined. However, this case is the same as the case in which 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 image decoding.
[0163] 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, due to the above reasons, 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.
[0164] Fig.11 A process of splitting a square coding unit performed by an image decoding device when division shape pattern information indicates that the square coding unit is not split into four square coding units according to an embodiment is illustrated.
[0165] 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.
[0166] 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 and 1110b or 1120a and 1120b, etc. may be recursively divided in a preset order, and the division method may correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.
[0167] For example, the image decoding device 100 may determine square third coding units 1112a and 1112b by dividing the left second coding unit 1110a in the horizontal direction, and may determine square third coding units 1114a and 1114b by dividing the right second coding unit 1110b in the horizontal direction. In addition, the image decoding device 100 may determine square third coding units 1116a, 1116b, 1116c, and 1116d by dividing both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction. In this case, a coding unit having the same shape as the four square second coding units 1130a, 1130b, 1130c, and 1130d divided from the first coding unit 1100 may be determined.
[0168] As another example, the image decoding device 100 may determine square third coding units 1122a and 1122b by dividing the upper second coding unit 1120a in the vertical direction, and may determine 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 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.
[0169] Fig.12 It is shown that a processing order among a plurality of coding units may be changed depending on a process of splitting the coding units according to an embodiment.
[0170] 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 can be independently divided based on the division shape pattern information of each coding unit. For example, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. Reference has been made to the above Fig.11 An operation of dividing the second coding units 1210a and 1210b or 1220a and 1220b is described, and thus a detailed description thereof is not provided here.
[0171] According to an embodiment, the image decoding apparatus 100 may process the coding units in a preset order. Figure 7 The operation of processing the encoding units in a preset order is described, and thus a detailed description thereof is not 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 a processing order of the third coding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d based on the division shape into which the first coding unit 1200 is divided.
[0172] According to an embodiment, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can process the third coding units 1216a, 1216b, 1216c and 1216d in the processing order 1217 to first process the third coding units 1216a and 1216c included in the left second coding unit 1210a in the vertical direction, and then process the third coding units 1216b and 1216d included in the right second coding unit 1210b in the vertical direction.
[0173] According to an embodiment, the image decoding device 100 can determine the third coding units 1226a, 1226b, 1226c and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c and 1226d in the processing order 1227 to first process the third coding units 1226a and 1226b included in the upper second coding unit 1220a in the horizontal direction, and then process the third coding units 1226c and 1226d included in the lower second coding unit 1220b in the horizontal direction.
[0174] refer to Fig.12 , the 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 are determined by dividing the first coding unit 1200 in the vertical direction, unlike 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 therefrom ultimately show the same shape of 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 be the same shape, the image decoding device 100 can process a plurality of coding units in different orders.
[0175] Fig.13 A process of determining a depth of a coding unit when a shape and a size of a coding unit are changed when a coding unit is recursively split such that a plurality of coding units are determined according to an embodiment is illustrated.
[0176] According to an embodiment, the image decoding device 100 may determine the depth of the coding unit based on a preset criterion. For example, the preset criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being divided is 2n times (n>0) the length of the long side of the current coding unit being divided, the image decoding device 100 may determine that the depth of the current coding unit is increased by n from 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.
[0177] refer to Fig.13According to an embodiment, the image decoding device 100 may determine the second coding unit 1302 and the 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 expressed 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 by 1 / 2 of the width and height of the first coding unit 1300 may have a size of N×N. In addition, the third coding unit 1304 determined by dividing by 1 / 2 of the width and height of the second coding unit 1302 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 times 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 times those 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 times those of the first coding unit 1300 may be D+2.
[0178] According to an embodiment, the image decoding device 100 can determine the second coding unit 1312 or 1322 and the third coding unit 1314 or 1324 of a deeper depth by dividing the non-square first coding unit 1310 or 1320 based on block shape information indicating a non-square shape (for example, the block shape information can be represented as '1:NS_VER' indicating a non-square shape, whose height is longer than the width, or the block shape information can be represented as '2:NS_HOR' indicating a non-square shape, whose width is longer than the height).
[0179] 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 direction and the vertical direction.
[0180] 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 the 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 the horizontal and vertical directions.
[0181] 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.
[0182] 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 direction and the horizontal direction.
[0183] 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.
[0184] 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.
[0185] According to an embodiment, the width and height of the third coding unit 1314 or 1324 may be 1 / 4 times 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 times 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 times the first coding unit 1310 or 1320 may be D+2.
[0186] 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.
[0187] 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.
[0188] According to an embodiment, the depth of the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d determined based on the division shape pattern information of the square first coding unit 1400 can be determined based on the length of its long side. For example, because the side length of the square first coding unit 1400 is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b may have the same depth, for example, D. However, when the image decoding device 100 divides the first coding unit 1400 into four square second coding units 1406a, 1406b, 1406c and 1406d based on the division shape pattern information, because the side length of the square second coding units 1406a, 1406b, 1406c and 1406d is 1 / 2 times the side length 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.
[0189] 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 having a height greater than a width in a 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 having a width greater than a height in a vertical direction based on the division shape pattern information.
[0190] 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 its long side. For example, since the side length of the square second coding units 1412a and 1412b is 1 / 2 times the length of the long side of the non-square first coding unit 1410 whose height is greater than the 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 410.
[0191] 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 times the length of the long side of the non-square 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 greater than a height by using the above-described method of determining the depths of the coding units split from the first coding unit 1410 .
[0192] According to an embodiment, when the sizes of the odd-numbered split coding units are not equal, 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 coding unit 1414b at the center position among the odd-numbered divided coding units 1414a, 1414b, and 1414c may have the same width as the other coding units 1414a and 1414c and 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 of the 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 next to the coding unit 1414b may increase by 2 and may therefore be 3. That is, there may be discontinuity in the PID value. According to an embodiment, the image decoding device 100 may determine whether the odd-numbered divided coding units have equal sizes based on whether there is discontinuity in the PID for identifying the divided coding units.
[0193] According to an embodiment, the image decoding apparatus 100 may determine whether to use a specific splitting method based on a PID value for identifying a plurality of coding units determined by splitting a current coding unit. Fig.14, the image decoding device 100 may determine the even number of coding units 1412a and 1412b or the odd number of coding units 1414a, 1414b, and 1414c by dividing the first coding unit 1410 having a rectangular shape having a height greater than a width. The image decoding device 100 may use a PID indicating a corresponding coding unit in order to identify the corresponding coding unit. According to an embodiment, the PID may be obtained from a sample point at a preset position of each coding unit (e.g., an upper left sample point).
[0194] According to an embodiment, the image decoding device 100 may determine a coding unit at a preset position in the divided coding unit by using a PID for distinguishing the coding unit. According to an embodiment, when the division shape pattern information of the first coding unit 1410 having a rectangle with a height greater 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 the coding unit at the center position in the coding unit. The image decoding device 100 may determine the coding unit 1414b having a PID corresponding to an intermediate value in the PID of the coding unit as the coding unit at the center position in the coding unit determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding apparatus 100 may determine a PID for distinguishing the divided coding units based on a size ratio between the coding units. Fig.14, the coding unit 1414b generated by dividing the first coding unit 1410 may have the same width as the other coding units 1414a and 1414c and 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 next to the coding unit 1414b may increase by 2 and may thus be 3. As described above, when the PID does not increase uniformly, the image decoding device 100 may determine that the coding unit is divided into a plurality of coding units, and the plurality of coding units include coding units having sizes different from 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 a coding unit at a preset position in the odd number of coding units (e.g., a coding unit at the center position) has a size different from other coding units. In this case, the image decoding device 100 may determine the coding unit at the center position having different sizes by using the PID of the coding unit. However, the PID and the size or position of the encoding unit of the preset position are not limited to the above-mentioned examples, and various PIDs and various positions and sizes of the encoding unit may be used.
[0195] According to an embodiment, the image decoding apparatus 100 may use a preset data unit that is recursively divided starting from a coding unit.
[0196] Fig.15 It is shown that a plurality of coding units are determined based on a plurality of preset data units included in a picture according to an embodiment.
[0197] According to an embodiment, a preset data unit may be defined as a data unit that recursively divides a coding unit by starting with division shape pattern information. That is, the preset data unit may correspond to a coding unit of the highest depth, which is used to determine a plurality of coding units divided from a current picture. In the following description, for ease of explanation, the preset data unit is referred to as a reference data unit.
[0198] According to an embodiment, the reference data unit may have a preset size and a preset shape. According to an embodiment, the reference coding unit may include M×N samples. Here, M and N may be equal to each other and may be an integer represented as a power of 2. That is, the reference data unit may have a square or non-square shape and may be divided into an integer number of coding units.
[0199] According to an embodiment, the image decoding apparatus 100 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding apparatus 100 may divide the plurality of reference data units divided from the current picture by using the division shape pattern information of each reference data unit. The operation of dividing the reference data unit may correspond to the division operation using the quadtree structure.
[0200] 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 greater than the minimum size, and may determine one or more coding units by using the division shape mode information with respect to the determined reference data unit.
[0201] refer to 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 that may include one or more reference coding units (e.g., a sequence, a picture, a slice, a slice segment, a slice, a slice group, a maximum coding unit, etc.).
[0202] 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 with respect to each of various data units from a bitstream. Figure 3 The operation of dividing the current coding unit 300 is described above, and the operation of dividing the square reference coding unit 1500 into one or more coding units is described above, and Figure 4 The operation of dividing the current coding unit 400 or 450 is described above, and the operation of dividing the non-square reference coding unit 1502 into one or more coding units is described above. Therefore, a detailed description thereof will not be provided herein.
[0203] According to an embodiment, the image decoding device 100 may use a PID for identifying the size and shape of a reference coding unit to determine the size and shape of a reference coding unit according to some data units predetermined based on a preset condition. That is, the receiver 110 may obtain a PID only from a bitstream to identify the size and shape of a reference coding unit for each slice, slice segment, slice, slice group, or maximum coding unit as a data unit satisfying a preset condition (a data unit having a size equal to or less than a slice) among various data units (e.g., a sequence, a picture, a slice, a slice segment, a slice, a slice group, a sub-maximum coding unit, etc.). The image decoding device 100 may determine the size and shape of a reference data unit for each data unit satisfying the preset condition by using a PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from a bitstream according to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information. In this case, at least one of the size and shape of the reference coding unit corresponding to the PID for identifying the size and shape of the reference coding unit may be predetermined. That is, the image decoding device 100 may determine at least one of the size and shape of a reference coding unit included in a data unit serving as a unit for obtaining a PID by selecting at least one of the size and shape of a predetermined reference coding unit based on the PID.
[0204] 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 may divide the reference coding unit based on at least one of the block shape information and the division shape pattern information.
[0205] 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 shown.
[0206] 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 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 one or more reference coding units determined in each processing block may correspond to one of the various types of orders for determining the reference coding units, and may vary depending on the processing block. The determination order of the reference coding units determined relative to each processing block may be one of various orders (e.g., a raster scan order, a Z scan, an N scan, an upper right diagonal scan, a horizontal scan, and a vertical scan, but not limited to the scan order mentioned).
[0207] 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 preset size of a data unit indicated by the processing block size information.
[0208] According to an embodiment, the receiver 110 of the image decoding device 100 may obtain processing block size information from a bitstream according to each specific data unit. For example, the processing block size information may be obtained from a bitstream in a data unit such as an image, a sequence, a picture, a slice, a slice segment, a slice, or a slice group. That is, the receiver 110 may obtain processing block size information from a 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 reference coding unit.
[0209] 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.
[0210] 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 block, and may determine the determination order of one or more reference coding units in the processing blocks 1602 and 1612. According to an embodiment, the determination of the reference coding unit may include determination of the size of the reference coding unit.
[0211] According to an embodiment, the image decoding device 100 may obtain the determination order information of one or more reference coding units included in one or more processing blocks from the bitstream, and may determine the determination order of the 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 with respect to each processing block.
[0212] According to an embodiment, the image decoding apparatus 100 may obtain the determination order information of the reference coding unit according to each specific data unit from the bitstream. 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 slice, a slice group, or a processing block). Since 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 with respect to each specific data unit including an integer number of processing blocks.
[0213] According to an embodiment, the image decoding device 100 may determine one or more reference coding units based on the determined determination order.
[0214] According to an embodiment, the receiver 110 may obtain the determination order information of the reference coding unit from the bitstream as 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 reference coding units is obtained with respect to each processing block, determination order information of reference coding units of different types may be obtained with respect to 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 backward raster scan order, the reference coding units included in the processing block 1612 may be determined according to the backward raster scan order.
[0215] According to an embodiment, the image decoding device 100 may decode the determined one or more reference coding units. As described above, the image decoding device 100 may decode the image based on the determined reference coding unit. The method of decoding the reference coding unit may include various image decoding methods.
[0216] According to an embodiment, the image decoding device 100 may obtain block shape information indicating the shape of the current coding unit or division shape pattern information indicating the division method of the current coding unit from the bitstream, and may use the obtained information. The division shape pattern information may be included in 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 slice header, or a slice group header. In addition, the image decoding device 100 may obtain a syntax element corresponding to the block shape information or the division shape pattern information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and may use the obtained syntax element.
[0217] Next, a method for determining a division rule according to an embodiment of the present invention will be described in detail.
[0218] The image decoding device 100 may determine a division rule of the image. The division rule may be predetermined between the image decoding device 100 and the image encoding device 2200. The image decoding device 100 may determine the division rule of the image based on information obtained from the bitstream. The image decoding device 100 may determine the 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 slice header, and a slice group header. The image decoding device 100 may determine the division rule differently according to a frame, a slice, a slice, a temporal layer, a maximum coding unit, or a coding unit.
[0219] 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 2200 and the image decoding device 100 may determine the division rule based on the block shape of the coding unit in advance. 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 2200.
[0220] 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.
[0221] The size of the coding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, and 256x256. 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 long sides as coding units 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 long sides.
[0222] 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 greater than the length of its height. The vertical direction may indicate a case where the length of the width of the coding unit is less than the length of its height.
[0223] 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 allowed division shape mode differently based on the size of the coding unit. For example, the image decoding device 100 may determine whether to allow division 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 allowed division type according to the size of the coding unit.
[0224] The division rule determined based on the size of the coding unit may be a division rule predetermined between the image encoding device 2200 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.
[0225] The image decoding device 100 may adaptively determine a division rule based on a position of a coding unit. The image decoding device 100 may adaptively determine a division rule based on a position of a coding unit in an image.
[0226] 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. Fig.12 The decoding process order is described, so its details are not provided again.
[0227] Below, according to the embodiment of this specification, a method for dividing a coding unit for an effective hardware implementation is provided, and reference is made to Figures 17 to 20 A method and apparatus for encoding or decoding video is described in detail.
[0228] Fig.17 A block diagram of a video encoding apparatus according to an embodiment is shown.
[0229] According to an embodiment, the video encoding device 1700 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 as 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 data received from the outside and data generated by the processor, for example, division information related to the coding unit, prediction information related to the coding unit, and residual information related to the coding unit, information on whether binary division of the coding unit is allowed, information on whether ternary division of the coding unit is allowed, etc.
[0230] In order to efficiently encode an image divided into a plurality of blocks, the video encoding device 1700 may perform encoding using a pipeline method that performs processing of a plurality of blocks in parallel. Hereinafter, a block that is processed during one pipeline cycle to implement pipelined video encoding in hardware is referred to as a pipeline data unit. The size of the pipeline data unit may be predetermined.
[0231] Because the processor 1720 can access the data of the current pipeline data unit during the current pipeline cycle, the block located in the pipeline can be encoded. However, because the processor 1720 may not be able to access the data of the next pipeline data unit or the previous pipeline data unit during the current pipeline cycle, the block spanning the current pipeline data unit and the next pipeline data unit, or the block spanning the current pipeline data unit and the previous pipeline data unit may not be encoded.
[0232] Furthermore, in order to be able to perform encoding on a block in a pipeline data unit within a pipeline cycle, the size of a coding unit or a transform unit needs to be smaller than or equal to the size of the pipeline data unit.
[0233] In addition, when the origin of the upper left position of the coding unit includes the outline of the image, the coding unit may be outside the image depending on the size of the coding unit, and thus the video encoding device 1700 may determine to arbitrarily divide the coding unit.
[0234] The processor 1720 of the video encoding device 1700 may determine the coding unit by dividing at least one of the height and the width of the maximum coding unit having the first size based on whether the height or the width of a non-square first coding unit including the outer boundary of the image in the coding unit is greater than the maximum transformation size, determine whether it is allowed to generate two second coding units by dividing at least one of the height and the width of the first coding unit, and perform encoding by transforming the second coding unit generated from the first coding unit using the maximum transformation size.
[0235] In this regard, the size of the pipeline data unit may be considered, and the maximum transform size may be determined to be less than or equal to the size of the pipeline data unit. Therefore, encoding of each second coding unit having a size less than or equal to the maximum transform size may be processed during one pipeline cycle, and therefore, the video encoding apparatus 1700 may process encoding using a pipeline method.
[0236] Next, we will refer to Fig.18 A detailed operation of a method in which the video encoding apparatus 1700 performs encoding using coding units determined from maximum coding units is described in detail.
[0237] Fig.18 A flowchart of a video encoding method according to an embodiment is shown.
[0238] In operation 1810 , the video encoding device 1700 may generate coding units by splitting at least one of a height and a width of a maximum coding unit having a first size.
[0239] In operation 1820, based on whether the height or width of a non-square first coding unit including an outer boundary of an image in the coding unit is greater than the maximum transformation size, the video encoding device 1700 may determine whether it is allowed to generate two second coding units by dividing at least one of the height and width of the first coding unit.
[0240] According to an embodiment, the video encoding device 1700 may set a flag value indicating whether it is allowed to generate the second coding unit by dividing at least one of the height and the width of the non-square first coding unit including the outer boundary of the image.
[0241] In operation 1820, according to an embodiment, when the length of the width of the non-square first coding unit including the outer boundary of the image is greater than the maximum transformation size and the length of the height of the first coding unit is equal to the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing vertical binary splitting on the first coding unit, and prohibit the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit. Specifically, the video encoding device 1700 may set a vertical binary split flag value for allowing the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit, and set a horizontal binary split flag value for prohibiting the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit.
[0242] According to an embodiment, when the length of the width of the non-square first coding unit including the outer boundary of the image is equal to the maximum transformation size and the length of the height of the first coding unit is greater than the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing horizontal binary splitting on the first coding unit, and prohibit the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit. Specifically, the video encoding device 1700 may set a horizontal binary split flag value for allowing the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit, and set a vertical binary split flag value for prohibiting the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit.
[0243] According to an embodiment, when the length of the height of the coding unit including the outer boundary of the image is greater than the maximum transformation size and the length of the width of the coding unit is greater than the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing quadtree partitioning on the coding unit.
[0244] According to an embodiment, the sizes of the height and width of the coding unit may be greater than or equal to the maximum transform size.
[0245] In addition, in operation 1820, when the first coding unit is adjacent to the outline of the image so that the height or width of the first coding unit is outside the outline of the image, the video encoding device 1700 may prohibit binary division in the direction of dividing the height or width of the first coding unit, which may be outside the outline of the image. As a specific example, when the height of the first coding unit is greater than the maximum transform size and the width of the first coding unit is outside the right outline of the image, the video encoding device 1700 may determine to prohibit vertical binary division for dividing the width of the first coding unit. Similarly, when the width of the first coding unit is greater than the maximum transform size and the height of the first coding unit is outside the lower outline of the image, the video encoding device 1700 may determine to prohibit horizontal binary division for dividing the height of the first coding unit.
[0246] However, when the height of the coding unit including the outer boundary of the image is outside the lower contour of the image or the width of the coding unit is outside the right contour of the image, the video encoding device 1700 may allow quadtree splitting of the coding unit.
[0247] In operation 1830, the video encoding device 1700 may perform encoding by transforming the second coding unit generated from the first coding unit using the maximum transform size. The video encoding device 1700 may determine a prediction block by performing prediction on the second coding unit, and determine a residual block consisting of a difference between a sample value of an original block of the second coding unit and a sample value of the prediction block. The video encoding device 1700 may generate a quantized transform coefficient by performing transformation and quantization on the residual block, and encode the second coding unit by performing entropy encoding on the quantized transform coefficient.
[0248] According to an embodiment, the video encoding device 1700 may also determine whether to arbitrarily divide the coding unit into coding units of lower depths, taking into account the size of the pipeline data unit. In order to complete the transformation and quantization of the residual data in the coding unit during one pipeline cycle, it is necessary to determine that the size of the pipeline data unit is equal to the size of the maximum transformation unit. In addition, when the pipeline data unit and the maximum transformation unit have a square shape, the height and width of the pipeline data unit and the maximum transformation unit are equal to each other. Therefore, when the length of the height or width of the coding unit is greater than the length of the height or width of the maximum transformation unit, by arbitrarily dividing the height or width of the coding unit to divide the coding unit into coding units of lower depths, the encoding process of the corresponding coding unit can be completed within one pipeline cycle.
[0249] Therefore, an embodiment will be described below, in which, in order to complete the transformation within the pipeline cycle, the video encoding device 1700 compares the maximum transformation size with at least one of the height and width of the coding unit, and sets a vertical binary division flag value, a horizontal binary division flag value, and a quadtree division flag value to respectively indicate whether vertical binary division, horizontal binary division, and quadtree division of the coding unit are allowed.
[0250] Specifically, in order to complete the transformation within the pipeline cycle, when the length of the width of the coding unit is greater than the maximum transformation size and the length of the height of the coding unit is equal to the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing vertical binary splitting on the coding unit, and prohibit the generation of a smaller coding unit by performing horizontal binary splitting on the coding unit.
[0251] Specifically, in order to complete the transformation within the pipeline cycle, when the length of the width of the coding unit is equal to the maximum transformation size and the length of the height of the coding unit is greater than the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing horizontal binary splitting on the coding unit, and prohibit the generation of a smaller coding unit by performing vertical binary splitting on the coding unit.
[0252] Specifically, in order to complete the transformation within the pipeline cycle, when the length of the width of the coding unit is greater than the maximum transformation size and the length of the height of the coding unit is equal to the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing vertical binary splitting on the coding unit, and prohibit the generation of a smaller coding unit by performing horizontal binary splitting on the coding unit.
[0253] Specifically, in order to complete the transformation within the pipeline cycle, when the length of the width of the coding unit is equal to the maximum transformation size and the length of the height of the coding unit is greater than the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing horizontal binary splitting on the coding unit, and prohibit the generation of a smaller coding unit by performing vertical binary splitting on the coding unit.
[0254] Specifically, in order to complete the transformation within a pipeline cycle, when each of the sizes of the height and the width of the coding unit is greater than the maximum transformation size, the video encoding device 1700 may allow a smaller coding unit to be generated by performing quadtree partitioning on the coding unit.
[0255] In addition, according to an embodiment, the video encoding device 1700 may predetermine a maximum value and a minimum value to limit the size of a maximum coding unit or a coding unit, and encode information about the maximum value and the minimum value.
[0256] In operation 1810, according to an embodiment, the video encoding device 1700 may divide an image into maximum coding units having a constant size and encode the image. Each maximum coding unit may be divided into coding units having an optimal size, from which the highest encoding efficiency may be obtained. To this end, the size of the maximum coding unit may be predetermined, and the video encoding device 1700 may encode information about the size of the maximum coding unit and include the encoded information in a sequence parameter set (SPS). According to an embodiment, the size of the maximum coding unit may be 128x128.
[0257] According to an embodiment, the video encoding device 1700 may differently determine a maximum size and a minimum size of a coding unit based on a type of a slice.
[0258] Specifically, the video encoding device 1700 may set the minimum size of the luma coding unit generated by performing binary partitioning on the intra slice and the maximum size of the luma coding unit. In addition, by using the minimum size of the luma coding unit generated by performing binary partitioning on the intra slice and the maximum size of the luma coding unit, the video encoding device 1700 may determine information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary partitioning on the intra slice. In addition, the video encoding device 1700 may encode information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary partitioning on the intra slice, and include the encoded information in the SPS.
[0259] Specifically, the video encoding device 1700 may pre-set the maximum size of the luma coding unit generated by performing three-way division on the intra slice. In addition, by using the minimum size of the luma coding unit generated by performing three-way division on the intra slice and the maximum size of the luma coding unit, the video encoding device 1700 may determine information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the intra slice. In addition, the video encoding device 1700 may encode information about the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the intra slice, and include the encoded information in the SPS.
[0260] Specifically, the video encoding device 1700 may pre-set the maximum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice. In addition, by using the minimum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice and the maximum size of the luma coding unit, the video encoding device 1700 may determine information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice. In addition, the video encoding device 1700 may encode information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice, and include the encoded information in the SPS.
[0261] Specifically, the video encoding device 1700 may pre-set the maximum size of the luma coding unit generated by performing three-way division on the inter-frame slice. In addition, by using the minimum size of the luma coding unit generated by performing three-way division on the inter-frame slice and the maximum size of the luma coding unit, the video encoding device 1700 may determine information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the inter-frame slice. In addition, the video encoding device 1700 may encode information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the inter-frame slice, and include the encoded information in the SPS.
[0262] According to an embodiment, the video encoding device 1700 may determine whether the luma coding unit and the chroma coding unit are separately determined. The video encoding device 1700 may encode information indicating whether the luma coding unit and the chroma coding unit are separately determined, and include the encoded information in the SPS.
[0263] According to an embodiment, when the luma coding unit and the chroma coding unit are determined separately, the video encoding device 1700 may pre-set the maximum size of the chroma coding unit generated by performing binary division on the intra slice. In addition, by using the minimum size of the chroma coding unit generated by performing binary division on the intra slice and the maximum size of the chroma coding unit, the video encoding device 1700 may determine information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing binary division on the intra slice. In addition, the video encoding device 1700 may encode information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing binary division on the intra slice, and include the encoded information in the SPS.
[0264] According to an embodiment, when the luma coding unit and the chroma coding unit are determined separately, the video encoding device 1700 may pre-set the maximum size of the chroma coding unit generated by performing three-way division, and the three-way division may be determined in the intra slice. By using the minimum size of the chroma coding unit generated by performing three-way division on the intra slice and the maximum size of the chroma coding unit, the video encoding device 1700 may determine information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing three-way division on the intra slice. In addition, the video encoding device 1700 may encode information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing three-way division on the intra slice, and include the encoded information in the SPS.
[0265] According to an embodiment, when a first coding unit among the coding units is not adjacent to an outer boundary of an image, the video encoding device 1700 may encode partition type information of the first coding unit and output the encoded partition type information in a bitstream.
[0266] Specifically, when binary partitioning is performed on the first coding unit, the video encoding device 1700 may determine two second coding units, each of which has a depth increased by 1 compared to the depth of the first coding unit, and encode the partition type information of the first coding unit indicating the binary partitioning. For example, when the depth of the first coding unit is N, the depth of each of the two second coding units generated by performing binary partitioning on the first coding unit may be N+1. In this regard, the area of each of the second coding units may be 1 / 2 of the area of the first coding unit.
[0267] Specifically, when a three-way split is performed on a first coding unit, the video encoding device 1700 may determine a third coding unit whose depth is increased by 1 compared to the depth of the first coding unit and two fourth coding units whose depth is increased by 2 compared to the depth of the first coding unit, and encode the split type information of the first coding unit indicating the three-way split. For example, when the depth of the first coding unit is N, the depth of the third coding unit may be N+1, and the depth of each of the two fourth coding units may be N+2, and the third coding unit and the fourth coding unit are generated by performing a three-way split on the first coding unit. In this regard, the area of the third coding unit may be 1 / 2 of the area of the first coding unit, and the area of each of the fourth coding units may be 1 / 4 of the area of the first coding unit.
[0268] Next, we will refer to Fig.19 and Fig. 20 The video decoding process is described in detail.
[0269] Fig.19A block diagram of a video decoding apparatus according to an embodiment is shown.
[0270] According to an embodiment, the video decoding device 1900 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 as 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 data received from the outside and data generated by the processor, for example, partition information, prediction information, and residual information related to the coding unit, information on whether binary partitioning of the coding unit is allowed, information on whether ternary partitioning of the coding unit is allowed, and the like.
[0271] In order to efficiently perform video decoding, the video decoding apparatus 1900 may perform decoding in a pipeline method of performing processing of a plurality of blocks in parallel, similar to the video encoding apparatus 1700. To this end, a pipeline data unit of the same size as that determined by the video encoding apparatus 1700 may be used.
[0272] The processor 1920 can access the data of the current pipeline data unit during the current pipeline cycle, and thus can decode the block located in the pipeline. However, the processor 1920 may not be able to decode the block across the current pipeline data unit and the next pipeline data unit, or to decode the block across the current pipeline data unit and the previous pipeline data unit.
[0273] In addition, as in the video encoding apparatus 1700 , the size of a coding unit or a transform unit needs to be smaller than or equal to the size of a pipeline data unit.
[0274] In addition, the video decoding device 1900 may determine a split method of splitting a coding unit into coding units of a lower depth according to split type information obtained from a bitstream.
[0275] However, when the origin of the upper left position of the coding unit includes the outline of the image, the coding unit may be outside the image depending on the size of the coding unit, so the video decoding device 1900 may determine to arbitrarily divide the coding unit into a shape in which the coding unit does not cross the outline of the image, even in the absence of the division type information. Even if the division type information of the coding unit exists, the video decoding device 1900 may ignore the value of the division type information and divide the coding unit into a division shape in which the coding unit does not cross the outline of the image. When the video decoding device 1900 determines to arbitrarily divide the coding unit, the value of the division type information may be changed and set to an arbitrarily determined division shape.
[0276] The processor 1920 of the video decoding device 1900 can determine the coding unit by dividing at least one of the height and the width of the maximum coding unit having the first size based on whether the height or the width of a non-square first coding unit including the outer boundary of the image in the coding unit is greater than the maximum transformation size, determine whether it is allowed to generate two second coding units by dividing at least one of the height and the width of the first coding unit, and perform decoding by inversely transforming the second coding unit generated from the first coding unit using the maximum transformation size.
[0277] In this regard, the maximum transform size may be determined to be less than or equal to the size of the pipeline data unit in consideration of the size of the pipeline data unit. Therefore, decoding of each second coding unit having a size less than or equal to the maximum transform size may be processed during one pipeline cycle, and therefore, the video decoding apparatus 1900 may process decoding using a pipeline method.
[0278] Next, we will refer to Fig. 20 Detailed operations of a method in which the video decoding apparatus 1900 performs decoding using coding units determined from maximum coding units are described in detail.
[0279] Fig. 20 A flowchart of a video decoding method according to an embodiment is shown.
[0280] In operation 2010, the video decoding device 1900 according to an embodiment may generate coding units by splitting at least one of a height and a width of a maximum coding unit having a first size.
[0281] In operation 2020, based on whether the height or width of a non-square first coding unit including an outer boundary of an image in the coding unit is greater than the maximum transformation size, the video decoding device 1900 may determine whether it is allowed to generate two second coding units by dividing at least one of the height and width of the first coding unit.
[0282] According to an embodiment, the video decoding device 1900 may set a flag value indicating whether it is allowed to generate the second coding unit by dividing at least one of the height and the width of the first coding unit. Specifically, when the first coding unit includes the outer boundary of the image, the first coding unit may be outside the outer boundary of the image depending on the size of the first coding unit, and therefore, the video decoding device 1900 may determine whether it is allowed to generate the second coding unit by arbitrarily dividing at least one of the height and the width of the first coding unit.
[0283] According to an embodiment, when the length of the width of the non-square first coding unit including the outer boundary of the image is greater than the maximum transformation size and the length of the height of the first coding unit is equal to the maximum transformation size, the video decoding device 1900 may allow a smaller coding unit to be generated by performing vertical binary splitting on the first coding unit, and prohibit the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit. Specifically, the video decoding device 1900 may set a vertical binary split flag value for allowing the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit, and set a horizontal binary split flag value for prohibiting the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit.
[0284] According to an embodiment, when the length of the width of the non-square first coding unit including the outline of the image is equal to the maximum transformation size and the length of the height of the first coding unit is greater than the maximum transformation size, the video decoding device 1900 may allow a smaller coding unit to be generated by performing horizontal binary splitting on the first coding unit, and prohibit the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit. Specifically, the video decoding device 1900 may set a horizontal binary split flag value for allowing the generation of a smaller coding unit by performing horizontal binary splitting on the first coding unit, and set a vertical binary split flag value for prohibiting the generation of a smaller coding unit by performing vertical binary splitting on the first coding unit.
[0285] According to an embodiment, when the length of each of the height and width of the coding unit including the outline of the image is greater than the maximum transform size, the video decoding device 1900 may allow a smaller coding unit to be generated by performing quadtree partitioning on the coding unit. Specifically, a quadtree partitioning flag value for allowing a smaller coding unit to be generated by performing quadtree partitioning on the coding unit may be set.
[0286] According to an embodiment, the lengths of the height and width of the coding unit may be greater than or equal to the maximum transform size.
[0287] In addition, in operation 2020, when the first coding unit is adjacent to the outline of the image so that the height or width of the first coding unit is outside the outline of the image, the video decoding device 1900 may prohibit binary division in the direction of dividing the height or width of the first coding unit, which may be outside the outline of the image. As a specific example, when the height of the first coding unit is greater than the maximum transform size and the width of the first coding unit is outside the right outline of the image, the video decoding device 1900 may determine to prohibit vertical binary division for dividing the width of the first coding unit. Similarly, when the width of the first coding unit is greater than the maximum transform size and the height of the first coding unit is outside the lower outline of the image, the video decoding device 1900 may determine to prohibit horizontal binary division for dividing the height of the first coding unit.
[0288] However, when the height of the coding unit including the outer boundary of the image is outside the lower contour of the image or the width of the coding unit is outside the right contour of the image, the video decoding device 1900 may allow quadtree partitioning of the coding unit.
[0289] In operation 2030, the video decoding device 1900 may perform decoding by inversely transforming the second coding unit generated from the first coding unit using the maximum transform size. The video decoding device 1900 may determine a prediction block by performing prediction on the second coding unit, reconstruct a residual block by performing inverse quantization and inverse transformation on the second coding unit using the transform block, and determine a reconstructed block by synthesizing the prediction block and the residual block.
[0290] According to an embodiment, in response to a video encoding device 1700 in which the size of a pipeline data unit is set to be equal to a maximum transform size to complete encoding within a pipeline cycle, in order to enable the video decoding device 1900 to complete decoding within one pipeline cycle by performing an inverse transform and generating a reconstructed block, it is also necessary to set the size of the pipeline data unit used by the video decoding device 1900 to be equal to the maximum transform size, and to arbitrarily divide the encoding unit based on the maximum transform size.
[0291] Therefore, an embodiment will be described below, in which, considering the pipeline cycle, the video decoding device 1900 compares the maximum transform size with at least one of the height and width of the coding unit, and sets a vertical binary division flag value, a horizontal binary division flag value, and a quadtree division flag value, respectively indicating whether vertical binary division, horizontal binary division, and quadtree division of the coding unit are allowed.
[0292] Specifically, in order to complete the decoding of the coding unit within the pipeline cycle, when the length of the width of the coding unit is greater than the maximum transformation size and the length of the height of the coding unit is equal to the maximum transformation size, the video decoding device 1900 may allow the generation of smaller coding units by performing vertical binary splitting on the coding unit, and prohibit the generation of smaller coding units by performing horizontal binary splitting on the coding unit.
[0293] Specifically, in order to complete the decoding of the coding unit within the pipeline cycle, when the length of the width of the coding unit is equal to the maximum transformation size and the length of the height of the coding unit is greater than the maximum transformation size, the video decoding device 1900 may allow the generation of smaller coding units by performing horizontal binary splitting on the coding unit, and prohibit the generation of smaller coding units by performing vertical binary splitting on the coding unit.
[0294] Specifically, in order to complete the decoding of the coding unit within the pipeline cycle, when the length of the width of the coding unit is greater than the maximum transformation size and the length of the height of the coding unit is equal to the maximum transformation size, the video decoding device 1900 may allow the generation of smaller coding units by performing vertical binary splitting on the coding unit, and prohibit the generation of smaller coding units by performing horizontal binary splitting on the coding unit.
[0295] Specifically, in order to complete the decoding of the coding unit within the pipeline cycle, when the length of the width of the coding unit is equal to the maximum transformation size and the length of the height of the coding unit is greater than the maximum transformation size, the video decoding device 1900 may allow the generation of smaller coding units by performing horizontal binary splitting on the coding unit, and prohibit the generation of smaller coding units by performing vertical binary splitting on the coding unit.
[0296] Specifically, in order to complete decoding of a coding unit within a pipeline cycle, when each of the dimensions of the height and width of the coding unit is greater than the maximum transform size, the video decoding device 1900 may allow a smaller coding unit to be generated by performing quadtree partitioning on the coding unit.
[0297] In addition, according to an embodiment, the video decoding device 1900 may predetermine a maximum value and a minimum value based on information obtained from a bitstream to limit the size of a maximum coding unit or a coding unit.
[0298] In operation 2010, according to an embodiment, the video decoding device 1900 may divide an image into a maximum coding unit having a constant size and decode the image. Since the size of the maximum coding unit has been previously determined by the video encoding device 1700, the video decoding device 1900 may obtain information about the size of the maximum coding unit from the SPS. According to an embodiment, the size of the maximum coding unit may be 128x128.
[0299] According to an embodiment, the video decoding device 1900 may separately obtain information about the maximum size and the minimum size of a coding unit from a bitstream based on the type of a slice.
[0300] Specifically, the video decoding device 1900 may obtain information about the minimum size of the luma coding unit and information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary division on the intra slice from the bitstream. By using the information about the minimum size of the luma coding unit and the information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary division on the intra slice, the video decoding device 1900 may determine the maximum size of the luma coding unit generated by performing binary division on the intra slice. In addition, the video decoding device 1900 may obtain the encoded information about the minimum size of the luma coding unit and information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary division on the intra slice from the SPS.
[0301] Specifically, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the intra slice from the bitstream. By using the information about the minimum size of the luma coding unit and the information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the intra slice, the video decoding device 1900 may determine the maximum size of the luma coding unit generated by performing three-way division on the intra slice. In addition, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the intra slice from the SPS.
[0302] Specifically, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice from the bitstream. By using the information about the minimum size of the luma coding unit and the information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice, the video decoding device 1900 may determine the maximum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice. In addition, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing binary partitioning on the inter-frame slice from the SPS.
[0303] Specifically, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the inter-frame slice from the bitstream. By using the information about the minimum size of the luma coding unit and the information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the inter-frame slice, the video decoding device 1900 may determine the maximum size of the luma coding unit generated by performing three-way division on the inter-frame slice. In addition, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the luma coding unit generated by performing three-way division on the inter-frame slice from the SPS.
[0304] According to an embodiment, the video decoding device 1900 may determine whether the luma coding unit and the chroma coding unit are determined separately based on information obtained from the bitstream. Specifically, the video decoding device 1900 may obtain information indicating whether the luma coding unit and the chroma coding unit are determined separately from the SPS.
[0305] Specifically, when the luma coding unit and the chroma coding unit are determined separately, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing binary division on the intra slice from the bitstream. By using the information about the minimum size of the chroma coding unit and the information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing binary division on the intra slice, the video decoding device 1900 may determine the maximum size of the chroma coding unit generated by performing binary division on the intra slice. In addition, the video decoding device 1900 may obtain encoded information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing binary division on the intra slice from the SPS.
[0306] Specifically, when the luma coding unit and the chroma coding unit are determined separately, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing three-way division on the intra slice from the bitstream. By using the information about the minimum size of the chroma coding unit and the information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing three-way division on the intra slice, the video decoding device 1900 may determine the maximum size of the chroma coding unit generated by performing three-way division on the intra slice. In addition, the video decoding device 1900 may obtain information about the difference between the maximum size and the minimum size of the chroma coding unit generated by performing three-way division on the intra slice from the SPS.
[0307] According to an embodiment, when the coding unit is not adjacent to the outer boundary of the image, the video decoding device 1900 may obtain encoding partition type information of the coding unit from a bitstream.
[0308] Specifically, when the obtained split type information of the first coding unit indicates binary splitting, the video decoding device 1900 may determine two second coding units whose depth is increased by 1 compared to the depth of the first coding unit. For example, when the depth of the first coding unit is N, the depth of each of the two second coding units generated by performing binary splitting on the first coding unit may be N+1. In this regard, the area of each of the second coding units may be 1 / 2 of the area of the first coding unit.
[0309] Specifically, when the obtained division type information of the first coding unit indicates a three-way division, the video decoding device 1900 may determine a third coding unit whose depth is increased by 1 compared to the depth of the first coding unit and two fourth coding units whose depths are each increased by 2 compared to the depth of the first coding unit. For example, when the depth of the first coding unit is N, the depth of the third coding unit may be N+1, and the depth of each of the two fourth coding units may be N+2, and the third coding unit and the fourth coding unit are generated by performing three-way division on the first coding unit. In this regard, the area of the third coding unit may be 1 / 2 of the area of the first coding unit, and the area of each of the fourth coding units may be 1 / 4 of the area of the first coding unit.
[0310] Next, we will refer to Fig.21 and Fig.28 A combination of pipeline data units that can be used by the video encoding apparatus 1700 and the video decoding apparatus 1900 is described.
[0311] Fig.21 The relationship between a maximum coding unit, a pipeline data unit, and a block according to an embodiment is shown.
[0312] The hardware design in the video encoding method that performs partitioning of the coding unit using quadtree partitioning, binary partitioning, and ternary partitioning can be considered to define the partitioning method. For example, in the traditional video codec standard, the size of the maximum coding unit (coding tree unit (CTU)) is 64x64, and therefore, the size of the pipeline data unit is also set to 64x64. However, in some codecs that are currently being standardized, the size of the maximum coding unit (CTU) 2100 can be determined to be up to 128x128. This means that the memory size or cache size is increased compared to the traditional codec standard. Therefore, in some codecs that are currently being standardized, the block partitioning rule is limited to a pipeline data unit 2110 having a size of 64x64. Specifically, constraints have been set that do not allow ternary partitioning in blocks of size greater than 64x64 (width>64 or height>64), and only allow binary partitioning in a ratio of 1:2 or 2:1 in blocks of size greater than 64x64 (i.e., only blocks of size 128x128, 128x64, and 64x128 are allowed. Because the current maximum transform size is 64 (i.e., the size of the maximum transform unit is 64x64), it may be allowed to split a block into blocks larger than the pipeline data unit 2110 of size 64x64.
[0313] In addition, in order to complete the encoding or decoding process of the coding unit during the pipeline cycle of the pipeline data unit 2110, the coding unit needs to be located in the pipeline data unit 2110 without crossing the boundary line (hereinafter referred to as the pipeline boundary line) of the pipeline data unit 2110. Although the coding units 2120 and 2130 are located in the pipeline data unit 2110, the coding units 2140 and 2150 cross the pipeline boundary line, so the encoding or decoding process is difficult to complete within one pipeline cycle.
[0314] According to an embodiment, in order to complete the transformation / inverse transformation performed based on the transformation unit during the pipeline cycle, it is preferred that the transformation unit is located in the pipeline data unit 2110. In particular, the transformation unit is not allowed to cross the pipeline boundary line. Therefore, according to an embodiment, the video encoding device 1700 and the video decoding device 1900 may prohibit the determination of the transformation unit from the coding unit. To this end, the video encoding device 1700 and the video decoding device 1900 may determine the size of the maximum transformation unit to 64x64, which is the size of the pipeline data unit and is less than or equal to the size of the coding unit.
[0315] According to an embodiment, the video encoding device 1700 and the video decoding device 1900 can determine the transformation unit that does not cross the pipeline boundary line by dividing the transformation unit that crosses the pipeline boundary line into smaller sizes. However, there is a problem that the division of the transformation unit needs to be changed according to the position of the pipeline boundary line and the coding unit and the shape of the coding unit.
[0316] According to another embodiment, when a coding unit crosses a pipeline boundary line, the video encoding device 1700 may not be able to perform a transform on the corresponding block within the pipeline cycle, and thus may be able to encode the block without residual data. That is, since the coding unit is a coding unit that does not include residual data, there is no need to determine the transform unit.
[0317] According to an embodiment, the video encoding device 1700 may set the encoding mode of the coding unit crossing the pipeline boundary line to the skip mode, and encode the coding unit without encoding the residual data. In response to this, the video decoding device 1900 may determine the encoding mode of the coding unit crossing the pipeline boundary line to the skip mode, and decode the coding unit without decoding the residual data. In addition, the encoding mode of the coding unit crossing the pipeline boundary line is limited to the skip mode, and other encoding modes may be prohibited.
[0318] According to another embodiment, even if the encoding mode of the coding unit crossing the pipeline boundary line is a mode other than the skip mode, the video encoding device 1700 may encode the coding unit without residual data by setting the coded block flag (cbf) of the coding unit or the transform unit to 0. In response to this, the video decoding device 1900 may determine that the encoding mode of the coding unit crossing the pipeline boundary line has a cbf of 0 regardless of the encoding mode, and decode the coding unit without decoding the residual data.
[0319] Therefore, the video encoding device 1700 may set the encoding mode of the block (coding unit or transformation unit) crossing the pipeline boundary line to a mode that can be processed without residual data, so as to encode the corresponding block (coding unit or transformation unit). Similarly, the video decoding device 1900 may determine the encoding mode of the block (coding unit or transformation unit) crossing the pipeline boundary line to a mode that can be processed without residual data, so as to decode the corresponding block (coding unit or transformation unit).
[0320] In addition, in the sub-block based prediction method, the entire block is set as the motion vector estimation range, so the video encoding device 1700 and the video decoding device 1900 may not be able to apply the sub-block based prediction method to the coding unit crossing the pipeline boundary line. Therefore, the sub-block based prediction method (such as the affine skip method) is not applicable to the coding unit crossing the pipeline boundary line.
[0321] However, as an exception, the problem caused by the pipeline method does not occur in the maximum coding unit that crosses the outline of the image. Therefore, the restriction of prohibiting residual data at the pipeline boundary may not be applied to the maximum coding unit that crosses the outline of the image.
[0322] exist Fig.21 In the above, only the case where the pipeline data unit size is 64x64 is described. However, there is a disadvantage that the encoding performance is reduced by limiting the pipeline data unit to only square blocks. Therefore, the following Figure 22 to Figure 28 In the present invention, a method for improving encoding performance by allowing pipeline data units of various shapes (such as square and non-square) but keeping the size (area) of the pipeline data unit at 64×64=4096 is provided. Because the various shapes of the pipeline data unit require operations for memory addressing, the complexity of the implementation may increase, but the encoding performance can be increased. Therefore, when selecting the pipeline type, the encoding performance and the amount of operations can be considered to select the optimal pipeline data unit. In the following Figure 22 to Figure 28 An embodiment of the allowed pipeline data unit combinations is shown in FIG.
[0323] Fig. 22 Three shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are shown.
[0324] like Fig. 22 As shown, the allowed pipeline data unit combination may include pipeline data units of three shapes. That is, a maximum coding unit of 128x128 size may include a combination 2210 of four pipeline data units of 64x64 size, a combination 2220 of four pipeline data units of 32x128 size, and a combination 2230 of four pipeline data units of 128x32 size. In this case, for example, three-way partitioning may not be allowed in blocks of 128x128, 128x64, and 64x128 sizes.
[0325] When a 128x128-sized block is vertically partitioned and its first 64x128-sized block is vertically binary partitioned, its second 64x128-sized block can be vertically binary partitioned unconditionally (horizontal binary partitioning and no partitioning may not be allowed in the second 64x128-sized block). When the first 64x128-sized block is not partitioned or is horizontally binary partitioned, vertical binary partitioning may not be allowed in the second 64x128-sized block.
[0326] In addition, when a 128x128-sized block is horizontally split and its first 128x64-sized block is horizontally binary split, its second 128x64-sized block can be horizontally binary split unconditionally (vertical binary split and no split may not be allowed in the second 128x64-sized block). When the first 128x64-sized block is not split or is vertically binary split, horizontal binary split may not be allowed in the second 128x64-sized block.
[0327] Fig.23 Five shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are illustrated.
[0328] like Fig.23 As shown, the allowed pipeline data unit combinations may include pipeline data units of five shapes. In this case, for example, it may be considered to change Fig. 22 The constraints in the embodiment of , allow trifurcated partitioning in a block of 128x128 size. In this case, when a block of 128x128 size is trifurcated and its center block is binary partitioned, binary partitioning in the center block may be allowed in the same direction as the trifurcated partitioning. When allowed, combinations 2320 and 2330 of four rectangular pipeline data units of the same size may be determined.
[0329] However, when the 128x128 size block is trifurcated and the center block is binary partitioned, binary partitioning in the center block is not allowed in the same direction as the trifurcated partitioning direction. In this case, you can use Fig.23 The pipeline data unit of the combination 2340 or 2350.
[0330] Fig.24 Seven shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are shown.
[0331] like Fig.24As shown, the allowed pipeline data unit combinations may include pipeline data units of seven shapes. According to an embodiment, when three-way partitioning is not allowed in blocks of 128x128, 128x64, and 64x128 sizes, it may be determined Fig.24 combination.
[0332] Fig.25 Nine shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of the size of the pipeline data unit according to another embodiment are shown.
[0333] like Fig.25 As shown, the allowed pipeline data unit combinations may include pipeline data units of nine shapes. According to an embodiment, when three-way partitioning is allowed in a block of 128x128 size and three-way partitioning is not allowed in a block of 128x64 size and a block of 64x128 size, it may be determined Fig.25 combination.
[0334] Fig.26 Two shapes of combinations of pipeline data units that may be determined from a maximum coding unit in consideration of the size of the pipeline data unit according to an embodiment are shown.
[0335] like Fig.26 As shown, the allowed pipeline data unit combination may include pipeline data units of two shapes. According to an embodiment, when ternary partitioning is not allowed in blocks of 128x128, 128x64, and 64x128 sizes and only vertical binary partitioning is allowed in blocks of 128x128 size, it may be determined Fig.26 When a 128x128-sized block is vertically partitioned and its first 64x128-sized block is vertically binary partitioned, its second 64x128-sized block can be vertically binary partitioned unconditionally. Horizontal binary partitioning and no partitioning are not allowed in the second 64x128-sized block.
[0336] Fig. 27 Two shapes of combinations of pipeline data units that can be determined only through quadtree partitioning or binary partitioning of a maximum coding unit in consideration of the size of the pipeline data unit according to an embodiment are shown.
[0337] like Fig. 27As shown, the allowed pipeline data unit combination may include pipeline data units of two shapes. For example, three-way partitioning may not be allowed in blocks of 128x128, 128x64, and 64x128 sizes, and only horizontal binary partitioning is allowed in blocks of 128x128 size. When a block of 128x128 size is horizontally partitioned and its first block of 128x64 size is horizontally binary partitioned, its second block of 128x64 size can be horizontally binary partitioned unconditionally (vertical binary partitioning and no partitioning may not be allowed in the second block of 128x64 size).
[0338] Fig.28 Three shapes of combinations of pipeline data units that may be determined by quadtree partitioning, ternary partitioning, and binary partitioning of a maximum coding unit in consideration of sizes of the pipeline data units according to an embodiment are shown.
[0339] like Fig.28 As shown, the allowed pipeline data unit combination may include pipeline data units of three shapes. When trifurcated partitioning is allowed in a block of 128x128 size, and thus a block of 128x128 size is trifurcated and its central block is binary partitioned, binary partitioning in the same direction as the trifurcated partitioning direction may not be allowed in the central block. In this case, depending on whether trifurcated partitioning is allowed and the partitioning direction, a combination of pipeline data units may be selected from the three combinations.
[0340] References Figures 21 to 28 Various shapes of the pipeline data unit are described. However, in addition to the above embodiments, the pipeline data unit can be configured as any combination that can be easily modified by a person of ordinary skill in the art.
[0341] Although the shape of the pipeline data unit allowed varies according to the above-mentioned various situations, the point that the residual data of the block crossing the pipeline boundary line is not processed remains the same. Fig.29 Describes a method for determining whether the current block crosses a pipeline boundary.
[0342] Fig.29 A function for determining whether a coding unit is located at a boundary line of a pipeline data unit according to an embodiment is shown.
[0343] exist Fig.29 In the function, the size of the pipeline data unit is 64x64, the coordinates of the upper left sample point of the current block are (x, y), and the height and width of the current block are h and w respectively.
[0344] When the right boundary of the current block is outside the right boundary line of the pipeline data unit (if (left_pipeline_boundary + 64 < x + w)), it can be determined that the current block straddles the boundary line of the pipeline data unit (result = true).
[0345] When the lower boundary of the current block is outside the lower boundary line of the pipeline data unit (if (top_pipeline_boundary + 64 < y + h)), it can be determined that the current block straddles the boundary line of the pipeline data unit (result = true).
[0346] When the size of the current block is 128x128 (if (w == 128 && h == 128)), it can be determined that the current block does not straddle the boundary line of the pipeline data unit (result = false).
[0347] When the width of the current block is 64 and the height of the current block is 128 (if (w == 64 && h == 128 && (w % 64) == 0)), it can be determined that the current block does not straddle the boundary line of the pipeline data unit (result = false).
[0348] When the height of the current block is 64 and the width of the current block is 128 (if (h == 64 && w == 128 && (h % 64) == 0)), it can be determined that the current block does not straddle the boundary line of the pipeline data unit (result = false).
[0349] When the right boundary or the lower boundary of the current block is outside the contour of the image (if ((x + 128) > pic_w || (y + 128) > pic_h)), it can be determined that the current block does not straddle the boundary line of the pipeline data unit (result = false).
[0350] Next, various embodiments will be described, in which the video encoding device 1700 and the video decoding device 1900 signal information regarding the maximum size, minimum size, and the difference between the maximum size and the minimum size of various blocks for video encoding and decoding.
[0351] The size of the maximum coding unit and the minimum size of the coding unit can be defined independently of the division mode. Before reaching the minimum size of the coding unit, the coding unit can be recursively divided using division methods of various segmentation types (quadtree division, binary division, and ternary division types). That is, when recursive segmentation is performed, it can be determined whether the current coding unit can be further divided into sub-coding units by comparing the size of the current coding unit with the minimum size of the coding unit. For example, when identifying whether to perform quadtree division, when quadtree division is performed on the current coding unit and the size of the sub-coding unit becomes smaller than the minimum size of the coding unit, quadtree division may not be performed. As another example, when identifying whether to perform binary division, when binary division is performed on the current coding unit in a specific direction, when the length of the corresponding side of the sub-coding unit in the division direction becomes smaller than the minimum size of the coding unit, binary division in a specific direction may not be performed. As another example, when identifying whether to perform trifurcating division, when trifurcating division is performed in a specific direction on the current coding unit and the length of the corresponding side of the sub-coding unit in the division direction becomes smaller than the minimum size of the coding unit, the trifurcating division in the specific direction may not be performed.
[0352] In this regard, information about the minimum size of the coding unit may be predefined by the video encoding device 1700 and the video decoding device 1900. The video encoding device 1700 may encode the information about the minimum size of the coding unit and include the encoded information in a sequence header, SPS, picture header, picture parameter set (PPS), or slice header. In response, the video decoding device 1900 may obtain information about the minimum size of the coding unit from the sequence header, SPS, picture header, PPS, or slice header.
[0353] As a specific example, the minimum size of the coding unit may be 4. In addition, the value after log2 of the minimum size of the coding unit may be encoded. That is, when the minimum size of the coding unit is 4, the value corresponding to the log2 of the coding unit is 2, and when -2 is applied thereto, the resulting value may be 0. By applying -2 to the value after log2 of the minimum size of the coding unit and then signaling the resulting value, the encoding efficiency of the information about the minimum size of the coding unit may be improved. In this regard, a fixed length coding (FLC) method or a variable length coding (VLC) method may be used as a method for encoding the information about the minimum size of the coding unit. In this case, when the VLC method is used, an unsigned exponential Golomb code method may be used. As another example, when the minimum size of the coding unit is 8, the resulting value may be signaled by applying -2 to the value (3) corresponding to the log2 and setting the value to 1.
[0354] The allowed partition depth (indicating the number of recursive partitions allowed in the corresponding type) for various partition types (quadtree partition, binary partition, ternary partition type) can also be set separately for each partition type. When the video encoding device 1700 and the video decoding device 1900 support quadtree partition, binary partition and ternary partition, for example, the partition depth allowed by quadtree partition, the partition depth allowed by binary partition and the partition depth allowed by ternary partition can be set. As another example, the partition depth allowed by quadtree partition and the partition depth allowed by binary partition and ternary partition can also be defined. In this case, the partition depth allowed by binary partition and ternary partition can be set equally. As another example, the partition depth allowed by quadtree partition, binary partition and ternary partition can be set to a single partition depth.
[0355] In the aforementioned embodiment of presetting the partition depth, the concept of depth can be considered as the concept of area. For example, when a block is partitioned and therefore the area of its sub-block is 1 / N, the depth of the sub-block can be set to be 1 more than the depth of the block. For example, in the case of N=2, when two M / 2xM blocks are determined by performing binary partitioning on an MxM block (depth=0), the area of each M / 2xM block is 1 / N (i.e., 1 / 2), so that the depth of each M / 2xM block increases by 1, so the depth can be 1. In addition, when four M / 2xM / 2 blocks are determined by performing quadtree partitioning on an MxM block (depth=0), the area of each M / 2xM / 2 block is 1 / N×1 / N (i.e., 1 / 2×1 / 2=1 / 4), so that the depth of each M / 2xM / 2 increases by 2, so the depth can be determined to be 2. In addition, when two M / 4xM blocks and one M / 2xM block are determined by performing trifurcated partitioning on the MxM block (depth=0), the depth of each M / 4xM block increases by 2, so the depth may be determined as 2, and the depth of the M / 2xM block increases by 1, so the depth may be determined as 1. In addition, depth information may be individually set depending on a partitioning method.
[0356] In addition, there is a module that performs a specific operation by comparing the depth information of the adjacent block with the depth information of the current block, and the depth configuration method in the corresponding segmentation method can be used. For example, the context-based adaptive binary arithmetic code (CABAC) context can be determined by comparing the depth of the current block with the depth of the adjacent block. The embodiment is not limited to the depth of a specific partitioning pattern, and the depth of the current block is compared with the depth of the adjacent block based on the actual partitioning area or block size, so that a more accurate context can be determined.
[0357] Assuming that the allowed partition depths of binary partition and ternary partition are the same as each other, and the allowed partition depth is N, in the case of binary partition, when the current depth is D, the depth of each sub-block is D+1. However, in the case of ternary partition, since the areas of the sub-blocks are different from each other, the depths of the first sub-block and the third sub-block are determined to be D+2, and the depth of the second (middle) sub-block is determined to be D+1. In this regard, when the allowed partition depth (N) is D+3, an additional partition can be performed on the first sub-block and the third sub-block, and two additional partitions can be performed on the second sub-block. As another example, an additional partition can be performed on the first sub-block and the third sub-block, but only a partition mode that increases the depth of the sub-block by 1 is allowed. That is, because there is a partition mode that increases the depth of the sub-block by 2 when the ternary partition is performed on the corresponding sub-block, the ternary partition can be not used, and a partition mode that increases the depth of the sub-block by 1 (such as binary partition) can be allowed. That is, the depth of the block as a leaf node can be set to a value that does not exceed the partition depth.
[0358] According to an embodiment, the video encoding device 1700 and the video decoding device 1900 may only pre-set the maximum size and the minimum size of the coding unit, and may not signal the allowed split depth. In this case, the split depth allowed by quadtree splitting, binary splitting, and ternary splitting reaches the minimum size of the coding unit, and no special allowed split depth is signaled. However, even in this case, information about the split depth can be stored in the storage device for execution of other modules.
[0359] In a partition structure that allows binary partitioning and trifurcating partitioning, when a constraint is imposed on the maximum size of a coding unit for each of the binary partitioning and the trifurcating partitioning (for example, when the binary partitioning or the trifurcating partitioning is not performed with a size larger than the maximum size of the coding unit), the value of the maximum size of the coding unit for the trifurcating partitioning may be set to be always equal to or less than the value of the maximum size of the coding unit for the binary partitioning. As a specific example, when the value of the maximum size of the coding unit for the binary partitioning is 64, the value of the maximum size of the coding unit for the trifurcating partitioning may be equal to or less than 64, i.e., 32.
[0360] According to an embodiment, the video encoding device 1700 and the video decoding device 1900 may allow only binary partitioning and ternary partitioning in a coding unit having a fixed size or smaller by presetting the maximum size of the coding unit for binary partitioning and ternary partitioning. As a specific example, binary partitioning and ternary partitioning may always be allowed only on an edge having a length of 64 or less.
[0361] According to an embodiment, the video encoding device 1700 and the video decoding device 1900 may use the maximum transform size as a reference when designing a hardware pipeline. In this case, a constraint may be imposed on the partitioning so that the number of blocks greater than the maximum transform size relative to the longer side of the block does not exceed (the maximum size of the coding unit) / (the maximum transform size) within the maximum coding unit. For example, when the maximum size of the coding unit is 128 and the maximum transform size is 64, in the maximum coding unit of size 128x128, 128 / 64 blocks (i.e., a maximum of two blocks) may be allowed, each of the two blocks having at least two sides of length 128 greater than 64. Here, because a block having a side length of 128 has a maximum transform size of 64, the transform should be performed by dividing one side of the block having a length of 128. That is, because a block having a side length of 128 includes two transform blocks having the maximum transform size, two pipeline data units are required for pipeline design, so a maximum of two blocks may be allowed by default. Specifically, when trisection partitioning is performed on a maximum coding unit of a size of 128x128 at a ratio of 1:2:1, three blocks having a side length of 128 are generated, and thus such trisection partitioning may not be permitted. Alternatively, when horizontal binary partitioning is performed again on each sub-block (128x64) generated by performing vertical binary partitioning on a maximum coding unit of a size of 128x128 at a ratio of 1:1, three or more blocks having a side length of 128 are generated, and thus binary partitioning of these sub-blocks is not permitted.
[0362] In a block structure that performs partitioning using quadtree partitioning, binary partitioning, and ternary partitioning, relative to the maximum transform size, ternary partitioning may not be allowed for blocks whose sides are larger than the maximum transform size, and only ternary partitioning may be allowed for blocks with aspect ratios of 1:1, 1:2, and 2:1. As a specific example, when the maximum transform size is 64, ternary partitioning is not allowed by default for blocks of 128x128 size, and only ternary partitioning is allowed for blocks of 1:1, 1:2, and 2:1 aspect ratios. Therefore, because the binary partitioned sub-blocks (blocks with aspect ratios of 1:2 or 2:1, i.e., blocks of 128x64 size or 64x128 size) already have a ratio of 1:2 or 2:1, binary partitioning that partitions the longer side may be allowed.
[0363] In a structure that allows the block generated by quadtree partitioning to be split using binary partitioning and ternary partitioning, the partition depth allowed by binary partitioning and ternary partitioning can be defined. In this case, the partition depth allowed by binary partitioning and ternary partitioning can be defined depending on the depth of quadtree partitioning (or the block size of the block generated by quadtree partitioning). For example, when the depth of the block generated by quadtree partitioning is between 0 and 2, the partition depth allowed by binary partitioning and ternary partitioning in the block generated by quadtree partitioning can be determined to be 2. When the depth of the block generated by quadtree partitioning is between 3 and the last depth or the minimum size allowed by the block generated by quadtree partitioning, the partition depth allowed by binary partitioning and ternary partitioning can be set to 3.
[0364] As another example, when the depth of the block generated by quadtree partitioning is between 0 and 2, the partition depth allowed by binary partitioning and ternary partitioning may be set to 3. When the depth of the block generated by quadtree partitioning is between 3 and the last depth or the minimum size allowed by the block generated by quadtree partitioning, the partition depth allowed by binary partitioning and ternary partitioning may be set to 2.
[0365] In a method of independently segmenting a luminance block and a chrominance block, segmentation information about the luminance block and segmentation information about the chrominance block may be transmitted separately. In the above method, the video decoding apparatus 1900 may apply parameters for determining a segmentation method of the luminance block to a segmentation method of the chrominance block in the same manner. As another example, parameters for segmentation methods of the luminance block and the chrominance block are signaled separately so that different segmentation methods may be performed.
[0366] Below, a specific example of the size of the picture sample unit will be given. For the luminance block and the chrominance block, the maximum size of the binary divisible coding unit can be determined to be the same. In this regard, the maximum size of the binary divisible coding unit can be a value pre-agreed by the video encoding device 1700 and the video decoding device 1900, or can be a value notified by header signaling. The value determined in units of sequences can be used together in intra-frame slices and inter-frame slices, or the value determined in units of slices can be used together by signaling for each slice.
[0367] As another example, for each luminance block and each chrominance block, the maximum size of the binary divisible coding unit may be determined differently. In this regard, the maximum size of the binary divisible coding unit may be a value pre-agreed by the video encoding device 1700 and the video decoding device 1900, or may be a value notified by header signaling. In this case, in units of picture samples, the maximum size of the binary divisible chrominance block may be greater than the maximum size of the binary divisible luminance block.
[0368] As another example, in a method of independently segmenting a luminance block and a chrominance block, when the maximum size of a binary divisible coding unit is determined in units of signaled picture samples, the maximum size may be interpreted based on actual luminance blocks and chrominance blocks. For example, when a 4:2:0 YUV color format is used and the maximum size of a binary divisible coding unit is determined to be 32, the maximum size of the binary divisible coding unit may be applied in units of luminance samples in the segmentation of the luminance block, and the maximum size of the binary divisible coding unit may be applied in units of chrominance samples in the segmentation of the chrominance block. In this case, in the segmentation of the chrominance block, a parameter corresponding to a size twice the width and height of the luminance block relative to the picture sample is applied.
[0369] In the above-described embodiments, the video encoding apparatus 1700 and the video decoding apparatus 1900 may perform signaling on the maximum size of a binary-dividable coding unit and the maximum size of a tri-dividable coding unit in an integrated manner.
[0370] The following are examples of block segmentation methods that may be used by the video encoding apparatus 1700 and the video decoding apparatus 1900 .
[0371] - In a method of independently partitioning a luminance block and a chrominance block, parameters of the partitioning method of the luminance block and the chrominance block may be signaled in an integrated manner for the luminance block and the chrominance block, and the partitioning method may also be shared between the luminance block and the chrominance block.
[0372] -Parameters of the partitioning method in the intra slice and the inter slice can be integrated and then signaled, and the partitioning method can be shared between the intra slice and the inter slice. By setting the parameters in units of a sequence, the corresponding partitioning method can be shared in all pictures.
[0373] -When the maximum size of a coding unit is 128x128, a block having a maximum size (binary partitioning is allowed) may be fixedly determined as a coding unit of a size of 64x64 in an intra slice. In addition, a block having a maximum size that can be trifurcated may be determined as a 64x64 coding unit in the same manner as the binary partitioning, or may be determined as a coding unit of a size of 32x32 (which corresponds to 1 / 4 of 128x128). A block having a maximum size (binary partitioning is allowed) may be fixedly determined as a coding unit of a size of 128x128 in an inter slice. In addition, a block having a maximum size that can be trifurcated may be determined as a 128x128 coding unit in the same manner as the binary partitioning, or may be determined as a coding unit of a size of 64x64 (which corresponds to 1 / 4 of 128x128).
[0374] -The maximum size of the trifurcated coding unit may be determined based on the maximum size of the bifurcated coding unit. For example, a size corresponding to 1 / 4 of the maximum size of the bifurcated coding unit may be determined as the maximum size of the trifurcated coding unit. When the maximum size of the bifurcated coding unit is MxN, the maximum size of the trifurcated coding unit may be M / 2xN / 2. That is, the maximum size of the trifurcated coding unit may be determined based on the signaling notification of the maximum size of the bifurcated coding unit.
[0375] -According to an embodiment, the video encoding device 1700 and the video decoding device 1900 may fixedly set the maximum size of the binary divisible coding unit and the maximum size of the trifurcated divisible coding unit without signaling. When a method of independently splitting a luminance block and a chrominance block is applied, the maximum size of the binary divisible block and the maximum size of the trifurcated divisible block may also be fixedly set depending on the slice type. In addition, the maximum size of the trifurcated divisible block may be determined to be equal to the maximum transform size. As a specific example, the maximum size of the binary divisible block may be set differently for an intra slice and an inter slice, but the maximum size of the binary divisible block in the intra slice may be set to be smaller than the maximum size of the binary divisible block in the inter slice.
[0376] In addition, when a method of independently dividing the luma block and the chroma block is applied, the maximum size of the binary divisible luma block can be set to be smaller than the maximum size of the binary divisible chroma block in the same slice. Similarly, the maximum size of the trifurcated luma block can be set to be smaller than the maximum size of the trifurcated chroma block in the same slice. As a specific example, the maximum size of the binary divisible block in the intra slice can be set to 32, and the maximum size of the binary divisible block in the inter slice can be set to 128.
[0377] When a method of independently partitioning luminance blocks and chrominance blocks is applied, the maximum size of a binary-divisible chrominance coding unit in an intra slice may be set to 64. In addition, for a coding unit having a side length of 128, partitioning is allowed only at a ratio of 1:2 or 2:1.
[0378] -For example, the video decoding device 1900 may obtain the following parameters from a bitstream, and the video encoding device 1700 may encode the following parameters and then transmit the encoded parameters included in the bitstream.
[0379] * Maximum size of a coding unit
[0380] * Maximum size of binary divisible coding unit (applicable to luma blocks and chroma blocks) (When a method of independently splitting luma blocks and chroma blocks is applied, information about the maximum size of binary divisible coding units can be shared and used in luma blocks and chroma blocks.)
[0381] * Maximum size of a three-way divisible coding unit (applicable to luma blocks and chroma blocks) (When a method of independently splitting luma blocks and chroma blocks is applied, information about the maximum size of a three-way divisible coding unit may be shared and used in luma blocks and chroma blocks.)
[0382] - As another example, the video decoding device 1900 may obtain the following parameters from a bitstream, and the video decoding device 1900 may encode the following parameters and then transmit the encoded parameters included in the bitstream.
[0383] * Maximum size of a coding unit
[0384] * Maximum size of binary-divisible coding units and tri-divisible coding units (applicable to luminance blocks and chrominance blocks) (when a method of independently splitting luminance blocks and chrominance blocks is applied, information about the maximum size of binary-divisible coding units can be shared and used in luminance blocks and chrominance blocks).
[0385] - In addition, as another example, the video decoding device 1900 may obtain the following parameters from the bitstream, and the video decoding device 1900 may encode the following parameters and then transmit the encoded parameters included in the bitstream.
[0386] * Maximum size of a coding unit
[0387] * Maximum size of a binary divisible coding unit (applicable to luma blocks and chroma blocks) (The maximum size of a trifurcatingly divisible coding unit can be determined by using the maximum size of a binary divisible coding unit.)
[0388] - In addition, as another example, the video decoding device 1900 may obtain the following parameters from the bitstream, and the video decoding device 1900 may encode the following parameters and then transmit the encoded parameters included in the bitstream.
[0389] * Maximum size of a coding unit
[0390] * Maximum size of binary and tri-partitionable luma coding units
[0391] * Maximum size of binary and tri-partitionable chroma coding units when applying the method of independently partitioning luminance blocks and chroma blocks
[0392] *When the method of independently splitting the luma block and the chroma block is not applied, the maximum size of the binary-divisible and tri-divisible luma coding unit may be applied to the splitting of the chroma coding unit.
[0393] - In addition, as another example, the video decoding device 1900 may obtain the following parameters from the bitstream, and the video decoding device 1900 may encode the following parameters and then transmit the encoded parameters included in the bitstream.
[0394] * Maximum size of a coding unit
[0395] * Maximum size of a binary divisible luma coding unit
[0396] * When the method of independently partitioning luminance blocks and chrominance blocks is applied, the maximum size of the chrominance coding unit that can be binary divided
[0397] *When the method of independently splitting the luma block and the chroma block is not applied, the maximum size of the binary divisible luma coding unit may be applied to the splitting of the chroma coding unit.
[0398] * Maximum size of a luma coding unit that can be divided into three parts
[0399] * When the method of independently partitioning luminance blocks and chrominance blocks is applied, the maximum size of the chrominance coding unit that can be divided into three parts
[0400] *When the method of independently splitting the luma block and the chroma block is not applied, the maximum size of the tripartite-divisible luma coding unit may be applied to the splitting of the chroma coding unit.
[0401] - In addition, as another example, the video decoding device 1900 may obtain the following parameters from the bitstream, and the video decoding device 1900 may encode the following parameters and then transmit the encoded parameters included in the bitstream.
[0402] * Maximum size of a coding unit
[0403] * Maximum size of a binary divisible luma coding unit in an intra slice
[0404] * When the method of independently partitioning luma blocks and chroma blocks in intra slices is applied, the maximum size of the chroma coding unit that can be binary divided
[0405] * Maximum size of a luma coding unit that can be trifurcated in an intra slice
[0406] * When the method of independently partitioning luma blocks and chroma blocks in intra slices is applied, the maximum size of the chroma coding unit that can be trifurcated
[0407] * Maximum size of a binary divisible luma coding unit in an inter slice
[0408] * When the method of independently partitioning luma blocks and chroma blocks in inter slices is applied, the maximum size of a binary divisible chroma coding unit
[0409] * Maximum size of a luma coding unit that can be trifurcated in an inter slice
[0410] * When the method of independently partitioning luma blocks and chroma blocks in inter slices is applied, the maximum size of the chroma coding unit that can be trifurcated
[0411] - In addition to the above embodiments, signaling may also be performed on the minimum size of the coding unit.
[0412] *When there are various partitioning methods, the minimum size of the coding unit is not defined for each division mode, but the minimum size of the coding unit can be defined and signaled, and the minimum size of the coding unit is generally used for various division modes. Specifically, the minimum size of the coding unit can be determined as MxN, such as 4x4, etc. When M and N are the same as each other, only information about M can be signaled, and when M and N are different from each other, the value of M and the difference between M and N can be signaled (or the value of N and the difference between N and M can be signaled).
[0413] *In addition, the definition of the minimum size of the coding unit can be set for each inter block and each intra block. For example, the minimum size of the coding unit for the intra block (e.g., min_cu_size_intra), the value obtained by applying log2 to the minimum size of the coding unit (e.g., log2_min_cu_size_intra), or the value obtained by applying -2 to the value after log2 (e.g., log2_min_cu_size_intra_minus2) can be signaled. In addition, the inter block is similar to the intra block, and the minimum size of the coding unit (e.g., min_cu_size_inter), the value obtained by applying log2 to the minimum size of the coding unit (e.g., log2_min_cu_size_inter), or the value obtained by applying -2 to the value after log2 (e.g., log2_min_cu_size_inter_minus2) can be signaled.
[0414] * In addition, for each partitioning mode, information about the minimum size of the coding unit may be signaled. For example, information about the minimum size of the coding unit allowed by quadtree partitioning, binary partitioning, and ternary partitioning may be signaled separately, and the minimum size of the coding unit allowed by quadtree partitioning and the minimum size of the coding unit allowed by binary partitioning and ternary partitioning may be signaled.
[0415] - In addition to the above embodiments, additional allowed partition depths may be defined for each partition mode. The allowed partition depths for quadtree partitioning (e.g., max_qp_depth), allowed partition depths for ternary partitioning (e.g., max_tt_depth), and allowed partition depths for binary partitioning (e.g., max_bt_depth) may be set, and then these partition depths may be signaled. As another example, the allowed partition depths for binary partitioning and ternary partitioning (e.g., max_btt_depth) may be set, and then the partition depths may be signaled.
[0416] -As a specific embodiment, the size of the binary-dividable coding unit in the intra slice may be configured as 64 (shared between the luma block and the chroma block), the size of the trifurcated coding unit in the intra slice may be configured as 32 (shared between the luma block and the chroma block), the size of the binary-dividable coding unit in the inter slice may be configured as 128, and the size of the trifurcated coding unit in the inter slice may be configured as 64.
[0417] As a specific embodiment, the maximum sizes of binary-dividable coding units and ternary-dividable coding units in an intra slice may be configured as 32, and the maximum sizes of binary-dividable coding units and ternary-dividable coding units in an inter slice may be configured as 64.
[0418] - As a specific embodiment, the maximum size of the binary-dividable coding unit and the tri-dividable coding unit in the intra slice may be configured as 32, the maximum size of the binary-dividable coding unit in the inter slice may be configured as 128, and the maximum size of the binary-dividable coding unit in the inter slice may be configured as 64. For coding units with sizes from 128x128 to 64x64, it may be configured to allow only blocks with an aspect ratio of 1:2 or 2:1.
[0419] According to an embodiment, pseudo codes to be used by the video encoding device 1700 and the video decoding device 1900 to implement the above-mentioned embodiment in a pipeline structure are shown below. In the pseudo codes shown in Table 1 below, the partition modes BT, TT and QT indicate binary partition, ternary partition and quadtree partition, respectively.
[0420] [Table 1]
[0421] max_tt_size / / Maximum size of a coding unit that can be divided into three parts
[0422] max_bt_size / / Maximum size of a binary divisible coding unit
[0423] width / / The width of the current coding unit
[0424] height / / The height of the current encoding unit
[0425] log2_width / / log2(width)
[0426] log2_height / / log2 (height)
[0427] / / (1. Test for trifurcated division in horizontal direction)
[0428] if(height(height)>max_tt_size)
[0429] TT in horizontal direction is not allowed
[0430] else
[0431] TT in horizontal direction may be allowed (TT in horizontal direction may be allowed) / / There may be additional conditions to determine whether trifurcations in the horizontal direction are allowed.
[0432] / / (2. Test for the vertical trident division)
[0433] if(width(width)>max_tt_size)
[0434] TT in vertical direction is not allowed
[0435] else
[0436] TT in vertical direction may be allowed (TT in vertical direction may be allowed) / / There may be additional conditions to determine whether trifurcations in the vertical direction are allowed.
[0437] / / (3. Test for binary partition in horizontal direction)
[0438] if(abs(log2_height / 2-log2_width)>1&&(height>64||width>64))
[0439] BT in horizontal direction is not allowed
[0440] else
[0441] BT in horizontal direction is allowed (BT in horizontal direction is allowed) / / There can be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0442] / / (4. Test for binary partition in the vertical direction)
[0443] if(abs(log2_width / 2-log2_height)>1&&(height>64||width>64))
[0444] BT in vertical direction is not allowed
[0445] else
[0446] BT in vertical direction is allowed (BT in vertical direction is allowed) / / There can be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0447] / / End of table 1
[0448] As another embodiment, Test 1 and Test 2 may be as shown in Table 2. It may be set so that only trifurcated partitioning is allowed in the case of a size of the coding unit (max_tt_size x max_tt_size) or smaller. As an example, in Test 1, even if the width of the current coding unit is greater than max_tt_size, although the height of the coding unit is equal to or less than max_tt_size, the corresponding partitioning mode may be allowed. However, in the case of Table 2 below, even if the other side is greater than max_tt_size, the corresponding partitioning mode may not be allowed.
[0449] [Table 2]
[0450] / / (1. Test for trifurcated division in horizontal direction)
[0451] if(height>max_tt_size||width>max_tt_size)
[0452] TT in horizontal direction is not allowed
[0453] else
[0454] TT in horizontal direction may be allowed (TT in horizontal direction may be allowed) / / There may be additional conditions to determine whether trifurcations in the horizontal direction are allowed.
[0455] / / (2. Test for the vertical trident division)
[0456] if(width>max_tt_size||height>max_tt_size)
[0457] TT in vertical direction is not allowed
[0458] else
[0459] TT in vertical direction may be allowed (TT in vertical direction may be allowed) / / There may be additional conditions to determine whether trifurcations in the vertical direction are allowed.
[0460] / / End of table 2
[0461] As another embodiment, Test 1 and Test 2 may be as shown in Table 3. When the maximum size max_tt_size of the trifurcated coding unit is less than N, it may be set so that only trifurcated division TT is allowed when the size of the coding unit is (N×N) or smaller. As a specific example, N may be 64. In addition, in this case, the value of max_tt_size may be set to be less than or equal to N. As another example, in this regard, N may be set to the maximum transform size.
[0462] [Table 3]
[0463] / / (1. Test for trifurcated division in horizontal direction)
[0464] if(height>max_tt_size||width>N)
[0465] TT in horizontal direction is not allowed
[0466] else
[0467] TT in horizontal direction may be allowed (TT in horizontal direction may be allowed) / / There may be additional conditions to determine whether trifurcations in the horizontal direction are allowed.
[0468] / / (2. Test for the vertical trident division)
[0469] if(width>max_tt_size||height>N)
[0470] TT in vertical direction is not allowed
[0471] else
[0472] TT in vertical direction may be allowed (TT in vertical direction may be allowed) / / There may be additional conditions to determine whether trifurcations in the vertical direction are allowed.
[0473] / / End of table 3
[0474] As another embodiment, Test 3 and Test 4 may be as shown in Table 4.
[0475] [Table 4]
[0476] / / (3. Test for binary partition in horizontal direction)
[0477] if(width>height&&width>64)
[0478] BT in horizontal direction is not allowed
[0479] else
[0480] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0481] / / (4. Test for binary partition in the vertical direction)
[0482] if(height>width&&height>64)
[0483] BT in vertical direction is not allowed
[0484] else
[0485] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0486] / / End of table 4
[0487] As another embodiment, Test 3 and Test 4 may be as shown in Table 5.
[0488] [Table 5]
[0489] / / (3. Test for binary partition in horizontal direction)
[0490] if(width>64&&width>height)
[0491] BT in horizontal direction is not allowed
[0492] else
[0493] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0494] / / (4. Test for binary partition in the vertical direction)
[0495] if(height>64&&height>width)
[0496] BT in vertical direction is not allowed
[0497] else
[0498] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0499] / / End of table 5
[0500] As another example, Tests 3 and 4 may be as shown in Table 6.
[0501] [Table 6]
[0502] / / (3. Test for binary partition in horizontal direction)
[0503] if(width>64&&log2_width-log2_height==1)
[0504] BT in horizontal direction is not allowed
[0505] else
[0506] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0507] / / (4. Test for binary partition in the vertical direction)
[0508] if(height>64&&log2_height-log2_width==1)
[0509] BT in vertical direction is not allowed
[0510] else
[0511] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0512] / / End of table 6
[0513] As another example, Tests 3 and 4 may be as shown in Table 7.
[0514] [Table 7]
[0515] / / (3. Test for binary partition in horizontal direction)
[0516] if(width>64&&width!=height)
[0517] BT in horizontal direction is not allowed
[0518] else
[0519] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0520] / / (4. Test for binary partition in the vertical direction)
[0521] if(height>64&&height!=width)
[0522] BT in vertical direction is not allowed
[0523] else
[0524] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0525] / / End of Table 7
[0526] As another example, Tests 3 and 4 may be as shown in Table 8.
[0527] [Table 8]
[0528] / / (3. Test for binary partition in horizontal direction)
[0529] if(width>64&&width-height!=0)
[0530] BT in horizontal direction is not allowed
[0531] else
[0532] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0533] / / (4. Test for binary partition in the vertical direction)
[0534] if(height>64&&height-width!=0)
[0535] BT in vertical direction is not allowed
[0536] else
[0537] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0538] / / End of table 8
[0539] As another embodiment, Test 3 and Test 4 may be as shown in Table 9. In the following embodiments, maximumtransform size indicates the maximum transform size.
[0540] [Table 9]
[0541] / / (3. Test for binary partition in horizontal direction)
[0542] if(height==64&&width==128)
[0543] BT in horizontal direction is not allowed
[0544] else
[0545] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0546] / / (4. Test for binary partition in the vertical direction)
[0547] if(height==128&&width==64)
[0548] BT in vertical direction is not allowed
[0549] else
[0550] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0551] / / End of table 9
[0552] As another example, Tests 3 and 4 may be as shown in Table 10.
[0553] [Table 10]
[0554] / / (3. Test for binary partition in horizontal direction)
[0555] if(height==maximum transform size&&width==CTU size)
[0556] BT in horizontal direction is not allowed
[0557] else
[0558] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0559] / / (4. Test for binary partition in the vertical direction)
[0560] if(height==CTU size&&width==maximum transform size)
[0561] BT in vertical direction is not allowed
[0562] else
[0563] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0564] / / End of table 10
[0565] As another example, Tests 3 and 4 may be as shown in Table 11.
[0566] [Table 11]
[0567] / / (3. Test for binary partition in horizontal direction)
[0568] if(height==maximum transform size&&width>maximum transform size)
[0569] BT in horizontal direction is not allowed
[0570] else
[0571] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0572] / / (4. Test for binary partition in the vertical direction)
[0573] if(height>maximum transform size&&width==maximum transform size)
[0574] BT in vertical direction is not allowed
[0575] else
[0576] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0577] / / End of table 11
[0578] As another example, Tests 3 and 4 may be as shown in Table 12.
[0579] [Table 12]
[0580] / / (3. Test for horizontal binary division)
[0581] if(height == 64 &&width>64)
[0582] BT in horizontal direction is not allowed
[0583] else
[0584] BT in horizontal direction may be allowed (BT in horizontal direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0585] / / (4. Test for binary partition in the vertical direction)
[0586] if(height>64&&width==64)
[0587] BT in vertical direction is not allowed
[0588] else
[0589] BT in vertical direction may be allowed (BT in vertical direction may be allowed) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0590] / / End of table 12
[0591] In the above embodiments (Table 1 to Table 12), it can be considered that various expression methods for designing pipeline structures with the maximum transform size of 64x64 as a unit have been provided.
[0592] Similar to the above embodiment, the method of dividing the coding unit at the outline of the image can be determined in combination with the design of the pipeline structure. When the coding unit crosses the outline of the image, the coding unit can be arbitrarily divided by using binary division, and as shown in the previous embodiment, binary division can be allowed or prohibited under preset conditions. As another example, when quadtree division and binary division are allowed at the outline of the image at the same time but the preset conditions are not met, it can be set to use quadtree division. As a specific example, with respect to the coding unit that crosses the outline of the image, conditions 3 and 4 can be changed as shown in Table 13.
[0593] [Table 13]
[0594] / / (3. Test for binary partition in horizontal direction)
[0595] if(height == 64 &&width>64)
[0596] QT is used(use QT)
[0597] else
[0598] BT in horizontal direction may be used(BT in horizontal direction may be used) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0599] / / (4. Test for binary partition in the vertical direction)
[0600] if(height>64&&width==64)
[0601] QT is used(use QT)
[0602] else
[0603] BT in vertical direction may be used(BT in vertical direction may be used) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0604] / / End of table 13
[0605] For reference, the division of coding units that cross the outline of an image and the division of coding units that do not cross the outline of an image are as follows. For coding units that cross the outline of an image, it may be considered whether to use a division mode, and for coding units that do not cross the outline of an image, it may be considered whether to allow a division mode. In another embodiment, when the current coding unit is determined by performing binary division on a coding unit of a higher depth, after the binary division, quadtree division of the current coding unit may not be allowed, and the binary division of the current coding unit in the same direction may also be restricted. As an exception, quadtree division of non-square coding units may be allowed. In addition, when the coding unit has been binary divided in another direction, because binary division in a specific direction is difficult to perform, the division may be performed in a direction different from the division direction of the previously performed binary division. That is, when binary division in the vertical direction has been performed because binary division in the horizontal direction is not possible, binary division in the horizontal direction may be allowed subsequently. This can be represented by pseudo code, as shown in Table 14.
[0606] [Table 14]
[0607] / / (3. Test for binary partition in horizontal direction)
[0608] if(height == 64 &&width>64)
[0609] BT in vertical direction is used
[0610] else
[0611] BT in horizontal direction may be used(BT in horizontal direction may be used) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0612] / / (4. Test for binary partition in the vertical direction)
[0613] if(height>64&&width==64)
[0614] BT in horizontal direction is used (BT in horizontal direction)
[0615] else
[0616] BT in vertical direction may be used(BT in vertical direction may be used) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0617] / / End of table 14
[0618] In another embodiment, conditions 3 and 4 may be modified as shown in Table 15.
[0619] [Table 15]
[0620] / / (3. Test for binary partition in horizontal direction)
[0621] if(width!=height&&width>64)
[0622] QT is used(use QT)
[0623] else
[0624] BT in horizontal direction may be used(BT in horizontal direction may be used) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0625] / / (4. Test for binary partition in the vertical direction)
[0626] if(width!=height&&width==64)
[0627] QT is used(use QT)
[0628] else
[0629] BT in vertical direction may be used (BT in vertical direction) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed.
[0630] / / End of table 15
[0631] In another embodiment, for non-square coding units, binary partitioning may be allowed, as shown in Table 16.
[0632] [Table 16]
[0633] / / (3. Test for binary partition in horizontal direction)
[0634] if(width!=height&&width>64)
[0635] BT in vertical is used
[0636] else
[0637] BT in horizontal direction may be used(BT in horizontal direction may be used) / / There may be additional conditions to determine whether binary partitioning in the horizontal direction is allowed.
[0638] / / (4. Test for binary partition in the vertical direction)
[0639] if(width!=height&&width==64)
[0640] BT in horizontal is used (BT in horizontal direction)
[0641] else
[0642] BT in vertical direction may be used (using BT in vertical direction) / / There may be additional conditions to determine whether binary partitioning in the vertical direction is allowed / /
[0643] / / End of table 16
[0644] The above-mentioned specific conditions for various division methods can be used together with various conditions for determining the division mode. In addition, when the maximum coding unit includes the outline of the image, the maximum coding unit is arbitrarily divided once using quadtree division, and the division method according to the division information can be applied to the coding unit generated by quadtree division. As an example, when the size of the maximum coding unit is 128x128 and the maximum transform size is 64, the maximum coding unit is arbitrarily divided into four 64x64-sized coding units, and then the division method can be performed on the 64x64-sized coding unit according to the division information based on the division mode.
[0645] [Table 17]
[0646] if(width>64&&height>64)
[0647] QT split is used
[0648] / / End of table 17
[0649] As another example, when the maximum coding unit includes the right outline of the image, the maximum coding unit is vertically binary split once, and when the coding unit generated by the vertical binary split requires additional splitting, only horizontal binary splitting may be allowed. Similarly, when the maximum coding unit includes the lower outline of the image, the maximum coding unit is horizontally binary split once, and when the coding unit generated by the horizontal binary split requires additional splitting, only vertical binary splitting may be allowed.
[0650] According to an embodiment, when half or more of the coding units located at the outline of the image are included in the image, additional division may be allowed in consideration of the number of pipeline modules allowed by the pipeline structure. For example, under the assumption that the number of pipeline modules in the coding unit of size 128x128 is 4, a case where the maximum transform size is 64 may be assumed. When the area of the coding unit of size 64x128 is located within the outline of the image, binary division in the vertical direction may be allowed so as to allow generation of two coding units of size 32x128. In this regard, additional binary division of the generated coding unit in the vertical direction may not be allowed.
[0651] Hereinafter, the SPS is modified based on the working draft 2.0 of the Versatile Video Coding (VVC) standard so that information on the size of a block limited in various partition modes can be signaled.
[0652] Fig.301 shows a syntax notified by SPS signaling according to an embodiment. According to an embodiment, the video encoding device 1700 may encode information n about the size of a block limited in various division modes, and include the encoded information in Fig.30 According to an embodiment, the video decoding device 1900 can Fig.30 The SPS obtains information about the size of the block limited in various partitioning modes.
[0653] Through SPS (seq_parameter_set_rbsp()), information about the maximum size of the binary divisible coding unit (log2_diff_ctu_max_bt_size_intra, log2_diff_ctu_max_bt_size_inter) and information about the difference between the maximum size and the minimum size of the binary divisible coding unit (log2_diff_ctu_max_bt_size_intra, log2_diff_ctu_max_bt_size_inter) can be signaled by intra type and inter type. In addition, information about the maximum size of the ternary divisible coding unit (log2_diff_ctu_max_tt_size_intra, log2_diff_ctu_max_tt_size_inter) and information about the difference between the maximum size and the minimum size of the ternary divisible coding unit (log2_diff_ctu_max_tt_size_intra, log2_diff_ctu_max_tt_size_inter) can be signaled through intra-frame slices and inter-frame slices through SPS.
[0654] In addition, information indicating whether the division mode is determined separately for the luminance block and the chrominance block (qtbtt_dual_tree_inter_flag) can be signaled through SPS. When qtbtt_dual_tree_inter_fla indicates that the division mode is determined separately for the luminance block and the chrominance block, information about the difference between the maximum size and the minimum size of the chrominance coding unit that can be divided into two branches (log2_diff_ctu_max_bt_size_chroma_intra, log2_diff_ctu_max_bt_size_chroma_inter) can be signaled through intra-frame slices and inter-frame slices through SPS. In addition, information about the difference between the maximum size and the minimum size of the chrominance coding unit that can be divided into three branches (log2_diff_ctu_max_tt_size_chroma_intra, log2_diff_ctu_max_tt_size_chroma_inter) can be signaled through intra-frame slices and inter-frame slices through SPS.
[0655] Alternative Fig.30 The examples provided in Fig.30 In the embodiment, information about the maximum size of a binary divisible coding unit or a trifurcated coding unit is signaled), information about the minimum size of a binary divisible coding unit and information about the minimum size of a trifurcated coding unit may be signaled.
[0656] In another embodiment, signaling of information about the size of a binary / tripartiteable coding unit may not be performed through binary and tripartite partitioning but may be performed using a common parameter.
[0657] Furthermore, additionally set values for each slice may be updated and signaled at the slice header level.
[0658] The present invention has been specifically shown and described with reference to the embodiments of the present invention. To this end, it will be appreciated by those skilled in the art that various changes may be made to the form and details thereof without departing from the scope of the present disclosure. Therefore, the embodiments should be considered only in a descriptive sense and not for the purpose of limitation. The scope of the present invention is defined not by the detailed description of the present invention but by the appended claims, and all differences within the scope will be interpreted as included in the present disclosure.
[0659] At the same time, the above-mentioned embodiments of the present invention can be written as a program executable on a computer, and can be implemented in a general-purpose digital computer that executes the program by using a computer-readable recording medium. Examples of computer-readable storage media include magnetic storage media (such as ROM, floppy disks, hard disks, etc.), optical storage media (such as CD-ROM or DVD), etc.
Claims
1. A video decoding method, include: identifying that a boundary of the first coding unit includes a right boundary of the image; When the width of the first coding unit is greater than the maximum transform size and the height of the first coding unit is equal to the maximum transform size, determining to allow a vertical binary partition of the first coding unit; When vertical binary division of the first coding unit is allowed, determining a second coding unit by dividing the width of the first coding unit into two halves in a vertical direction, and decoding the second coding unit; When a height of the first coding unit is greater than a maximum transform size and a width of the first coding unit is equal to the maximum transform size, determining that a vertical binary split of the first coding unit is not allowed and a horizontal binary split of the first coding unit is allowed; as well as When vertical binary splitting of the first coding unit is not allowed and horizontal binary splitting of the first coding unit is allowed, a third coding unit is determined by splitting the height of the first coding unit into halves in a horizontal direction and is decoded.
2. A video decoding device, include: The processor is configured as: identifying that the boundary of the first coding unit includes the right boundary of the image, When the width of the first coding unit is greater than the maximum transform size and the height of the first coding unit is equal to the maximum transform size, determining that a vertical binary partition of the first coding unit is allowed, When vertical binary division of the first coding unit is allowed, determining a second coding unit by dividing the width of the first coding unit into halves in a vertical direction, and decoding the second coding unit, When a height of the first coding unit is greater than a maximum transform size and a width of the first coding unit is equal to the maximum transform size, determining that a vertical binary split of the first coding unit is not allowed and a horizontal binary split of the first coding unit is allowed, and When vertical binary division of the first coding unit is not allowed and horizontal binary division of the first coding unit is allowed, determining a third coding unit by dividing the height of the first coding unit into halves in a horizontal direction, and decoding the third coding unit; as well as A memory is used to store data generated by the processor.
3. A video encoding method, include: identifying that a boundary of the first coding unit includes a right boundary of the image; When the width of the first coding unit is greater than the maximum transform size and the height of the first coding unit is equal to the maximum transform size, determining to allow a vertical binary partition of the first coding unit; When vertical binary division of the first coding unit is allowed, determining a second coding unit by dividing the width of the first coding unit into two halves in a vertical direction, and encoding the second coding unit; When a height of the first coding unit is greater than a maximum transform size and a width of the first coding unit is equal to the maximum transform size, determining that a vertical binary split of the first coding unit is not allowed and a horizontal binary split of the first coding unit is allowed; as well as When vertical binary splitting of the first coding unit is not allowed and horizontal binary splitting of the first coding unit is allowed, a third coding unit is determined by splitting the height of the first coding unit into halves in a horizontal direction and is encoded.
