Image encoding method, encoding device, decoding method, and decoding device using intra-predictive mode
By determining and applying optimal intra-prediction modes within a search range, the method addresses inefficiencies in spatial redundancy removal, enhancing image compression and decoding performance.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2024-03-21
- Publication Date
- 2026-06-12
Smart Images

Figure 2026519231000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image encoding and decoding. More specifically, it relates to an apparatus and method for encoding and decoding an image using an intra prediction mode.
Background Art
[0002] In image encoding and decoding, an image is divided into blocks, and each block is predicted and encoded and predicted and decoded through inter prediction (inter prediction) or intra prediction.
[0003] Inter prediction is a technique for removing temporal redundancy between images to compress an image. In inter prediction, a block of a current image is predicted using a reference image. A reference block most similar to the current block can be searched from a predetermined search range within the reference image. The current block is predicted based on the reference block, and a predicted block generated as a prediction result is subtracted from the current block to generate a residual block.
[0004] Intra prediction is a technique for removing spatial redundancy within an image to compress an image. Intra prediction generates a predicted block based on pixels around the current block according to a prediction mode. Then, the predicted block is subtracted from the current block to generate a residual block.
[0005] The residual block generated through inter prediction or intra prediction is transmitted to a decoder through transformation and quantization. The decoder inverse quantizes and inverse transforms the residual block, and combines the predicted block of the current block and the residual block to decode the current block. The decoder can filter the decoded current block in certain cases to remove artifacts in the decoded current block.
Summary of the Invention
Means for Solving the Problems
[0006] According to one embodiment of the present invention, an image decoding method is provided. The image decoding method includes the step of obtaining information about a first intra-prediction mode for the current block from a bitstream. The image decoding method includes the step of determining the first intra-prediction mode for the current block using the information about the first intra-prediction mode. The image decoding method includes the step of determining a search range for a second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. The image decoding method includes the step of determining a second intra-prediction mode for the current block within the search range of the second intra-prediction mode. The image decoding method includes the step of performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block. The image decoding method includes the step of generating a decoded image based on the predicted block.
[0007] According to one embodiment of the present invention, an image decoding device is provided. The image decoding device includes memory and at least one processor. At least one processor can obtain information about a first intra-prediction mode for the current block from a bitstream by executing at least one instruction stored in memory. At least one processor can determine the first intra-prediction mode for the current block using the information about the first intra-prediction mode by executing at least one instruction stored in memory. At least one processor can determine the search range for a second intra-prediction mode based on the first intra-prediction mode by executing at least one instruction stored in memory. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. At least one processor can determine the second intra-prediction mode for the current block within the search range of the second intra-prediction mode by executing at least one instruction stored in memory. At least one processor can perform an intra-prediction for the current block using the second intra-prediction mode and generate a predicted block by executing at least one instruction stored in memory. At least one processor can generate a decoded image based on the predicted block by executing at least one instruction stored in memory.
[0008] An embodiment of the present invention provides an image coding method. The image coding method includes the step of determining a first intra-prediction mode for the current block. The image coding method includes the step of determining a search range for a second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. The image coding method includes the step of determining a second intra-prediction mode for the current block within the search range of the second intra-prediction mode. The image coding method includes the step of performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block. The image coding method includes the step of generating a bitstream containing information about the first intra-prediction mode for the current block.
[0009] According to one embodiment of the present invention, a computer-readable recording medium for storing a bitstream is provided. The bitstream is encoded by an image encoding method. The image encoding method includes the step of determining a first intra-prediction mode for the current block. The image encoding method includes the step of determining a search range for a second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. The image encoding method includes the step of determining a second intra-prediction mode for the current block within the search range of the second intra-prediction mode. The image encoding method includes the step of performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block. The image encoding method includes the step of generating a bitstream containing information about the first intra-prediction mode for the current block. [Brief explanation of the drawing]
[0010] [Figure 1] This is a block diagram of an image decoding device according to one embodiment of the present invention. [Figure 2] This is a block diagram of an image encoding device according to one embodiment of the present invention. [Figure 3]This figure shows the process of dividing the current coding unit and determining at least one coding unit according to one embodiment of the present invention. [Figure 4] This figure shows the process of dividing a non-square coding unit and determining at least one coding unit according to one embodiment of the present invention. [Figure 5] This figure shows the process of dividing an encoded unit based on at least one of block shape information and divided shape mode information according to one embodiment of the present invention. [Figure 6] This figure shows a method for determining a predetermined coding unit from an odd number of coding units according to one embodiment of the present invention. [Figure 7] This diagram shows the order in which multiple coding units are processed when a current coding unit is divided and multiple coding units are determined according to one embodiment of the present invention. [Figure 8] This figure shows the process by which, according to one embodiment of the present invention, when the coding units cannot be processed in a predetermined order, it is determined that the current coding unit will be divided into an odd number of coding units. [Figure 9] This figure shows the process of dividing a first coding unit to determine at least one coding unit according to one embodiment of the present invention. [Figure 10] This figure shows that, according to one embodiment of the present invention, if a non-square second coding unit determined by dividing a first coding unit satisfies predetermined conditions, the divisible shape is limited. [Figure 11] This figure shows the process of dividing a square coding unit when the divided shape mode information cannot indicate a division into four square coding units according to one embodiment of the present invention. [Figure 12] This figure shows that, according to one embodiment of the present invention, the processing order between multiple coding units can change depending on the coding unit partitioning process. [Figure 13] This figure shows the process by which the depth of a coding unit is determined in accordance with changes in the shape and size of a coding unit when a coding unit is recursively divided and multiple coding units are determined according to one embodiment of the present invention. [Figure 14] A diagram showing the depth and the index of coding unit division (partindex, hereinafter PID) that can be determined based on the shape and size of a coding unit according to an embodiment of the present invention. [Figure 15] A diagram showing that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment of the present invention. [Figure 16] A diagram showing coding units that can be determined for each picture when combinations of shapes in which a coding unit can be divided are different for each picture according to an embodiment of the present invention. [Figure 17] A diagram showing various shapes of coding units that can be determined based on division shape mode information represented by a binary code according to an embodiment of the present invention. [Figure 18] A diagram showing another shape of coding units that can be determined based on division shape mode information represented by a binary code according to an embodiment of the present invention. [Figure 19] A block diagram of an image encoding and decoding system that executes loop filtering according to an embodiment of the present invention. [Figure 20] A block diagram showing the configuration of an image decoding apparatus according to an embodiment of the present invention. [Figure 21] A diagram for explaining a process of predicting a current image using a reference sample according to an embodiment of the present invention. [Figure 22] A diagram showing an intra prediction direction according to an embodiment of the present invention. [Figure 23] A flowchart relating to an image decoding method for performing intra prediction on a current block using an intra prediction mode according to an embodiment of the present invention. [Figure 24] 。 A diagram for explaining a process of determining an intra prediction mode according to an embodiment of the present invention. [Figure 25] A diagram for explaining a process of determining an intra prediction mode according to an embodiment of the present invention. [Figure 26]A diagram for explaining the process of determining an intra prediction mode according to an embodiment of the present invention. [Figure 27] A flowchart showing the process of determining an intra prediction mode based on predetermined conditions according to an embodiment of the present invention. [Figure 28] A diagram for explaining the reference area of a current block according to an embodiment of the present invention. [Figure 29] A diagram for explaining the reference area of a current block according to an embodiment of the present invention. [Figure 30] A diagram for explaining interpolation filtering for a current block according to an embodiment of the present invention. [Figure 31] A diagram for explaining the process of determining a reference block using template matching according to an embodiment of the present invention. [Figure 32] A diagram for explaining the process of determining sub - blocks of a current block according to an embodiment of the present invention. [Figure 33] A diagram for explaining the process of determining an intra prediction mode of a current block including a plurality of sub - blocks according to an embodiment of the present invention. [Figure 34] A block diagram showing the configuration of an image encoding apparatus according to an embodiment of the present invention. [Figure 35] A flowchart related to an image encoding method for performing intra prediction on a current block using an intra prediction mode according to an embodiment of the present invention.
Embodiments for Carrying Out the Invention
[0011] The present invention can be subjected to various modifications and can have various embodiments. Embodiments are illustrated in the drawings and will be described in more detail by detailed description. However, this is not intended to limit the present invention to the embodiments, and the present invention can include all modifications, equivalents, or alternatives included in the spirit and technical scope of various embodiments.
[0012] When describing embodiments, if a detailed explanation of related prior art is deemed to unnecessarily obscure the spirit of the present invention, such detailed explanation will be omitted. Furthermore, the numbers used in the description of embodiments (for example, 1st, 2nd, etc.) are merely identification symbols to distinguish one component from other components.
[0013] In this invention, the expression "at least one of a, b, or c" refers to "a," "b," "c," "a and b," "a and c," "b and c," "any of a, b, and c," or variations thereof.
[0014] In this invention, when one component is referred to as being "connected" or "linked" to another component, it may mean that one component is directly connected to or linked to another component, but unless otherwise specified, it may also mean that the components are connected or linked via other components in between.
[0015] In this invention, components represented as "~part (unit)" or "module" may include cases where two or more components are combined into one component, or where one component is divided into two or more more subdivided components. Furthermore, each component described below may perform some or all of the functions performed by other components, in addition to its own primary function, and some of the primary functions performed by each component may be performed by other components.
[0016] In this invention, "image" includes a picture, a still image, a frame, and a video or motion picture composed of multiple consecutive still images.
[0017] In this invention, "sample" refers to data assigned to a sampling position in an image, including data to be processed. For example, a sample includes pixels within a frame in a spatial region. A block means a unit containing multiple samples.
[0018] Hereinafter, with reference to Figures 1 to 19, an image coding method and apparatus, an image decoding method and apparatus, based on a tree structure coding unit and a transformation unit according to one embodiment of the present invention are disclosed.
[0019] Figure 1 is a block diagram of an image decoding device 100 according to one embodiment of the present invention.
[0020] The image decoding device 100 includes a bitstream acquisition unit 110 and a decoding unit 120. The bitstream acquisition unit 110 and the decoding unit 120 each include at least one processor. The bitstream acquisition unit 110 and the decoding unit 120 also include a memory for storing instructions executed by at least one processor.
[0021] The bitstream acquisition unit 110 receives a bitstream. The bitstream contains information encoded by the image encoding device 200, which will be described later. The bitstream can also be transmitted from the image encoding device 200. The image encoding device 200 and the image decoding device 100 are connected by wire or wireless, and the bitstream acquisition unit 110 receives the bitstream via wire or wireless. The bitstream acquisition unit 110 receives the bitstream from a storage medium such as an optical medium or a hard disk. The decoding unit 120 can decode the image based on the information acquired from the received bitstream. The decoding unit 120 acquires syntax elements for decoding the image from the bitstream. The decoding unit 120 can decode the image based on the syntax elements.
[0022] To explain the operation of the image decoding device 100 in detail, the bitstream acquisition unit 110 receives the bitstream.
[0023] The image decoding device 100 generates a bin string (bin) corresponding to the division shape mode of the encoding unit from the bitstream. The image decoding device 100 performs an operation to obtain a bin string. Then, the image decoding device 100 performs an operation to determine the division rule of the coding unit. Furthermore, the image decoding device 100 can perform an operation to divide the coding unit into a plurality of coding units based on the bin string corresponding to the division shape mode and at least one of the division rule. In order to determine the division rule, the image decoding device 100 can determine a first allowable range of the size of the coding unit based on the ratio of the width and height of the coding unit. In order to determine the division rule, the image decoding device 100 can determine a second allowable range of the size of the coding unit based on the division shape mode of the coding unit.
[0024] The following describes in detail the division of coding units using one embodiment of the present invention.
[0025] First, a single picture can be divided into one or more slices or one or more tiles. A single slice or tile is one or more maximum coding units (Coding). It can be a sequence of Tree Units (CTUs). Depending on the embodiment, a slice may contain one or more tiles, and a slice may also contain one or more maximum coding units. A slice containing one or more tiles may be determined within the picture.
[0026] For the largest coding unit (CTU), the largest coding block (Coding) There is a concept called Tree Block (CTB). A maximum coded block (CTB) is an N×N block containing N×N samples (where N is an integer). Each color component can be divided into one or more maximum coded blocks.
[0027] If a picture has three sample sequences (sample sequences for each of the Y, Cr, and Cb components), the Maximum Encoded Unit (CTU) is a unit that includes the maximum encoded block of the luminal sample and the two corresponding maximum encoded blocks of the chroma sample, as well as the syntax structure used to encode the luminal and chroma samples. If the picture is a monochrome picture, the Maximum Encoded Unit is a unit that includes the maximum encoded block of the monochrome sample and the syntax structure used to encode the monochrome sample. If the picture is encoded with color planes separated by color components, the Maximum Encoded Unit is a unit that includes the picture and the syntax structure used to encode the samples of the picture.
[0028] One maximum coding block (CTB) is an M×N coding block containing M×N samples. It can be divided into blocks (where M and N are integers).
[0029] If the picture has sample sequences for each Y, Cr, and Cb component, the coding unit (Coding) A Unit (Cu) is a unit that includes the coding block of the luminous sample and the two corresponding coding blocks of the chroma sample, as well as the syntax structure used to code the luminous and chroma samples. If the picture is a monochrome picture, the coding unit is a unit that includes the coding block of the monochrome sample and the syntax structure used to code the monochrome sample. If the picture is a picture coded with color planes separated by color components, the coding unit is a unit that includes the picture and the syntax structure used to code the samples of the picture.
[0030] As stated above, the maximum coding block and the maximum coding unit are distinct concepts, and the coding block and the coding unit are also distinct concepts. That is, a (maximum) coding unit means a data structure that includes the (maximum) coding block containing the sample and the corresponding syntax structure. However, a person skilled in the art can understand that a (maximum) coding unit or (maximum) coding block refers to a block of a predetermined size containing a predetermined number of samples. Therefore, in the following specification, unless there are special circumstances, the maximum coding block and the maximum coding unit, or the coding block and the coding unit, will not be distinguished.
[0031] Images are the largest coding unit (Coding It can be divided into Tree Units (CTUs). The size of the largest coding unit can be determined based on information obtained from the bitstream. The shape of the largest coding unit is a square of the same size, but is not limited to this.
[0032] For example, information about the maximum size of a Luma-coded block can be obtained from a bitstream. For instance, the maximum size of a Luma-coded block indicated by this information is one of the following: 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, or 256x256.
[0033] For example, information about the maximum size of a bipartite Luma-encoded block and the Luma block size difference can be obtained from the bitstream. The information about the Luma block size difference indicates the size difference between the largest Luma-encoded unit and the largest bipartite Luma-encoded block. Therefore, by combining the information about the maximum size of a bipartite Luma-encoded block and the information about the Luma block size difference obtained from the bitstream, the size of the largest Luma-encoded unit can be determined. Using the size of the largest Luma-encoded unit, the size of the largest chroma-encoded unit can also be determined. For example, if the color format is Y:Cb:Cr=4:2:0, the size of the chroma block is half the size of the Luma block, and similarly, the size of the largest chroma-encoded unit may also be half the size of the largest Luma-encoded unit.
[0034] According to one embodiment, binary partitioning (binary Since information about the maximum size of a Luma-coded block that can be split is obtained from the bitstream, the maximum size of a binary-splittable Luma-coded block can be determined variably. In contrast, ternary splitting ( The maximum size of a Luma-coded block that can be split can be fixed. For example, the maximum size of a Luma-coded block that can be ternarily split in an I-picture is 32x32, and the maximum size of a Luma-coded block that can be ternarily split in a P-picture or B-picture is 64x64.
[0035] Furthermore, the maximum encoding unit can be hierarchically divided into encoding units based on the division shape mode information obtained from the bitstream. The division shape mode information can be a quad division (quad At least one of the following information can be obtained from the bitstream: information indicating the presence or absence of a split, information indicating the presence or absence of multiple divisions, division direction information, and division type information.
[0036] For example, the information indicating whether or not a quad split is performed indicates whether or not the current encoding unit is subjected to a quad split (QUAD_SPLIT).
[0037] If the current encoding unit is not quad-split, the information indicating whether or not it is multi-split can indicate whether the current encoding unit will not be further split (NO_SPLIT) or will be binary / ternary-split.
[0038] If the current coding unit is to be split in binary or terminally, the split direction information indicates whether the current coding unit will be split horizontally or vertically.
[0039] If the current coding unit is to be split horizontally or vertically, the split type information indicates whether the current coding unit will be split binaryly or terminally.
[0040] Based on the division direction information and division type information, the division mode of the current coding unit can be determined. If the current coding unit is divided horizontally in binary, the division mode can be determined as binary horizontal division (SPLIT_BT_HOR); if it is divided horizontally in a ternary manner, the division mode can be determined as ternary horizontal division (SPLIT_TT_HOR); if it is divided vertically in binary, the division mode can be determined as binary vertical division (SPLIT_BT_VER); and if it is divided vertically in a ternary manner, the division mode can be determined as ternary vertical division (SPLIT_TT_VER).
[0041] The image decoding device 100 obtains segmentation shape mode information from the bitstream from a single binstring. The form of the bitstream received by the image decoding device 100 is fixed-length binary code (Fixed This includes length binary code, unary code, truncated unary code, and predetermined binary codes. A binstring represents information as a sequence of binary numbers. A binstring may consist of at least one bit. The image decoding device 100 acquires division shape mode information corresponding to the binstring based on the division rule. Based on one binstring, the image decoding device 100 determines whether or not to quad-divide the encoding unit, or the division direction and division type.
[0042] An encoding unit is less than or equal to the maximum encoding unit. For example, the maximum encoding unit is also an encoding unit because it has the largest size. If the division shape mode information for the maximum encoding unit indicates "not divided," the encoding unit determined in the maximum encoding unit will have the same size as the maximum encoding unit. If the division shape mode information for the maximum encoding unit indicates "divided," the maximum encoding unit may be divided into encoding units. Also, if the division shape mode information for an encoding unit indicates division, the encoding unit may be divided into smaller encoding units. However, image division is not limited to this, and the maximum encoding unit and encoding units may not be distinguished. The division of encoding units will be explained in more detail in Figures 3 to 16.
[0043] Furthermore, one or more prediction blocks may be determined from the coding unit. The prediction blocks are the same as or smaller than the coding unit. Also, one or more transformation blocks may be determined from the coding unit. The transformation blocks are the same as or smaller than the coding unit.
[0044] The shapes and sizes of the transformation block and the prediction block may not be related to each other.
[0045] In other embodiments, prediction may be performed using coding units as prediction blocks. Furthermore, transformation may be performed using coding units as transformation blocks.
[0046] The partitioning of the coding unit will be explained in more detail in Figures 3 to 16. The current block and surrounding block of the present invention can represent any of the maximum coding unit, coding unit, prediction block, and transformation block. The current block or current coding unit is a block that is currently being decoded or coded, or a block that is currently being partitioned. The surrounding block may be a block that was decoded before the current block. The surrounding block is spatially or temporally adjacent to the current block. The surrounding block is located to the lower left, left, upper left, top, upper right, right, or lower right of the current block.
[0047] Figure 2 shows a block diagram of an image encoding device 200 that can encode an image based on at least one of block shape information and segmented shape mode information according to one embodiment of the present invention.
[0048] The image encoding device 200 includes an encoding unit 220 and a bitstream generation unit 210. The encoding unit 220 receives an input image and encodes the input image. The encoding unit 220 encodes the input image and obtains at least one syntax element. The syntax element is skip flag, prediction mode, motion vector difference, motion vector prediction method(or index), transform quantized coefficient, coded block pattern, coded block flag, intra prediction mode, direct flag, merge flag, delta QP, reference index, prediction direction, transform It includes at least one index. The encoding unit 220 determines a context model based on block shape information that includes at least one of the shape, orientation, width, and height ratio or size of the encoding unit.
[0049] The bitstream generation unit 210 generates a bitstream based on the encoded input image. For example, the bitstream generation unit 210 generates the bitstream by entropy encoding syntax elements based on a context model. The image encoding device 200 then transmits the bitstream to the image decoding device 100.
[0050] According to one embodiment of the present invention, the encoding unit 220 of the image encoding device 200 can determine the shape of the encoding unit. For example, the encoding unit may have a square or non-square shape, and information indicating such a shape may be included in the block shape information.
[0051] According to one embodiment of the present invention, the encoding unit 220 can determine in what form the encoding unit is divided. The encoding unit 220 determines the form of at least one encoding unit included in the encoding unit, and the bitstream generation unit 210 generates a bitstream that includes division shape mode information which includes information about the form of such encoding unit.
[0052] According to one embodiment of the present invention, the encoding unit 220 can determine whether or not the encoding unit is divided. If the encoding unit 220 determines that the encoding unit contains only one encoding unit, or that the encoding unit is not divided, the bitstream generation unit 210 generates a bitstream that includes division shape mode information indicating that the encoding unit is not divided. Alternatively, the encoding unit 220 can divide the encoding unit into a plurality of encoding units, and the bitstream generation unit 210 generates a bitstream that includes division shape mode information indicating that the encoding unit is divided into a plurality of encoding units.
[0053] According to one embodiment of the present invention, the division shape mode information may include information indicating how many coding units to divide an encoding unit into, or in which direction to divide it. For example, the division shape mode information may indicate that it is divided in at least one of the vertical and horizontal directions, or that it is not divided at all.
[0054] The image encoding device 200 determines information regarding the division shape mode based on the division shape mode of the encoding unit. The image encoding device 200 determines a context model based on at least one of the shape, orientation, width, and height ratio or size of the encoding unit. Then, based on the context model, the image encoding device 200 generates information regarding the division shape mode for dividing the encoding unit as a bitstream.
[0055] The image encoding device 200 obtains an array for associating at least one of the ratios or dimensions of the shape, orientation, width, and height of the encoding unit with an index for the context model in order to determine the context model. The image encoding device 200 obtains an index for the context model based on at least one of the ratios or dimensions of the shape, orientation, width, and height of the encoding unit in the array. The image encoding device 200 determines the context model based on the index for the context model.
[0056] The image encoding device 200 determines the context model based on block shape information, which includes at least one of the shape, orientation, width, and height ratio or size of a peripheral encoding unit adjacent to the encoding unit. The peripheral encoding unit also includes at least one encoding unit located to the lower left, left, upper left, top, upper right, right, or lower right of the encoding unit.
[0057] Furthermore, the image encoding device 200 compares the width of the upper peripheral encoding unit with the width of the encoding unit in order to determine the context model. The image encoding device 200 also compares the height of the left and right peripheral encoding units with the height of the encoding unit. The image encoding device 200 then determines the context model based on the comparison results.
[0058] Since the operation of the image encoding device 200 is similar to that of the video decoding device 100 described in Figures 3 to 19, a detailed explanation will be omitted.
[0059] Figure 3 shows the process by which an image decoding device 100 divides the current encoding unit and determines at least one encoding unit according to one embodiment of the present invention.
[0060] The block shapes include 4N×4N, 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N, where N is a positive integer. The block shape information is information that indicates at least one of the shape, orientation, width, and height ratios or size of the coding unit.
[0061] The shape of the coding unit includes both square and non-square shapes. If the width and height of the coding unit are the same (i.e., the block shape of the coding unit is 4N × 4N), the image decoding device 100 determines the block shape information of the coding unit to be square. The image decoding device 100 also determines the shape of the coding unit to be non-square.
[0062] If the width and height of the coding unit are different (i.e., the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N), the image decoding device 100 determines the block shape information of the coding unit as non-square. If the shape of the coding unit is non-square, the image decoding device 100 determines the ratio of width to height in the block shape information of the coding unit to be at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, or 32:1. Furthermore, based on the width and height of the coding unit, the image decoding device 100 determines whether the coding unit is horizontal or vertical. Furthermore, based on at least one of the width, height, or area of the coding unit, the image decoding device 100 determines the size of the coding unit.
[0063] According to one embodiment of the present invention, the image decoding device 100 determines the shape of the coding unit using block shape information and determines how the coding unit will be divided using division shape mode information. That is, the method of dividing the coding unit indicated by the division shape mode information can be determined depending on which block shape the block shape information used by the image decoding device 100 indicates.
[0064] The image decoding device 100 acquires segmentation shape mode information from the bitstream. However, it is not limited to this; the image decoding device 100 and the image encoding device 200 can determine predetermined segmentation shape mode information based on block shape information. The image decoding device 100 determines predetermined segmentation shape mode information for the largest encoding unit or the smallest encoding unit. For example, the image decoding device 100 determines the segmentation shape mode information for the largest encoding unit as a quad segmentation (quad The image decoding device 100 determines the division shape mode information for the smallest coding unit as "do not divide". Specifically, the image decoding device 100 determines the size of the maximum coding unit as 256 × 256. The image decoding device 100 determines the predetermined division shape mode information as quad division. Quad division is a division shape mode in which both the width and height of the coding unit are divided into two equal parts. Based on the division shape mode information, the image decoding device 100 obtains a coding unit having a size of 128 × 128 from the largest coding unit having a size of 256 × 256. The image decoding device 100 also determines the size of the smallest coding unit as 4 × 4. The image decoding device 100 obtains division shape mode information indicating "do not divide" for the smallest coding unit.
[0065] According to one embodiment of the present invention, the image decoding device 100 can utilize block shape information indicating that the current encoding unit is a square. For example, based on the division shape mode information, the image decoding device 100 decides whether to not divide the square encoding unit, to divide it vertically, to divide it horizontally, or to divide it into four encoding units. Referring to Figure 3, if the block shape information of the current encoding unit 300 indicates a square, the decoding unit 120 decides whether not to divide the encoding unit 310a which is the same size as the current encoding unit 300, based on the division shape mode information indicating that it will not be divided, or determines the divided encoding units 310b, 310c, 310d, 310e, 310f, etc., based on the division shape mode information indicating a predetermined division method.
[0066] Referring to Figure 3, the image decoding device 100 determines two coding units 310b obtained by vertically dividing the current coding unit 300 based on division shape mode information indicating that it is divided vertically, according to one embodiment of the present invention. The image decoding device 100 determines two coding units 310c obtained by horizontally dividing the current coding unit 300 based on division shape mode information indicating that it is divided horizontally. The image decoding device 100 determines four coding units 310d obtained by vertically and horizontally dividing the current coding unit 300 based on division shape mode information indicating that it is divided vertically and horizontally. The image decoding device 100 determines three coding units 310e obtained by vertically dividing the current coding unit 300 based on division shape mode information indicating that it is divided vertically and ternarily, according to one embodiment of the present invention. The image decoding device 100 determines three coding units 310f obtained by horizontally dividing the current coding unit 300 based on division shape mode information indicating that it is divided horizontally and ternarily. However, the division shapes in which a square coding unit can be divided should not be interpreted as being limited to the forms described above, but may include a variety of forms that the division shape mode information can indicate. A predetermined division shape in which a square coding unit is divided will be specifically described below through one embodiment of the present invention.
[0067] Figure 4 shows the process by which an image decoding device 100 divides a non-square coding unit and determines at least one coding unit according to one embodiment of the present invention.
[0068] According to one embodiment of the present invention, the image decoding device 100 utilizes block shape information indicating that the current coding unit is non-square. Based on the division shape mode information, the image decoding device 100 decides whether to not divide the non-square current coding unit or to divide it in a predetermined way. Referring to Figure 4, if the block shape information of the current coding unit 400 or 450 indicates that it is non-square, the image decoding device 100 determines a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 based on the division shape mode information indicating not to divide it, or determines divided coding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, 480c based on the division shape mode information indicating a predetermined division method. A predetermined division method for dividing a non-square coding unit will be specifically described below through one embodiment of the present invention.
[0069] According to one embodiment of the present invention, the image decoding device 100 determines the form in which an encoded unit is divided using division shape mode information, in which case the division shape mode information indicates the number of at least one encoded unit generated when the encoded unit is divided. Referring to Figure 4, if the division shape mode information indicates that the current encoded unit 400 or 450 is divided into two encoded units, the image decoding device 100 divides the current encoded unit 400 or 450 based on the division shape mode information and determines the two encoded units 420a, 420b or 470a, 470b that are included in the current encoded unit.
[0070] According to one embodiment of the present invention, when the image decoding device 100 divides a non-square current coding unit 400 or 450 based on the division shape mode information, the image decoding device 100 divides the current coding unit considering the position of the long side of the non-square current coding unit 400 or 450. For example, the image decoding device 100 considers the shape of the current coding unit 400 or 450 and divides the current coding unit 400 or 450 in a direction that divides the long side of the current coding unit 400 or 450 to determine a plurality of coding units.
[0071] According to one embodiment of the present invention, if the division shape mode information indicates that the coding unit is divided into an odd number of blocks (ternary division), the image decoding device 100 determines the odd number of coding units to be included in the current coding unit 400 or 450. For example, if the division shape mode information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding device 100 divides the current coding unit 400 or 450 into three coding units 430a, 430b, 430c or 480a, 480b, 480c.
[0072] According to one embodiment of the present invention, the width-to-height ratio of the current coding unit 400 or 450 is 4:1 or 1:4. When the width-to-height ratio is 4:1, the length of the width is longer than the length of the height, so the block shape information can be horizontal. When the width-to-height ratio is 1:4, the length of the width is shorter than the length of the height, so the block shape information can be vertical. The image decoding device 100 determines whether to divide the current coding unit into an odd number of blocks based on the division shape mode information. The image decoding device 100 also determines 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, if the current coding unit 400 is vertical, the image decoding device 100 divides the current coding unit 400 horizontally to determine coding units 430a, 430b, and 430c. Furthermore, if the current coding unit 450 is in the horizontal direction, the image decoding device 100 divides the current coding unit 450 vertically to determine coding units 480a, 480b, and 480c.
[0073] According to one embodiment of the present invention, the image decoding device 100 determines an odd number of coding units included in the current coding unit 400 or 450, and the sizes of the determined coding units are not necessarily all the same. For example, among the determined odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c, a predetermined coding unit 430b or 480b may have a different size from the other coding units 430a, 430c, 480a, and 480c. That is, the coding units determined by dividing the current coding unit 400 or 450 may have multiple sizes, and in some cases, the odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may each have different sizes.
[0074] According to one embodiment of the present invention, if the division shape mode information indicates that the coding unit is divided into an odd number of blocks, the image decoding device 100 determines the odd number of coding units included in the current coding unit 400 or 450, and further, the image decoding device 100 imposes a predetermined restriction on at least one of the odd number of coding units generated by the division. Referring to Figure 4, the image decoding device 100 makes the decoding process for the central coding unit 430b, 480b, and 480c, which are the three coding units 430a, 430b, 430c, 480a, 480b, and 480c generated by the division of the current coding unit 400 or 450, different from that for the other coding units 430a, 430c, 480a, and 480c. For example, the image decoding device 100 restricts the centrally located coding units 430b and 480b from being further divided, or restricts them to being divided only a predetermined number of times, unlike the other coding units 430a, 430c, 480a, and 480c.
[0075] Figure 5 shows the process by which an image decoding device 100 divides an encoded unit based on at least one of block shape information and divided shape mode information, according to one embodiment of the present invention.
[0076] An image decoding device 100 according to one embodiment of the present invention determines whether to divide a square first coding unit 500 into coding units or not, based on at least one of block shape information and division shape mode information. According to one embodiment of the present invention, if the division shape mode information indicates that the first coding unit 500 should be divided horizontally, the image decoding device 100 divides the first coding unit 500 horizontally and determines a second coding unit 510. The terms first coding unit, second coding unit, and third coding unit used in one embodiment of the present invention are used to understand the relationship between coding units before and after division. For example, when the first coding unit is divided, the second coding unit is determined, and when the second coding unit is divided, the third coding unit is determined. The relationship between the first coding unit, second coding unit, and third coding unit used below is understood to follow the features described above.
[0077] An image decoding device 100 according to one embodiment of the present invention determines whether to divide the determined second coding unit 510 into coding units based on the division shape mode information, or not. Referring to Figure 5, the image decoding device 100 divides the non-square second coding unit 510, determined by dividing the first coding unit 500 based on the division shape mode information, into at least one third coding unit 520a, 520b, 520c, 520d, etc., or not. The image decoding device 100 acquires the division shape mode information, divides the first coding unit 500 based on the acquired division shape mode information, determines a plurality of second coding units (e.g., 510) of various forms, and the second coding unit 510 is divided according to the method in which the first coding unit 500 was divided based on the division shape mode information. According to one embodiment of the present invention, if a first coding unit 500 is divided into a second coding unit 510 based on the division shape mode information for the first coding unit 500, the second coding unit 510 may also be divided into a third coding unit (e.g., 520a, 520b, 520c, 520d, etc.) based on the division shape mode information for the second coding unit 510. That is, coding units are recursively divided based on the division shape mode information associated with each coding unit. Therefore, a square coding unit may be determined from a non-square coding unit, and such a square coding unit may be recursively divided to determine a non-square coding unit.
[0078] Referring to Figure 5, among the odd number of third coding units 520b, 520c, and 520d determined by the division of the non-square second coding unit 510, a predetermined coding unit (e.g., a centrally located coding unit or a square coding unit) can be recursively divided. According to one embodiment of the present invention, a non-square third coding unit 520b, which is one of the odd number of third coding units 520b, 520c, and 520d, is divided horizontally into a plurality of fourth coding units. A non-square fourth coding unit 530b or 530d, which is one of the plurality of fourth coding units 530a, 530b, 530c, and 530d, can be further divided into a plurality of coding units. For example, a non-square fourth coding unit 530b or 530d may be again divided into an odd number of coding units. Methods that can be used for the recursive division of coding units will be described later through one embodiment of the present invention.
[0079] According to one embodiment of the present invention, the image decoding device 100 divides each of the third coding units 520a, 520b, 520c, 520d, etc. into coding units based on the division shape mode information. The image decoding device 100 also decides not to divide the second coding unit 510 based on the division shape mode information. According to one embodiment of the present invention, the image decoding device 100 divides the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, 520d. The image decoding device 100 sets a predetermined restriction on a predetermined third coding unit among the odd number of third coding units 520b, 520c, 520d. For example, the image decoding device 100 restricts the coding unit 520c located in the middle among the odd number of third coding units 520b, 520c, 520d so that it cannot be divided any further, or so that it can only be divided a set number of times.
[0080] Referring to Figure 5, the image decoding device 100 restricts the central coding unit 520c, among the odd number of third coding units 520b, 520c, and 520d contained in the non-square second coding unit 510, so that it is not further divided, or is divided in a predetermined division shape (for example, divided into only four coding units, or divided in a shape corresponding to the divided form of the second coding unit 510), or is restricted to being divided only a predetermined number of times (for example, n times, n>0). However, the above restriction regarding the central coding unit 520c is merely an embodiment and should not be interpreted as being limited to the above embodiment, but rather as including various restrictions that allow the central coding unit 520c to be decoded in a different way than the other coding units 520b and 520d.
[0081] According to one embodiment of the present invention, the image decoding device 100 can acquire division shape mode information used to divide the current coding unit at a predetermined position within the current coding unit.
[0082] Figure 6 shows a method by which an image decoding device 100 determines a predetermined coding unit from an odd number of coding units, according to one embodiment of the present invention.
[0083] Referring to Figure 6, the segmentation shape mode information of the current coding units 600 and 650 can be obtained from a sample at a predetermined position among multiple samples contained in the current coding units 600 and 650 (for example, samples 640 and 690 located in the center). However, the predetermined position within the current coding unit 600 from which at least one of such segmentation shape mode information can be obtained should not be interpreted as being limited to the central position shown in Figure 6, but rather as being able to include various positions that may be contained within the current coding unit 600 (for example, the top edge, bottom edge, left side, right side, upper left edge, lower left edge, upper right edge, lower right edge, etc.). The image decoding device 100 obtains the segmentation shape mode information obtained from the predetermined position and decides whether to divide the current coding unit into coding units of various shapes and sizes, or not.
[0084] According to one embodiment of the present invention, the image decoding device 100 selects one of the coding units when the current coding unit is divided into a predetermined number of coding units. There are various methods for selecting one of multiple coding units, and these methods will be described later in the following embodiment of the present invention.
[0085] According to one embodiment of the present invention, the image decoding device 100 divides the current encoding unit into a plurality of encoding units and determines the encoding unit at a predetermined position.
[0086] According to one embodiment of the present invention, the image decoding device 100 utilizes information indicating the position of each of the odd-numbered coding units in order to determine the central coding unit from among the odd-numbered coding units. Referring to Figure 6, the image decoding device 100 divides the current coding unit 600 or the current coding unit 650 to determine the odd-numbered coding units 620a, 620b, 620c or the odd-numbered coding units 660a, 660b, 660c. The image decoding device 100 uses information regarding the positions of the odd-numbered coding units 620a, 620b, 620c or the odd-numbered coding units 660a, 660b, 660c to determine the central coding unit 620b or the central coding unit 660b. For example, the image decoding device 100 determines the central coding unit 620b by determining the positions of the coding units 620a, 620b, 620c based on information indicating the positions of predetermined samples contained in the coding units 620a, 620b, 620c. Specifically, the image decoding device 100 determines the centrally located coding unit 620b by determining the positions of coding units 620a, 620b, and 620c based on information indicating the positions of samples 630a, 630b, and 630c at the upper left corner of coding units 620a, 620b, and 620c.
[0087] According to one embodiment of the present invention, the information indicating the position of the upper left corner samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c respectively includes information regarding the position or coordinates of the encoding units 620a, 620b, and 620c within the picture. According to one embodiment of the present invention, the information indicating the position of the upper left corner samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c respectively includes information indicating the width or height of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, and these widths or heights correspond to information indicating the difference between coordinates within the picture of the encoding units 620a, 620b, and 620c. In other words, the image decoding device 100 can determine the centrally located encoding unit 620b by directly using information regarding the position or coordinates of the encoding units 620a, 620b, and 620c within the picture, or by using information regarding the width or height of the encoding units corresponding to the difference values between coordinates.
[0088] According to one embodiment of the present invention, information indicating the position of the upper left sample 630a of the upper end encoding unit 620a can be expressed as coordinates (xa, ya), information indicating the position of the upper left sample 630b of the central encoding unit 620b can be expressed as coordinates (xb, yb), and information indicating the position of the upper left sample 630c of the lower end encoding unit 620c can be expressed as coordinates (xc, yc). The image decoding device 100 uses the coordinates of the upper left samples 630a, 630b, and 630c contained in the encoding units 620a, 620b, and 620c, respectively, to determine the central encoding unit 620b. For example, when the coordinates of the top-left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b containing the coordinates (xb,yb) of the centrally located sample 630b is determined as the central coding unit among the coding units 620a, 620b, and 620c determined by the division of the currently selected coding unit 600. However, the coordinates indicating the positions of the top-left samples 630a, 630b, and 630c represent their absolute positions within the picture. Furthermore, the (dxb,dyb) coordinates, which indicate the relative position of the top-left sample 630b of the central coding unit 620b, and the (dxc,dyc) coordinates, which indicate the relative position of the top-left sample 630c of the bottom-end coding unit 620c, may also be used, based on the position of the top-left sample 630a of the top-left coding unit 620a. Furthermore, the method of determining the coding unit at a predetermined location by using the coordinates of a sample as information indicating the location of the sample included in the coding unit should not be interpreted as being limited to the method described above, but rather as a variety of arithmetic methods that can utilize the coordinates of the sample.
[0089] An image decoding device 100 according to one embodiment of the present invention divides the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and selects an encoding unit from among the encoding units 620a, 620b, and 620c according to a predetermined criterion. For example, the image decoding device 100 selects an encoding unit 620b from among the encoding units 620a, 620b, and 620c that are of different sizes.
[0090] According to one embodiment of the present invention, the image decoding device 100 uses the (xa,ya) coordinates, which are information indicating the position of the upper left sample 630a of the upper end coding unit 620a, the (xb,yb) coordinates, which are information indicating the position of the upper left sample 630b of the central coding unit 620b, and the (xc,yc) coordinates, which are information indicating the position of the upper left sample 630c of the lower end coding unit 620c, to determine the width or height of each coding unit 620a, 620b, and 620c. The image decoding device 100 uses the coordinates (xa,ya), (xb,yb), and (xc,yc), which are the coordinates indicating the positions of the coding units 620a, 620b, and 620c, to determine the size of each coding unit 620a, 620b, and 620c. According to one embodiment of the present invention, the image decoding device 100 determines the width of the upper end coding unit 620a as the width of the current coding unit 600. The image decoding device 100 determines the height of the upper coding unit 620a as yb-ya. According to one embodiment of the present invention, the image decoding device 100 determines the width of the central coding unit 620b as the width of the current coding unit 600. The image decoding device 100 determines the height of the central coding unit 620b as yc-yb. According to one embodiment of the present invention, the image decoding device 100 determines the width or height of the lower coding unit using the width or height of the current coding unit and the widths and heights of the upper coding unit 620a and the central coding unit 620b. Based on the determined widths and heights of the coding units 620a, 620b, and 620c, the image decoding device 100 determines a coding unit having a different size from the other coding units. Referring to Figure 6, the image decoding device 100 determines the central coding unit 620b, which has a different size from the upper coding unit 620a and the lower coding unit 620c, as the coding unit at a predetermined position. However, the process by which the aforementioned image decoding device 100 determines an encoding unit having a different size from other encoding units is merely one embodiment of determining an encoding unit at a predetermined position using the size of an encoding unit determined based on sample coordinates. Therefore, various processes can be used to determine an encoding unit at a predetermined position by comparing the sizes of encoding units determined according to predetermined sample coordinates.
[0091] The image decoding device 100 uses the (xd,yd) coordinates, which indicate the position of sample 670a at the upper left corner of the left coding unit 660a, the (xe,ye) coordinates, which indicate the position of sample 670b at the upper left corner of the central coding unit 660b, and the (xf,yf) coordinates, which indicate the position of sample 670c at the upper left corner of the right coding unit 660c, to determine the width or height of each coding unit 660a, 660b, and 660c. The image decoding device 100 uses the coordinates (xd,yd), (xe,ye), and (xf,yf), which indicate the positions of each coding unit 660a, 660b, and 660c, to determine the size of each coding unit 660a, 660b, and 660c.
[0092] According to one embodiment of the present invention, the image decoding device 100 determines the width of the left coding unit 660a as xe-xd. The image decoding device 100 determines the height of the left coding unit 660a as the height of the current coding unit 650. According to one embodiment of the present invention, the image decoding device 100 determines the width of the central coding unit 660b as xf-xe. The image decoding device 100 determines the height of the central coding unit 660b as the height of the current coding unit 650. According to one embodiment of the present invention, the image decoding device 100 determines the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the central coding unit 660b. Based on the determined widths and heights of the coding units 660a, 660b, and 660c, the image decoding device 100 determines a coding unit having a different size from the other coding units. Referring to Figure 6, the image decoding device 100 determines a central coding unit 660b, which has a different size from the left coding unit 660a and the right coding unit 660c, as the coding unit at a predetermined position. However, the process by which the image decoding device 100 determines a coding unit having a different size from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on the sample coordinates. Therefore, various processes can be used to determine a coding unit at a predetermined position by comparing the sizes of the coding units determined according to predetermined sample coordinates.
[0093] However, the sample positions considered in determining the location of the coding unit should not be interpreted as being limited to the upper left corner as described above, but rather as being able to utilize information about the location of any sample included in the coding unit.
[0094] According to one embodiment of the present invention, the image decoding device 100 selects a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit, taking into consideration the shape of the current coding unit. For example, if the current coding unit is a non-square shape with a width longer than its height, the image decoding device 100 determines a coding unit at a predetermined position along the horizontal direction. That is, the image decoding device 100 determines one coding unit from among coding units with different positions in the horizontal direction and imposes restrictions on that coding unit. If the current coding unit is a non-square shape with a height longer than its width, the image decoding device 100 determines a coding unit at a predetermined position along the vertical direction. That is, the image decoding device 100 determines one coding unit from among coding units with different positions in the vertical direction and imposes restrictions on that coding unit.
[0095] According to one embodiment of the present invention, the image decoding device 100 uses information indicating the position of each of the even-numbered coding units in order to determine the coding unit at a predetermined position from among the even-numbered coding units. The image decoding device 100 divides the current coding unit (binary division) to determine the even-numbered coding units and uses the information regarding the positions of the even-numbered coding units to determine the coding unit at the predetermined position. This specific process corresponds to the process of determining the coding unit at a predetermined position (e.g., the central position) from among the odd-numbered coding units described in Figure 6, and is therefore omitted here.
[0096] According to one embodiment of the present invention, when a non-square current coding unit is divided into a plurality of coding units, predetermined information relating to the coding unit at a predetermined position in the division process can be used to determine the coding unit at a predetermined position among the plurality of coding units. For example, the image decoding device 100 uses at least one of the block shape information and division shape mode information stored in the sample included in the central coding unit during the division process to determine the coding unit located in the center among the plurality of coding units into which the current coding unit has been divided.
[0097] Referring to Figure 6, the image decoding device 100 divides the current coding unit 600 into multiple coding units 620a, 620b, and 620c based on the division shape mode information, and determines the coding unit 620b located in the center among the multiple coding units 620a, 620b, and 620c. Furthermore, the image decoding device 100 determines the coding unit 620b located in the center by considering the position where the division shape mode information is acquired. That is, the division shape mode information of the current coding unit 600 may be acquired at a sample 640 located in the center of the current coding unit 600, and if the current coding unit 600 is divided into multiple coding units 620a, 620b, and 620c based on the division shape mode information, the coding unit 620b including the sample 640 is determined as the coding unit located in the center. However, the information used to determine the coding unit located in the center is not limited to the division shape mode information, and various types of information may be used in the process of determining the coding unit located in the center.
[0098] According to one embodiment of the present invention, predetermined information for identifying an encoding unit at a predetermined location is obtained from a predetermined sample included in the encoding unit to be determined. Referring to Figure 6, the image decoding device 100 can use segmentation shape mode information obtained from a predetermined location sample within the current encoding unit 600 (for example, a sample located in the center of the current encoding unit 600) to determine an encoding unit at a predetermined location (for example, an encoding unit located in the center of the multiple divided encoding units) among a plurality of encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600. That is, the image decoding device 100 can determine a predetermined location sample considering the block shape of the current encoding unit 600, and can also determine an encoding unit 620b among a plurality of encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600, which includes a sample from which predetermined information (for example, segmentation shape mode information) can be obtained, and impose a predetermined restriction. Referring to Figure 6, according to one embodiment of the present invention, the image decoding device 100 determines a sample 640 located in the center of the current coding unit 600 as a sample from which predetermined information can be obtained, and the image decoding device 100 can impose a predetermined restriction on the coding unit 620b containing this sample 640 during the decoding process. However, the location of the sample from which predetermined information can be obtained is not limited to the aforementioned location, but can be interpreted as any sample at any location included in the coding unit 620b determined for the purpose of imposing the restriction.
[0099] According to one embodiment of the present invention, the location of a sample from which predetermined information can be obtained is determined according to the shape of the current coding unit 600. According to one embodiment of the present invention, block shape information determines whether the shape of the current coding unit is square or non-square, and determines the location of a sample from which predetermined information can be obtained according to the shape. An image decoding device 100 according to one embodiment of the present invention uses at least one of the information regarding the width and the information regarding the height of the current coding unit to determine a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which predetermined information can be obtained. As another example, if the block shape information associated with the current coding unit indicates that it is non-square, the image decoding device 100 determines one of the samples adjacent to the boundary that divides the long side of the current coding unit in half as a sample from which predetermined information can be obtained.
[0100] The image decoding device 100 according to one embodiment of the present invention, when the current coding unit is divided into multiple coding units, utilizes division shape mode information to determine the coding unit at a predetermined position among the multiple coding units. The image decoding device 100 according to one embodiment of the present invention acquires division shape mode information from a sample at a predetermined position included in the coding unit, and the image decoding device 100 divides the multiple coding units generated by the division of the current coding unit using the division shape mode information acquired from the sample at a predetermined position included in each of the multiple coding units. That is, the coding unit is recursively divided using the division shape mode information acquired from the sample at a predetermined position included in each coding unit. The recursive division process of the coding unit has been described above through Figure 5, so a detailed explanation is omitted.
[0101] An image decoding device 100 according to one embodiment of the present invention divides the current encoding unit to determine at least one encoding unit, and determines the order in which the at least one encoding unit is decoded according to a predetermined block (for example, the current encoding unit).
[0102] Figure 7 shows the order in which the multiple coding units are processed when the image decoding device 100 according to one embodiment of the present invention divides the current coding unit and determines multiple coding units.
[0103] An image decoding device 100 according to one embodiment of the present invention divides the first coding unit 700 vertically to determine the second coding units 710a and 710b, divides the first coding unit 700 horizontally to determine the second coding units 730a and 730b, or divides the first coding unit 700 vertically and horizontally to determine the second coding units 750a, 750b, 750c, and 750d according to the divided shape mode information.
[0104] Referring to Figure 7, the image decoding device 100 can determine the order in which the second coding units 710a and 710b, determined by dividing the first coding unit 700 vertically, are processed horizontally 710c. The image decoding device 100 determines the processing order of the second coding units 730a and 730b, determined by dividing the first coding unit 700 horizontally, in the vertical direction 730c. The image decoding device 100 processes the second coding units 750a, 750b, 750c, and 750d, determined by dividing the first coding unit 700 vertically and horizontally, in a predetermined order (for example, raster scan order) in which the coding units located in one row are processed before the coding units located in the next row are processed. Determined according to the scan order (or z-scan order, such as 750e).
[0105] The image decoding device 100 according to one embodiment of the present invention recursively divides the coding unit. Referring to Figure 7, the image decoding device 100 according to one embodiment of the present invention divides the first coding unit 700 to determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d, and recursively divides each of the determined plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The method for dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d may correspond to the method for dividing the first coding unit 700. As a result, the multiple coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can each be independently divided into multiple coding units. Referring to Figure 7, the image decoding device 100 divides the first coding unit 700 vertically to determine the second coding units 710a and 710b, and then decides whether or not to independently divide each of the second coding units 710a and 710b.
[0106] According to one embodiment of the present invention, the image decoding device 100 divides the left second coding unit 710a horizontally into third coding units 720a and 720b, while not dividing the right second coding unit 710b.
[0107] According to one embodiment of the present invention, the processing order of the coding units is determined based on the coding unit division process. In other words, the processing order of the divided coding units is determined based on the processing order of the coding unit immediately before division. The image decoding device 100 determines the processing order of the third coding units 720a and 720b, which are determined when the left second coding unit 710a is divided, independently of the processing order of the right second coding unit 710b. Since the left second coding unit 710a is divided horizontally to determine the third coding units 720a and 720b, the third coding units 720a and 720b can be processed vertically 720c. Also, since the processing order of the left second coding unit 710a and the right second coding unit 710b corresponds to the horizontal direction 710c, the right coding unit 710b can be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed vertically 720c. The above description is intended to explain the process by which the processing order of each coding unit is determined based on the coding unit before division, and should not be interpreted as being limited to the embodiments described above. Rather, it should be interpreted as being applicable to various methods in which coding units determined by division into various forms can be processed independently according to a predetermined order.
[0108] Figure 8 shows the process by which an image decoding device 100 according to one embodiment of the present invention determines that the current coding unit will be divided into an odd number of coding units when the coding unit cannot be processed in a predetermined order.
[0109] An image decoding device 100 according to one embodiment of the present invention determines, based on acquired division shape mode information, that the current coding unit is divided into an odd number of coding units. Referring to Figure 8, a square first coding unit 800 may be divided into non-square second coding units 810a and 810b, while the second coding units 810a and 810b are each independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. The image decoding device 100 according to one embodiment of the present invention divides the left coding unit 810a of the second coding unit horizontally to determine a plurality of third coding units 820a and 820b, and divides the right coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.
[0110] An image decoding device 100 according to one embodiment of the present invention determines whether the third coding units 820a, 820b, 820c, 820d, and 820e can be processed in a predetermined order, and determines whether there are coding units that have been divided into an odd number of parts. Referring to Figure 8, the image decoding device 100 determines the third coding units 820a, 820b, 820c, 820d, and 820e by recursively dividing the first coding unit 800. Based on at least one of the block shape information and the division shape mode information, the image decoding device 100 determines whether the first coding unit 800, the second coding units 810a, 810b, or the third coding units 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units. For example, the coding units located on the right side of the second coding units 810a and 810b are divided into an odd number of third coding units 820c, 820d, and 820e. The order in which the multiple coding units contained in the first coding unit 800 are processed is predetermined (for example, the z-scan order). The order becomes 830), and the image decoding device 100 determines whether the third coding units 820c, 820d, and 820e, which are determined by dividing the right-side second coding unit 810b into an odd number of parts, satisfy the condition that they can be processed in the predetermined order.
[0111] An image decoding device 100 according to one embodiment of the present invention determines whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy the condition that they can be processed in the predetermined order, and the condition relates to whether at least one of the width or height of the second coding units 810a and 810b is divided in half along the boundary of the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined by dividing the height of the non-square left second coding unit 810a in half satisfy the condition. The boundary of the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into three coding units does not divide the width or height of the right second coding unit 810b in half, so the third coding units 820c, 820d, and 820e are determined not to satisfy the condition. The image decoding device 100 determines that the failure to satisfy these conditions constitutes a disconnection in the scan sequence, and based on the determination result, it decides that the second coding unit 810b on the right will be divided into an odd number of coding units. In the case of division into an odd number of coding units, the image decoding device 100 according to one embodiment of the present invention can impose a predetermined restriction on the coding unit at a predetermined position among the divided coding units. The content of the restriction or the predetermined position, etc., has been described above through the embodiment of the present invention, so a detailed explanation is omitted.
[0112] Figure 9 shows the process by which an image decoding device 100 according to one embodiment of the present invention divides the first coding unit 900 and determines at least one coding unit.
[0113] An image decoding device 100 according to one embodiment of the present invention divides a first coding unit 900 based on the division shape mode information acquired by the bitstream acquisition unit 110. The square first coding unit 900 is divided into four square coding units or into a plurality of non-square coding units. For example, referring to Figure 9, if the first coding unit 900 is square and the division shape mode information indicates that it is divided into non-square coding units, the image decoding device 100 divides the first coding unit 900 into a plurality of non-square coding units. Specifically, if the division shape mode information indicates that the first coding unit 900 is divided horizontally or vertically to determine an odd number of coding units, the image decoding device 100 can divide the square first coding unit 900 into second coding units 910a, 910b, 910c determined by vertical division as an odd number of coding units, or into second coding units 920a, 920b, 920c determined by horizontal division.
[0114] An image decoding device 100 according to one embodiment of the present invention determines whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy the condition that they can be processed in a predetermined 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 boundaries of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to Figure 9, the boundaries of the second coding units 910a, 910b, and 910c determined by vertically dividing the square first coding unit 900 do not divide the width of the first coding unit 900 in half, and therefore it is determined that the first coding unit 900 does not satisfy the condition that it can be processed in a predetermined order. Furthermore, the boundaries of the second coding units 920a, 920b, and 920c, which are determined by horizontally dividing the square first coding unit 900, do not divide the height of the first coding unit 900 in half. Therefore, it is determined that the first coding unit 900 does not satisfy the condition that it can be processed in a predetermined order. The image decoding device 100 determines that such a failure to satisfy the condition is a disconnection in the scan order, and based on the determination result, it decides that the first coding unit 900 will be divided into an odd number of coding units. In the case of division into an odd number of units, the image decoding device 100 can impose a predetermined restriction on the coding unit at a predetermined position among the divided coding units. The content of the restriction or the predetermined position, etc., has been described above through the embodiment of the present invention, so a detailed explanation is omitted.
[0115] An image decoding device 100 according to one embodiment of the present invention divides a first coding unit to determine coding units of various forms.
[0116] Referring to Figure 9, the image decoding device 100 divides the square first coding unit 900, the non-square first coding unit 930, or 950 into coding units of various shapes.
[0117] Figure 10 shows that in an image decoding device 100 according to one embodiment of the present invention, if the non-square second coding unit determined by dividing the first coding unit 1000 satisfies predetermined conditions, the shape in which the second coding unit can be divided is limited.
[0118] An image decoding device 100 according to one embodiment of the present invention decides to divide a square first coding unit 1000 into non-square second coding units 1010a, 1010b, 1020a, and 1020b based on the division shape mode information acquired by the bitstream acquisition unit 110. The second coding units 1010a, 1010b, 1020a, and 1020b are divided independently. Based on the division shape mode information associated with each of the second coding units 1010a, 1010b, 1020a, and 1020b, the image decoding device 100 decides whether to divide into multiple coding units or not. The image decoding device 100 according to one embodiment of the present invention divides the non-square left second coding unit 1010a, which was determined by dividing the first coding unit 1000 vertically, horizontally to determine the third coding units 1012a and 1012b. However, the image decoding device 100 restricts the right-side second coding unit 1010b from being divided horizontally in the same direction as the left-side second coding unit 1010a when the left-side second coding unit 1010a is divided horizontally. If the right-side second coding unit 1010b is divided in the same direction and the third coding units 1014a and 1014b are determined, the left-side second coding unit 1010a and the right-side second coding unit 1010b can be divided horizontally independently, thereby determining the third coding units 1012a, 1012b, 1014a, and 1014b. However, this is the same result as when 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 mode information, which can be inefficient from the standpoint of image decoding.
[0119] An image decoding device 100 according to one embodiment of the present invention divides a first coding unit 1000 horizontally to determine a non-square second coding unit 1020a or 1020b, which is then divided vertically to determine third coding units 1022a, 1022b, 1024a, and 1024b. However, if one of the second coding units (for example, the upper second coding unit 1020a) is divided vertically, the image decoding device 100 restricts the division of other second coding units (for example, the lower second coding unit 1020b) from being divided vertically in the same direction as the upper second coding unit 1020a for the reasons mentioned above.
[0120] Figure 11 shows the process by which the image decoding device 100 divides the square coding units when the divided shape mode information cannot indicate division into four square coding units according to one embodiment of the present invention.
[0121] An image decoding device 100 according to one embodiment of the present invention divides a first coding unit 1100 based on division shape mode information and determines second coding units 1110a, 1110b, 1120a, 1120b, etc. The division shape mode information may include information about various forms in which the coding unit can be divided, but the information about various forms may not include information for dividing it into four square coding units. According to such division shape mode information, the image decoding device 100 cannot divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, 1130d. Based on the division shape mode information, the image decoding device 100 determines non-square second coding units 1110a, 1110b, 1120a, 1120b, etc.
[0122] An image decoding device 100 according to one embodiment of the present invention independently divides non-square second coding units 1110a, 1110b, 1120a, 1120b, etc. Each of the second coding units 1110a, 1110b, 1120a, 1120b, etc. can be divided in a predetermined order through a recursive method. This is a division method that corresponds to a method in which the first coding unit 1100 is divided based on division shape mode information.
[0123] For example, the image decoding device 100 divides the left second coding unit 1110a horizontally to determine square third coding units 1112a and 1112b, and divides the right second coding unit 1110b horizontally to determine square third coding units 1114a and 1114b. Furthermore, the image decoding device 100 may also divide both the left second coding unit 1110a and the right second coding unit 1110b horizontally to determine square third coding units 1116a, 1116b, 1116c, and 1116d. In this case, the coding units of the first coding unit 1100 can be determined in the same way as when it is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0124] As another example, the image decoding device 100 vertically divides the upper second coding unit 1120a to determine square third coding units 1122a and 1122b, and vertically divides the lower second coding unit 1120b to determine square third coding units 1124a and 1124b. Furthermore, the image decoding device 100 may vertically divide both the upper second coding unit 1120a and the lower second coding unit 1120b to determine square third coding units 1126a, 1126b, 1126c, and 1126d. In this case, the coding units of the first coding unit 1100 can be determined in a similar manner to when it is divided into four square second coding units 1130a, 1130b, 1130c, and 1130d.
[0125] Figure 12 shows that, according to one embodiment of the present invention, the processing order between multiple coding units can change depending on the coding unit partitioning process.
[0126] An image decoding device 100 according to one embodiment of the present invention divides a first coding unit 1200 based on division shape mode information. If the block shape is square and the division shape mode information indicates that the first coding unit 1200 is divided in at least one of the horizontal and vertical directions, the image decoding device 100 divides the first coding unit 1200 to determine second coding units (e.g., 1210a, 1210b, 1220a, 1220b, etc.). Referring to Figure 12, the non-square second coding units 1210a, 1210b, 1220a, 1220b determined by dividing the first coding unit 1200 only in the horizontal or vertical direction can be divided independently based on the division shape mode information for each. For example, the image decoding device 100 divides the second coding units 1210a and 1210b, which are generated by vertically dividing the first coding unit 1200, horizontally to determine the third coding units 1216a, 1216b, 1216c, and 1216d. Similarly, it divides the second coding units 1220a and 1220b, which are generated by horizontally dividing the first coding unit 1200, vertically to determine the third coding units 1226a, 1226b, 1226c, and 1226d. The division process of these second coding units 1210a, 1210b, 1220a, and 1220b is as described above in relation to Figure 11, so a detailed explanation is omitted.
[0127] An image decoding device 100 according to one embodiment of the present invention can process coding units in a predetermined order. The features relating to the processing of coding units in a predetermined order have been described above in relation to Figure 7, so a detailed explanation is omitted. Referring to Figure 12, the image decoding device 100 divides the square first coding unit 1200 to determine four square third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The image decoding device 100 according to one embodiment of the present invention determines the processing order of the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d according to the form in which the first coding unit 1200 is divided.
[0128] According to one embodiment of the present invention, the image decoding device 100 divides the second coding units 1210a and 1210b, which are generated by dividing them vertically, horizontally to determine the third coding units 1216a, 1216b, 1216c, and 1216d. The image decoding device 100 processes the third coding units 1216a and 1216c, which are included in the left second coding unit 1210a, vertically first, and then processes the third coding units 1216b and 1216d, which are included in the right second coding unit 1210b, vertically according to the sequence 1217.
[0129] An image decoding device 100 according to one embodiment of the present invention divides the second coding units 1220a and 1220b, which are generated by dividing them horizontally, vertically to determine the third coding units 1226a, 1226b, 1226c, and 1226d. The image decoding device 100 processes the third coding units 1226a and 1226b, which are contained in the upper second coding unit 1220a, horizontally first, and then processes the third coding units 1226c and 1226d, which are contained in the lower second coding unit 1220b, horizontally according to a sequence 1227.
[0130] Referring to Figure 12, the second coding units 1210a, 1210b, 1220a, and 1220b are each divided, determining the square third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The second coding units 1210a and 1210b determined by vertical division and the second coding units 1220a and 1220b determined by horizontal division are divided in different ways, but according to the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d determined thereafter, the first coding unit 1200 is ultimately divided into coding units of the same shape. As a result, the image decoding device 100 can process multiple coding units determined to be the same shape in different orders, even when it recursively divides coding units through different processes based on the divided shape mode information and consequently determines coding units of the same shape.
[0131] Figure 13 shows the process by which the depth of a coding unit is determined in accordance with changes in the shape and size of the coding unit when a coding unit is recursively divided and multiple coding units are determined according to one embodiment of the present invention.
[0132] An image decoding device 100 according to one embodiment of the present invention determines the depth of an encoding unit according to a predetermined criterion. For example, the predetermined criterion is the length of the long side of the encoding unit. If the length of the long side of the current encoding unit is divided into 2n (n>0) times the length of the long side of the encoding unit before division, the image decoding device 100 determines the depth of the current encoding unit as having increased by n from the depth of the encoding unit before division. Hereinafter, the encoding unit with increased depth will be referred to as the lower-depth encoding unit.
[0133] Referring to Figure 13, according to one embodiment of the present invention, based on block shape information indicating that it is a square (for example, when the block shape information indicates "0:SQUARE"), the image decoding device 100 can divide the square first coding unit 1300 to determine the second coding unit 1302, third coding unit 1304, etc., for lower depths. If the size of the square first coding unit 1300 is 2N × 2N, the second coding unit 1302, which is determined by dividing the width and height of the first coding unit 1300 by half, can have a size of N × N. Furthermore, the third coding unit 1304, which is determined by dividing the width and height of the second coding unit 1302 by half, can have a size of N / 2 × N / 2. In this case, the width and height of the third coding unit 1304 correspond to 1 / 4 of the first coding unit 1300. If the depth of the first coding unit 1300 is D, then the depth of the second coding unit 1302, which is half the width and height of the first coding unit 1300, will be D+1, and the depth of the third coding unit 1304, which is quarter the width and height of the first coding unit 1300, will be D+2.
[0134] According to one embodiment of the present invention, based on block shape information indicating a non-square shape (for example, the block shape information indicates "1:NS_VER" which indicates a non-square shape where the height is longer than the width, or "2:NS_HOR" which indicates a non-square shape where the width is longer than the height), the image decoding device 100 can divide the non-square first coding unit 1310 or 1320 to determine a lower-depth second coding unit 1312 or 1322, a third coding unit 1314 or 1324, etc.
[0135] The image decoding device 100 can determine a second coding unit (e.g., 1302, 1312, 1322, etc.) by dividing at least one of the width and height of the first coding unit 1310, which is N×2N in size. That is, the image decoding device 100 can divide the first coding unit 1310 horizontally to determine an N×N second coding unit 1302 or an N×N / 2 second coding unit 1322, and may further divide it horizontally and vertically to determine an N / 2×N second coding unit 1312.
[0136] An image decoding device 100 according to one embodiment of the present invention may also determine a second coding unit (e.g., 1302, 1312, 1322, etc.) by dividing at least one of the width and height of a first coding unit 1320 of size 2N × N. That is, the image decoding device 100 may divide the first coding unit 1320 vertically to determine a second coding unit 1302 of size N × N, or a second coding unit 1312 of size N / 2 × N, and further divide it horizontally and vertically to determine a second coding unit 1322 of size N × N / 2.
[0137] An image decoding device 100 according to one embodiment of the present invention may also divide at least one of the width and height of a second coding unit 1302 of N×N size to determine a third coding unit (e.g., 1304, 1314, 1324, etc.). That is, the image decoding device 100 divides the second coding unit 1302 vertically and horizontally to determine a third coding unit 1304 of N2×N / 2 size, a third coding unit 1314 of N / 4×N / 2 size, or a third coding unit 1324 of N / 2×N / 4 size.
[0138] An image decoding device 100 according to one embodiment of the present invention may also determine a third coding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second coding unit 1312 of N / 2 × N size. That is, the image decoding device 100 may determine a third coding unit 1304 of N / 2 × N / 2 size or a third coding unit 1324 of N / 2 × N / 4 size by dividing the second coding unit 1312 horizontally, or determine a third coding unit 1314 of N / 4 × N / 2 size by dividing it vertically and horizontally.
[0139] An image decoding device 100 according to one embodiment of the present invention may also determine a third coding unit (e.g., 1304, 1314, 1324, etc.) by dividing at least one of the width and height of a second coding unit 1322 of N × N / 2 size. That is, the image decoding device 100 may determine a third coding unit 1304 of N / 2 × N / 2 size or a third coding unit 1314 of N / 4 × N / 2 size by dividing the second coding unit 1322 vertically, or a third coding unit 1324 of N / 2 × N / 4 size by dividing it vertically and horizontally.
[0140] An image decoding device 100 according to one embodiment of the present invention divides a square coding unit (e.g., 1300, 1302, 1304) horizontally or vertically. For example, a first coding unit 1300 of size 2N × 2N is divided vertically to determine a first coding unit 1310 of size N × 2N, or divided horizontally to determine a first coding unit 1320 of size 2N × N. According to one embodiment of the present invention, if the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 of size 2N × 2N in the horizontal or vertical direction may be the same as the depth of the first coding unit 1300.
[0141] The width and height of the third coding unit 1314 or 1324 according to one embodiment of the present invention correspond to 1 / 4 times that of the first coding unit 1310 or 1320. If the depth of the first coding unit 1320 is D, then the depth of the second coding unit 1312 or 1322, which is 1 / 2 the width and height of the first coding unit 1310 or 1320, becomes D+1, and the depth of the third coding unit 1314 or 1324, which is 1 / 4 the width and height of the first coding unit 1310 or 1320, becomes D+2.
[0142] Figure 14 shows an index of depth and coding unit segment that can be determined based on the shape and size of the coding unit by one embodiment of the present invention (part This indicates the index (PID).
[0143] An image decoding device 100 according to one embodiment of the present invention divides a square first coding unit 1400 to determine second coding units of various shapes. Referring to Figure 14, the image decoding device 100 divides the first coding unit 1400 in at least one of the vertical and horizontal directions according to the division shape mode information to determine second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d. That is, the image decoding device 100 determines second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the division shape mode information for the first coding unit 1400.
[0144] According to one embodiment of the present invention, the depth of the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d, which are determined according to the division shape mode information for the square first coding unit 1400, can be determined based on the length of the longer side. For example, since the length of one side of the square first coding unit 1400 is the same as the length of the longer side of the non-square second coding units 1402a, 1402b, 1404a, and 1404b, the depth of the first coding unit 1400 and the non-square second coding units 1402a, 1402b, 1404a, and 1404b can be considered to be the same at D. In contrast, 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 mode information, the length of one side of the square second coding units 1406a, 1406b, 1406c, and 1406d is half the length of one side of the first coding unit 1400. Therefore, the depth of the second coding units 1406a, 1406b, 1406c, and 1406d is D+1, which is one level lower than the depth D of the first coding unit 1400.
[0145] An image decoding device 100 according to one embodiment of the present invention divides a first coding unit 1410, which has a height longer than its width, horizontally according to the division shape mode information, and divides it into a plurality of second coding units 1412a, 1412b, 1414a, 1414b, and 1414c. An image decoding device 100 according to one embodiment of the present invention divides a first coding unit 1420, which has a width longer than its height, vertically according to the division shape mode information, and divides it into a plurality of second coding units 1422a, 1422b, 1424a, 1424b, and 1424c.
[0146] According to one embodiment of the present invention, the depth of the second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, and 1424c, which are determined according to the division shape mode information for the non-square first coding unit 1410 or 1420, is determined based on the length of the longer side. ...For example, since the length of one side of the square second coding units 1412a and 1412b is half the length of one side of the non-square first coding unit 1410, whose height is longer than its width, the depth of the square second coding units 1412a and 1412b is D+1, which is one level lower than the depth D of the non-square first coding unit 1410.
[0147] Furthermore, the image decoding device 100 divides 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 include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, the length of the longer side of the non-square second coding units 1414a and 1414c and the length of one side of the square second coding unit 1414b are both half the length of one side of the first coding unit 1410. Therefore, the depth of the second coding units 1414a, 1414b, and 1414c is D+1, which is one level lower than the depth D of the first coding unit 1410. The image decoding device 100 determines the depth of the coding unit associated with the non-square first coding unit 1420, in a manner corresponding to the method for determining the depth of the coding unit associated with the first coding unit 1410.
[0148] An image decoding device 100 according to one embodiment of the present invention can determine the index PID for the division of a divided coding unit based on the size ratio between coding units when the odd number of divided coding units are not the same size. Referring to Figure 14, among the odd number of divided coding units 1414a, 1414b, and 1414c, the central coding unit 1414b has the same width as the other coding units 1414a and 1414c, but its height may be twice that of the other coding units 1414a and 1414c. That is, in this case, the central coding unit 1414b contains two of the other coding units 1414a and 1414c. Therefore, if the index PID of the central coding unit 1414b is 1 according to the scan order, the index of the next coding unit 1414c will be 3, which is 2 higher. In other words, there is a discontinuity in the index values. An image decoding device 100 according to one embodiment of the present invention determines whether an odd number of coded units are of the same size to each other, based on the presence or absence of discontinuities in the index for the divisions between the coded units thus divided.
[0149] An image decoding device 100 according to one embodiment of the present invention determines whether a plurality of coding units, which have been divided and determined from a current coding unit, have been divided according to a specific division shape, based on the index value for dividing them. Referring to Figure 14, the image decoding device 100 divides a rectangular first coding unit 1410, whose height is longer than its width, to determine an even number of coding units 1412a and 1412b, or an odd number of coding units 1414a, 1414b, and 1414c. The image decoding device 100 uses an index PID that represents each coding unit to distinguish each of the plurality of coding units. According to one embodiment of the present invention, the PID may be obtained from a sample at a predetermined position in each coding unit (for example, the upper left corner sample).
[0150] An image decoding device 100 according to one embodiment of the present invention uses an index for the division of coding units to determine a coding unit at a predetermined position among the divided and determined coding units. According to one embodiment of the present invention, if the division shape mode information for a rectangular first coding unit 1410, whose height is longer than its width, indicates that it is divided into three coding units, the image decoding device 100 divides the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 assigns an index to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 compares the indices for each coding unit to determine the central coding unit among the odd number of divided coding units. Based on the coding unit indices, the image decoding device 100 can determine the coding unit 1414b, which has an index corresponding to the middle value among the indices, as the coding unit at the central position among the coding units determined by the division of the first coding unit 1410. An image decoding device 100 according to one embodiment of the present invention can determine the index for the division of a divided coding unit based on the size ratio between coding units when the coding units are not the same size as each other. Referring to Figure 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, but its height may be twice that of the other coding units 1414a and 1414c. In this case, if the index PID of the coding unit 1414b located in the center is 1, then the index of the coding unit 1414c located in the next order will be 3, which is an increase of 2. When the index increases uniformly in this way and then the amount of increase changes, the image decoding device 100 can determine that the image has been divided into multiple coding units, including coding units that have different sizes from the other coding units. According to one embodiment of the present invention, if the divided shape mode information indicates that it is divided into an odd number of coding units, the image decoding device 100 can divide the current coding unit in such a way that the coding unit at a predetermined position among the odd number of coding units (for example, the central coding unit) is of a different size from the other coding units.In this case, the image decoding device 100 uses an index PID for the coding unit to determine the central coding unit having a different size. However, the aforementioned index, the size of the coding unit at the predetermined position to be determined, or the position are specified to illustrate one embodiment and should not be interpreted as limiting to this, and it should be interpreted that various indices, coding unit positions, and sizes may be used.
[0151] An image decoding device 100 according to one embodiment of the present invention utilizes a predetermined data unit from which the recursive division of the coding unit is initiated.
[0152] Figure 15 shows that, according to one embodiment of the present invention, multiple encoding units are determined based on multiple predetermined data units contained in a picture.
[0153] According to one embodiment of the present invention, a predetermined data unit may be defined as a data unit from which an encoded unit is recursively divided using the division shape mode information. That is, it may correspond to the highest-depth encoded unit used in the process of determining multiple encoded units that divide the current picture. Hereinafter, for explanatory convenience, such a predetermined data unit will be referred to as a reference data unit.
[0154] According to one embodiment of the present invention, the reference data unit has a predetermined size and shape. According to one embodiment of the present invention, the reference data unit contains M × N samples, where M and N may be the same as each other, or they may be integers expressed as powers of 2. That is, the reference data unit has a square or non-square shape and can subsequently be divided into an integer number of coding units.
[0155] An image decoding device 100 according to one embodiment of the present invention divides the current picture into a plurality of reference data units. The image decoding device 100 according to one embodiment of the present invention divides the current picture into a plurality of reference data units using division shape mode information for each reference data unit. This division process of reference data units corresponds to a division process using a quad-tree structure.
[0156] An image decoding device 100 according to one embodiment of the present invention predetermines the minimum size that a reference data unit contained in the current picture can have. Based on this, the image decoding device 100 determines reference data units of various sizes that are larger than or equal to the minimum size, and uses the determined reference data units as a reference to determine at least one encoding unit using the segmented shape mode information.
[0157] Referring to Figure 15, the image decoding device 100 may utilize a square reference coding unit 1500 or a non-square reference coding unit 1502. According to one embodiment of the present invention, the shape and size of the reference coding unit may be various data units (e.g., sequence, picture, slice, slice segment) that include at least one reference coding unit. This is determined by the segment, tile, tile group, maximum coding unit, etc.
[0158] The bitstream acquisition unit 110 of the image decoding device 100 according to one embodiment of the present invention acquires from the bitstream at least one of information relating to the shape of a reference coding unit and information relating to the size of a reference coding unit for each of the various data units. The process for determining at least one coding unit included in a square reference coding unit 1500 has been described above through the process of dividing the current coding unit 300 in Figure 3, and the process for determining at least one coding unit included in a non-square reference coding unit 1502 has been described above through the process of dividing the current coding unit 400 or 450 in Figure 4, so a detailed explanation is omitted.
[0159] According to one embodiment of the present invention, the image decoding device 100 uses an index for identifying the size and shape of a reference coding unit in order to determine the size and shape of a reference coding unit according to some data units predetermined based on predetermined conditions. That is, the bitstream acquisition unit 110 acquires only an index for identifying the size and shape of a reference coding unit from the bitstream for each slice, slice segment, tile, tile group, and maximum coding unit, which are data units that satisfy predetermined conditions (for example, data units having a size of slice or less) from among the various data units (e.g., sequence, picture, slice, slice segment, tile, group, maximum coding unit, etc.). By using the index, the image decoding device 100 can determine the size and shape of the reference data unit for each data unit that satisfies the predetermined conditions. When information regarding the shape and size of the reference coding unit is acquired and used from the bitstream for each relatively small data unit, the utilization efficiency of the bitstream may be poor. Therefore, instead of directly acquiring information regarding the shape and size of the reference coding unit, only the index can be acquired and used. In this case, at least one of the sizes and shapes of reference coding units corresponding to an index indicating the size and shape of a reference coding unit may be predetermined. That is, the image decoding device 100 can determine at least one of the sizes and shapes of reference coding units included in the data unit that serves as the basis for index acquisition by selecting at least one of the predetermined sizes and shapes of reference coding units according to the index.
[0160] An image decoding device 100 according to one embodiment of the present invention utilizes at least one reference coding unit contained in a single maximum coding unit 1510. That is, the maximum coding unit 1510 that divides the image contains at least one reference coding unit, and coding units are determined through a recursive partitioning process of each reference coding unit. At least one of the width and height of the maximum coding unit 1510 according to one embodiment of the present invention corresponds to at least one integer multiple of the width and height of the reference coding unit. According to one embodiment of the present invention, the size of the reference coding unit may be the size obtained by dividing the maximum coding unit 1510 n times according to a quadtree structure. That is, the image decoding device 100 determines the reference coding unit by dividing the maximum coding unit 1510 n times according to a quadtree structure, and further according to one embodiment of the present invention, the reference coding unit may be partitioned based on at least one of block shape information and partition shape mode information.
[0161] An image decoding device 100 according to one embodiment of the present invention acquires and utilizes block shape information indicating the form of the current coding unit, or division shape mode information indicating how the current coding unit is divided, from a bitstream. The division shape mode information may be contained in bitstreams associated with various data units. For example, the image decoding device 100 utilizes division shape mode information contained in sequence parameter sets, picture parameter sets, video parameter sets, slice headers, slice segment headers, tile headers, and tile group headers. Furthermore, for each maximum coding unit and reference coding unit, the image decoding device 100 acquires and utilizes syntax elements corresponding to the block shape information or division shape mode information from the bitstream.
[0162] The following describes in detail a method for determining partition rules according to one embodiment of the present invention.
[0163] The image decoding device 100 determines the image division rule. The division rule may be predetermined between the image decoding device 100 and the image encoding device 200. The image decoding device 100 determines the image division rule based on information obtained from the bitstream. The image decoding device 100 determines the division rule based on information obtained from at least one of the following: sequence parameter set, picture parameter set, video parameter set, slice header, slice segment header, tile header, and tile group header. The image decoding device 100 divides the image into frames, slices, tiles, and temporal layers. The layer, the maximum coding unit, or the coding unit may be determined differently depending on these factors.
[0164] The image decoding device 100 determines a division rule based on the block shape of the coding unit. The block shape includes the size, shape, width and height ratios, and orientation of the coding unit. The image coding device 200 and the image decoding device 100 predetermine, but are not limited to, determining a division rule based on the block shape of the coding unit. The image decoding device 100 determines a division rule based on information obtained from the bitstream received from the image coding device 200.
[0165] The shape of the coding unit includes both square and non-square shapes. If the width and height of the coding unit are the same, the image decoding device 100 determines the shape of the coding unit to be square. If the width and height of the coding unit are different, the image decoding device 100 determines the shape of the coding unit to be non-square.
[0166] The size of the coding unit includes various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256, etc. ...The size of the coding unit can be classified based on the length of the long side, the length of the short side, or the width of the coding unit. The image decoder 100 applies the same division rule to coding units classified into the same group. For example, the image decoder 100 classifies coding units having the same long side length as having the same size. Also, the image decoder 100 applies the same division rule to coding units having the same long side length.
[0167] The width-to-height ratio of the coded unit includes 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, or 1:32, etc. Furthermore, the orientation of the coded unit includes horizontal and vertical directions. The horizontal direction indicates when the width of the coded unit is longer than its height. The vertical direction indicates when the width of the coded unit is shorter than its height.
[0168] The image decoding device 100 can adaptively determine the division rule based on the size of the coding unit. The image decoding device 100 can determine different permitted division shape modes based on the size of the coding unit. For example, the image decoding device 100 determines whether division is permitted or not based on the size of the coding unit. The image decoding device 100 determines the division direction according to the size of the coding unit. The image decoding device 100 determines the permitted division direction according to the size of the coding unit.
[0169] Determining the division rule based on the size of the coding unit may be a division rule predetermined between the image coding device 200 and the image decoding device 100. Alternatively, the image decoding device 100 may determine the division rule based on information obtained from the bitstream.
[0170] The image decoding device 100 adaptively determines the division rule based on the position of the coding unit. The image decoding device 100 adaptively determines the division rule based on the position of the coding unit within the image.
[0171] Furthermore, the image decoding device 100 may determine a division rule such that coded units generated by different division paths do not have the same block shape. However, it is not limited to this, and coded units generated by different division paths may have the same block shape. Coded units generated by different division paths may have different decoding processing orders. The decoding processing order has been explained with reference to Figure 12, so a detailed explanation is omitted here.
[0172] Figure 16 shows an embodiment of the present invention that illustrates an encoding unit that can be determined for each picture when the combination of shapes that can be divided into an encoding unit differs for each picture.
[0173] Referring to Figure 16, the image decoding device 100 determines a different combination of division shapes for each picture in which the encoding units can be divided. For example, the image decoding device 100 decodes an image using at least one picture included in the image, which can be divided into four encoding units (picture 1600), two or four encoding units (picture 1610), and two, three or four encoding units (picture 1620). To divide picture 1600 into multiple encoding units, the image decoding device 100 uses only division shape information indicating that it can be divided into four square encoding units. To divide picture 1610, the image decoding device 100 may use only division shape information indicating that it can be divided into two or four encoding units. To divide picture 1620, the image decoding device 100 may use only division shape information indicating that it can be divided into two, three or four encoding units. The aforementioned combinations of division shapes are merely embodiments for explaining the operation of the image decoding device 100, and the aforementioned combinations of division shapes should not be interpreted as being limited to the above embodiments. Rather, it should be interpreted that various combinations of division shapes can be used for each predetermined data unit.
[0174] The bitstream acquisition unit 110 of the image decoding device 100 according to one embodiment of the present invention acquires a bitstream containing an index indicating a combination of segmented shape information for each predetermined data unit (e.g., sequence, picture, slice, slice segment, tile, or tile group). For example, the bitstream acquisition unit 110 acquires a sequence parameter set (Sequence Parameter Set, Picture Parameter Set, Slice Header, Tile Header An index indicating a combination of division shape information is obtained from the header or tile group header. The image decoding device 100 uses the obtained index to determine combinations of division shapes in which the encoded unit can be divided for each predetermined data unit, thereby enabling the use of different combinations of division shapes for each predetermined data unit.
[0175] Figure 17 shows various shapes of coding units that can be determined based on segmentation shape mode information represented by binary code according to one embodiment of the present invention.
[0176] An image decoding device 100 according to one embodiment of the present invention can divide an encoded unit into various forms by utilizing block shape information and division shape mode information acquired through the bitstream acquisition unit 110. The forms of the encoded unit that can be divided may include a variety of forms, including those described through the embodiments described above.
[0177] Referring to Figure 17, the image decoding device 100 divides a square coding unit in at least one of the horizontal and vertical directions based on the division shape mode information, and divides a non-square coding unit in either the horizontal or vertical direction.
[0178] When an image decoding device 100 according to one embodiment of the present invention divides a square encoding unit into four square encoding units by dividing it horizontally and vertically, there can be four types of division shapes that the division shape mode information for the square encoding unit can represent. According to one embodiment of the present invention, the division shape mode information is represented as a two-digit binary code, and a binary code can be assigned to each division shape. For example, when the encoding unit is not divided, the division shape mode information is represented as (00)b; when the encoding unit is divided horizontally and vertically, the division shape mode information is represented as (01)b; when the encoding unit is divided horizontally, the division shape mode information is represented as (10)b; and when the encoding unit is divided vertically, the division shape mode information is represented as (11)b.
[0179] When an image decoding device 100 according to one embodiment of the present invention divides a non-square coding unit horizontally or vertically, the types of division shapes that the division shape mode information can indicate are determined according to how many coding units it divides into. Referring to Figure 17, the image decoding device 100 according to one embodiment of the present invention can divide a non-square coding unit into up to three. The image decoding device 100 divides the coding unit into two coding units, in which case the division shape mode information is represented as (10)b. The image decoding device 100 divides the coding unit into three coding units, in which case the division shape mode information is represented as (11)b. The image decoding device 100 decides not to divide the coding unit, in which case the division shape mode information is represented as (0)b. That is, the image decoding device 100 uses fixed-length coding (FLC) to utilize the binary code that indicates the division shape mode information. Instead of Fixed Length Coding, Variable Length Coding (VLC) can be used.
[0180] According to one embodiment of the present invention, referring to Figure 17, the binary code of the division shape mode information indicating that the coding unit is not divided is represented as (0)b. If the binary code of the division shape mode information indicating that the coding unit is not divided is set to (00)b, then all two bits of the binary code of the division shape mode information must be used, even though there is no division shape mode information set to (01)b. However, as shown in Figure 17, if three types of division shapes are used for a non-square coding unit, the image decoding device 100 can determine that the coding unit is not divided even if it uses a one-bit binary code (0)b as the division shape mode information, and thus can efficiently utilize the bitstream. However, the division shape of a non-square coding unit indicated by the division shape mode information should not be interpreted as being limited to the three types of forms shown in Figure 17, but should be interpreted as being a variety of forms, including the embodiments described above.
[0181] Figure 18 shows another shape of the coding unit that can be determined based on the segmentation shape mode information represented by the binary code according to one embodiment of the present invention.
[0182] Referring to Figure 18, the image decoding device 100 divides square coding units horizontally or vertically, and non-square coding units horizontally or vertically, based on the division shape mode information. That is, the division shape mode information indicates that a square coding unit is divided in one direction. In such cases, the binary code of the division shape mode information indicating that a square coding unit is not divided is represented by (0)b. If the binary code of the division shape mode information indicating that the coding unit is not divided is set to (00)b, then all 2 bits of the binary code of the division shape mode information must be used even though there is no division shape mode information set to (01)b. However, as shown in Figure 18, if three types of division shapes are used for a square coding unit, the image decoding device 100 can determine that the coding unit is not divided even if it uses a 1-bit binary code (0)b as the division shape mode information, thus efficiently utilizing the bitstream. However, the division shape of a square coding unit indicated by the division shape mode information should not be interpreted as being limited to the three types of forms shown in Figure 18, but should be interpreted as being a variety of forms, including the embodiments described above.
[0183] According to one embodiment of the present invention, block shape information or segmented shape mode information is represented using binary code, and this information can be directly generated as a bitstream. Furthermore, block shape information or segmented shape mode information that can be represented as binary code is not immediately generated as a bitstream, but rather CABAC(context It is sometimes used as the binary code input to adaptive binary arithmetic coding.
[0184] According to one embodiment of the present invention, the image decoding device 100 describes the process of acquiring syntax relating to block shape information or segmented shape mode information via CABAC. The bitstream acquisition unit 110 acquires a bitstream containing the binary code for the syntax. The image decoding device 100 then processes the binstring (bin) contained in the acquired bitstream. The image decoding device 100, according to one embodiment of the present invention, obtains a set of binary binstrings corresponding to the syntax element to be decoded, decodes each bin using probability information, and repeats this process until the binstring composed of the decoded bins matches one of the previously obtained binstrings. The image decoding device 100 determines the syntax element by performing inverse binary evolution of the binstring.
[0185] According to one embodiment of the present invention, the image decoding device 100 uses adaptive binary arithmetic coding. The decoding process (binary arithmetic coding) is performed to determine the syntax for the bin string, and the probability model for the bins obtained through the bitstream acquisition unit 110 is updated. Referring to Figure 17, the bitstream acquisition unit 110 of the image decoding device 100 acquires a bitstream showing a binary code indicating segmented shape mode information according to one embodiment of the present invention. Using the acquired binary code having a size of 1 or 2 bits, the image decoding device 100 determines the syntax for the segmented shape mode information. In order to determine the syntax for the segmented shape mode information, the image decoding device 100 updates the probability for each bit of the 2-bit binary code. That is, depending on whether the value of the first bin in the 2-bit binary code is 0 or 1, the image decoding device 100 may update the probability of having a value of 0 or 1 when decoding the next bin.
[0186] According to one embodiment of the present invention, the image decoding device 100 updates the probability for a bin used in the process of decoding the bins of the binstring for the syntax during the process of determining the syntax, and determines that a specific bit of the binstring has the same probability without updating the probability.
[0187] Referring to Figure 17, in the process of determining the syntax using a binstring indicating the division shape mode information for a non-square coding unit, the image decoding device 100 determines the syntax for the division shape mode information using one bin that has a value of 0 if the non-square coding unit is not divided. That is, if the block shape information indicates that the coding unit is non-square, the first bin of the binstring for the division shape mode information is 0 if the non-square coding unit is not divided, and 1 if it is divided into two or three coding units. Thus, the probability that the first bin of the binstring for the division shape mode information for a non-square coding unit is 0 is 1 / 3, and the probability that it is 1 is 2 / 3. As mentioned above, since the division shape mode information indicating that a non-square coding unit is not divided can only be represented by a 1-bit binstring with a value of 0, the image decoding device 100 can determine the syntax for the division shape mode information by determining whether the second bin is 0 or 1 only when the first bin of the division shape mode information is 1. In one embodiment of the present invention, the image decoding device 100 decodes the bins by assuming that the probability of the second bin being 0 or 1 is the same when the first bin for the segmented shape mode information is 1.
[0188] An image decoding device 100 according to one embodiment of the present invention utilizes a variety of probabilities for each bin in the process of determining the bins of a bin string for segmented shape mode information. An image decoding device 100 according to one embodiment of the present invention may determine different bin probabilities for segmented shape mode information depending on the orientation of the non-square block. An image decoding device 100 according to one embodiment of the present invention may determine different bin probabilities for segmented shape mode information depending on the width or length of the long side of the currently encoded unit. An image decoding device 100 according to one embodiment of the present invention may determine different bin probabilities for segmented shape mode information depending on at least one of the shape and length of the long side of the currently encoded unit.
[0189] An image decoding device 100 according to one embodiment of the present invention can determine the bin probabilities for segmented shape mode information as being the same for coding units of a predetermined size or larger. For example, for coding units having a size of 64 samples or more based on the length of the long side of the coding unit, the bin probabilities for segmented shape mode information can be determined as being the same.
[0190] An image decoding device 100 according to one embodiment of the present invention determines the initial probability for bins constituting a bin string of segmented shape mode information based on the slice type (e.g., I-slice, P-slice, or B-slice).
[0191] Figure 19 is a block diagram of an image coding and decoding system that performs loop filtering.
[0192] The encoding stage 1910 of the image encoding and decoding system 1900 transmits an encoded bitstream of an image, and the decoding stage 1950 receives the bitstream and decodes it to output a decoded image. Here, the encoding stage 1910 has a configuration similar to the image encoding device 200 described later, and the decoding stage 1950 has a configuration similar to the image decoding device 100.
[0193] In the coding stage 1910, the prediction coding unit 1915 outputs predicted data through interpretation and intraprediction, and the transformation and quantization unit 1920 outputs quantized transformation coefficients of residual data between the predicted data and the current input image. The entropy coding unit 1925 encodes and transforms the quantized transformation coefficients and outputs them as a bitstream. The quantized transformation coefficients are decoded as spatial domain data via the inverse quantization and inverse transformation unit 1930, and the decoded spatial domain data is output as a decoded image via the deblocking filtering unit 1935 and the loop filtering unit 1940. The decoded image can be used as a reference image for the next input image via the prediction coding unit 1915.
[0194] The encoded image data from the bitstream received by the decoding stage 1950 is decoded as spatial domain residual data via the entropy decoding unit 1955 and the inverse quantization and inverse transform unit 1960. The predicted data output from the prediction decoding unit 1975 and the residual data are combined to form spatial domain image data, and the deblocking filtering unit 1965 and the loop filtering unit 1970 perform filtering on the spatial domain image data and output a decoded image for the current original image. The decoded image can be used by the prediction decoding unit 1975 as a reference image for the next original image.
[0195] The loop filtering unit 1940 of the encoding stage 1910 performs loop filtering using filter information input according to user input or system settings. The filter information used by the loop filtering unit 1940 is output to the entropy encoding unit 1925 and transmitted to the decoding stage 1950 together with the encoded image data. The loop filtering unit 1970 of the decoding stage 1950 performs loop filtering based on the filter information input from the decoding stage 1950.
[0196] The embodiments described above describe the operation related to the image decoding method performed by the image decoding device 100. Below, the operation of an image encoding device 200 that performs an image encoding method corresponding to the reverse process of these image decoding methods will be described using one embodiment of the present invention.
[0197] Figure 20 is a block diagram showing the configuration of an image decoding device according to one embodiment of the present invention.
[0198] Referring to Figure 20, the image decoding device 2000 includes an acquisition unit 2010 and a predictive decoding unit 2020.
[0199] An acquisition unit 2010 and a predictive decoding unit 2020 according to one embodiment of the present invention can be implemented by at least one processor. In one embodiment, the acquisition unit 2010 and the predictive decoding unit 2020 operate according to instructions stored in memory.
[0200] The image decoding device 2000 includes a memory for storing input / output data from the acquisition unit 2010 and the prediction decoding unit 2020. The image decoding device 2000 also includes a memory control unit for controlling the input / output of data in the memory.
[0201] In one embodiment, the acquisition unit 2010 corresponds to the entropy decoding unit 1955 shown in Figure 19. In one embodiment, the prediction decoding unit 2020 corresponds to the prediction decoding unit 1975 shown in Figure 19.
[0202] The acquisition unit 2010 acquires the bitstream generated as a result of encoding the picture. The bitstream contains the encoding result for the current block. In one embodiment, the acquisition unit 2010 receives the bitstream from the image encoding device via a network. In one embodiment, the acquisition unit 2010 receives the bitstream from magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and floppy disks. This process retrieves a bitstream from a data storage medium, including a magneto-optical medium such as a disk.
[0203] The acquisition unit 2010 obtains the syntax elements for decoding the picture from the bitstream. The element is obtained. The values corresponding to the syntax element may be included in the bitstream according to the picture's hierarchical structure. In one embodiment, the acquisition unit 2010 obtains the syntax element by entropy decoding the bins included in the bitstream.
[0204] In one embodiment, the bitstream includes information about the prediction mode of the current block within the current picture. The current block may be the largest coding unit, coding unit, transformation unit, or prediction unit separated from the current picture to be decoded. In one embodiment, the prediction mode of the current block may be intra-mode or inter-mode.
[0205] The prediction / decoding unit 2020 performs intra-prediction or inter-prediction on the current block according to the prediction mode of the current block, and decodes the current block.
[0206] In one embodiment, if the prediction mode of the current block is intra mode, the acquisition unit 2010 acquires information about the intra prediction mode of the current block from the bitstream.
[0207] In one embodiment, if the prediction mode of the current block is an intra mode, the acquisition unit 2010 acquires information from the bitstream indicating whether or not refinement is performed on the intra prediction mode of the current block. In one embodiment, "refinement on the intra prediction mode" includes the operation of determining a second intra prediction mode indicating a subdivided direction based on a first intra prediction mode determined using the bitstream. For example, the image decoding device 2000 determines one intra prediction mode from among 129 direction modes (e.g., 65 general direction modes and 64 subdivided direction modes) based on a first intra prediction mode (e.g., 64th intra prediction mode) determined from among 65 general direction modes (e.g., 2nd intra prediction mode to 66th intra prediction mode).
[0208] In one embodiment, the acquisition unit 2010 acquires information regarding a method for determining an intra-prediction mode. The method for determining an intra-prediction mode includes at least one of a first determination method that determines an intra-prediction mode using only information acquired from the bitstream, a second determination method that determines an intra-prediction mode without using information acquired from the bitstream, and a third determination method that determines an intra-prediction mode by improving the intra-prediction mode determined based on information acquired from the bitstream. In one embodiment, the information regarding the method for determining an intra-prediction mode is included in at least one of the bitstream's block syntax, coding tree syntax, tile syntax, slice syntax, picture syntax, and sequence syntax.
[0209] In one embodiment, the prediction decoding unit 2020 determines the intra-prediction mode indicated by the intra-prediction mode information obtained from the bitstream using a first determination method. The first determination method according to one embodiment is described in H.266 This could be either the VVC (Versatile Video Coding) standard or the H.265 HEVC (High Efficiency Video Coding) standard's intra-predictive mode determination method.
[0210] In one embodiment, the prediction decoding unit 2020 determines an intra-prediction mode from among all intra-prediction modes using a second determination method. In one embodiment, the prediction decoding unit 2020 determines an intra-prediction mode based on the gradient value of the reference sample of the current block. The process by which the prediction decoding unit 2020 determines an intra-prediction mode based on the gradient value according to one embodiment is described with reference to Figure 25. In one embodiment, the prediction decoding unit 2020 determines an intra-prediction mode based on the result of a prediction made using the decoded sample of the current block. The process by which the prediction decoding unit 2020 determines an intra-prediction mode based on the result of a prediction according to one embodiment is described with reference to Figure 26.
[0211] In one embodiment, the prediction decoding unit 2020 determines a first intra-prediction mode based on an intra-prediction mode obtained from a bitstream using a third determination method, and determines a second intra-prediction mode based on the first intra-prediction mode.
[0212] The acquisition unit 2010 acquires information regarding the intra-prediction mode of the current block. The prediction decoding unit 2020 determines the first intra-prediction mode of the current block based on the acquired information.
[0213] In one embodiment, the prediction decoding unit 2020 determines a first intra-prediction mode based on the intra-prediction mode of the surrounding block (for example, at least one of the left, top, upper left, upper right, or lower left end of the current block).
[0214] In one embodiment, the prediction decoding unit 2020 uses an MPM (Most Prediction Mode) that includes multiple intra-prediction modes based on the prediction mode of the surrounding block. The prediction decoding unit 2020 generates a list of Probable Modes. The prediction decoding unit 2020 obtains information on whether the current block uses the MPM list to determine the intra-prediction mode. In one embodiment, if there are subdivided intra-prediction modes (e.g., improved intra-prediction modes) among the prediction modes of the surrounding blocks, the prediction decoding unit 2020 generates an MPM list containing intra-prediction modes close to the subdivided intra-prediction modes. In one embodiment, the prediction decoding unit 2020 stores intra-prediction modes close to the subdivided intra-prediction modes in order to generate an MPM list of the surrounding blocks. For example, the prediction decoding unit 2020 can store the first intra-prediction mode as the intra-prediction mode of the current block even if the second intra-prediction mode of the current block indicates a more subdivided direction than the first intra-prediction mode.
[0215] In one embodiment, if the acquired information indicates that the intra-prediction mode is determined using an MPM list, the acquisition unit 2010 acquires information indicating one of the intra-prediction modes included in the MPM list. The prediction decoding unit 2020 determines a first intra-prediction mode based on the acquired information.
[0216] In one embodiment, if the acquired information indicates that the intra-prediction mode can be determined without using the MPM list, the acquisition unit 2010 acquires information indicating one of the remaining intra-prediction modes, excluding the intra-prediction modes included in the MPM list. The prediction decoding unit 2020 determines the first intra-prediction mode based on the acquired information.
[0217] In one embodiment, the acquisition unit 2010 acquires information regarding the first intra-prediction mode. The information regarding the first intra-prediction mode includes an index related to the intra-prediction mode. The prediction decoding unit 2020 uses the information regarding the first intra-prediction mode to determine the first intra-prediction mode for the current block.
[0218] In one embodiment, the prediction decoding unit 2020 performs an improvement on the intra-prediction mode of the current block. The prediction decoding unit 2020 determines a second intra-prediction mode based on the first intra-prediction mode. The prediction decoding unit 2020 performs an intra-prediction for the current block using the second intra-prediction mode. In one embodiment, the second intra-prediction mode means the improved first intra-prediction mode.
[0219] In one embodiment, the prediction decoding unit 2020 determines the search range of the second intra prediction mode based on the first intra prediction mode. The search range includes a plurality of intra prediction modes, including the first intra prediction mode. The prediction decoding unit 2020 determines the second intra prediction mode within the search range. The prediction decoding unit 2020 performs intra prediction for the current block using the second intra prediction mode.
[0220] In one embodiment, if the prediction decoding unit 2020 does not improve the intra-prediction mode of the current block, the prediction decoding unit 2020 may perform intra-prediction for the current block using the first intra-prediction mode.
[0221] The prediction-decoding unit 2020 generates a prediction block corresponding to the current block via intra-prediction. The prediction-decoding unit 2020 generates a current block decoded using the prediction block. In one embodiment, the prediction-decoding unit 2020 determines the prediction block as the decoded current block. In one embodiment, the prediction-decoding unit 2020 generates a decoded current block by combining the prediction block with residual data acquired from the bitstream by the acquisition unit 2010. The decoded current block may be used as a reference block for the next block.
[0222] In intra-mode, it is assumed that there is continuity between the surrounding samples of the current block and the samples within the current block, and a predicted block for the current block can be generated based on the surrounding samples of the current block according to the intra-prediction mode.
[0223] In one embodiment, the prediction decoding unit 2020 can utilize not only the surrounding samples of the current block included in the current picture, but also spatial reference samples included in the current picture for intra-prediction. When using samples decoded before the current block, the size of residual data can be reduced by predicting the samples of the current block using not only samples directly adjacent to the current block, but also samples far from the current block. In one embodiment, the image decoding device 2000 improves the efficiency of intra-prediction, thereby improving compression efficiency. It can improve efficiency.
[0224] Figure 21 illustrates the process of predicting the current image using a reference sample according to one embodiment of the present invention.
[0225] An image decoding device 2000 according to one embodiment of the present invention makes a prediction for the current block 2110 based on data decoded before the current block 2110. The image decoding device 2000 determines a reference region 2120 for the current block 2110 from the data decoded before the current block 2110. The image decoding device 2000 predicts the current sample 2015 of the current block 2010 based on a reference sample 2125 included in the reference region.
[0226] Referring to Figure 21, the image decoding device 2000 determines a reference sample 2125 corresponding to the current sample 2115. The reference sample 2125 is determined as the intra-prediction mode of the current sample 2115. In one embodiment, the reference sample 2125 includes at least one of the upper sample, left sample, or sample indicated by the intra-prediction mode of the current sample 2115.
[0227] In one embodiment, the image decoding device 2000 determines the reference sample 2125 indicated by the intra-prediction mode as the prediction sample for the current sample 2115. In one embodiment, if the intra-prediction mode of the current sample 2115 indicates an integer pixel, the image decoding device 2000 can determine the sample indicated by the intra-prediction mode of the current sample 2115 as the reference sample 2125.
[0228] In one embodiment, if the intra-prediction mode of the current sample 2115 indicates a subpixel, the image decoder 2000 can determine the predicted sample for the current sample 2115 by a weighted sum of a plurality of integer pixel reference samples 2125. For example, if the reference sample 2125 in intra-prediction mode indicates (6.2,-1), the image decoder 2000 can determine the predicted sample using a weighted sum of the reference sample (6,-1) and the reference sample (7,-1). The weight values are determined in accordance with the distance between the subpixel and the integer pixel.
[0229] Figure 22 shows an intra-prediction direction according to one embodiment of the present invention.
[0230] Referring to Figure 22, in one embodiment, the multiple intra-prediction modes include the non-directional Intra_Planar mode (number 0), the non-directional Intra_DC mode (number 1), the directional Intra_Angular modes (numbers 2 through 66), and the Intra_Wide_Angular modes (numbers -14 through -1 and 67 through 80).
[0231] Intra_Planar mode refers to a mode that determines the predicted sample based on a weighted average of the distances to the left reference sample, the upper reference sample, and the lower left and upper right samples of the current block.
[0232] Intra_DC mode refers to a mode in which the mean of the reference samples is determined as the predictive sample.
[0233] In Intra_Angular mode, the position of the reference sample for generating the predicted sample for the currently in-block sample can be identified, taking into account the direction indicated by Intra_Angular mode. For example, in mode 34, a reference sample located 45 degrees to the upper left relative to the currently in-block sample is identified.
[0234] The Intra_Wide_Angular mode is used to identify a reference sample for a non-square sample within the current block. In one embodiment, the image decoder 2000 determines one of the Intra_Wide_Angular modes as the intra-prediction mode for the non-square current block. In another embodiment, the image decoder 2000 determines one of the Intra_Wide_Angular modes as the improved intra-prediction mode for the square current block. For example, the image decoder 2000 determines one of the Intra_Wide_Angular modes as the second intra-prediction mode based on a first intra-prediction mode, which is one of the Intra_Angular modes.
[0235] An image decoding device 2000 according to one embodiment of the present invention determines the intra-prediction mode of the current block in order to perform intra-prediction for the current block.
[0236] In one embodiment, if the prediction mode of the current block is intra mode, the image decoding device 2000 obtains information about the intra prediction mode of the current block from the bitstream. The information about the intra prediction mode includes either information indicating the intra prediction mode or information indicating a range that can be determined as an intra prediction mode. For example, the information about the intra prediction mode includes index information indicating intra prediction mode number 64 (e.g., predModeIntra==64). For example, the information about the intra prediction mode includes information indicating a predetermined range (e.g., 2 to 34).
[0237] The current intra-prediction mode of a block can be any of a plurality of intra-prediction modes. In one embodiment, the plurality of intra-prediction modes include a directional prediction mode and a non-directional prediction mode.
[0238] The intra-prediction mode shown in Figure 22 is just one example, and the number and types of intra-prediction modes available in intra-mode for the image decoding device 2000 according to one embodiment can be set in various ways.
[0239] Figure 23 is a flowchart of an image decoding method that performs intra-prediction for the current block using an intra-prediction mode according to one embodiment of the present invention.
[0240] Referring to Figure 23, in step S2710, the image decoding device 2000 obtains information from the bitstream regarding the first intra-prediction mode of the current block. The information regarding the first intra-prediction mode includes information that the prediction mode of the current block is an intra-prediction mode. In one embodiment, the information regarding the first intra-prediction mode includes index information indicating the first intra-prediction mode, or information regarding the range of the first intra-prediction mode. In one embodiment, the first intra-prediction mode is the coding unit syntax (Coding) of the bitstream. (Included in unit syntax)
[0241] In one embodiment, the image decoding device 2000 determines the first intra-prediction mode of the current block using information regarding the first intra-prediction mode. In one embodiment, the first intra-prediction mode is a non-directional intra-mode (e.g., Intra_Planar_Mode). It includes at least one of the following: or Intra_DC_Mode) and directional intra modes (e.g., Intra_Angular_Mode or Intra_Wide_Angular_Mode). According to one embodiment, the index value of the first intra prediction mode may be an integer. For example, the index value of Intra_Planar_Mode is 0. The index value of Intra_DC_Mode is 1. Intra_Angular_Mode The index value for is at least one between 2 and 66. The index value for Intra_Wide_Angular_Mode is at least one between -14 and -1 or between 67 and 80.
[0242] In step S2330, the image decoding device 2000 determines the search range for the second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. For example, the search range includes the first intra-prediction mode (e.g., index 64) and a plurality of subdivided intra-prediction modes adjacent to the first intra-prediction mode (e.g., indices 63.5, 64.5). According to one embodiment, the index values of the intra-prediction modes included in the search range may be rational numbers. For example, the index values of the intra-modes included in the search range represent integer values and rational numbers between integer values. The plurality of subdivided intra-prediction modes may represent rational values that are not integers.
[0243] In step S2340, the image decoding device 2000 determines a second intra-prediction mode for the current block within the search range of the second intra-prediction mode. In one embodiment, the image decoding device 2000 determines the second intra-prediction mode based on a plurality of reference samples of the reference region of the current block.
[0244] In step S2350, the image decoder 2000 performs an intra-prediction for the current block using the second intra-prediction mode and generates a predicted block. The image decoder 2000 determines a reference sample corresponding to the sample in the current block using the second intra-prediction mode. The image decoder 2000 generates a predicted block containing the predicted sample using the reference sample.
[0245] In step S2360, the image decoding device 2000 generates a decoded image based on the predicted blocks. In one embodiment, the image decoding device 2000 generates a decoded current block by combining residual data obtained from the bitstream with the predicted blocks.
[0246] Figure 24 illustrates the process of determining the intra-prediction mode according to one embodiment of the present invention.
[0247] Referring to Figure 24, the first intra-prediction mode 2410 of the current block according to one embodiment of the present invention may be intra-prediction mode number 64. The image decoding device 2000 determines the first intra-prediction mode from the intra-prediction mode set. In one embodiment, the image decoding device 2000 determines the first intra-prediction mode 2410 based on information obtained from the bitstream.
[0248] In one embodiment, the intra-predictive mode set includes multiple directional modes. For example, the intra-predictive mode set includes 65 directional modes (numbers 2 through 66) of the VVC standard. Or, for example, the intra-predictive mode set includes 33 directional modes (numbers 2 through 34) of the HEVC standard.
[0249] In one embodiment, the search range of the second intra-prediction mode includes prediction modes that represent the direction between intra-prediction modes included in the intra-prediction mode set. Referring to Figure 24, the intra-prediction mode set includes intra-prediction modes having integer values between 2 and 66, and the search range of the second intra-prediction mode includes intra-prediction modes that show integer values between 2 and 66, or intra-prediction modes that show values of "integer + 0.5". For example, the intra-prediction mode set includes a first intra-prediction mode 2410 showing 64, and the search range of the second intra-prediction mode includes an intra-prediction mode 2420 showing 63.5, a first intra-prediction mode 2410 showing 64, and an intra-prediction mode 2430 showing 64.5. In one embodiment, intra-prediction modes included in the search range of the second intra-prediction mode may be represented as candidate intra-prediction modes.
[0250] In one embodiment, the search range of the second intra-prediction mode includes a plurality of candidate intra-prediction modes that indicate indices that fall within a predetermined range from the index of the value of the first intra-prediction mode. For example, if the index of the first intra-prediction mode is K (where K is an integer), the candidate intra-prediction modes included in the search range indicate index values that are greater than (or equal to) KS, or less than (or equal to) K+T (where S and T are integers). Here, the index value is either an integer or a non-integer rational number. According to one embodiment of the present invention, the image decoding device 2000 obtains information about a predetermined range (e.g., the values of S and T) from the bitstream. In one embodiment, the predetermined range may be a predetermined value.
[0251] In one embodiment, the candidate intra-prediction modes are determined based on their number. For example, if the number of candidate intra-prediction modes is determined to be N, the candidate intra-prediction modes are the N prediction modes adjacent to the first intra-prediction mode. Here, the index values of the N prediction modes represent either integers or non-integer rational numbers. In one embodiment, the candidate intra-prediction modes are determined based on data obtained from a bitstream. In one embodiment, the candidate intra-prediction modes may be predetermined values.
[0252] In one embodiment, the image decoding device 2000 determines a second intra-prediction mode based on a first intra-prediction mode 2410. The image decoding device 2000 determines the search range for the second intra-prediction mode based on prediction modes adjacent to the first intra-prediction mode 2410. For example, the image decoding device 2000 determines the search range for the second intra-prediction mode, which includes at least a portion of the first intra-prediction mode 2410, the first candidate intra-prediction mode 2420, and the second candidate intra-prediction mode 2430. The image decoding device 2000 determines the second intra-prediction mode within the search range for the second intra-prediction mode.
[0253] In one embodiment, the image decoding device 2000 determines a third intra-prediction mode based on a first intra-prediction mode 2410 and a second intra-prediction mode. For example, the third intra-prediction mode is determined based on the average of the first intra-prediction mode 2410 and the second intra-prediction mode.
[0254] The more directional prediction modes there are, the better the accuracy of the predicted value for the current block. However, as the number of prediction modes increases and the amount of information to be transmitted increases, there are limits to how much the performance in reducing rate distortion can be improved. If the amount of information transmitted regarding the prediction modes exceeds the gain obtained by reducing the error in the predicted value, the image compression efficiency decreases. An image decoding device 2000 according to one embodiment of the present invention can improve prediction efficiency while reducing the overhead of data transmission related to intra-prediction modes.
[0255] Figure 25 illustrates the process of determining the intra-prediction mode according to one embodiment of the present invention.
[0256] Referring to Figure 25, the reference region 2520 of block 2510 currently contains multiple reference lines. The reference region 2520 currently contains one or more reference lines above block 2510 and one or more reference lines to the left. For example, the reference region 2520 contains N reference lines La0, ..., LaN-1 above and M reference lines La0, ..., LaM-1 to the left.
[0257] In one embodiment, the image decoding device 2000 determines the intra-prediction mode of the current block 2510 based on the reference region 2520. The image decoding device 2000 determines the intra-prediction mode of the current block 2510 based on the gradient value of the reference sample 2525 of the reference region 2520. According to one embodiment, the intra-prediction mode determined by the image decoding device 2000 may be a second intra-prediction mode or an improved intra-prediction mode.
[0258] In one embodiment, the image decoding device 2000 determines the gradient value of the reference sample 2525. The image decoding device 2000 determines an intra-prediction mode based on the gradient value of the reference sample contained in the reference region. The image decoding device 2000 determines the gradient value using the values of the surrounding samples 2530 of the reference sample 2525. For example, the image decoding device 2000 determines the gradient value of the reference sample 2525 using the values of at least two samples, the reference sample 2525 and the surrounding samples 2530. In one embodiment, the surrounding samples 2530 are contained in the same reference line as the reference sample 2525, or in a reference line adjacent to the reference sample.
[0259] In one embodiment, the image decoding device 2000 determines the horizontal and vertical changes of the reference sample 2525. The image decoding device 2000 uses the reference sample 2525 and the surrounding sample 2530 to determine at least one of the horizontal or vertical changes of the reference sample 2525. The image decoding device 2000 determines at least one of the horizontal or vertical changes by multiplying the values of the reference sample 2525 and the surrounding sample 2530 by a weighted value. For example, the Sobel operator may be used as the weighted value. The Sobel Operator is used. The image decoding device 2000 uses the Sobel Operator to determine the horizontal change (△X) and vertical change (△Y) of the reference sample.
[0260] In one embodiment, the image decoding apparatus 2000 applies horizontal weighting values 2540 to the reference samples 2525 and the surrounding samples 2530 to determine the horizontal change amount (ΔX). For example, the gradient value of pij is determined by -1*pi-1,j-1 - 2*pi-1,j - 1*pi-1,j+1 + 1*pi+1,j - 1 + 2*pi+1,j + 1*pi+1,j+1. The image decoding apparatus 2000 applies vertical weighting values 2550 to the reference samples 2525 and the surrounding samples 2530 to determine the vertical change amount (ΔY). In FIG. 25, the horizontal weighting values 2540 and the vertical weighting values 2550 according to one embodiment are described as a 3×3 matrix, but are not limited thereto, and may be matrices or vectors of various sizes, and the values of the weighting values may be variously deformed. The image decoding apparatus 2000 determines the horizontal change amount and the vertical change amount for all or some of the reference samples in the reference region 2520.
[0261] In one embodiment, the image decoding apparatus 2000 determines an intra prediction mode based on the horizontal change amount and the vertical change amount. In one embodiment, the image decoding apparatus 2000 determines the gradient value of the reference sample 2525 based on the ratio of the horizontal change amount to the vertical change amount. The image decoding apparatus 2000 determines the gradient value based on the frequency of the gradient values in the reference region 2520. For example, the image decoding apparatus 2000 determines the intra prediction mode corresponding to the gradient value with the highest frequency. In one embodiment, the image decoding apparatus 2000 determines the intra prediction mode of the current block 2510 based on the ratio of the sum of the horizontal change amounts to the sum of the vertical change amounts in the reference region 2520.
[0262] In one embodiment, the image decoding apparatus 2000 can determine an intra prediction mode without obtaining information from a bitstream. That is, the image decoding apparatus 2000 does not improve the intra prediction mode determined based on the information obtained from the bitstream, but determines one intra prediction mode from all the intra prediction modes. The image decoding apparatus 2000 determines a reference area of the current block 2510. The image decoding apparatus 2000 determines gradient values of reference samples of the reference area 2520 of the current block 2510. The image decoding apparatus 2000 determines an intra prediction mode based on the gradient values. The image decoding apparatus 2000 determines an intra prediction mode based on at least one of an intra prediction mode corresponding to the gradient value with the highest frequency, an intra prediction mode corresponding to the average of the gradient values, or an intra prediction mode corresponding to the ratio of the sum of horizontal change amounts and the sum of vertical change amounts.
[0263] In one embodiment, the image decoding apparatus 2000 determines an intra prediction mode based on the information obtained from the bitstream. The image decoding apparatus 2000 determines a first intra prediction mode based on the information obtained from the bitstream. The image decoding apparatus 2000 determines a search range of a second intra prediction mode based on the first intra prediction mode. The process of determining the search range of the second intra prediction mode according to an embodiment of the present invention has been described with reference to FIG. 24, and thus the description thereof is omitted. The image decoding apparatus 2000 determines gradient values using reference samples of the current block. The image decoding apparatus 2000 determines a second intra prediction mode from a plurality of intra prediction modes included in the search range using the gradient values. For example, the image decoding apparatus 2000 selects an intra prediction mode with the highest gradient value frequency among a plurality of intra prediction modes included in the search range, or selects an intra prediction mode closest to the determined gradient value.
[0264] FIG. 26 is a diagram for explaining a process of determining an intra prediction mode according to an embodiment of the present invention.
[0265] Referring to Figure 26, the reference region 2620 and target region 2630 of block 2610 currently contain the decoded sample.
[0266] In one embodiment, the image decoding device 2000 determines the reference region 2620 and the target region 2630 of the current block 2610. The image decoding device 2000 determines the target region 2630 which includes one or more reference lines adjacent to the current block 2610. The image decoding device 2000 determines the reference region 2620 which is adjacent to the target region 2630. For example, the image decoding device 2000 determines the target region 2630 which includes three reference lines adjacent to the current block 2610, and determines the reference region 2620 which includes one reference line adjacent to the target region 2630.
[0267] In one embodiment, the image decoding device 2000 determines the sum of the number of reference lines in the reference region 2620 and the number of reference lines in the target region 2630 as a multiple of 2. In one embodiment, the image decoding device 2000 determines at least one of the number of reference lines in the reference region 2620 and the number of reference lines in the target region 2630 based on the current block size. For example, if the current block size is less than or equal to a predetermined size, the image decoding device 2000 can determine at least one of the number of reference lines in the reference region 2620 and the number of reference lines in the target region 2630 as a first value. If the current block size is greater than the predetermined size, the image decoding device 2000 can determine at least one of the number of reference lines in the reference region 2620 and the number of reference lines in the target region 2630 as a second value.
[0268] The image decoding device 2000 performs predictions for samples in the target region 2630 based on the reference region 2620. The image decoding device 2000 performs predictions for samples in the target region 2630 using samples from the reference region 2620 and intra-prediction modes. In one embodiment, the image decoding device 2000 performs predictions for samples in the target region 2630 using multiple intra-prediction modes included in the search range of the second intra-prediction mode in Figure 24. For example, the image decoding device 2000 performs predictions for the target region 2630 using intra-prediction mode 64, intra-prediction mode 63.5, and intra-prediction mode 64.5, respectively. In one embodiment, the image decoding device 2000 performs predictions for samples in the target region 2630 using all or part of the intra-prediction modes.
[0269] The image decoding device 2000 determines the error using the decoded and predicted samples of the target region 2630. The image decoding device 2000 uses SAD(sum The error is determined using at least one cost function from among (of absolute difference), SSE (Sum of squared error), or MR-SAD (Mean removed SAD). In one embodiment, the image decoding device 2000 determines the error for all or part of the target region 2630.
[0270] The image decoding device 2000 determines the intra-prediction mode with the smallest error. For example, if the error using intra-prediction mode 64 is Cost1, the error using intra-prediction mode 63.5 is Cost2, and the error using intra-prediction mode 64.5 is Cost3, the image decoding device 2000 may determine the intra-prediction mode with the smallest value among Cost1, Cost2, and Cost3 as the second intra-prediction mode.
[0271] In one embodiment, the image decoding device 2000 determines the error for all intra-prediction modes. The image decoding device 2000 uses the samples in the reference region 2620 and each of the intra-prediction modes to perform predictions for the samples in the target region 2630. The image decoding device 2000 determines the error for each of the intra-prediction modes. The image decoding device 2000 determines the intra-prediction mode based on the error.
[0272] In one embodiment, the image decoding device 2000 determines a second intra-prediction mode based on the error for the intra-prediction modes included in the search range. The intra-prediction mode is determined based on information obtained from the bitstream. The image decoding device 2000 determines a first intra-prediction mode based on information obtained from the bitstream. The image decoding device 2000 determines the search range for the second intra-prediction mode based on the first intra-prediction mode. The process for determining the search range for the second intra-prediction mode according to one embodiment of the present invention has been described with reference to Figure 24, so the description is omitted here. The image decoding device 2000 performs a prediction for the samples in the target region 2630 using the samples in the reference region 2620 and the multiple intra-prediction modes included in the search range. The image decoding device 2000 determines the error for the multiple intra-prediction modes included in the search range. The image decoding device 2000 determines a second intra-prediction mode based on the error.
[0273] In one embodiment, the image decoding device 2000 determines an intra-prediction mode using the gradient value and error. The image decoding device 2000 determines the gradient value of the current block 2610. The process by which the image decoding device 2000 determines the gradient value has been explained with reference to Figure 25 and is therefore omitted here. The image decoding device 2000 determines an intra-prediction mode corresponding to the gradient value. The image decoding device 2000 performs a prediction for the sample in the target region 2630 using the sample in the reference region 2620 and the determined intra-prediction mode. The image decoding device 2000 determines the error for the determined intra-prediction mode. The image decoding device 2000 determines an intra-prediction mode based on the error.
[0274] In one embodiment, the image decoding device 2000 determines a second intra-prediction mode using the search range, gradient value, and error. The intra-prediction mode is determined based on information obtained from the bitstream. The image decoding device 2000 determines a first intra-prediction mode based on information obtained from the bitstream. The image decoding device 2000 determines the search range of the second intra-prediction mode based on the first intra-prediction mode. The process of determining the search range of the second intra-prediction mode according to one embodiment of the present invention has been described with reference to Figure 24, so the description is omitted here. The image decoding device 2000 performs a prediction for the sample in the target region 2630 using the sample in the reference region 2620 and a plurality of intra-prediction modes included in the search range. The image decoding device 2000 determines the error for the plurality of intra-prediction modes included in the search range. The image decoding device 2000 determines the gradient value of the current block 2610. The image decoding device 2000 determines a second intra-prediction mode based on the error and gradient value.
[0275] Figure 27 is a flowchart showing the process of determining the intra-prediction mode based on predetermined conditions according to one embodiment of the present invention.
[0276] Referring to Figure 23, in step S2710, the image decoding device 2000 decides whether or not to perform an improvement based on predetermined conditions. The image decoding device 2000 identifies whether or not the predetermined conditions are satisfied. If the predetermined conditions are satisfied, the image decoding device 2000 decides to perform an improvement to the first intra-prediction mode (determine the second intra-prediction mode).
[0277] In one embodiment, the image decoding device 2000 identifies whether the first intra-prediction mode determined based on the bitstream falls within a predetermined range relative to a predetermined mode. For example, the image decoding device 2000 identifies whether the absolute difference between the first intra-prediction mode and the horizontal mode (number 50 in the case of VVC) is less than or equal to k. If the intra-prediction mode falls within a predetermined range relative to the predetermined mode, the image decoding device 2000 decides to perform an improvement on the first intra-prediction mode.
[0278] In one embodiment, the image decoding device 2000 identifies whether the first intra-prediction mode determined based on the bitstream is a predetermined mode. For example, the image decoding device 2000 identifies whether the first intra-prediction mode is Wide_Angular mode, DC mode, or Planar mode. If the first intra-prediction mode is not a predetermined mode, the image decoding device 2000 decides to perform an improvement on the first intra-prediction mode. In one embodiment, if the first intra-prediction mode is a predetermined mode, the image decoding device 2000 decides to perform an improvement on the first intra-prediction mode based on a search range that includes a predetermined Angular mode.
[0279] In one embodiment, the image decoding device 2000 is MPM (Most The system identifies whether it is in Probable Mode. If it is in MPM mode, the image decoding device 2000 decides to perform improvements to the first intra-prediction mode.
[0280] In one embodiment, the image decoding apparatus 2000 identifies whether the size of the current block is larger than a predetermined size. For example, the image decoding apparatus 2000 determines whether at least one of the width and height of the current block is larger than the predetermined size, or whether the area of the current block is larger than the predetermined size. If the size of the current block is larger than the predetermined size, the image decoding apparatus 2000 determines to perform an improvement on the first intra prediction mode.
[0281] In one embodiment, the image decoding apparatus 2000 identifies the availability of the peripheral region of the current block. The image decoding apparatus 2000 identifies the availability of the upper region and the left region of the current block. For example, the image decoding apparatus 2000 identifies whether the upper region or the left region of the current block cannot be referenced (for example, when it is outside the picture boundary or the tile boundary). The image decoding apparatus 2000 determines whether to perform an improvement on the first intra prediction mode based on the availability. If only one of the upper region and the left region of the current block cannot be used, the image decoding apparatus 2000 determines to perform the improvement using the available region. If neither the upper region nor the left region of the current block can be used, the image decoding apparatus 2000 determines not to perform an improvement on the first intra prediction mode.
[0282] In one embodiment, the image decoding apparatus 2000 identifies improvement activation information included in the bitstream. The improvement activation information is included in at least one of a slice header, a picture header, a tile header, a CTU header, a sequence header, a sequence parameter set (Sequence Parameter Set; SPS), or a picture parameter set (Picture Parameter Set; PPS) of the bitstream. The image decoding apparatus 2000 determines whether to perform an improvement on the first intra prediction mode based on the improvement activation information.
[0283] In one embodiment, the image decoding device 2000 decides to perform an improvement over the first intra-prediction mode when the prediction mode is an intra-prediction mode.
[0284] In one embodiment, the image decoding device 2000 decides whether or not to perform an improvement to the first intra-prediction mode for each color component. In one embodiment, the image decoding device 2000 performs an improvement to the first intra-prediction mode only for a specific color component (e.g., the luma component). In one embodiment, the image decoding device 2000 determines the result of the improvement performed for the specific color component as the intra-prediction mode for the remaining color components. In one embodiment, the image decoding device 2000 performs an improvement to the intra-prediction mode for the remaining color components based on the result of the improvement performed for the specific color component.
[0285] In step S2720, the image decoding device 2000 determines whether or not to improve the first intra-prediction mode. If the first intra-prediction mode is not improved, the process proceeds to step S2730; if the first intra-prediction mode is improved, the process proceeds to step S2750.
[0286] In step S2730, the image decoding device 2000 determines the first intra-prediction mode. The operation by which the image decoding device 2000 determines the first intra-prediction mode according to one embodiment of the present invention has been described with reference to Figures 20 to 24, so the description is omitted here. In step S2740, the image decoding device 2000 performs intra-prediction using the first intra-prediction mode.
[0287] In step S2750, the image decoding device 2000 determines the first intra-prediction mode. The operation by which the image decoding device 2000 determines the first intra-prediction mode according to one embodiment of the present invention has been described with reference to Figures 20 to 24, so the description is omitted here.
[0288] In step S2760, the image decoding device 2000 determines a second intra-prediction mode based on the first intra-prediction mode. The operation by which the image decoding device 2000 according to one embodiment of the present invention determines a second intra-prediction mode based on the first intra-prediction mode has been described with reference to Figures 20 to 26, so the description is omitted here. In step S2770, the image decoding device 2000 performs intra-prediction using the second intra-prediction mode.
[0289] Figure 28 illustrates the reference region of the current block according to one embodiment of the present invention.
[0290] In the image decoding device 2000 according to one embodiment of the present invention, if the first intra-prediction mode of block 2810 is currently DC mode, the image decoding device 2000 determines a DC mode using one of the multiple reference regions 2820, 2830, and 2840 as the second intra-prediction mode. The image decoding device 2000 determines the reference region for the DC mode.
[0291] In one embodiment, MRLP (Multiple When the Reference Line Prediction technique is used, multiple reference regions 2820, 2830, and 2840 may be reference regions containing other reference lines, rather than reference lines adjacent to the current block.
[0292] In one embodiment, the image decoding device 2000 determines one of the multiple reference regions 2820, 2830, and 2840 based on representative values of the multiple reference regions 2820, 2830, and 2840. In one embodiment, the representative value includes at least one of the mean, median, or mode of the reference samples of the reference region.
[0293] In one embodiment, the image decoding device 2000 determines a first representative value based on the left reference sample and the upper reference sample of the current block 2810 corresponding to the first reference region 2820. In one embodiment, the image decoding device 2000 determines a second representative value based on the upper reference sample of the current block 2810 corresponding to the second reference region 2830. In one embodiment, the image decoding device 2000 determines a third representative value based on the left reference sample of the current block 2810 corresponding to the third reference region 2840.
[0294] In one embodiment, the image decoding device 2000 determines the errors of the first reference region 2820, the second reference region 2830, and the third reference region 2840 based on the first representative value, the second representative value, and the third representative value. The image decoding device 2000 performs predictions for each reference region based on the respective representative values. The image decoding device 2000 determines the errors based on the results of the predictions for each reference region. The image decoding device 2000 determines the reference region with the smallest error.
[0295] In one embodiment, the image decoding device 2000 determines multiple representative values for each of the multiple reference regions 2820, 2830, and 2840. The image decoding device 2000 determines the representative value with the smallest error among the multiple representative values as the predicted value.
[0296] Figure 25 illustrates an embodiment of the present invention in which the first reference region 2820 includes both the adjacent upper and left regions, the second reference region 2830 includes the adjacent upper region, and the third reference region 2840 includes the adjacent left region. However, the invention is not limited to this, and the reference regions may also be determined using all or part of the reference samples of the reference lines.
[0297] Figure 29 illustrates the reference region of the current block according to one embodiment of the present invention.
[0298] Referring to Figure 29, the reference region of block 2910 can take various forms. Referring to Figures 21, 25, 26, and 28, an image decoding device 2000 according to one embodiment of the present invention is described as using a first reference region 2920 that includes all of the left reference sample, upper reference sample, and upper left reference sample to determine and perform prediction of the intra-prediction mode of block 2910, but is not limited to this, and may use a reference region that includes various reference samples to determine and perform prediction of the intra-prediction mode of block 2910.
[0299] In one embodiment, the image decoding device 2000 uses a second reference region 2930, which includes a left-side reference sample and an upper-side reference sample, to determine the current intra-prediction mode for block 2910 and to perform prediction.
[0300] In one embodiment, the image decoding device 2000 uses a third reference region 2940, which includes a left-side reference sample, an upper-side reference sample, an upper-left-side reference sample, a lower-left-side reference sample, and an upper-right-side reference sample, to determine the current intra-prediction mode of block 2910 and to perform prediction.
[0301] In one embodiment, the image decoding device 2000 uses a fourth reference region 2950, which includes at least a portion of the right-side reference sample, the upper-side reference sample, and the upper-right-side reference sample, to determine the current intra-prediction mode of block 2910 and to perform a prediction. The image decoding device 2000 determines the reference region based on the coding order (or coding direction) of the block. In one embodiment, when the coding of the block is performed from right to left, the image decoding device 2000 uses the fourth reference region 2950 to determine the current intra-prediction mode of block 2910 and to perform a prediction.
[0302] In one embodiment, the image decoding device 2000 uses a fifth reference region 2960, which includes at least a portion of the right-side reference sample, upper-side reference sample, left-side reference sample, upper-left-side reference sample, and upper-right-side reference sample, to determine the current intra-prediction mode of block 2910 and to perform a prediction. In one embodiment, when the coding order (or coding direction) of a block changes, the image decoding device 2000 uses a fifth reference region 2960, which includes referenceable samples, to determine the current intra-prediction mode of block 2910 and to perform a prediction.
[0303] Figure 30 illustrates interpolation filtering for the current block according to one embodiment of the present invention.
[0304] Figure 30 shows the interpolation filtering coefficients according to the position of the reference sample according to one embodiment of the present invention.
[0305] In one embodiment, the image decoding device 2000 selectively applies an LPF (Low Filter) to improve prediction efficiency. Perform Pass Filtering. For example, the image decoding device 2000 performs filtering using the Gaussian filter
[0121] .
[0306] In one embodiment, the image decoding device 2000 determines the subpixel position of the reference sample (fractional Based on the position, the current sample of the current block is predicted. For example, the image decoder 2000 determines the subpixel position in units of 1 / 32 samples. The image decoder 2000 determines the filter coefficients according to the subpixel position. For example, referring to Figure 30, the DCT-based filter coefficients or Gaussian filter coefficients corresponding to the case where the subpixel position p is from 0 to 31 / 32 are shown. In one embodiment, the image decoder 2000 obtains the filter type from the bitstream.
[0307] In one embodiment, the image decoding device 2000 determines the current sample using filter coefficients. For example, when the subpixel position is 1 / 32, the image decoding device 2000 predicts the current sample based on a value obtained by multiplying the reference sample at position p=-1 by -1, the reference sample at position p=0 by 63, and the reference sample at position p=1 by 2, using DCT-based filter coefficients.
[0308] In one embodiment, the second intra-prediction mode provides finer directions than the first intra-prediction mode. In one embodiment, when the image decoder 2000 performs prediction using the second intra-prediction mode, it can determine interpolation filter coefficients that include finer sub-pixel position intervals than the first intra-prediction mode. For example, if the second intra-prediction mode is finer than the first intra-prediction mode, the image decoder 2000 can determine the filter coefficients at sub-pixel positions of 1 / 64 sample units instead of 1 / 32 sample units.
[0309] In one embodiment, when the image decoding device 2000 performs prediction using the second intra-prediction mode, it can determine the interpolation filter coefficients at the same sub-pixel position interval as in the first intra-prediction mode. For example, if the second intra-prediction mode is more subdivided than the first intra-prediction mode, the image decoding device 2000 can determine the filter coefficients at sub-pixel positions of 1 / 32 samples, similar to the first intra-prediction mode.
[0310] In one embodiment, the image decoding device 2000 obtains information from the bitstream regarding whether or not to determine sub-pixel filter coefficients in subdivided units.
[0311] Figure 31 illustrates the process of determining a reference block using template matching according to one embodiment of the present invention.
[0312] In one embodiment, the image decoding device 2000 determines a reference block based on the template region 3120 of the current block 3110. The image decoding device 2000 determines the template region 3120 of the current block 3110 from among the already decoded decoding regions. The image decoding device 2000 determines a template region similar to the template region 3120 from among the decoding regions. In one embodiment, the process by which the image decoding device 2000 determines the template region is sometimes called template matching.
[0313] In one embodiment, the image decoding device 2000 determines similar regions using a cost function. For example, the image decoding device 2000 uses SAD(sum (cost) of absolute difference, SSE (Sum of squared error), or MR-SAD (Mean removed SAD) - at least one cost function Using a function, the image decoding device 2000 determines a region similar to the template region 3120 of the current block 3110 within the decoding region. For example, the image decoding device 2000 compares template region A3140 and template region B3150 with the template region 3120 of the current block 3110 and determines template region A3140, which has a smaller error, as the similar template region. The image decoding device 2000 determines a reference block corresponding to the similar template region as the reference block for the current block 3110. For example, the image decoding device 2000 determines reference block A3130 as the reference block for the current block 3110. The image decoding device 2000 performs a prediction for the current block 3110 based on the value of the reference block. In one embodiment, the image decoding device 2000 determines the current block 3110 to be identical to the reference block.
[0314] In one embodiment, the image decoding device 2000 determines a template region similar to the template region 3120 of the current block 3110, according to the block units of the decoding region. For example, the image decoding device 2000 compares the template region corresponding to the block of the decoding region with the template region 3120 of the current block 3110 to determine a similar template region.
[0315] In one embodiment, the image decoding device 2000 determines a similar template region from among all possible template regions in the decoding region. For example, the image decoding device 2000 determines a similar template region by comparing all or part of the template regions containing the decoding sample included in the decoding region with the template region 3120 of the current block 3110.
[0316] Figure 32 illustrates the process of determining a subblock of the current block according to one embodiment of the present invention.
[0317] Referring to Figure 32, an image decoding device 2000 according to one embodiment of the present invention divides the current block into a plurality of subblocks.
[0318] In one embodiment, the image decoding device 2000 divides the current block into a plurality of subblocks 3210 based on the number of subblocks information. For example, if the number of subblocks information indicates that the block should be divided into m horizontally and n vertically, the image decoding device 2000 divides the current block into m horizontally and n vertically of the same size to determine the plurality of subblocks 3210. The image decoding device 2000 obtains the number of subblocks information from the bitstream or determines it using a predetermined value.
[0319] In one embodiment, the image decoding device 2000 divides the current block into a plurality of subblocks 3220 based on the subblock size information. For example, if the subblock size information indicates T×S, the image decoding device 2000 divides the current block into multiple subblocks 3220 of the same T×S size. The image decoding device 2000 obtains the subblock size information from the bitstream or determines it using a predetermined value.
[0320] In one embodiment, the image decoding device 2000 divides the current block into a plurality of subblocks 3230 and 3240 based on the number information and direction information of the subblocks. For example, if the number information of the subblocks indicates n and the direction information indicates the horizontal direction, the image decoding device 2000 can determine a plurality of subblocks 3230 by dividing the current block into n of the same size in the horizontal direction. For example, if the number information of the subblocks indicates m and the direction information indicates the vertical direction, the image decoding device 2000 can determine a plurality of subblocks 3230 by dividing the current block into m of the same size in the vertical direction. The image decoding device 2000 obtains the size information and direction information of the subblocks from the bitstream or determines them using predetermined values.
[0321] In one embodiment, the image decoding device 2000 divides the current block into a plurality of subblocks 3250 based on the number information and shape information of the subblocks. For example, if the number information of the subblocks indicates m subblocks and the shape information indicates that it should be divided into L-shaped blocks, the image decoding device 2000 can determine the plurality of subblocks 3250 by dividing the current block into m L-shaped blocks of the same size. The image decoding device 2000 obtains the number information of the subblocks from the bitstream or determines it using a predetermined value.
[0322] Figure 33 illustrates the process of determining the intra-prediction mode of a current block containing multiple sub-blocks according to one embodiment of the present invention.
[0323] Referring to Figure 33, the current block in one embodiment is divided into several subblocks 3310, 3320, 3330, and 3340. In one embodiment, the first subblock 3310, the second subblock 3320, the third subblock 3330, and the fourth subblock 3340 are referred to as subblock 0, subblock 1, subblock 2, and subblock 3, respectively, but the order of the numbers may be changed.
[0324] In one embodiment, the image decoding device 2000 determines an intra-prediction mode for each subblock. The image decoding device 2000 determines the intra-prediction mode based on a first reference region 3315 of the first subblock 3310. The image decoding device 2000 improves the first intra-prediction mode to a second intra-prediction mode based on the first reference region 3315. The image decoding device 2000 performs a prediction for the first subblock 3310 based on the determined intra-prediction mode (or the improved second intra-prediction mode). The image decoding device 2000 decodes the first subblock 3310.
[0325] In one embodiment, the image decoding device 2000 determines an intra-prediction mode based on a second reference region 3325 of the second subblock 3320. The image decoding device 2000 improves the first intra-prediction mode to a second intra-prediction mode based on the second reference region 3325. The image decoding device 2000 determines an intra-prediction mode for the second subblock 3320 based on the intra-prediction mode of the first subblock 3310. For example, the image decoding device 2000 determines an intra-prediction mode for the second subblock 3320 based on the second intra-prediction mode of the first subblock 3310. The image decoding device 2000 performs a prediction for the second subblock 3320. The image decoding device 2000 decodes the second subblock 3320.
[0326] In one embodiment, the image decoding device 2000 can determine an intra-prediction mode, perform prediction, and perform decoding for the third subblock 3330 and the fourth subblock 3340, respectively, similar to the first subblock 3310 and the second subblock 3320.
[0327] In one embodiment, the image decoding device 2000 determines a template region for each subblock. Based on the first template region 3315 of the first subblock 3310, the image decoding device 2000 determines a reference block for the first subblock 3310. The image decoding device 2000 determines a template region similar to the first template region 3315. The image decoding device 2000 determines a reference block corresponding to the similar template region. Based on the determined reference block, the image decoding device 2000 performs a prediction for the first subblock 3310. For example, the image decoding device 2000 determines the value of the first subblock to be the same as the value of the reference block. The image decoding device 2000 decodes the first subblock 3310.
[0328] In one embodiment, the image decoding device 2000 determines a reference block based on the template region 3325 of the second subblock 3320. In one embodiment, the image decoding device 2000 determines a reference block based on the second template region 3325 of the second subblock 3320. In one embodiment, the image decoding device 2000 determines the reference block of the second subblock as the reference block of the first subblock 3310. The image decoding device 2000 performs a prediction for the second subblock 3320. The image decoding device 2000 decodes the second subblock 3320.
[0329] In one embodiment, the image decoding device 2000 can determine a reference block, perform prediction, and perform decoding for the third subblock 3330 and the fourth subblock 3340, respectively, as well as for the first subblock 3310 and the second subblock 3320.
[0330] In one embodiment, the image decoding device 2000 performs at least one of prediction or decoding on a subblock based on a subblock that has been previously predicted or decoded. For example, the image decoding device 2000 performs a prediction on a second subblock 3320 using a first subblock 3310 that has been decoded or predicted. In one embodiment, after decoding is performed on a subblock, the image decoding device 2000 performs a prediction on the next subblock. In one embodiment, the image decoding device 2000 performs a prediction on a subblock and then performs decoding on the current block.
[0331] In one embodiment, the image decoding device 2000 determines whether to perform a prediction using a subblock only if the size of the subblock or the current block is greater than or equal to a predetermined size. In another embodiment, the image decoding device 2000 determines whether to perform a prediction using a subblock based on the shape of the subblock or the current block.
[0332] Figure 34 is a block diagram showing the configuration of an image encoding device according to one embodiment of the present invention.
[0333] Referring to Figure 34, the image coding device 3400 includes a predictive coding unit 3410 and a generation unit 3420.
[0334] In one embodiment, the predictive coding unit 3410 and the generation unit 3420 can be implemented by at least one processor. In one embodiment, the predictive coding unit 3410 and the generation unit 3420 operate according to instructions stored in memory.
[0335] The image coding device 3400 includes a memory for storing input and output data from the prediction coding unit 3410 and the generation unit 3420. The image coding device 3400 also includes a memory control unit for controlling the input and output of data from the memory.
[0336] In one embodiment, the predictive coding unit 3410 corresponds to the predictive coding unit 1915 shown in Figure 19, and the generation unit 3420 corresponds to the entropy coding unit 1925 shown in Figure 19.
[0337] The predictive coding unit 3410 determines the prediction mode of the current block. The current block can be the largest coding unit, coding unit, transformation unit, or prediction unit divided from the current picture 2200 to be coded.
[0338] In one embodiment, the prediction mode of the current block is determined as intra-mode or inter-mode.
[0339] In one embodiment, the predictive coding unit 3410 can determine the intra-predictive mode of the current block if the prediction mode of the current block is intra-mode.
[0340] The current intra-prediction mode of a block can be any of several intra-prediction modes. As explained with reference to Figure 21, the multiple intra-prediction modes include non-directional intra-modes and directional intra-modes.
[0341] In one embodiment, the predictive coding unit 3410 performs intra-prediction or inter-prediction on the current block according to the prediction mode of the current block, and encodes the current block using the predicted block generated as a result of the intra-prediction or inter-prediction.
[0342] In one embodiment, encoding the current block means the process by which the image decoding device 2000 generates information that makes the current block decodeable. The information generated by encoding is included in the bitstream.
[0343] In one embodiment, the predictive coding unit 3410 generates residual data corresponding to the difference between the predicted block and the current block. If the predicted block is determined to be the current block, residual data may not be generated.
[0344] In one embodiment, if the prediction mode of the current block is an intra mode, the prediction decoding unit 3410 determines information indicating whether or not to refine the intra prediction mode of the current block. The generation unit 3420 generates a bitstream containing the determined information. In one embodiment, "refinement of the intra prediction mode" includes determining a second intra prediction mode indicating a refined direction based on a first intra prediction mode determined using the bitstream. For example, the image coding device 3400 determines one intra prediction mode from among 129 direction modes (e.g., 65 general direction modes and 64 refined direction modes) based on a first intra prediction mode (e.g., 64th intra prediction mode) determined from among 65 general direction modes (e.g., 2nd intra prediction mode to 66th intra prediction mode).
[0345] In one embodiment, the predictive coding unit 3410 determines a method for determining the intra-predictive mode. The generation unit 3420 generates a bitstream containing information about the method for determining the intra-predictive mode. The method for determining the intra-predictive mode includes at least one of a first determination method, a second determination method, and a third determination method.
[0346] In one embodiment, according to a first method for determining the intra-prediction mode, the prediction coding unit 3410 determines the intra-prediction mode, and the generation unit 3420 generates a bitstream containing information about the intra-prediction mode. The first determination method according to one embodiment is described in H.266. This could be either the VVC (Versatile Video Coding) standard or the H.265 HEVC (High Efficiency Video Coding) standard's intra-predictive mode determination method.
[0347] In one embodiment, the prediction coding unit 3410 determines the intra-prediction mode according to a second method for determining the intra-prediction mode, and the generation unit 3420 does not generate a bitstream. In one embodiment, the prediction coding unit 3410 determines the intra-prediction mode based on the gradient value of the reference sample of the current block. The process by which the prediction coding unit 3410 determines the intra-prediction mode based on the gradient value according to one embodiment has been described with reference to Figure 25, so a detailed explanation is omitted. In one embodiment, the prediction coding unit 3410 determines the intra-prediction mode based on the result of prediction using the decoded sample of the current block. The process by which the prediction coding unit 3410 determines the intra-prediction mode based on the result of prediction according to one embodiment has been described with reference to Figure 26, so a detailed explanation is omitted.
[0348] In one embodiment, according to a third method for determining the intra-prediction mode, the prediction coding unit 3410 determines a second intra-prediction mode by making improvements to the first intra-prediction mode, and the generation unit 3420 generates a bitstream containing information about the first intra-prediction mode. In one embodiment, the method for determining the intra-prediction mode includes at least one of a block-unit syntax, coding tree syntax, tile syntax, slice syntax, picture syntax, and sequence syntax for the bitstream.
[0349] In one embodiment, the predictive coding unit 3410 determines a first intra-predictive mode based on the intra-predictive mode of the surrounding block (for example, at least one of the left, top, upper left, upper right, or lower left end of the current block).
[0350] In one embodiment, the predictive coding unit 3410 uses multiple intra-predictive modes (MPM(Most)) based on the prediction modes of the surrounding blocks. The predictive coding unit 3410 generates a list of Probable Modes. The predictive coding unit 3410 determines whether the current block uses the MPM list to determine the intra predictive mode. The generation unit 3420 generates a bitstream containing information about whether the MPM list is used to determine the intra predictive mode. In one embodiment, if there are subdivided intra predictive modes (e.g., improved intra predictive modes) among the predictive modes of surrounding blocks, the predictive coding unit 3420 generates an MPM list containing intra predictive modes close to the subdivided intra predictive modes. In one embodiment, the predictive coding unit 3420 stores intra predictive modes close to the subdivided intra predictive modes in order to generate the MPM list of surrounding blocks. For example, the predictive coding unit 3420 can store the first intra predictive mode as the intra predictive mode of the current block even if the second intra predictive mode of the current block indicates a more subdivided direction than the first intra predictive mode.
[0351] In one embodiment, when the predictive coding unit 3410 determines an intra-predictive mode using an MPM list, the predictive coding unit 3410 determines one of the intra-predictive modes included in the MPM list in order to determine a first intra-predictive mode. The generation unit 3420 generates a bitstream containing information indicating one of the intra-predictive modes included in the MPM list.
[0352] In one embodiment, if the predictive coding unit 3410 determines an intra-predictive mode without using an MPM list, the predictive coding unit 3410 determines one of the remaining intra-predictive modes excluding those included in the MPM list. The generation unit 3420 generates a bitstream containing information indicating the determined intra-predictive mode.
[0353] The prediction coding unit 3410 determines the first intra-prediction mode for the current block. In one embodiment, the first intra-prediction mode is selected from among a plurality of intra-prediction modes included in the intra-prediction mode set.
[0354] The prediction coding unit 3410 determines the search range of the second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. In one embodiment, the plurality of intra-prediction modes included in the search range represent a more refined direction than the plurality of intra-prediction modes included in the intra-prediction mode set. In one embodiment, the plurality of intra-prediction modes included in the search range represent indices that fall within a predetermined range from the index of the first intra-prediction mode. In one embodiment, the plurality of intra-prediction modes included in the search range represent index values between an index value that is one value smaller than the index value representing the first intra-prediction mode and an index value that is two values larger than the index value representing the first intra-prediction mode.
[0355] The predictive coding unit 3410 determines the second intra-prediction mode for the current block within the search range of the second intra-prediction mode. In one embodiment, the predictive coding unit 3410 determines a plurality of gradient values for each of a plurality of reference samples in the reference region of the current block. The predictive coding unit 3420 determines the second intra-prediction mode based on the plurality of gradient values. In one embodiment, the predictive coding unit 3410 divides the current block into a plurality of sub-blocks. In one embodiment, the second intra-prediction mode is determined for each of the plurality of sub-blocks. In one embodiment, the predictive coding unit 3410 determines a reference template region similar to the template region of the current block from the current image. The predictive coding unit 3410 determines the second intra-prediction mode based on the intra-prediction mode of the reference block corresponding to the reference template region. In one embodiment, the reference template region is determined for each sub-block.
[0356] The predictive coding unit 3410 performs intra-prediction on the current block using a second intra-prediction mode and generates a predicted block. In one embodiment, the predicted block is generated using the second intra-prediction mode for each sub-block. In one embodiment, the predictive coding unit 3410 determines the sub-pixel reference sample for the current sample of the current block using the second intra-prediction mode. The predictive coding unit 3410 performs interpolation filtering based on the position of the sub-pixel reference sample.
[0357] The prediction coding unit 3410 generates a bitstream containing information about the first intra-prediction mode of the current block. In one embodiment, the information about the first intra-prediction mode includes at least one of index information indicating the first intra-prediction mode or information indicating a plurality of intra-prediction modes that can be determined as the first intra-prediction mode.
[0358] The generation unit 3420 generates a bitstream containing the encoding result of the picture. The bitstream contains the encoding result for the current block.
[0359] In one embodiment, the generation unit 3420 transmits the bitstream to the image decoding device 2000 via a network.
[0360] In one embodiment, the generation unit 3420 generates magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and floppy disks. A bitstream is recorded on a data storage medium, including a magneto-optical medium such as a disk.
[0361] The generation unit 3420 generates syntax elements (syntax) through the encoding of the picture. Generates a bitstream containing the `<syntax>` element. The values corresponding to the syntax elements are included in the bitstream according to the picture's hierarchical structure.
[0362] The generation unit 3420 entropy encodes the syntax elements to obtain the bins contained in the bitstream.
[0363] In one embodiment, the bitstream includes information about the prediction mode of the current block in the current picture 2200.
[0364] In one embodiment, if the current block's prediction mode is intra mode, the bitstream includes information indicating the current block's intra prediction mode.
[0365] In intra-mode, it is assumed that there is continuity between the surrounding samples of the current block and the samples within the current block, and a predicted block for the current block can be generated based on the surrounding samples of the current block according to the intra-prediction mode.
[0366] In one embodiment, the predictive coding unit 3410 can utilize not only the surrounding samples of the current block included in the current picture, but also spatial reference samples included in the current picture for intra-prediction. By predicting the samples of the current block using not only samples directly adjacent to the current block, but also samples far from the current block, the predictive coding unit 3410 can reduce the size of residual data. In one embodiment, the image coding device 3400 can improve compression efficiency by increasing the efficiency of intra-prediction. It can improve efficiency.
[0367] Figure 35 is a flowchart of an image coding method that performs intra-prediction for the current block using an intra-prediction mode according to one embodiment of the present invention.
[0368] Referring to Figure 35, in step S3510, the image encoding device 3400 determines the first intra-prediction mode of the current block. In step S3520, the image encoding device 3400 determines the search range for the second intra-prediction mode based on the first intra-prediction mode. The search range includes multiple intra-prediction modes, including the first intra-prediction mode.
[0369] In step S3530, the image coding device 3400 determines the second intra-prediction mode for the current block within the search range of the second intra-prediction mode.
[0370] In step S3540, the image coding device 3400 performs an intra-prediction for the current block using the second intra-prediction mode and generates a predicted block.
[0371] In step S3550, the image encoding device 3400 generates a bitstream containing information about the first intra-prediction mode of the current block.
[0372] An embodiment of the present invention provides an image decoding method. The image decoding method includes the step of obtaining information about a first intra-prediction mode for the current block from a bitstream. The image decoding method includes the step of determining the first intra-prediction mode for the current block using the information about the first intra-prediction mode. The image decoding method includes the step of determining the search range of a second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. The image decoding method includes the step of determining the second intra-prediction mode for the current block within the search range of the second intra-prediction mode. The image decoding method includes the step of performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block. The image decoding method includes the step of generating a decoded image based on the predicted block. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0373] According to one embodiment of the present invention, the first intra-prediction mode is selected from a plurality of intra-prediction modes included in the intra-prediction mode set. The plurality of intra-prediction modes included in the search range represent directions that are more finely subdivided than the plurality of intra-prediction modes included in the intra-prediction mode set. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by making predictions for finer directions using the second intra-prediction mode.
[0374] According to one embodiment of the present invention, the multiple intra-prediction modes included in the search range indicate indices included in a predetermined range from the index of the first intra-prediction mode. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode, and can also shorten execution time by using a search range included in a predetermined range.
[0375] According to one embodiment of the present invention, the multiple intra-prediction modes included in the search range represent index values between an index value that is one value smaller than the index value representing the first intra-prediction mode and an index value that is two values larger than the index value representing the first intra-prediction mode. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode, and can also shorten execution time by using a search range that is included in a predetermined range.
[0376] An image decoding method according to one embodiment of the present invention includes the step of determining a plurality of gradient values for each of a plurality of reference samples of the reference region of the current block. The image decoding method includes the step of determining a second intra-prediction mode based on the plurality of gradient values. The image decoding method according to one embodiment of the present invention performs prediction for fine directions using the second intra-prediction mode.
[0377] According to one embodiment of the present invention, the image decoding method includes the step of determining a prediction sample of the target region of the current block for a plurality of intra-prediction modes included in the search range, using a decoded sample of the reference region of the current block. The image decoding method includes the step of determining the error for one or more prediction modes based on the prediction sample of the target region and the decoded sample of the target region. The image decoding method includes the step of determining the prediction mode with the smallest error among the plurality of intra-prediction modes included in the search range as the second intra-prediction mode. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0378] Information relating to a first intra-prediction mode according to one embodiment of the present invention includes at least one of index information indicating a first intra-prediction mode or information indicating a plurality of intra-prediction modes that can be determined as a first intra-prediction mode. An image decoding method according to one embodiment of the present invention can improve prediction accuracy by representing information relating to a first intra-prediction mode in various forms and using a variety of first intra-prediction modes.
[0379] An image decoding method according to one embodiment of the present invention includes the step of dividing a current block into a plurality of subblocks. A second intra-prediction mode is determined for each of the plurality of subblocks. Prediction blocks are generated using the second intra-prediction mode for each subblock.
[0380] According to one embodiment of the present invention, the first intra-prediction mode is the DC mode. The second intra-prediction mode is one of the first DC mode, the second DC mode, and the third DC mode. The first DC mode is calculated using one or more left-side reference samples and one or more upper-side reference samples. The second DC mode is calculated using one or more left-side reference samples. The third DC mode is calculated using one or more upper-side reference samples. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing prediction using various reference regions with the second intra-prediction mode.
[0381] An image decoding method according to one embodiment of the present invention includes the step of determining a subpixel reference sample for the current sample of the current block using a second intra-prediction mode. The image decoding method includes the step of performing interpolation filtering based on the position of the subpixel reference sample. An image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0382] An image decoding method according to one embodiment of the present invention includes the step of determining a reference template region similar to the template region of the current block from the current image. The image decoding method includes the step of determining a second intra-prediction mode based on the intra-prediction mode of the reference block corresponding to the reference template region. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0383] An image decoding method according to one embodiment of the present invention includes the step of dividing the current block into a plurality of subblocks. A reference template region is determined for each of the plurality of subblocks. The image decoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using a second intra-prediction mode.
[0384] According to one embodiment of the present invention, an image decoding device is provided. The image decoding device includes memory and at least one processor. At least one processor can obtain information about a first intra-prediction mode for the current block from a bitstream by executing at least one instruction stored in memory. At least one processor can determine the first intra-prediction mode for the current block using the information about the first intra-prediction mode by executing at least one instruction stored in memory. At least one processor can determine the search range for a second intra-prediction mode based on the first intra-prediction mode by executing at least one instruction stored in memory. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. At least one processor can determine the second intra-prediction mode for the current block within the search range of the second intra-prediction mode by executing at least one instruction stored in memory. At least one processor can perform an intra-prediction for the current block using the second intra-prediction mode and generate a predicted block by executing at least one instruction stored in memory. At least one processor can generate a decoded image based on the predicted block by executing at least one instruction stored in memory.
[0385] According to one embodiment of the present invention, the first intra-prediction mode is selected from a plurality of intra-prediction modes included in the intra-prediction mode set. The plurality of intra-prediction modes included in the search range represent directions that are more finely subdivided than the plurality of intra-prediction modes included in the intra-prediction mode set. The image decoding device according to one embodiment of the present invention can improve prediction accuracy by making predictions for finer directions using the second intra-prediction mode.
[0386] According to one embodiment of the present invention, the multiple intra-prediction modes included in the search range indicate indices included in a predetermined range from the index of the first intra-prediction mode. The image decoding device according to one embodiment of the present invention can perform predictions for finer directions using the second intra-prediction mode to improve prediction accuracy, and can also shorten execution time by using a search range included in a predetermined range.
[0387] According to one embodiment of the present invention, the multiple intra-prediction modes included in the search range represent index values between an index value that is one value smaller than the index value representing the first intra-prediction mode and an index value that is two values larger than the index value representing the first intra-prediction mode. The image decoding device according to one embodiment of the present invention can perform predictions for finer directions using the second intra-prediction mode to improve prediction accuracy, and can also shorten execution time by using a search range that is included in a predetermined range.
[0388] According to one embodiment of the present invention, at least one processor can determine a plurality of gradient values for each of a plurality of reference samples in the reference region of the current block by executing at least one instruction stored in memory. At least one processor can determine a second intra-prediction mode based on the plurality of gradient values by executing at least one instruction stored in memory. The image decoding device according to one embodiment of the present invention uses the second intra-prediction mode to make predictions for fine directions.
[0389] According to one embodiment of the present invention, at least one processor can determine the prediction sample of the target region of the current block for a plurality of intra-prediction modes included in the search range, using the decoded sample of the reference region of the current block, by executing at least one instruction stored in memory. At least one processor can determine the error for each of one or more prediction modes based on the prediction sample of the target region and the decoded sample of the target region, by executing at least one instruction stored in memory. At least one processor can determine the prediction mode with the smallest error among the plurality of intra-prediction modes included in the search range as the second intra-prediction mode by executing at least one instruction stored in memory. The image decoding device according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0390] Information relating to a first intra-prediction mode according to one embodiment of the present invention includes at least one of index information indicating a first intra-prediction mode or information indicating a plurality of intra-prediction modes that can be determined as a first intra-prediction mode. An image decoding device according to one embodiment of the present invention can improve prediction accuracy by representing information relating to a first intra-prediction mode in various forms and using a variety of first intra-prediction modes.
[0391] According to one embodiment of the present invention, at least one processor can divide a current block into a plurality of subblocks by executing at least one instruction stored in memory. A second intra-prediction mode is determined for each of the plurality of subblocks. Prediction blocks are generated using the second intra-prediction mode for each subblock.
[0392] According to one embodiment of the present invention, the first intra-prediction mode is the DC mode. The second intra-prediction mode is one of the first DC mode, the second DC mode, and the third DC mode. The first DC mode is calculated using one or more left-side reference samples and one or more upper-side reference samples. The second DC mode is calculated using one or more left-side reference samples. The third DC mode is calculated using one or more upper-side reference samples. The image decoding device according to one embodiment of the present invention can improve prediction accuracy by performing prediction using various reference regions with the second intra-prediction mode.
[0393] According to one embodiment of the present invention, at least one processor can determine a subpixel reference sample for the current sample of the current block using a second intra-prediction mode by executing at least one instruction stored in memory. At least one processor can perform interpolation filtering based on the position of the subpixel reference sample by executing at least one instruction stored in memory. The image decoding device according to one embodiment of the present invention can improve prediction accuracy by making predictions for finer directions using the second intra-prediction mode.
[0394] According to one embodiment of the present invention, at least one processor can determine a reference template region similar to the template region of the current block from the current image by executing at least one instruction stored in memory. At least one processor can determine a second intra-prediction mode based on the intra-prediction mode of the reference block corresponding to the reference template region by executing at least one instruction stored in memory. The image decoding device according to one embodiment of the present invention can use the second intra-prediction mode to make predictions for finer directions and improve prediction accuracy.
[0395] According to one embodiment of the present invention, at least one processor can divide the current block into a plurality of subblocks by executing at least one instruction stored in memory. A reference template area is determined for each of the plurality of subblocks. The image decoding device according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using a second intra-prediction mode.
[0396] An embodiment of the present invention provides an image coding method. The image coding method includes the step of determining a first intra-prediction mode for the current block. The image coding method includes the step of determining a search range for a second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. The image coding method includes the step of determining a second intra-prediction mode for the current block within the search range of the second intra-prediction mode. The image coding method includes the step of performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block. The image coding method includes the step of generating a bitstream containing information about the first intra-prediction mode for the current block.
[0397] According to one embodiment of the present invention, the first intra-prediction mode is selected from a plurality of intra-prediction modes included in the intra-prediction mode set. The plurality of intra-prediction modes included in the search range represent directions that are more finely subdivided than the plurality of intra-prediction modes included in the intra-prediction mode set. The image coding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0398] According to one embodiment of the present invention, the multiple intra-prediction modes included in the search range indicate indices included in a predetermined range from the index of the first intra-prediction mode. The image coding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode, and can also shorten execution time by using a search range included in a predetermined range.
[0399] According to one embodiment of the present invention, the multiple intra-prediction modes included in the search range represent index values between an index value that is one value smaller than the index value representing the first intra-prediction mode and an index value that is two values larger than the index value representing the first intra-prediction mode. The image coding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode, and can also shorten execution time by using a search range that is included in a predetermined range.
[0400] An image coding method according to one embodiment of the present invention includes the step of determining a plurality of gradient values for each of a plurality of reference samples in the reference region of the current block. The image coding method includes the step of determining a second intra-prediction mode based on the plurality of gradient values. An image coding method according to one embodiment of the present invention performs predictions for finer directions using the second intra-prediction mode.
[0401] According to one embodiment of the present invention, the image coding method includes the step of determining a prediction sample of the target region of the current block for a plurality of intra-prediction modes included in the search range, using a decoded sample of the reference region of the current block. The image coding method includes the step of determining an error for one or more prediction modes based on the prediction sample of the target region and the decoded sample of the target region. The image coding method includes the step of determining the prediction mode with the smallest error among the plurality of intra-prediction modes included in the search range as the second intra-prediction mode. The image coding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0402] Information relating to a first intra-prediction mode according to one embodiment of the present invention includes at least one of index information indicating a first intra-prediction mode or information indicating a plurality of intra-prediction modes that can be determined as a first intra-prediction mode. An image coding method according to one embodiment of the present invention improves prediction accuracy by representing information relating to a first intra-prediction mode in various forms and using a variety of first intra-prediction modes.
[0403] An image encoding method according to one embodiment of the present invention includes the step of dividing a current block into a plurality of subblocks. A second intra-prediction mode is determined for each of the plurality of subblocks. Prediction blocks are generated using the second intra-prediction mode for each subblock.
[0404] According to one embodiment of the present invention, the first intra-prediction mode is the DC mode. The second intra-prediction mode is one of the first DC mode, the second DC mode, and the third DC mode. The first DC mode is calculated using one or more left-side reference samples and one or more upper-side reference samples. The second DC mode is calculated using one or more left-side reference samples. The third DC mode is calculated using one or more upper-side reference samples. The image coding method according to one embodiment of the present invention improves prediction accuracy by performing prediction using various reference regions with the second intra-prediction mode.
[0405] An image coding method according to one embodiment of the present invention includes the step of determining a subpixel reference sample for the current sample of the current block using a second intra-prediction mode. The image coding method includes the step of performing interpolation filtering based on the position of the subpixel reference sample. An image coding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0406] An image coding method according to one embodiment of the present invention includes the step of determining a reference template region similar to the template region of the current block from the current image. The image coding method includes the step of determining a second intra-prediction mode based on the intra-prediction mode of the reference block corresponding to the reference template region. The image coding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using the second intra-prediction mode.
[0407] An image encoding method according to one embodiment of the present invention includes the step of dividing the current block into a plurality of subblocks. A reference template region is determined for each of the plurality of subblocks. The image encoding method according to one embodiment of the present invention can improve prediction accuracy by performing predictions for finer directions using a second intra-prediction mode.
[0408] According to one embodiment of the present invention, a computer-readable recording medium for storing a bitstream is provided. The bitstream is encoded by an image encoding method. The image encoding method includes the step of determining a first intra-prediction mode for the current block. The image encoding method includes the step of determining a search range for a second intra-prediction mode based on the first intra-prediction mode. The search range includes a plurality of intra-prediction modes, including the first intra-prediction mode. The image encoding method includes the step of determining a second intra-prediction mode for the current block within the search range of the second intra-prediction mode. The image encoding method includes the step of performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block. The image encoding method includes the step of generating a bitstream containing information about the first intra-prediction mode for the current block.
[0409] A recording medium readable by a device is provided in the form of a non-transitory recording medium. Here, "non-transitory recording medium" simply means that it is a tangible device and does not contain signals (e.g., electromagnetic waves), and this term does not distinguish between cases where data is stored semi-permanently and cases where it is stored temporarily. For example, a "non-transitory recording medium" includes a buffer in which data is stored temporarily.
[0410] According to one embodiment, the method according to one embodiment of the present invention is a computer program product (computer Computer program products may be provided as part of a program product. Computer program products can be traded as goods between a seller and a buyer. Computer program products may be provided on a device-readable recording medium (e.g., compact It is distributed in the form of a disc read-only memory (CD-ROM), or through an application store, or directly online between two user devices (e.g., smartphones) (e.g., by download or upload). In the case of online distribution, the computer program product (e.g., downloadable app) At least a portion of the app is stored or generated at least temporarily on a device-readable storage medium, such as the memory of the manufacturer's server, the application store's server, or a relay server.
Claims
1. In image decoding methods, A step of obtaining information about the first intra-prediction mode of the current block from the bitstream, A step of determining the first intra prediction mode of the current block using information relating to the first intra prediction mode, A step of determining the search range of a second intra prediction mode based on the first intra prediction mode, wherein the search range includes a plurality of intra prediction modes including the first intra prediction mode, The steps include determining the second intra prediction mode for the current block within the search range of the second intra prediction mode, The steps include: performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block; An image decoding method comprising the step of generating a decoded image based on the prediction block.
2. The first intra-prediction mode is selected from a plurality of intra-prediction modes included in the intra-prediction mode set. The image decoding method according to claim 1, characterized in that the plurality of intra-prediction modes included in the search range indicate directions that are more finely subdivided than the plurality of intra-prediction modes included in the intra-prediction mode set.
3. The image decoding method according to claim 1, characterized in that the plurality of intra-prediction modes included in the search range indicate indices included in a predetermined range from the index of the first intra-prediction mode.
4. The image decoding method according to claim 3, characterized in that the plurality of intra-prediction modes included in the search range represent index values between an index value that is one value smaller than the index value representing the first intra-prediction mode and an index value that is two values larger than the index value representing the first intra-prediction mode.
5. The steps include determining multiple gradient values for each of the multiple reference samples in the reference region of the current block, The image decoding method according to claim 1, comprising the step of determining the second intra prediction mode based on the plurality of gradient values.
6. The step of determining the second intra prediction mode is: The steps include determining prediction samples for the target region of the current block for a plurality of intra-prediction modes included in the search range, using the decoded sample of the reference region of the current block, A step of determining the error for each of the plurality of intra prediction modes based on the prediction sample of the target region and the decoding sample of the target region, The image decoding method according to claim 1, comprising the step of determining the second intra-prediction mode with the smallest error from among a plurality of intra-prediction modes included in the search range.
7. The image decoding method according to claim 1, wherein the information relating to the first intra prediction mode includes at least one of index information indicating the first intra prediction mode or information indicating a plurality of intra prediction modes that can be determined as the first intra prediction mode.
8. The step includes dividing the current block into multiple subblocks, The second intra prediction mode is determined for each of the plurality of subblocks, The image decoding method according to claim 1, wherein the prediction block is generated using the second intra-prediction mode for each of the sub-blocks.
9. When the first intra prediction mode is DC mode, The second intra prediction mode is one of the first DC mode, the second DC mode, and the third DC mode. The first DC mode is calculated using one or more left-side reference samples and one or more upper-side reference samples. The second DC mode is calculated using the one or more left-hand reference samples, The image decoding method according to claim 1, wherein the third DC mode is calculated using one or more upper reference samples.
10. The steps include determining a sub-pixel reference sample for the current sample of the current block using the second intra prediction mode described above, The image decoding method according to claim 1, comprising the step of performing interpolation filtering based on the position of the subpixel reference sample.
11. The steps include determining a reference template region similar to the template region of the current block using the current image, The image decoding method according to claim 1, comprising the step of determining a second intra-prediction mode based on the intra-prediction mode of a reference block corresponding to the reference template region.
12. The step includes dividing the current block into multiple subblocks, The image decoding method according to claim 11, wherein the reference template region is determined for each of the plurality of subblocks.
13. In an image decoding device, Memory and Includes at least one processor, The at least one processor executes at least one instruction stored in the memory, Obtain information about the first intra-prediction mode of the current block from the bitstream. Using the information regarding the first intra prediction mode, the first intra prediction mode of the current block is determined. Based on the first intra prediction mode, the search range of the second intra prediction mode is determined, and the search range includes a plurality of intra prediction modes, including the first intra prediction mode. The second intra prediction mode for the current block is determined within the search range of the second intra prediction mode. Using the second intra prediction mode described above, an intra prediction is performed for the current block, and a predicted block is generated. An image decoding device that generates a decoded image based on the aforementioned prediction block.
14. In image encoding methods, The current step is to determine the first intra prediction mode of the block, Based on the first intra prediction mode, the search range of the second intra prediction mode is determined, wherein the search range includes a plurality of intra prediction modes including the first intra prediction mode, The steps include determining the second intra prediction mode for the current block within the search range of the second intra prediction mode, The steps include: performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block; An image decoding method comprising the step of generating a bitstream containing information about the first intra-prediction mode of the current block.
15. The current step is to determine the first intra prediction mode of the block, A step of determining the search range of a second intra prediction mode based on the first intra prediction mode, wherein the search range includes a plurality of intra prediction modes including the first intra prediction mode, The steps include determining the second intra prediction mode for the current block within the search range of the second intra prediction mode, The steps include: performing an intra-prediction for the current block using the second intra-prediction mode and generating a predicted block; A computer-readable recording medium for storing a bitstream encoded by an image encoding method, the method comprising the steps of: generating a bitstream containing information about the first intra-prediction mode of the current block; and storing a bitstream encoded by an image encoding method.