Apparatus and method for encoding and decoding image by using intra prediction
By performing intra-prediction by deriving the intra-prediction mode of the current block from the previous block, the problem of large data volume of the intra-prediction mode is solved, the bit rate of the bit stream is reduced, and the efficiency of image encoding and decoding is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2024-07-18
- Publication Date
- 2026-04-10
AI Technical Summary
In existing image encoding and decoding technologies, intra-frame prediction mode involves a large amount of data, resulting in a high bit rate in the bitstream, which affects encoding and decoding performance.
By obtaining gradient information that meets predetermined conditions from multiple previous blocks that have been decoded or encoded before the current block, the intra-prediction mode of the current block is derived, and the intra-prediction mode is used to generate a prediction block and reconstruct the current block.
It reduces the amount of data required for intra-frame prediction mode, lowers the bit rate of the bitstream, and improves the performance of image encoding and decoding.
Smart Images

Figure CN121844566A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The disclosure relates to the field of image encoding and decoding, and more particularly, to an apparatus and method for encoding and decoding an image by using intra prediction. BACKGROUND
[0002] In image encoding and decoding, an image is divided into blocks, and each block can be predictively encoded and predictively decoded via inter prediction or intra prediction.
[0003] Inter prediction refers to a technique of compressing an image by removing temporal redundancy between images. In inter prediction, a block of a current image can be predicted by using a reference image. A reference block most similar to the current block can be searched in a predetermined search range within the reference image. The current block can be predicted based on the reference block, and a residual block can be generated by subtracting a prediction block generated as a result of prediction from the current block.
[0004] In standards such as H.264, Advanced Video Coding (AVC), and High Efficiency Video Coding (HEVC), in order to predict a motion vector of a current block, a motion vector of a previously encoded block adjacent to the current block or a block included in a previously encoded image can be used as a motion vector predictor of the current block. A motion vector difference that is a difference between the motion vector of the current block and the motion vector predictor can be signaled to a decoder by using a predetermined scheme.
[0005] Intra prediction is a method of compressing an image by removing spatial redundancy within an image. In intra prediction, a prediction block can be generated based on neighboring pixels of a current block according to an intra prediction mode. A residual block can be generated by subtracting the prediction block from the current block.
[0006] The residual block generated via inter prediction or intra prediction can be transmitted to a decoder via transformation and quantization. The decoder can perform dequantization and inverse transformation on the residual block, and can reconstruct the current block by combining a prediction block of the current block and the residual block. The decoder can remove artifacts within the reconstructed current block by filtering the reconstructed current block in a regular manner. SUMMARY
[0007] TECHNICAL PROBLEM According to an embodiment, an image encoding method and apparatus and an image decoding method and apparatus are provided to improve performance of predictively encoding and predictively decoding a current block.
[0008] According to an embodiment, an image encoding method and apparatus and an image decoding method and apparatus are provided to reduce an amount of data required to signal an intra prediction mode.
[0009] According to an embodiment, an image encoding method and apparatus and an image decoding method and apparatus are provided to reduce a bit rate of a bitstream.
[0010] The technical features intended to be implemented in the present disclosure are not limited to the above-described technical features, and other unmentioned technical features will be clearly understood by those of ordinary skill in the art in light of the following description.
[0011] Solution According to an embodiment, an image decoding method can include obtaining gradient information satisfying a predetermined condition from a plurality of previous blocks decoded before a current block. The gradient information can include a first value corresponding to at least one intra prediction mode and a second value corresponding to a strength of the first value.
[0012] According to an embodiment, the image decoding method can include generating gradient information of the current block by using the obtained gradient information.
[0013] According to an embodiment, the image decoding method can include deriving an intra prediction mode of the current block based on the gradient information of the current block.
[0014] According to an embodiment, the image decoding method can include generating a prediction block of the current block by performing intra prediction on the current block using the derived intra prediction mode.
[0015] According to an embodiment, the image decoding method can include reconstructing the current block by using the prediction block.
[0016] According to an embodiment, an image decoding apparatus can include at least one memory storing at least one instruction, and at least one processor configured to operate according to the at least one instruction.
[0017] In an embodiment, the at least one processor can be configured to obtain gradient information satisfying a predetermined condition from a plurality of previous blocks decoded before a current block. The gradient information can include a first value corresponding to at least one intra prediction mode and a second value corresponding to a strength of the first value.
[0018] In an embodiment, the at least one processor can be configured to generate gradient information of the current block by using the obtained gradient information.
[0019] In an embodiment, the at least one processor can be configured to derive an intra prediction mode of the current block based on the gradient information of the current block.
[0020] In an embodiment, the at least one processor can be configured to generate a prediction block of the current block by performing intra prediction on the current block using the derived intra prediction mode.
[0021] In an embodiment, the at least one processor can be configured to reconstruct the current block by using the prediction block.
[0022] According to an embodiment, an image encoding method can include obtaining gradient information satisfying a predetermined condition from a plurality of previous blocks encoded before a current block. The gradient information can include a first value corresponding to at least one intra prediction mode and a second value corresponding to a strength of the first value.
[0023] According to an embodiment, the image encoding method can include generating gradient information of the current block by using the obtained gradient information.
[0024] According to an embodiment, the image encoding method can include deriving an intra prediction mode of the current block based on the gradient information of the current block.
[0025] According to an embodiment, the image encoding method can include generating a prediction block of the current block by performing intra prediction on the current block using the derived intra prediction mode.
[0026] According to an embodiment, the image encoding method can include encoding the current block by using the prediction block.
[0027] According to an embodiment, an image encoding apparatus can include at least one memory storing at least one instruction and at least one processor configured to operate according to the at least one instruction.
[0028] In an embodiment, the at least one processor can be configured to obtain gradient information satisfying a predetermined condition from a plurality of previous blocks encoded before a current block. The gradient information can include a first value corresponding to at least one intra prediction mode and a second value corresponding to a strength of the first value.
[0029] In an embodiment, the at least one processor can be configured to generate gradient information of the current block by using the obtained gradient information.
[0030] In an embodiment, the at least one processor can be configured to derive an intra prediction mode of the current block based on the gradient information of the current block.
[0031] In an embodiment, the at least one processor can be configured to generate a prediction block of the current block by performing intra prediction on the current block using the derived intra prediction mode.
[0032] In an embodiment, the at least one processor can be configured to encode the current block by using the prediction block.
[0033] According to an embodiment, in a computer readable recording medium having a bitstream recorded thereon, the bitstream can include an encoding result of a current block.
[0034] In one embodiment, the encoding result of the current block can be generated by obtaining gradient information that satisfies predetermined conditions from multiple previous blocks encoded before the current block. The gradient information may include a first value corresponding to at least one intra-prediction mode and a second value corresponding to the intensity of the first value.
[0035] In an embodiment, the encoding result of the current block can be generated by using the obtained gradient information to generate the gradient information of the current block.
[0036] In one embodiment, the encoding result of the current block can be generated by deriving the intra-frame prediction mode of the current block based on the gradient information of the current block.
[0037] In an embodiment, a prediction block for the current block can be generated by performing intra-prediction on the current block using a derived intra-prediction mode to produce the encoding result of the current block.
[0038] In an embodiment, the encoding result of the current block can be generated by encoding the current block using a prediction block.
[0039] Beneficial effects According to embodiments, the image encoding method and apparatus, as well as the image decoding method and apparatus, can improve the performance of predictive encoding and predictive decoding for the current block.
[0040] According to embodiments, the image encoding method and apparatus, as well as the image decoding method and apparatus, can reduce the amount of data required to transmit intra-frame prediction modes using signals.
[0041] According to embodiments, the image encoding method and apparatus, as well as the image decoding method and apparatus, can reduce the bit rate of the bitstream.
[0042] The effects intended to be achieved in this disclosure are not limited to those described above, and other unstated effects will be clearly understood by those skilled in the art in light of the following description. Attached Figure Description
[0043] Figure 1 A block diagram of an image decoding device according to an embodiment is shown.
[0044] Figure 2 A block diagram of an image encoding device according to an embodiment is shown.
[0045] Figure 3 The process of determining at least one coding unit by dividing the current coding unit is illustrated according to an embodiment.
[0046] Figure 4 The process of determining at least one coding unit by dividing non-square coding units according to an embodiment is illustrated.
[0047] Figure 5The process of dividing coding units based on at least one of block shape information and division shape pattern information according to an embodiment is illustrated.
[0048] Figure 6 A method for determining a predetermined coding unit from an odd number of coding units is shown according to an embodiment.
[0049] Figure 7 The following describes the order in which multiple coding units are processed when multiple coding units are determined by dividing the current coding unit, according to an embodiment.
[0050] Figure 8 The illustration shows the process of determining that the current coding unit will be divided into an odd number of coding units when the coding units cannot be processed in a predetermined order, according to an embodiment.
[0051] Figure 9 The process of determining at least one coding unit by dividing a first coding unit is illustrated according to an embodiment.
[0052] Figure 10 The embodiment shows that when a second coding unit with a non-square shape, determined when the first coding unit is divided, satisfies predetermined conditions, the shape into which the second coding unit can be divided is limited.
[0053] Figure 11 The illustration shows the process of dividing a square coding unit when the division shape pattern information cannot indicate that the square coding unit is divided into four square coding units, according to an embodiment.
[0054] Figure 12 This illustrates that, according to an embodiment, the processing order among multiple coding units can be changed based on the process of dividing coding units.
[0055] Figure 13 The illustration shows a process for determining the depth of a coding unit as the shape and size of the coding unit change when the coding unit is recursively divided such that multiple coding units are determined, according to an embodiment.
[0056] Figure 14 The diagram illustrates a depth that can be determined based on the shape and size of the coding unit, and a partial index (PID) used to distinguish the coding unit, according to an embodiment.
[0057] Figure 15 The illustration shows how multiple encoding units are determined based on multiple predetermined data units included in the screen, according to an embodiment.
[0058] Figure 16 The diagram illustrates an encoding unit that can be determined in each frame when the combination of shapes into which the encoding unit can be divided differs for each frame, according to an embodiment.
[0059] Figure 17 Various shapes of coding units, which can be determined based on partition shape pattern information that can be represented in binary code, are shown according to embodiments.
[0060] Figure 18 Other shapes of coding units, which can be determined based on partition shape pattern information that can be represented in binary code, are shown according to embodiments.
[0061] Figure 19 This is a block diagram of an image encoding and decoding system that performs loop filtering according to an embodiment.
[0062] Figure 20 This is a block diagram illustrating the configuration of an image decoding device according to an embodiment.
[0063] Figure 21 This is a diagram illustrating the intra-frame prediction mode according to an embodiment.
[0064] Figure 22 This is a flowchart of an image decoding method according to an embodiment.
[0065] Figure 23 This is a diagram illustrating an example of a method for calculating gradients according to an embodiment.
[0066] Figure 24 This is a diagram illustrating a method for calculating gradients according to an embodiment.
[0067] Figure 25 This is a diagram illustrating a method for generating gradient information according to an embodiment.
[0068] Figure 26 This is a diagram illustrating a method for deriving intra-prediction modes from neighboring blocks according to an embodiment.
[0069] Figure 27 This is a diagram illustrating the process of generating intra-frame prediction samples according to an embodiment.
[0070] Figure 28 This is a diagram illustrating a method for adaptively determining weights according to an embodiment.
[0071] Figure 29 This is a diagram illustrating a method for storing gradient information according to an embodiment.
[0072] Figure 30 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0073] Figure 31 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0074] Figure 32 This is a diagram illustrating an intra-frame prediction method that references gradient information from a previous block according to an embodiment.
[0075] Figure 33 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0076] Figure 34 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0077] Figure 35 This is a diagram illustrating an example of the positions of spatially and temporally adjacent blocks according to an embodiment.
[0078] Figure 36 This is a diagram illustrating a method for referencing gradient information in inter-frame mode according to an embodiment.
[0079] Figure 37 This is a diagram illustrating the location of neighboring blocks used in intra-frame prediction according to an embodiment.
[0080] Figure 38 This is a diagram illustrating an example of an intra-frame prediction method for chroma blocks according to an embodiment.
[0081] Figure 39 This is a flowchart of an image decoding method according to an embodiment.
[0082] Figure 40 This is a block diagram illustrating the configuration of an image encoding device according to an embodiment.
[0083] Figure 41 This is a flowchart of an image encoding method according to an embodiment.
[0084] The best embodiment of the present invention According to an embodiment, an image decoding method may include obtaining gradient information satisfying predetermined conditions from a plurality of previous blocks decoded before the current block. The gradient information may include a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
[0085] According to an embodiment, the image decoding method may include generating gradient information for the current block by using the obtained gradient information.
[0086] According to an embodiment, the image decoding method may include deriving the intra-frame prediction mode of the current block based on the gradient information of the current block.
[0087] According to an embodiment, the image decoding method may include generating a prediction block for the current block by performing intra-prediction on the current block using a derived intra-prediction mode.
[0088] According to an embodiment, the image decoding method may include reconstructing the current block by using a predicted block. Detailed Implementation
[0089] Because this disclosure allows for various modifications and numerous embodiments, specific embodiments will be shown in the accompanying drawings and described in detail in the written description. However, this is not intended to limit this disclosure to a particular mode of practice, and it should be understood that all modifications, equivalents, and alternatives that do not depart from the spirit and scope of this disclosure are included herein.
[0090] In the description of the embodiments, detailed explanations of the related technologies may be omitted when it is believed that such detailed explanations might unnecessarily obscure the essence of this disclosure. Furthermore, numbers in the description of the embodiments (e.g., "first," "second," etc.) are used only to distinguish one element from another.
[0091] Throughout this disclosure, the expression "at least one of a, b or c" means only a, only b, only c, both a and b, both a and c, both b and c, all of a, b and c, or variations thereof.
[0092] Throughout the specification, when an element is referred to as being “connected to” or “coupled to” another element, it can be directly connected to or coupled to another element, or it can be indirectly connected to or coupled to another element by inserting an intermediate element in between.
[0093] In this specification, elements referred to as "units" or "modules" may be combined into one element, or one element may be divided into two or more elements according to its subdivided functions. In addition, each element described below may additionally perform some or all of the functions performed by another element, in addition to its own main functions, and some of the main functions of each element may be performed entirely by another element.
[0094] In this disclosure, "image" can refer to a picture, still image, frame, moving picture including multiple consecutive still images, or video.
[0095] In this disclosure, a "sample point" can refer to data assigned to a sampling location in an image, i.e., the data to be processed. For example, pixels within a frame in the spatial domain can correspond to a sample point. A unit comprising multiple sample points can be defined as a block.
[0096] In this disclosure, entropy decoding of a block or unit can be either the processing of obtaining the syntax elements of the block or unit from a bit stream (or bits contained in the bit stream), or the processing of obtaining the binary bit string corresponding to the syntax elements.
[0097] In this disclosure, entropy encoding for a block or unit can instruct the processing of generating a bit stream (or bits contained in a bit stream) from the syntax elements of the block or unit, or the processing of generating a bit stream (or bits contained in a bit stream) from a binary bit string corresponding to a syntax element.
[0098] In the following text, refer to Figures 1 to 19 The invention provides an image encoding method and apparatus based on tree-structured encoding and transformation units, as well as an image decoding method and apparatus, according to embodiments.
[0099] Figure 1 A block diagram of an image decoding device 100 according to an embodiment is shown.
[0100] Image decoding device 100 may include a bitstream acquirer 110 and a decoder 120. The bitstream acquirer 110 and decoder 120 may include at least one processor. Furthermore, the bitstream acquirer 110 and decoder 120 may include memory storing instructions to be executed by the at least one processor.
[0101] Bitstream acquirer 110 can receive bitstreams. The bitstream includes information about an image encoded by image encoding device 200, which will be described below. Furthermore, bitstreams can be transmitted from image encoding device 200. Image encoding device 200 and image decoding device 100 can be connected via wired or wireless means, and bitstream acquirer 110 can receive bitstreams via wired or wireless means. Bitstream acquirer 110 can receive bitstreams from storage media such as optical media, hard disks, etc. Decoder 120 can reconstruct the image based on information obtained from the received bitstream. Decoder 120 can obtain syntax elements for reconstructing the image from the bitstream. Decoder 120 can reconstruct the image based on the syntax elements.
[0102] According to the detailed description of the operation of the image decoding device 100, the bit stream acquirer 110 can receive bit streams.
[0103] Image decoding device 100 can perform the operation of obtaining a binary bit string corresponding to the partition shape pattern of the coding unit from the bit stream. Image decoding device 100 can perform the operation of determining the partitioning rules of the coding unit. Furthermore, image decoding device 100 can perform the operation of dividing the coding unit into multiple coding units based on at least one of the binary bit string corresponding to the partition shape pattern and the partitioning rules. Image decoding device 100 can determine a first permissible range of the size of the coding unit according to the aspect ratio of the coding unit in order to determine the partitioning rules. Image decoding device 100 can determine a second permissible range of the size of the coding unit according to the partition shape pattern of the coding unit in order to determine the partitioning rules.
[0104] The division of coding units according to embodiments of the present disclosure will be described in detail below.
[0105] First, a frame can be divided into one or more stripes or one or more parallel blocks. A stripe or a parallel block can be a sequence of one or more maximum coding units (coding tree units (CTUs)). According to embodiments, a stripe may include one or more parallel blocks, or a stripe may include one or more CTUs. Stripes comprising one or more parallel blocks can be identified within a frame.
[0106] In contrast to the Maximum Coding Unit (CTU), there is conceptually a Maximum Coding Block (CTB). A Maximum Coding Block (CTB) indicates an N×N block (where N is an integer) comprising N×N samples. Each color component can be divided into one or more maximum coding blocks.
[0107] When the image comprises three sample arrays (sample arrays of Y, Cr, and Cb components), the maximum coding unit (CTU) is a unit that includes a maximum coding block for luma samples, two corresponding maximum coding blocks for chroma samples, and a syntax structure for encoding the luma and chroma samples. When the image is monochrome, the maximum coding unit is a unit that includes a maximum coding block for monochrome samples and a syntax structure for encoding the monochrome samples. When the image is encoded in a color plane separated according to color components, the maximum coding unit is a unit that includes a syntax structure for encoding the image and its samples.
[0108] A maximum code block (CTB) can be divided into an M×N code block consisting of M×N samples (where M and N are integers).
[0109] When the image has sample arrays for the Y, Cr, and Cb components, the coding unit (CU) comprises a coding block for luminance samples, two corresponding coding blocks for chrominance samples, and a syntax structure for encoding the luminance and chrominance samples. When the image is monochrome, the coding unit comprises a coding block for monochrome samples and a syntax structure for encoding the monochrome samples. When the image is encoded in a color plane separated according to the color components, the coding unit comprises a syntax structure for encoding the image and the image samples.
[0110] As described above, the maximum coding block and the maximum coding unit are conceptually distinct from each other, and the coding block and the coding unit are also conceptually distinct from each other. That is, the (maximum) coding unit refers to a data structure that includes: the (maximum) coding block containing the corresponding samples and the syntax structure corresponding to the (maximum) coding block. However, because those skilled in the art understand that the (maximum) coding unit or (maximum) coding block refers to a block of a predetermined size containing a predetermined number of samples, the maximum coding block and the maximum coding unit, or the coding block and the coding unit, will be referred to in the following description without distinction unless otherwise described.
[0111] An image can be divided into maximum coding units (CTUs). The size of each CTU can be determined based on information obtained from the bitstream. Each CTU can be a square of the same size. However, this disclosure is not limited thereto.
[0112] For example, information about the maximum size of a luminance-coded block can be obtained from the bitstream. For example, the maximum size of a luminance-coded block, indicated by the information about the maximum size of the luminance-coded block, can be one of 4×4, 8×8, 16×16, 32×32, 64×64, 128×128, and 256×256.
[0113] For example, information about the luma block size difference and the maximum size of a luma coded block that can be divided into two blocks can be obtained from the bitstream. The information about the luma block size difference can refer to the size difference between the maximum luma coded unit and the maximum luma coded block that can be divided into two blocks. Therefore, when the information about the maximum size of the luma coded block that can be divided into two blocks and the information about the luma block size difference obtained from the bitstream are combined, the size of the maximum luma coded unit can be determined. The size of the maximum chroma coded unit can be determined using the size of the maximum luma coded unit. For example, when the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block can be half the size of the luma block, and the size of the maximum chroma coded unit can be half the size of the maximum luma coded unit.
[0114] According to the embodiment, since information about the maximum size of a binary-divisible luminance coding block is obtained from the bitstream, the maximum size of the binary-divisible luminance coding block can be variably determined. Conversely, the maximum size of a ternary-divisible luminance coding block can be fixed. For example, the maximum size of a ternary-divisible luminance coding block in an I-frame can be 32×32, and the maximum size of a ternary-divisible luminance coding block in a P-frame or B-frame can be 64×64.
[0115] Furthermore, the largest coding unit can be hierarchically divided into coding units based on the partition shape pattern information obtained from the bit stream. At least one of the following can be obtained from the bit stream as partition shape pattern information: information indicating whether a quaternary partition will be performed, information indicating whether a multi-partition will be performed, partition direction information, and partition type information.
[0116] For example, information indicating whether a quad partition will be performed can indicate whether the current coding unit will be quad partitioned (QUAD_SPLIT).
[0117] When the current coding unit is not quadrupled, the information indicating whether a multipartition will be performed can indicate whether the current coding unit will no longer be partitioned (NO_SPLIT) or will be partitioned by a binary / triple.
[0118] When the current coding unit is partitioned into two or three parts, the partitioning direction information indicates that the current coding unit is partitioned in one of the horizontal or vertical directions.
[0119] When the current coding unit is divided in the horizontal or vertical direction, the partition type information indicates whether the current coding unit is divided into binary or ternary partitions.
[0120] The partitioning mode of the current coding unit can be determined based on the partitioning direction and partitioning type information. When the current coding unit is partitioned by a binary element in the horizontal direction, the partitioning mode can be determined as a binary horizontal partitioning mode (SPLIT_BT_HOR); when the current coding unit is partitioned by a ternary element in the horizontal direction, the partitioning mode can be determined as a ternary horizontal partitioning mode (SPLIT_TT_HOR); when the current coding unit is partitioned by a binary element in the vertical direction, the partitioning mode can be determined as a binary vertical partitioning mode (SPLIT_BT_VER); and when the current coding unit is partitioned by a ternary element in the vertical direction, the partitioning mode can be determined as a ternary vertical partitioning mode (SPLIT_TT_VER).
[0121] Image decoding device 100 can obtain a binary bit string containing partitioning shape pattern information from a bit stream. The bit stream received by image decoding device 100 may be in the form of fixed-length binary code, unary code, truncated unary code, predetermined binary code, etc. The binary bit string is information about binary numbers. The binary bit string may include at least one bit. Image decoding device 100 can obtain partitioning shape pattern information corresponding to the binary bit string based on partitioning rules. Image decoding device 100 can determine, based on a binary bit string, whether to perform quaternion partitioning on the coding unit, whether not to partition the coding unit, the partitioning direction, and the partitioning type.
[0122] A coding unit can be less than or equal to the largest coding unit. For example, since the largest coding unit is the coding unit with the largest size, it is one of the coding units. When the partitioning shape pattern information regarding the largest coding unit indicates that partitioning is not performed, the coding units determined within the largest coding unit have the same size as the largest coding unit. When the partitioning shape pattern information regarding the largest coding unit indicates that partitioning is performed, the largest coding unit can be divided into coding units. Furthermore, when the partitioning shape pattern information regarding the coding units indicates that partitioning is performed, the coding unit can be divided into smaller coding units. However, the partitioning of an image is not limited to this, and the largest coding unit and coding units may not be distinguished. (Refer to...) Figures 3 to 16 A more detailed description of the division of coding units.
[0123] Furthermore, one or more prediction blocks for prediction can be determined from the coding unit. The prediction blocks may be equal to or smaller than the coding unit. Additionally, one or more transform blocks for transform can be determined from the coding unit. The transform blocks may be equal to or smaller than the coding unit.
[0124] The shapes and sizes of the transform blocks and the prediction blocks can be independent of each other.
[0125] In another embodiment, prediction can be performed by using the coding unit as a prediction unit. Furthermore, transformation can be performed by using the coding unit as a transform block.
[0126] Reference Figures 3 to 16 The partitioning of coding units is described in detail. The current block and neighboring blocks in this disclosure can refer to one of the maximum coding unit, coding unit, prediction block, and transform block. Furthermore, the current block of the current coding unit is the block currently being decoded or encoded, or the block currently being partitioned. Neighboring blocks can be blocks reconstructed prior to the current block. Neighboring blocks can be spatially or temporally adjacent to the current block. Neighboring blocks can be located at one of the following locations: lower left, left side, upper left, top, upper right, right side, or lower right of the current block.
[0127] Figure 3 The illustration shows a process performed by an image decoding device 100 according to an embodiment to determine at least one coding unit by dividing the current coding unit.
[0128] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N. Here, N can be a positive integer. Block shape information is information indicating at least one of the shape, orientation, aspect ratio, or size of the coding unit.
[0129] The shape of the encoding unit can be square or non-square. When the width and height of the encoding unit are the same (i.e., when the block shape of the encoding unit is 4N×4N), the image decoding device 100 can determine the block shape information of the encoding unit as square. The image decoding device 100 can also determine the shape of the encoding unit as non-square.
[0130] When the width and height of the coding unit are different from each other (i.e., when the block shape of the coding unit is 4N×2N, 2N×4N, 4N×N, N×4N, 32N×N, N×32N, 16N×N, N×16N, 8N×N, or N×8N), the image decoding device 100 can determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding device 100 can determine the aspect ratio in the block shape information of the coding unit as at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, or 32:1. Furthermore, the image decoding device 100 can determine whether the coding unit is horizontal or vertical based on its width and height. Additionally, the image decoding device 100 can determine the size of the coding unit based on at least one of its width, height, or area.
[0131] According to an embodiment, the image decoding device 100 can determine the shape of the coding unit by using block shape information, and can determine the coding unit partitioning method by using partition shape pattern information. That is, the coding unit partitioning method indicated by the partition shape pattern information can be determined based on the block shape indicated by the block shape information used by the image decoding device 100.
[0132] Image decoding device 100 can obtain partition shape pattern information from the bitstream. However, embodiments are not limited to this, and image decoding device 100 and image encoding device 2200 can determine pre-agreed partition shape pattern information based on block shape information. Image decoding device 100 can determine pre-agreed partition shape pattern information for the largest or smallest coding unit. For example, image decoding device 100 can determine the partition shape pattern information for the largest coding unit as a quaternary partition. Furthermore, image decoding device 100 can determine the partition shape pattern information for the smallest coding unit as "no partition". Specifically, image decoding device 100 can determine the size of the largest coding unit to be 256×256. Image decoding device 100 can determine the pre-agreed partition shape pattern information as a quaternary partition. A quaternary partition is a partition shape pattern in which both the width and height of the coding unit are bisected. Image decoding device 100 can obtain a 128×128 coding unit from the 256×256-sized largest coding unit based on the partition shape pattern information. Furthermore, the image decoding device 100 can determine the size of the smallest coding unit to be 4×4. The image decoding device 100 can obtain partitioning shape pattern information indicating "no partitioning" for the smallest coding unit.
[0133] According to an embodiment, the image decoding device 100 can use block shape information indicating that the current coding unit has a square shape. For example, the image decoding device 100 can determine whether to not divide the square coding unit, whether to divide the square coding unit vertically, whether to divide the square coding unit horizontally, or whether to divide the square coding unit into four coding units based on the division shape pattern information. (See also...) Figure 3 When the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may not divide the coding unit 310a with the same size as the current coding unit 300 based on the division shape pattern information indicating that no division is to be performed, or may determine the coding units 310b, 310c, 310d, 310e or 310f divided based on the division shape pattern information indicating a predetermined division method.
[0134] Reference Figure 3According to an embodiment, the image decoding device 100 can determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that division is performed in the vertical direction. The image decoding device 100 can determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that division is performed in the horizontal direction. The image decoding device 100 can determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the division shape pattern information indicating that division is performed in both the vertical and horizontal directions. According to an embodiment, the image decoding device 100 can determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the division shape pattern information indicating that ternary division is performed in the vertical direction. The image decoding device 100 can determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape pattern information indicating that ternary division is performed in the horizontal direction. However, the method of dividing square coding units is not limited to the above methods, and the division shape pattern information can indicate various methods. The following describes in detail, with respect to various embodiments, a predetermined partitioning method for dividing square coding units.
[0135] Figure 4 The illustration shows a process performed by an image decoding device 100 according to an embodiment to determine at least one coding unit by dividing a non-square coding unit.
[0136] According to an embodiment, the image decoding device 100 can use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 100 can determine whether to not divide the non-square current coding unit or to divide the non-square current coding unit using a predetermined division method based on the division shape pattern information. (Refer to...) Figure 4 When the block shape information of the current encoding unit 400 or 450 indicates a non-square shape, the image decoding device 100 can determine, based on the partitioning shape pattern information indicating that no partitioning is to be performed, not to partition the encoding unit 410 or 460 which has the same size as the current encoding unit 400 or 450, or can determine the encoding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, and 480c that are partitioned based on the partitioning shape pattern information indicating a predetermined partitioning method. The predetermined partitioning method for partitioning non-square encoding units will be described in detail below with respect to various embodiments.
[0137] According to an embodiment, the image decoding device 100 can determine the method of dividing coding units by using division shape pattern information, and in this case, the division shape pattern information can indicate the number of one or more coding units generated by dividing the coding units. (See also...) Figure 4 When the partitioning shape pattern information indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by partitioning the current coding unit 400 or 450 based on the partitioning shape pattern information.
[0138] According to an embodiment, when the image decoding device 100 divides a non-square current coding unit 400 or 450 based on the division shape pattern information, the image decoding device 100 may consider the position of the long side of the non-square current coding unit 400 or 450 when dividing the current coding unit. For example, the image decoding device 100 may consider the shape of the current coding unit 400 or 450 and determine multiple coding units by dividing the current coding unit 400 or 450 in the direction of the long side of the current coding unit 400 or 450.
[0139] According to an embodiment, when the partitioning shape pattern information indicates that the coding unit is divided (ternary partitioning) into an odd number of blocks, the image decoding device 100 can determine the odd number of coding units included in the current coding unit 400 or 450. For example, when the partitioning shape pattern information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding device 100 can divide the current coding unit 400 or 450 into three coding units 430a, 430b and 430c or 480a, 480b and 480c.
[0140] According to an embodiment, the aspect ratio of the current encoding unit 400 or 450 can be 4:1 or 1:4. When the aspect ratio is 4:1, because the width is longer than the height, the block shape information can be horizontal. When the aspect ratio is 1:4, because the width is shorter than the height, the block shape information can be vertical. The image decoding device 100 can determine whether to divide the current encoding unit into an odd number of blocks based on the division shape pattern information. Furthermore, the image decoding device 100 can determine the division direction of the current encoding unit 400 or 450 based on the block shape information of the current encoding unit 400 or 450. For example, when the current encoding unit 400 is vertical, the image decoding device 100 can determine encoding units 430a, 430b, and 430c by dividing the current encoding unit 400 horizontally. Similarly, when the current encoding unit 450 is horizontal, the image decoding device 100 can determine encoding units 480a, 480b, and 480c by dividing the current encoding unit 450 vertically.
[0141] According to an embodiment, the image decoding device 100 can determine an odd number of coding units included in the current coding unit 400 or 450, and not all determined coding units may have the same size. For example, a predetermined coding unit 430b or 480b among the determined odd number of coding units 430a, 430b, and 430c, or 480a, 480b, and 480c, may have a size different from the sizes of other coding units 430a and 430c or 480a and 480c. That is, the coding units determined by dividing the current coding unit 400 or 450 may have multiple sizes, and in some cases, all odd number of coding units 430a, 430b, and 430c, or 480a, 480b, and 480c, may have different sizes.
[0142] According to an embodiment, when the shape pattern information indicates that the coding unit should be divided into an odd number of blocks, the image decoding device 100 can determine the odd number of coding units included in the current coding unit 400 or 450, and furthermore, can impose a predetermined restriction on at least one of the odd number of coding units generated by dividing the current coding unit 400 or 450. (Refer to...) Figure 4The image decoding device 100 may configure the decoding process for encoding unit 430b or 480b to differ from the decoding processes for other encoding units 430a and 430c or 480a or 480c, wherein encoding unit 430b or 480b is located at the center of the three encoding units 430a, 430b and 430c or 480a, 480b and 480c generated when the current encoding unit 400 or 450 is divided. For example, unlike other encoding units 430a and 430c or 480a and 480c, the image decoding device 100 may restrict the encoding unit 430b or 480b at the center position from being divided again or only divided a predetermined number of times.
[0143] Figure 5 This illustrates a process performed by an image decoding device 100 according to an embodiment to divide coding units based on at least one of block shape information and division shape pattern information.
[0144] According to an embodiment, the image decoding device 100 can determine whether to divide the square first coding unit 500 into coding units or not to divide the square first coding unit 500 based on at least one of block shape information and partition shape pattern information. According to an embodiment, when the partition shape pattern information indicates that the first coding unit 500 is divided in the horizontal direction, the image decoding device 100 can determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The terms first coding unit, second coding unit, and third coding unit used in the embodiment are terms used to understand the relationship before and after the division of coding units. For example, the second coding unit can be determined by dividing the first coding unit, and the third coding unit can be determined by dividing the second coding unit. In the following, the structures of the first coding unit, second coding unit, and third coding unit follow the above description.
[0145] According to an embodiment, the image decoding device 100 may determine, based on the division shape pattern information, whether to divide the determined second coding unit 510 into coding units or not to divide the determined second coding unit 510. (See also...) Figure 5The image decoding device 100 can divide a non-square second coding unit 510, determined by dividing the first coding unit 500, into one or more third coding units 520a, 520b, 520c, and 520d based on the division shape pattern information, or it can choose not to divide the non-square second coding unit 510. The image decoding device 100 can obtain the division shape pattern information and can obtain multiple second coding units (e.g., second coding units 510) of various shapes by dividing the first coding unit 500 based on the obtained division shape pattern information. It can also divide the second coding unit 510 based on the division shape pattern information using the division method of the first coding unit 500. According to an embodiment, when the first coding unit 500 is divided into a second coding unit 510 based on the division shape pattern information of the first coding unit 500, the second coding unit 510 can also be divided into third coding units (e.g., 520a, 520b, 520c, and 520d) based on the division shape pattern information of the second coding unit 510. In other words, coding units can be recursively divided based on the partitioning shape pattern information of each coding unit. Therefore, square coding units can be determined by dividing non-square coding units, and non-square coding units can be determined by recursively dividing square coding units.
[0146] Reference Figure 5 A predetermined number of coding units (e.g., coding units located at the center or square coding units) in an odd number of third coding units 520b, 520c, and 520d, determined by dividing a non-square second coding unit 510, can be recursively partitioned. According to an embodiment, a non-square third coding unit 520c in the odd number of third coding units 520b, 520c, and 520d can be horizontally divided into multiple fourth coding units. A non-square fourth coding unit 530b or 530d in the multiple fourth coding units 530a, 530b, 530c, and 530d can again be divided into multiple coding units. For example, a non-square fourth coding unit 530b or 530d can again be divided into an odd number of coding units. Methods for recursively partitioning coding units will be described below with respect to various embodiments.
[0147] According to an embodiment, the image decoding device 100 can divide each of the third coding units 520a or 520b, 520c, and 520d into coding units based on the division shape pattern information. Furthermore, the image decoding device 100 can determine, based on the division shape pattern information, not to divide the second coding unit 510. According to an embodiment, the image decoding device 100 can divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 can impose predetermined restrictions on predetermined third coding units among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 can limit the number of times the third coding unit 520c at the center position among the odd number of third coding units 520b, 520c, and 520d will not be divided or will be divided.
[0148] Reference Figure 5 The image decoding device 100 may restrict the third coding unit 520c at the center position of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, to be divided using a predetermined division method (e.g., divided into only four coding units or divided using the division method of the second coding unit 510), or to be divided only a predetermined number of times (e.g., divided only n times (where n>0)). However, the restriction on the third coding unit 520c at the center position is not limited to the above examples and may include various restrictions for decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.
[0149] According to an embodiment, the image decoding device 100 can obtain partitioning shape pattern information for partitioning the current coding unit from a predetermined position in the current coding unit.
[0150] Figure 6 This illustrates a method performed by an image decoding device 100 according to an embodiment to determine a predetermined coding unit from an odd number of coding units.
[0151] Reference Figure 6 The partitioning shape pattern information of the current encoding unit 600 or 650 can be obtained from a sample at a predetermined position (e.g., sample 640 or 690 at the center position) among a plurality of samples included in the current encoding unit 600 or 650. However, the predetermined position in the current encoding unit 600 from which at least one partitioning shape pattern information can be obtained is not limited to... Figure 6The center position in the image can be included, and may include various positions included in the current encoding unit 600 (e.g., top position, bottom position, left position, right position, upper left position, lower left position, upper right position, and lower right position, etc.). The image decoding device 100 can obtain the division shape pattern information from the predetermined position, and can determine whether to divide the current encoding unit into encoding units of various shapes and sizes or not to divide the current encoding unit.
[0152] According to an embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding device 100 can select one coding unit from the coding units. Various methods can be used to select one coding unit from a plurality of coding units, and the methods will be described below with respect to various embodiments.
[0153] According to an embodiment, the image decoding device 100 can divide the current encoding unit into multiple encoding units and determine the encoding unit at a predetermined position.
[0154] According to an embodiment, the image decoding device 100 can use information indicating the positions of an odd number of coding units to determine the coding unit at the center position among the odd number of coding units. (See also...) Figure 6 The image decoding device 100 can determine an odd number of coding units 620a, 620b, and 620c or an odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding device 100 can determine an intermediate coding unit 620b or an intermediate coding unit 660b by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding device 100 can determine the coding unit 620b at the center position by determining the positions of coding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in coding units 620a, 620b, and 620c. In detail, the image decoding device 100 can determine the position of the encoding units 620a, 620b and 620c based on the information indicating the positions of the upper left samples 630a, 630b and 630c of the encoding units 620a, 620b and 620c, and determine the encoding unit 620b at the center position.
[0155] According to an embodiment, the information indicating the positions of the top-left samples 630a, 630b, and 630c included in encoding units 620a, 620b, and 620c respectively may include information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the image. According to an embodiment, the information indicating the positions of the top-left samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c respectively may include information indicating the width or height of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, and the width or height may correspond to information indicating the difference between the coordinates of the encoding units 620a, 620b, and 620c in the image. That is, the image decoding device 100 can determine the encoding unit 620b at the center position by directly using information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the image, or by using information about the width or height corresponding to the difference between the coordinates of the encoding units.
[0156] According to an embodiment, the information indicating the position of the top left sample 630a of the upper encoding unit 620a may include coordinates (xa, ya), the information indicating the position of the top left sample 630b of the middle encoding unit 620b may include coordinates (xb, yb), and the information indicating the position of the top left sample 630c of the lower encoding unit 620c may include coordinates (xc, yc). The image decoding device 100 can determine the middle encoding unit 620b by using the coordinates of the top left samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top left samples 630a, 630b, and 630c are sorted in ascending or descending order, the encoding unit 620b including the coordinates (xb, yb) of the sample 630b at the center position can be determined as the encoding unit at the center position among the encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600. However, the coordinates indicating the positions of the top-left samples 630a, 630b, and 630c may include coordinates indicating absolute positions within the frame, or coordinates (dxb, dyb) indicating the relative position of the top-left sample 630b of the intermediate encoding unit 620b with respect to the top-left sample 630a of the upper encoding unit 620a, and coordinates (dxc, dyc) indicating the relative position of the top-left sample 630c of the lower encoding unit 620c with respect to the top-left sample 630a of the upper encoding unit 620a. The method of determining the encoding unit at a predetermined position by using the coordinates of samples included in the encoding unit as information indicating the position of the samples is not limited to the methods described above, and may include various arithmetic methods using the coordinates of the samples.
[0157] According to an embodiment, the image decoding device 100 can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and can select one of the encoding units 620a, 620b, and 620c based on a predetermined criterion. For example, the image decoding device 100 can select encoding unit 620b from the encoding units 620a, 620b, and 620c that has a size different from the sizes of the other encoding units.
[0158] According to an embodiment, the image decoding device 100 can determine the width or height of each of the encoding units 620a, 620b, and 620c by using coordinates (xa, ya) indicating the position of the upper left sample point 630a of the upper encoding unit 620a, coordinates (xb, yb) indicating the position of the upper left sample point 630b of the middle encoding unit 620b, and coordinates (xc, yc) indicating the position of the upper left sample point 630c of the lower encoding unit 620c. The image decoding device 100 can also determine the dimensions of the encoding units 620a, 620b, and 620c by using coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the encoding units 620a, 620b, and 620c. According to an embodiment, the image decoding device 100 can determine the width of the upper encoding unit 620a as the width of the current encoding unit 600. Image decoding device 100 can determine the height of the upper encoding unit 620a as yb-ya. According to an embodiment, image decoding device 100 can determine the width of the middle encoding unit 620b as the width of the current encoding unit 600. Image decoding device 100 can determine the height of the middle encoding unit 620b as yc-yb. According to an embodiment, image decoding device 100 can determine the width or height of the lower encoding unit by using the width or height of the current encoding unit or the width or height of the upper encoding unit 620a and the middle encoding unit 620b. Image decoding device 100 can determine encoding units with dimensions different from the dimensions of other encoding units based on the determined widths and heights of the encoding units 620a, 620b, and 620c. (Refer to...) Figure 6 The image decoding device 100 can determine an intermediate encoding unit 620b, which has a size different from that of the upper encoding unit 620a and the lower encoding unit 620c, as an encoding unit at a predetermined position. However, the method described above by the image decoding device 100 for determining an encoding unit with a size different from that of other encoding units corresponds only to the example of determining an encoding unit at a predetermined position by using the size of the encoding unit determined based on the coordinates of the sample points. Therefore, various methods can be used to determine an encoding unit at a predetermined position by comparing the size of the encoding unit determined based on the coordinates of the predetermined sample points.
[0159] The image decoding device 100 can determine the width or height of each of the encoding units 660a, 660b, and 660c by using coordinates (xd, yd) indicating the position of the upper left sample 670a of the left encoding unit 660a, coordinates (xe, ye) indicating the position of the upper left sample 670b of the middle encoding unit 660b, and coordinates (xf, yf) indicating the position of the upper left sample 670c of the right encoding unit 660c. The image decoding device 100 can also determine the individual dimensions of the encoding units 660a, 660b, and 660c by using coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the encoding units 660a, 660b, and 660c.
[0160] According to an embodiment, the image decoding device 100 can determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 can determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 can determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 can determine the height of the middle coding unit 660b as the height of the current coding unit 600. According to an embodiment, the image decoding device 100 can determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 or the width or height of the left coding unit 660a and the middle coding unit 660b. The image decoding device 100 can determine coding units with dimensions different from the dimensions of other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. (Refer to...) Figure 6 The image decoding device 100 can determine an intermediate encoding unit 660b, which has a size different from that of the left encoding unit 660a and the right encoding unit 660c, as an encoding unit at a specific location. However, the method described above by the image decoding device 100 for determining an encoding unit with a size different from that of other encoding units corresponds only to the example of determining an encoding unit at a predetermined location by using the size of the encoding unit determined based on the coordinates of sample points. Therefore, various methods can be used to determine an encoding unit at a predetermined location by comparing the size of the encoding unit determined based on the coordinates of specific sample points.
[0161] However, the position of the sample points considered in determining the position of the coding unit is not limited to the aforementioned upper left position, and information about any position of the sample points included in the coding unit can be used.
[0162] According to an embodiment, the image decoding device 100 can select a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than its height, the image decoding device 100 can determine a coding unit at a predetermined position in the horizontal direction. That is, the image decoding device 100 can determine one coding unit from the coding units at different positions in the horizontal direction and can impose restrictions on that coding unit. When the current coding unit has a non-square shape with a height greater than its width, the image decoding device 100 can determine a coding unit at a predetermined position in the vertical direction. That is, the image decoding device 100 can determine one coding unit from the coding units at different positions in the vertical direction and can impose restrictions on that coding unit.
[0163] According to an embodiment, the image decoding device 100 can use information indicating the positions of each of an even number of coding units to determine a coding unit at a predetermined position among the even number of coding units. The image decoding device 100 can determine the even number of coding units by partitioning (binary partitioning) the current coding unit, and can determine the coding unit at the predetermined position by using information about the positions of the even number of coding units. The associated operation is similar to that already referred to above. Figure 6 The operation corresponding to determining a predetermined position (e.g., the center position) among an odd number of coding units is described in detail, so its detailed description is not provided here.
[0164] According to an embodiment, when a non-square current coding unit is divided into multiple coding units, predetermined information about the coding unit at a predetermined position can be used in the division operation to determine the coding unit at the predetermined position among the multiple coding units. For example, the image decoding device 100 can use at least one of block shape information and division shape pattern information stored in the samples included in the intermediate coding unit to determine the coding unit at the center position among the multiple coding units determined by dividing the current coding unit in the division operation.
[0165] Reference Figure 6The image decoding device 100 can divide the current coding unit 600 into multiple coding units 620a, 620b, and 620c based on the division shape pattern information, and can determine the coding unit 620b at the center position among the multiple coding units 620a, 620b, and 620c. Furthermore, the image decoding device 100 can determine the coding unit 620b at the center position by considering the location where the division shape pattern information is obtained. That is, the division shape pattern information of the current coding unit 600 can be obtained from the sample point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into multiple coding units 620a, 620b, and 620c based on the division shape pattern information, the coding unit 620b including the sample point 640 can be determined as the coding unit at the center position. However, the information used to determine the coding unit at the center position is not limited to the division shape pattern information, and various types of information can be used to determine the coding unit at the center position.
[0166] According to an embodiment, predetermined information for identifying the coding unit at a predetermined location can be obtained from predetermined samples included in the coding unit to be determined. (Refer to...) Figure 6 The image decoding device 100 can use partitioning shape pattern information obtained from samples at predetermined positions in the current coding unit 600 (e.g., samples at the center of the current coding unit 600) to determine a coding unit at a predetermined position (e.g., a coding unit at the center of the partitioned coding units) among a plurality of coding units 620a, 620b, and 620c determined by partitioning the current coding unit 600. That is, the image decoding device 100 can determine samples at predetermined positions by considering the block shape of the current coding unit 600, and can determine a coding unit 620b that includes samples from the plurality of coding units 620a, 620b, and 620c determined by partitioning the current coding unit 600, including samples from which specific information (e.g., partitioning shape pattern information) can be obtained, and can impose predetermined limitations on the coding unit 620b. (Refer to...) Figure 5 According to an embodiment, in the decoding process, the image decoding device 100 can determine a sample 640 at the center position of the current encoding unit 600 as a sample from which predetermined information can be obtained, and can impose a predetermined restriction on the encoding unit 620b including the sample 640. However, the position of the sample from which the predetermined information can be obtained is not limited to the above-described position, and can include any position of the sample included in the encoding unit 620b to be determined as subject to restriction.
[0167] According to an embodiment, the location of a sample point from which predetermined information can be obtained can be determined based on the shape of the current encoding unit 600. According to an embodiment, block shape information can indicate whether the current encoding unit has a square shape or a non-square shape, and the location of the sample point from which predetermined information can be obtained can be determined based on this shape. For example, the image decoding device 100 can determine a sample point located on a boundary that bisects at least one of the width and height of the current encoding unit as a sample point from which predetermined information can be obtained by using at least one of information about the width and information about the height of the current encoding unit. As another example, when the block shape information of the current encoding unit indicates a non-square shape, the image decoding device 100 can determine one of the sample points adjacent to the boundary that bisects the long side of the current encoding unit as a sample point from which predetermined information can be obtained.
[0168] According to an embodiment, when the current coding unit is divided into multiple coding units, the image decoding device 100 can use partition shape pattern information to determine the coding unit at a predetermined position among the multiple coding units. According to an embodiment, the image decoding device 100 can obtain partition shape pattern information from samples at predetermined positions in the coding units, and can partition the multiple coding units generated by partitioning the current coding unit using the partition shape pattern information, wherein the partition shape pattern information is obtained from samples at predetermined positions in each of the multiple coding units. That is, the coding units can be recursively partitioned based on the partition shape pattern information, wherein the partition shape pattern information is obtained from samples at predetermined positions in each coding unit. The above already relates to... Figure 7 The operation of recursively dividing the coding unit is described, so its detailed description is not provided here.
[0169] According to an embodiment, the image decoding device 100 can determine one or more coding units by dividing the current coding unit, and can determine the order of decoding one or more coding units based on a predetermined block (e.g., the current coding unit).
[0170] Figure 7 This illustrates the order in which the image decoding device 100 processes the plurality of coding units when it determines the plurality of coding units by dividing the current coding unit, according to an embodiment.
[0171] According to an embodiment, based on the division shape pattern information, the image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, determine the second coding units 730a and 730b by dividing the first coding unit 700 in the horizontal direction, or determine the second coding units 750a, 750b, 750c and 750d by dividing the first coding unit 700 in both the vertical and horizontal directions.
[0172] Reference Figure 7 The image decoding device 100 can determine to process the second coding units 710a and 710b, determined by dividing the first coding unit 700 in the vertical direction, in a horizontal direction sequence 710c. The image decoding device 100 can determine to process the second coding units 730a and 730b, determined by dividing the first coding unit 700 in the horizontal direction, in a vertical direction sequence 730c. The image decoding device 100 can determine to process the second coding units 750a, 750b, 750c, and 750d, determined by dividing the first coding unit 700 in both the vertical and horizontal directions, in a predetermined order (e.g., raster scan order or zigzag scan order 750e) after processing the coding units in one row and then processing the coding units in the next row.
[0173] According to an embodiment, the image decoding device 100 can recursively divide encoding units. (Refer to...) Figure 7 The image decoding device 100 can determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d by dividing a first coding unit 700, and can recursively divide each of the determined plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The method of dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can correspond to the method of dividing the first coding unit 700. Therefore, each of the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can be independently divided into a plurality of coding units. (Refer to...) Figure 8 The image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, and can determine whether to divide or not divide each of the second coding units 710a and 710b independently.
[0174] According to an embodiment, the image decoding device 100 can determine the third coding units 720a and 720b by dividing the left second coding unit 710a in the horizontal direction, and may not divide the right second coding unit 710b.
[0175] According to an embodiment, the processing order of coding units can be determined based on the process of dividing coding units. In other words, the processing order of the divided coding units can be determined based on the processing order of the coding units immediately preceding the division. The image decoding device 100 can determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Because the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b can be processed in the vertical direction order 720c. Because the left second coding unit 710a and the right second coding unit 710b are processed in the horizontal direction order 710c, the right second coding unit 710b can be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in the vertical direction order 720c. The operation of determining the processing order of coding units based on the coding units before division is not limited to the above example, and it should be understood that various methods can be used to process the coding units that have been divided and determined to be of various shapes independently in a predetermined order.
[0176] Figure 8 The illustration shows a process performed by an image decoding device 100 according to an embodiment, in which the current encoding unit is determined to be divided into an odd number of encoding units when the encoding units cannot be processed in a predetermined order.
[0177] According to an embodiment, the image decoding device 100 can determine whether the current coding unit is divided into an odd number of coding units based on the obtained partition shape pattern information. (See also...) Figure 8 The square first coding unit 800 can be divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b can be independently divided into third coding units 820a and 820b, as well as 820c, 820d, and 820e. According to an embodiment, the image decoding device 100 can determine a plurality of third coding units 820a and 820b by dividing the left second coding unit 810a in the horizontal direction, and can divide the right second coding unit 810b into an odd number of third coding units 820c to 820e.
[0178] According to an embodiment, the image decoding device 100 can determine whether any coding unit is divided into an odd number of coding units by determining whether the third coding units 820a and 820b, as well as 820c, 820d, and 820e, can be processed in a predetermined order. (See also...) Figure 9 The image decoding device 100 can determine the third coding units 820a and 820b, as well as 820c, 820d, and 820e, by recursively dividing the first coding unit 800. The image decoding device 100 can determine whether any one of the following coding units is divided into an odd number of coding units based on at least one of block shape information and division shape pattern information: the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a and 820b, as well as 820c, 820d, and 820e. For example, the rightmost second coding unit 810b of the second coding units 810a and 810b can be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the plurality of encoding units included in the first encoding unit 800 may be a predetermined order (e.g., zigzag scanning order 830), and the image decoding device 100 may determine whether the third encoding units 820c, 820d, and 820e, determined by dividing the right second encoding unit 810b into an odd number of encoding units, meet the conditions for processing in a predetermined order.
[0179] According to an embodiment, the image decoding device 100 can determine whether the third encoding units 820a and 820b, as well as 820c, 820d and 820e included in the first encoding unit 800, satisfy a condition for processing in a predetermined order, and this condition is related to whether at least one of the width and height of the second encoding units 810a and 810b is halved along the boundary of the third encoding units 820a and 820b, as well as 820c, 820d and 820e. For example, the third encoding units 820a and 820b determined when the height of the non-square-shaped left second encoding unit 810a is halved can satisfy the condition. Because the boundary of the third encoding units 820c, 820d and 820e determined when the right second encoding unit 810b is divided into three encoding units fails to halve the width or height of the right second encoding unit 810b, it can be determined that the third encoding units 820c, 820d and 820e do not satisfy the condition. When the condition described above is not met, the image decoding device 100 can determine that the scanning order is discontinuous, and can determine, based on the determination result, that the right-side second coding unit 810b is divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose a predetermined restriction on the coding units at predetermined positions in the divided coding units, and this restriction or the predetermined position has been described above with respect to various embodiments, so its detailed description is not provided here.
[0180] Figure 9 The illustration shows a process performed by an image decoding device 100 according to an embodiment, which involves dividing a first encoding unit 900 to determine at least one encoding unit.
[0181] According to an embodiment, the image decoding device 100 can divide the first coding unit 900 based on the division shape pattern information obtained by the bitstream acquirer 110. The square first coding unit 900 can be divided into four square coding units, or it can be divided into multiple non-square coding units. For example, referring to… Figure 9 When the shape pattern information indicates that the first coding unit 900 should be divided into non-square coding units, the image decoding device 100 can divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the shape pattern information indicates that an odd number of coding units should be determined by dividing the first coding unit 900 in the horizontal or vertical direction, the image decoding device 100 can divide the square first coding unit 900 into an odd number of coding units, namely, second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in the vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction.
[0182] According to an embodiment, the image decoding device 100 can determine whether second encoding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first encoding unit 900 meet a condition for processing in a predetermined order, and this condition is related to whether at least one of the width and height of the first encoding unit 900 is divided in half along the boundaries of the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c. (Refer to...) Figure 9Because the boundaries of the second coding units 910a, 910b, and 910c, defined by the first coding unit 900 dividing the square in the vertical direction, do not halve the width of the first coding unit 900, it can be determined that the first coding unit 900 does not meet the conditions for processing in a predetermined order. Furthermore, because the boundaries of the second coding units 920a, 920b, and 920c, defined by the first coding unit 900 dividing the square in the horizontal direction, do not halve the height of the first coding unit 900, it can be determined that the first coding unit 900 does not meet the conditions for processing in a predetermined order. When these conditions are not met as described above, the image decoding device 100 can determine that the scanning order is discontinuous and can determine, based on the determination result, that the first coding unit 900 is divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose a predetermined restriction on the coding units at predetermined positions within the divided coding units, and this restriction or predetermined position has already been described above with respect to various embodiments, therefore its detailed description is not provided here.
[0183] According to an embodiment, the image decoding device 100 can determine coding units of various shapes by dividing a first coding unit.
[0184] Reference Figure 10 The image decoding device 100 can divide the square first coding unit 900 or the non-square first coding unit 930 or 950 into coding units of various shapes.
[0185] Figure 11 The embodiment shows that when the second encoding unit, which is determined by the image decoding device 100 to divide the first encoding unit 1000 and has a non-square shape, meets predetermined conditions, the shape into which the second encoding unit can be divided is limited.
[0186] According to an embodiment, the image decoding device 100 can determine, based on the partition shape pattern information obtained by the bitstream acquirer 110, to divide the square first coding unit 1000 into non-square second coding units 1010a, 1010b, 1020a, and 1020b. The second coding units 1010a, 1010b, 1020a, and 1020b can be divided independently. Therefore, the image decoding device 100 can determine, based on the partition shape pattern information of each of the second coding units 1010a, 1010b, 1020a, and 1020b, whether to divide each of the second coding units 1010a, 1010b, 1020a, and 1020b into multiple coding units or not to divide each of the second coding units 1010a, 1010b, 1020a, and 1020b. According to an embodiment, the image decoding device 100 can determine the third coding units 1012a and 1012b by dividing the non-square left second coding unit 1010a, which is determined by dividing the first coding unit 1000 in the vertical direction, in the horizontal direction. However, when the left second coding unit 1010a is divided in the horizontal direction, the image decoding device 100 can restrict the right second coding unit 1010b to not be divided in the horizontal direction in which the left second coding unit 1010a is divided. When the third coding units 1014a and 1014b are determined by dividing the right second coding unit 1010b in the same direction, the third coding units 1012a and 1012b or 1014a and 1014b can be determined in such a way that the left second coding unit 1010a and the right second coding unit 1010b are divided independently in the horizontal direction. However, this situation works in the same way as when the image decoding device 100 divides the first encoding unit 1000 into four squares, namely the second encoding units 1030a, 1030b, 1030c and 1030d, based on the division shape pattern information, and may be inefficient in terms of image decoding.
[0187] According to an embodiment, the image decoding device 100 can determine the third coding units 1022a and 1022b, or 1024a and 1024b, by dividing the non-square second coding units 1020a or 1020b, which are determined by dividing the first coding unit 1000 in the horizontal direction, in the vertical direction. However, when the second coding unit (e.g., the upper second coding unit 1020a) is divided in the vertical direction, for the reasons described above, the image decoding device 100 can restrict another second coding unit (e.g., the lower second coding unit 1020b) to not be divided in the vertical direction in which the upper second coding unit 1020a is divided.
[0188] Figure 12The illustration shows a process performed by an image decoding device 100 according to an embodiment, whereby the division shape pattern information can indicate that a square coding unit should not be divided into four square coding units, and the process of dividing a square coding unit is performed.
[0189] According to an embodiment, the image decoding device 100 can determine second coding units 1110a, 1110b, 1120a, 1120b, etc., by dividing the first coding unit 1100 based on division shape pattern information. The division shape pattern information may include information about various methods of dividing the coding units, but may not include information for dividing the coding unit into four square coding units. Based on such division shape pattern information, the image decoding device 100 may not divide the square first coding unit 1100 into four square coding units 1130a, 1130b, 1130c, and 1130d. Based on the division shape pattern information, the image decoding device 100 can determine non-square second coding units 1110a, 1110b, 1120a, 1120b, etc.
[0190] According to an embodiment, the image decoding device 100 can independently divide non-square second coding units 1110a, 1110b, 1120a, 1120b, etc. Each of the second coding units 1110a, 1110b, 1120a, 1120b, etc. can be recursively divided in a predetermined order, and this division method can correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.
[0191] For example, the image decoding device 100 can determine the third coding units 1112a and 1112b of the square by dividing the left second coding unit 1110a in the horizontal direction, and can determine the third coding units 1114a and 1114b of the square by dividing the right second coding unit 1110b in the horizontal direction. Furthermore, the image decoding device 100 can determine the third coding units 1116a, 1116b, 1116c, and 1116d of the square by dividing both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction. In this case, coding units with the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 can be determined.
[0192] In another example, the image decoding device 100 can determine the third coding units 1122a and 1122b of the square by dividing the upper second coding unit 1120a in the vertical direction, and can determine the third coding units 1124a and 1124b of the square by dividing the lower second coding unit 1120b in the vertical direction. Furthermore, the image decoding device 100 can determine the third coding units 1126a, 1126b, 1126c, and 1126d of the square by dividing both the upper second coding unit 1120a and the lower second coding unit 1120b in the vertical direction. In this case, coding units with the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 can be determined.
[0193] Figure 12 The processing order among multiple coding units according to the embodiment is shown to be changed according to the process of dividing the coding units.
[0194] According to an embodiment, the image decoding device 100 may divide the first coding unit 1200 based on division shape pattern information. When the block shape indicates a square shape and the division shape pattern information indicates that the first coding unit 1200 is divided in at least one direction, either horizontal or vertical, the image decoding device 100 may determine a second coding unit (e.g., second coding units 1210a, 1210b, 1220a, 1220b, etc.) by dividing the first coding unit 1200. (See also...) Figure 11 The non-square second coding units 1210a, 1210b, 1220a, and 1220b, determined by dividing the first coding unit 1200 only in the horizontal or vertical direction, can be independently divided based on the division shape pattern information of each coding unit. For example, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. (The above has already been referred to...) Figure 7 The operation of dividing the second coding units 1210a, 1210b, 1220a and 1220b is described, so its detailed description is not provided here.
[0195] According to an embodiment, the image decoding device 100 can process the encoding units in a predetermined order. (See above for reference.) Figure 12The operation of processing encoded units in a predetermined order is described, therefore its detailed description is not provided here. (See reference...) Figure 12 The image decoding device 100 can determine the third encoding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, of the four squares by dividing the first encoding unit 1200 into squares. According to an embodiment, the image decoding device 100 can determine the processing order of the third encoding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, based on the division method of the first encoding unit 1200.
[0196] According to an embodiment, the image decoding device 100 can determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can process the third coding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.
[0197] According to an embodiment, the image decoding device 100 can determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c, and 1226d in the following processing order 1227: firstly, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.
[0198] Reference Figure 13The square third coding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, can be determined by dividing the second coding units 1210a and 1210b, and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b are determined by dividing the first coding unit 1200 in the vertical direction, unlike the second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, derived from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b, ultimately show coding units of the same shape derived from the first coding unit 1200. Therefore, by recursively dividing the coding units in different ways based on the division shape pattern information, the image decoding device 100 can process multiple coding units in different orders even if the coding units are ultimately determined to be the same shape.
[0199] Figure 13 The illustration shows a process for determining the depth of a coding unit when the shape and size of the coding unit change, according to an embodiment, as the coding unit is recursively divided such that multiple coding units are determined.
[0200] According to an embodiment, the image decoding device 100 can determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion can be the length of the long side of the coding unit. When the length of the long side of the coding unit before it was divided is 2n (n>0) times the length of the long side of the current coding unit after the division, the image decoding device 100 can determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before the division. In the following, the coding unit with the increased depth is referred to as a deeper coding unit.
[0201] Reference Figure 14According to an embodiment, the image decoding device 100 can determine deeper second and third coding units 1302 and 1304 by dividing a first coding unit 1300 of a square based on block shape information indicating the shape of the square (e.g., the block shape information may be represented as "0:SQUARE"). Assuming the size of the first coding unit 1300 of the square is 2N×2N, the second coding unit 1302, 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, 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 are 1 / 4 times the width and height of the first coding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, whose width and height are 1 / 2 times the width and height of the first coding unit 1300, can be D+1, and the depth of the third coding unit 1304, whose width and height are 1 / 4 times the width and height of the first coding unit 1300, can be D+2.
[0202] According to an embodiment, the image decoding device 100 can determine a deeper second encoding unit 1312 or 1322 and a third encoding unit 1314 or 1324 by dividing a non-square first encoding unit 1310 or 1320 based on block shape information indicating a non-square shape (for example, the block shape information may be represented as "1:NS_VER" indicating a non-square shape with a height longer than its width, or "2:NS_HOR" indicating a non-square shape with a width longer than its height).
[0203] The image decoding device 100 can determine the second encoding unit 1302, 1312, or 1322 by dividing the width and height of the first encoding unit 1310, which has a size of N×2N. That is, the image decoding device 100 can determine the second encoding unit 1302 or the second encoding unit 1322 with a size of N×N by dividing the first encoding unit 1310 in the horizontal direction, or it can determine the second encoding unit 1312 with a size of N / 2×N by dividing the first encoding unit 1310 in both the horizontal and vertical directions.
[0204] According to an embodiment, the image decoding device 100 can determine a second encoding unit (e.g., second encoding units 1302, 1312, 1322, etc.) by dividing the width and height of a first encoding unit 1320 with a size of 2N×N. That is, the image decoding device 100 can determine a second encoding unit 1302 with a size of N×N or a second encoding unit 1312 with a size of N / 2×N by dividing the first encoding unit 1320 in the vertical direction, or it can determine a second encoding unit 1322 with a size of N×N / 2 by dividing the first encoding unit 1320 in both the horizontal and vertical directions.
[0205] According to an embodiment, the image decoding device 100 can determine a third encoding unit (1304, 1314, or 1324) by dividing the width and height of a second encoding unit 1302 with a size of N×N. That is, the image decoding device 100 can determine a third encoding unit 1304 with a size of N / 2×N / 2, a third encoding unit 1314 with a size of N / 4×N / 2, or a third encoding unit 1324 with a size of N / 2×N / 4 by dividing the second encoding unit 1302 in the vertical and horizontal directions.
[0206] According to an embodiment, the image decoding device 100 can determine a third encoding unit (e.g., a third encoding unit 1304, 1314, or 1324) by dividing the width and height of a second encoding unit 1312 with a size of N / 2 × N. That is, the image decoding device 100 can determine a third encoding unit 1304 with a size of N / 2 × N / 2 or a third encoding unit 1324 with a size of N / 2 × N / 4 by dividing the second encoding unit 1312 in the horizontal direction, or it can determine a third encoding unit 1314 with a size of N / 4 × N / 2 by dividing the second encoding unit 1312 in both the vertical and horizontal directions.
[0207] According to an embodiment, the image decoding device 100 can determine a third coding unit (e.g., a third coding unit 1304, 1314, 1324, etc.) by dividing the width and height of a second coding unit 1322 with a size of N×N / 2. That is, the image decoding device 100 can determine a third coding unit 1304 with a size of N / 2×N / 2 or a third coding unit 1314 with a size of N / 4×N / 2 by dividing the second coding unit 1322 in the vertical direction, or it can determine a third coding unit 1324 with a size of N / 2×N / 4 by dividing the second coding unit 1322 in both the vertical and horizontal directions.
[0208] According to an embodiment, the image decoding device 100 can divide square coding units (1300, 1302, or 1304) in the horizontal or vertical direction. For example, the image decoding device 100 can determine a first coding unit 1310 of size N×2N by dividing a first coding unit 1300 of size 2N×2N in the vertical direction, or it can determine a first coding unit 1320 of size 2N×N by dividing a first coding unit 1300 of size 2N×2N in the horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing a first coding unit 1300 of size 2N×2N in the horizontal or vertical direction can be the same as the depth of the first coding unit 1300.
[0209] According to an embodiment, the width and height of the third coding unit 1314 or 1324 can be 1 / 4 times the width and height of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322, whose width and height are 1 / 2 times the width and height of the first coding unit 1310 or 1320, can be D+1, and the depth of the third coding unit 1314 or 1324, whose width and height are 1 / 4 times the width and height of the first coding unit 1310 or 1320, can be D+2.
[0210] Figure 14 The diagram illustrates a depth that can be determined based on the shape and size of the coding unit, and a partial index (PID) used to distinguish the coding units, according to an embodiment.
[0211] According to an embodiment, the image decoding device 100 can determine second coding units of various shapes by dividing a first coding unit 1400 into squares. (See also...) Figure 14 The image decoding device 100 can determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c and 1406d by dividing the first coding unit 1400 in at least one direction, either vertical or horizontal, based on the division shape pattern information. In other words, the image decoding device 100 can determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c and 1406d based on the division shape pattern information of the first coding unit 1400.
[0212] According to an embodiment, the depths of the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d, determined based on the division shape pattern information of the square first coding unit 1400, can be determined based on the length of their longer sides. For example, since the length of the side of the square first coding unit 1400 is equal to the length of the longer side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b can have the same depth, such as D. However, when the image decoding device 100 divides the first encoding unit 1400 into four square second encoding units 1406a, 1406b, 1406c and 1406d based on the division shape pattern information, the depth of the second encoding units 1406a, 1406b, 1406c and 1406d can be D+1 deeper than the depth D of the first encoding unit 1400 because the length of the side of the square second encoding units 1406a, 1406b, 1406c and 1406d is 1 / 2 times the length of the side of the first encoding unit 1400.
[0213] According to an embodiment, the image decoding device 100 can determine a plurality of second encoding units 1412a and 1412b, as well as 1414a, 1414b, and 1414c, by dividing a first encoding unit 1410 in the horizontal direction with a height greater than its width based on division shape pattern information. According to an embodiment, the image decoding device 100 can determine a plurality of second encoding units 1422a and 1422b, as well as 1424a, 1424b, and 1424c, by dividing a first encoding unit 1420 in the vertical direction with a width greater than its height based on division shape pattern information.
[0214] According to an embodiment, the depths of the second coding units 1412a and 1412b, and 1414a, 1414b and 1414c, or 1422a and 1422b, and 1424a, 1424b and 1424c, determined based on the division shape pattern information of the non-square first coding unit 1410 or 1420, can be determined based on the length of their longer sides. For example, since the length of the side of the square second coding units 1412a and 1412b is half the length of the longer side of the non-square first coding unit 1410 whose height is greater than its width, the depth of the square second coding units 1412a and 1412b is D+1 deeper than the depth D of the non-square first coding unit 1410.
[0215] Furthermore, the image decoding device 100 can divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division shape pattern information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are 1 / 2 times the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c can be D+1, which is 1 deeper than the depth D of the non-square first coding unit 1410. The image decoding device 100 can determine the depth of the coding unit divided from the first coding unit 1420, which has a width longer than its height and has a non-square shape, by using the method described above for determining the depth of the coding unit divided from the first coding unit 1410.
[0216] According to an embodiment, when an odd number of the divided coding units do not have equal sizes, the image decoding device 100 can determine the PID used to identify the divided coding units based on the size ratio between the coding units. (See also...) Figure 14 In an odd-numbered set of coding units 1414a, 1414b, and 1414c, the width of the central coding unit 1414b can be equal to the width of the other coding units 1414a and 1414c, and its height can be twice the height of the other coding units 1414a and 1414c. That is, in this case, the central coding unit 1414b can include either two other coding units 1414a or 1414c. Therefore, when the PID of the central coding unit 1414b is 1 based on the scan order, the PID of the coding unit 1414c adjacent to the central coding unit 1414b can be increased by 2 and thus can be 3. That is, there may be discontinuous PID values. According to an embodiment, the image decoding device 100 can determine whether the odd-numbered coding units do not have equal sizes based on whether there is a discontinuity in the PID used to identify the divided coding units.
[0217] According to an embodiment, the image decoding device 100 may determine whether to use a specific partitioning method based on PID values used to identify multiple coding units determined by partitioning the current coding unit. (See also...) Figure 14The image decoding device 100 can determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b, and 1414c by dividing a first coding unit 1410 having a rectangular shape with a height longer than its width. The image decoding device 100 can use a PID indicating each coding unit to identify it. According to an embodiment, the PID can be obtained from a sample at a predetermined position (e.g., the upper left sample) of each coding unit.
[0218] According to an embodiment, the image decoding device 100 can determine the coding unit at a predetermined position within the divided coding units by using a PID for distinguishing coding units. According to an embodiment, when the division shape pattern information of a first coding unit 1410 having a rectangular shape with a height longer than its width indicates that the coding unit should be divided into three coding units, the image decoding device 100 can divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 can assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 can compare the PIDs of an odd number of divided coding units to determine the coding unit at the center position within the coding units. The image decoding device 100 can determine the coding unit 1414b corresponding to the median value of the PIDs of the coding units as the coding unit at the predetermined position within the coding units determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding device 100 can determine a PID for distinguishing the divided coding units based on the size ratio between the coding units. (Refer to...) Figure 15The width of the coding unit 1414b generated by dividing the first coding unit 1410 can be equal to the width of the other coding units 1414a and 1414c, and its height can be twice the height of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c adjacent to the coding unit 1414b can be increased by 2 and therefore can be 3. When the PID does not increase uniformly as described above, the image decoding device 100 can determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units includes coding units having dimensions different from those of other coding units. According to an embodiment, when the division shape pattern information indicates that the coding unit is divided into an odd number of coding units, the image decoding device 100 can divide the current coding unit in such a way that the coding unit at a predetermined position in the odd number of coding units (e.g., the coding unit at the center position) has a dimension different from that of other coding units. In this case, the image decoding device 100 can determine the coding unit at the center position with a different dimension by using the PID of the coding unit. However, the PID and the size or position of the encoding unit at the predetermined position are not limited to the examples above, and various PIDs, positions and sizes of encoding units can be used.
[0219] According to an embodiment, the image decoding device 100 may use a predetermined data unit, in which encoding units are recursively divided.
[0220] Figure 15 The illustration shows how multiple encoding units are determined based on multiple predetermined data units included in the screen, according to an embodiment.
[0221] According to an embodiment, a specific data unit can be defined as a data unit that recursively divides coding units by using division shape pattern information. That is, a predetermined data unit may correspond to the highest-depth coding unit, which is used to determine multiple coding units divided from the current frame. In the following description, for ease of description, the predetermined data unit is referred to as a reference data unit.
[0222] According to an embodiment, the reference data unit may have a predetermined size and a predetermined shape. According to an embodiment, the reference data unit may include M×N sample points. Here, M and N may be equal to each other and may be integers represented as powers of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of encoding units.
[0223] According to an embodiment, the image decoding device 100 can divide the current frame into multiple reference data units. According to an embodiment, the image decoding device 100 can divide the multiple reference data units from the current frame using the division shape pattern information of each reference data unit. The operation of dividing the reference data units can correspond to a division operation using a quadtree structure.
[0224] According to an embodiment, the image decoding device 100 may previously determine the minimum permissible size of the reference data units included in the current frame. Therefore, the image decoding device 100 may determine reference data units having a size equal to or greater than the minimum size, and may determine one or more coding units by referring to the determined reference data units and using partitioning shape pattern information.
[0225] Reference Figure 3 The image decoding device 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined based on various data units (e.g., sequences, frames, stripes, strip segments, parallel blocks, parallel block groups, maximum coding units, etc.) that can include one or more reference coding units.
[0226] According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can obtain from the bitstream at least one of reference coding unit shape information and reference coding unit size information for each of various data units. (See above for reference...) Figure 4 The operation of dividing the current coding unit 300 describes the operation of dividing the square reference coding unit 1500 into one or more coding units, and has already been referred to above. Figure 12 The operation of dividing the current coding unit 400 or 450 describes the operation of dividing the non-square reference coding unit 1502 into one or more coding units. Therefore, its detailed description is not provided here.
[0227] According to an embodiment, the image decoding device 100 can use a PID (PID) for identifying the size and shape of a reference coding unit to determine the size and shape of the reference coding unit based on some data units previously determined based on predetermined conditions. That is, the bitstream acquirer 110 can obtain from the bitstream only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, parallel block, parallel block group, or maximum coding unit, wherein the slice, slice segment, parallel block, parallel block group, or maximum coding unit is a data unit (e.g., a data unit with a size equal to or smaller than the slice) among various data units (e.g., a sequence, a frame, a slice, a slice segment, a parallel block, a parallel block group, a maximum coding unit, etc.) that meets predetermined conditions. The image decoding device 100 can determine the size and shape of the reference data unit for each data unit that meets the predetermined conditions by using the PID. When obtaining and using reference coding unit shape information and reference coding unit size information from the bitstream based on each data unit with a relatively small size, the efficiency of using the bitstream may be low, and therefore, only the PID can be obtained and used, rather than directly obtaining the reference coding unit shape information and reference coding unit size information. In this case, at least one of the dimensions and shapes of the reference coding unit corresponding to the PID used to identify the dimensions and shape of the reference coding unit can be determined previously. That is, the image decoding device 100 can determine at least one of the dimensions and shapes of the reference coding unit included in the data unit used as the unit for obtaining the PID by selecting at least one of the previously determined dimensions and shapes of the reference coding unit based on the PID.
[0228] According to embodiments, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit 1510. That is, the maximum coding unit divided from the image may include one or more reference coding units, and the coding unit can be determined by recursively dividing each reference coding unit. According to embodiments, at least one of the width and height of the maximum coding unit may be an integer multiple of at least one of the width and height of the reference coding unit. According to embodiments, the size of the reference coding unit can be obtained by dividing the maximum coding unit 0 n times based on a quadtree structure. That is, according to various embodiments, the image decoding device 100 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and may divide the reference coding unit based on at least one of block shape information and division shape pattern information.
[0229] According to an embodiment, the image decoding device 100 can obtain block shape information indicating the shape of the current coding unit or partition shape pattern information indicating the partitioning method of the current coding unit from the bitstream, and can use the obtained information. The partition shape pattern information can be included in the bitstream associated with various data units. For example, the image decoding device 100 can use partition shape pattern information included in sequence parameter sets, picture parameter sets, video parameter sets, strip headers, strip segment headers, parallel block headers, or parallel block group headers. Furthermore, the image decoding device 100 can obtain syntax elements corresponding to the block shape information or partition shape pattern information from the bitstream based on each maximum coding unit or each reference coding unit, and can use the obtained syntax elements.
[0230] The method for determining partitioning rules according to embodiments of the present disclosure will be described in detail below.
[0231] Image decoding device 100 can determine the partitioning rules of an image. The partitioning rules can previously be determined between image decoding device 100 and image encoding device 200. Image decoding device 100 can determine the partitioning rules based on information obtained from the bitstream. Image decoding device 100 can determine the partitioning rules based on information obtained from at least one of sequence parameter set, picture parameter set, video parameter set, strip header, strip segment header, parallel block header, or parallel block group header. Image decoding device 100 can determine different partitioning rules based on frames, stripes, parallel blocks, time layers, maximum coding units, or coding units.
[0232] Image decoding device 100 may determine partitioning rules based on the block shape of the coding unit. The block shape may include the size, shape, aspect ratio, and orientation of the coding unit. Image encoding device 200 and image decoding device 100 may previously determine partitioning rules based on block shape information of the coding unit. However, this disclosure is not limited thereto. Image decoding device 100 may determine partitioning rules based on information obtained from a bitstream received from image encoding device 200.
[0233] The shape of the encoding unit can be square or non-square. When the width and height of the encoding unit are the same, the image decoding device 100 can determine that the shape of the encoding unit is square. Furthermore, when the width and height of the encoding unit are not the same, the image decoding device 100 can determine that the shape of the encoding unit is non-square.
[0234] The size of the coding unit can include various sizes, such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, ..., and 256×256. The size of the coding unit can be classified based on the length of its long side, the length of its short side, or its area. The image decoding device 100 can apply the same classification rules to coding units classified into the same group. For example, the image decoding device 100 can classify coding units with the same long side length as having the same size. Furthermore, the image decoding device 100 can apply the same classification rules to coding units with the same long side length.
[0235] The aspect ratio of the coding unit can include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, 1:32, etc. Furthermore, the orientation of the coding unit can include horizontal and vertical directions. A horizontal orientation indicates that the width of the coding unit is longer than its height. A vertical orientation indicates that the width of the coding unit is shorter than its height.
[0236] The image decoding device 100 can adaptively determine the partitioning rules based on the size of the coding unit. The image decoding device 100 can determine the permissible partitioning shape patterns based on different coding unit sizes. For example, the image decoding device 100 can determine whether partitioning is permissible based on the size of the coding unit. The image decoding device 100 can determine the partitioning direction based on the size of the coding unit. The image decoding device 100 can determine the permissible partitioning type based on the size of the coding unit.
[0237] The partitioning rule determined based on the size of the coding unit can be a pre-determined partitioning rule between the image encoding device 200 and the image decoding device 100. Alternatively, the image decoding device 100 can determine the partitioning rule based on information obtained from the bitstream.
[0238] The image decoding device 100 can adaptively determine the partitioning rules based on the position of the coding units in the image.
[0239] Furthermore, the image decoding device 100 can determine partitioning rules such that coding units generated via different partitioning paths do not have the same block shape. However, this disclosure is not limited to this, and coding units generated via different partitioning paths may have the same block shape. Coding units generated via different partitioning paths may have different decoding processing orders. As already referred to above... Figure 16 The decoding process order has been described, so its detailed description is not provided here.
[0240] Figure 16The diagram illustrates the coding units that can be determined in each frame when the combination of shapes into which the coding units can be divided differs for each frame, according to an embodiment.
[0241] Reference Figure 17 The image decoding device 100 can determine that the combination of partition shapes into which the encoding units can be divided is different in each frame. For example, the image decoding device 100 can decode an image by using a frame 1600 that can be divided into four encoding units, a frame 1610 that can be divided into two or four encoding units, and a frame 1620 that can be divided into two, three, or four encoding units, all included in at least one frame in the image. To divide the frame 1600 into multiple encoding units, the image decoding device 100 can use only the partition shape information indicating that it is divided into four square encoding units. To partition the frame 1610, the image decoding device 100 can use only the partition shape information indicating that it is divided into two or four encoding units. To partition the frame 1620, the image decoding device 100 can use only the partition shape information indicating that it is divided into two, three, or four encoding units. The combination of partition shapes is only an embodiment used to describe the operation of the image decoding device 100, and therefore, the combination of partition shapes should not be construed as being limited to this embodiment, and it should be understood that various combinations of partition shapes can be used in each predetermined data unit.
[0242] According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can acquire a bitstream including an index indicating a combination of partition shape information for each predetermined data unit (e.g., each sequence, each frame, each strip, each strip segment, each parallel block, each parallel block group, etc.). For example, the bitstream acquirer 110 can acquire the index indicating the combination of partition shape information from a sequence parameter set, a frame parameter set, a strip header, a parallel block header, or a parallel block group header. By using the acquired index, the image decoding device 100 can determine the combination of partition shapes into which the encoding unit can be divided in each predetermined data unit, and therefore, different combinations of partition shapes can be used in each predetermined data unit.
[0243] Figure 17 Various shapes of coding units, which can be determined based on partition shape pattern information that can be represented as binary code, are shown according to embodiments.
[0244] According to an embodiment, the image decoding device 100 can divide the encoding unit into various shapes using block shape information and partition shape pattern information obtained via the bitstream acquirer 110. The shapes into which the encoding unit can be divided can correspond to various shapes including those described above in the embodiments.
[0245] Reference Figure 17The image decoding device 100 can divide square coding units along at least one of the horizontal and vertical directions based on the division shape pattern information, and can divide non-square coding units along either the horizontal or vertical direction.
[0246] According to an embodiment, when the image decoding device 100 is able to divide a square coding unit into four square coding units along the horizontal and vertical directions, the division shape indicated by the division shape pattern information for the square coding unit can be four shapes. According to an embodiment, the division shape pattern information can be represented as a 2-bit binary code, and the binary code can be assigned to each division shape. For example, when the coding unit is not divided, the division shape pattern information can be represented as (00)b; when the coding unit is divided along the horizontal and vertical directions, the division shape pattern information can be represented as (01)b; when the coding unit is divided along the horizontal direction, the division shape pattern information can be represented as (10)b; and when the coding unit is divided along the vertical direction, the division shape pattern information can be represented as (11)b.
[0247] According to an embodiment, when the image decoding device 100 divides a non-square coding unit along a horizontal or vertical direction, the division shape type, which can be indicated by the division shape pattern information, can be determined based on the number of times the coding unit is divided. (Refer to...) Figure 17 According to an embodiment, the image decoding device 100 may divide a non-square coding unit into three coding units. The image decoding device 100 may divide a coding unit into two coding units, and in this case, the division shape pattern information may be represented as (10)b. The image decoding device 100 may divide a coding unit into three coding units, and in this case, the division shape pattern information may be represented as (11)b. The image decoding device 100 may determine not to divide the coding unit, and in this case, the division shape pattern information may be represented as (0)b. That is, the image decoding device 100 may not use fixed-length coding (FLC), but may use variable-length coding (VLC) to use binary codes indicating the division shape pattern information.
[0248] According to the embodiments, refer to Figure 17 The binary code indicating the partition shape pattern information without dividing the coding unit can be represented as (0)b. When the binary code indicating the partition shape pattern information without dividing the coding unit is set to (00)b, the 2-bit binary code of the partition shape pattern information should be used even if there is no partition shape pattern information set to (01)b. However, as... Figure 17As shown, when using three partition shapes for non-square coding units, even when a 1-bit binary code (0)b is used as partition shape pattern information, the image decoding device 100 can determine that the coding unit is not partitioned, thus allowing efficient use of the bitstream. However, this should not be interpreted as the partition shape of the non-square coding unit indicated by the partition shape pattern information being limited to... Figure 18 The three shapes shown are to be interpreted as corresponding to various shapes including the embodiments described above.
[0249] Figure 18 Other shapes of coding units, which can be determined based on partition shape pattern information that can be represented as binary code, are shown according to embodiments.
[0250] Reference Figure 18 The image decoding device 100 can divide square coding units along the horizontal or vertical direction based on the division shape pattern information, and can also divide non-square coding units along the horizontal or vertical direction. That is, the division shape pattern information can indicate that the square coding units are divided in one direction. In this case, the binary code indicating the division shape pattern information that does not divide square coding units can be represented as (0)b. When the binary code indicating the division shape pattern information that does not divide coding units is set to (00)b, the 2-bit binary code of the division shape pattern information should be used even when there is no division shape pattern information set to (01)b. However, as Figure 18 As shown, when using three partition shapes for a square coding unit, even when a 1-bit binary code (0)b is used as partition shape pattern information, the image decoding device 100 can determine that the coding unit is not partitioned, thus allowing efficient use of the bitstream. However, this should not be interpreted as the partition shape of the square coding unit indicated by the partition shape pattern information being limited to... Figure 17 The three shapes shown are to be interpreted as corresponding to various shapes including the embodiments described above.
[0251] According to an embodiment, block shape information or partition shape pattern information can be represented using binary code, and such information can be directly generated as a bitstream. Alternatively, the block shape information or partition shape pattern information that can be represented as binary code may not be directly generated as a bitstream, but may be used as binary code to be input into Context Adaptive Binary Arithmetic Code (CABAC).
[0252] According to an embodiment, the processing of the image decoding device 100 to obtain block shape information or partition shape pattern information via CABAC will now be described. A bitstream including binary code for the syntax can be obtained by a bitstream acquirer 110. The image decoding device 100 can detect syntax elements indicating block shape information or partition shape pattern information by performing debinarization on the binary bit strings included in the obtained bitstream. According to an embodiment, the image decoding device 100 can compute a set of binary bit strings corresponding to the syntax element to be decoded, and can decode each binary bit by using probability information. The image decoding device 100 can repeat the decoding operation until the binary bit string configured with such decoded binary bits becomes equal to one of the pre-computed binary bit strings. The image decoding device 100 can determine the syntax element by performing debinarization on the binary bit string.
[0253] According to an embodiment, image decoding device 100 can determine the syntax of a binary bit string by performing decoding processing using adaptive binary arithmetic encoding. Image decoding device 100 can update the probabilistic model of the binary bits obtained via bitstream acquirer 110. (Refer to...) Figure 17 According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can acquire a bitstream indicating binary code, wherein the binary code indicates segmentation shape pattern information. The image decoding device 100 can determine the syntax of the segmentation shape pattern information by using binary code having 1 bit or 2 bits. To determine the syntax of the segmentation shape pattern information, the image decoding device 100 can update the probability of each bit in the 2-bit binary code. That is, the image decoding device 100 can update the probability that the next binary bit will have a value of 0 or 1 during decoding based on whether the value of the first binary bit in the 2-bit binary code is 0 or 1.
[0254] According to an embodiment, in the process of determining the grammar, the image decoding device 100 can update the probability of the binary bits used in the process of decoding the binary bits of the binary bit string about the grammar, and the image decoding device 100 can determine that the probability of a particular bit in the binary bit string is not updated and that the particular bit has the same probability.
[0255] Reference Figure 19In the process of determining the syntax by using a binary bit string indicating the partitioning shape pattern information of a non-square coding unit, when the non-square coding unit is not partitioned, the image decoding device 100 can determine the syntax of the partitioning shape pattern information by using a binary bit with a value of 0. That is, when the block shape information indicates that the current coding unit is a non-square coding unit, the first binary bit of the binary bit string regarding the partitioning shape pattern information can be 0 when the non-square coding unit is not partitioned, and can be 1 when the non-square coding unit is partitioned into two or three coding units. Therefore, the probability that the first binary bit of the binary bit string regarding the partitioning shape pattern information of a non-square coding unit is 0 can be 1 / 3, and the probability that the first binary bit is 1 can be 2 / 3. As described above, the partitioning shape pattern information indicating that the non-square coding unit is not partitioned can be represented by only a 1-bit binary bit string with a value of 0, so the image decoding device 100 can only determine the syntax of the partitioning shape pattern information by determining whether the second binary bit is 0 or 1 when the first binary bit of the partitioning shape pattern information is 1. According to an embodiment, when the first binary bit of the shape pattern information is 1, the image decoding device 100 can decode the binary bit by determining that the probability of the second binary bit being 0 or 1 is the same.
[0256] According to an embodiment, the image decoding device 100 may use various probabilities for each binary bit in the process of determining the binary bits of a binary bit string relating to shape pattern information. According to an embodiment, the image decoding device 100 may determine that the probability of determining the binary bits relating to shape pattern information varies depending on the orientation of the non-square block. According to an embodiment, the image decoding device 100 may determine that the probability of determining the binary bits relating to shape pattern information varies depending on the area of the current encoding unit or the length of its long side. According to an embodiment, the image decoding device 100 may determine that the probability of determining the binary bits relating to shape pattern information varies depending on at least one of the shape of the current encoding unit and the length of its long side.
[0257] According to an embodiment, the image decoding device 100 can determine that the probability of the binary bits relating to the shape pattern information is equal for encoding units having a predetermined size or larger. For example, it can be determined that the probability of the binary bits relating to the shape pattern information is equal for encoding units with a size of 64 samples or more.
[0258] According to an embodiment, the image decoding device 100 can determine the initial probability of the binary bits constituting the binary bit string of the segmentation shape pattern information based on the strip type (e.g., I strip, P strip, or B strip).
[0259] Figure 2 This is a block diagram of an image encoding and decoding system that performs loop filtering.
[0260] The encoding end 1910 of the image encoding and decoding system 1900 transmits the encoded bitstream of the image, and the decoding end 1950 outputs the reconstructed image by receiving and decoding the bitstream. Here, the encoding end 1910 may have a configuration similar to that of the image encoding device 200, and the decoding end 1950 may have a configuration similar to that of the image decoding device 100.
[0261] At the encoding end 1910, the predictive encoder 1915 outputs a reference image via inter-frame prediction and intra-frame prediction, and the transformer and quantizer 1920 outputs quantized transform coefficients of the residual data between the predicted data and the current input image. The entropy encoder 1925 transforms the quantized transform coefficients by encoding them and outputs the transformed quantized transform coefficients as a bitstream. The quantized transform coefficients are reconstructed into spatial domain data via the inverse quantizer and inverse transformer 1930, and the spatial domain data is output as a reconstructed image via the deblocking filter 1935 and the loop filter 1940. The reconstructed image can be used as a reference image for the next input image via the predictive encoder 1915.
[0262] The encoded image data in the bitstream received by the decoder 1950 is reconstructed into spatial domain residual data via the entropy decoder 1955, dequantizer, and inverse transformer 1960. When the reference image and the residual data output from the predictive decoder 1975 are combined, the spatial domain image data is configured, and the deblocking filter 1965 and loop filter 1970 can output a reconstructed image about the current original image by filtering the spatial domain image data. The reconstructed image can be used by the predictive decoder 1975 as a reference image for the next original image.
[0263] The loop filter 1940 of the encoder 1910 performs loop filtering by using filter information input according to user input or system settings. The filter information used by the loop filter 1940 is output to the entropy encoder 1925 and then sent to the decoder 1950 along with the encoded image data. The loop filter 1970 of the decoder 1950 can perform loop filtering based on the filter information input from the decoder 1950.
[0264] In the various embodiments described above, operations related to the image decoding method performed by the image decoding device 100 were described. Hereinafter, the operations of the image encoding device 200, which performs the image encoding method corresponding to the inverse processing of the image decoding method, will now be described in various embodiments.
[0265] Figures 3 to 19 A block diagram of an image encoding device 200 according to an embodiment is shown, capable of encoding an image based on at least one of block shape information and segmentation shape pattern information.
[0266] Image encoding device 200 may include encoder 220 and bitstream generator 210. Encoder 220 may receive an input image and then encode the input image. Encoder 220 may obtain at least one syntax element by encoding the input image. Syntax elements may include at least one of skip flag, prediction mode, motion vector difference, motion vector prediction method (or index), transform quantization coefficient, coding block mode, coding block flag, intra-prediction mode, direct flag, merge flag, incremental QP, reference index, prediction direction, or transform index. Encoder 220 may determine a context model based on block shape information including at least one of the shape, orientation, aspect ratio, or size of coding units.
[0267] Bitstream generator 210 can generate a bitstream based on an encoded input image. For example, bitstream generator 210 can generate a bitstream by entropy encoding of syntax elements based on a context model. Furthermore, image encoding device 200 can send the bitstream to image decoding device 100.
[0268] According to an embodiment, the encoder 220 of the image encoding device 200 can determine the shape of the encoding unit. For example, the encoding unit may have a square shape or a non-square shape, and information indicating the shape may be included in the block shape information.
[0269] According to an embodiment, encoder 220 can determine which shape the encoding unit will be divided into. Encoder 220 can determine the shape of at least one encoding unit included in the encoding unit, and bitstream generator 210 can generate a bitstream including division shape pattern information, wherein the division shape pattern information includes information about the shape of the encoding unit.
[0270] According to an embodiment, encoder 220 can determine whether a coding unit will be divided or not. When encoder 220 determines that only one coding unit is included in a coding unit or that the coding unit will not be divided, bitstream generator 210 can generate a bitstream including partitioning shape pattern information indicating that the coding unit will not be divided. Furthermore, encoder 220 can divide a coding unit into multiple coding units included in a coding unit, and bitstream generator 210 can generate a bitstream including partitioning shape pattern information indicating that the coding unit will be divided into multiple coding units.
[0271] According to an embodiment, information indicating how many coding units a coding unit is divided into or along which direction the coding units are divided can be included in the division shape pattern information. For example, the division shape pattern information may indicate division in at least one of the vertical and horizontal directions, or it may indicate no division.
[0272] Image encoding apparatus 200 can determine partition shape pattern information based on the partition shape pattern of the encoding unit. Image encoding apparatus 200 determines a context model based on at least one of the shape, orientation, aspect ratio, or size of the encoding unit. Then, image encoding apparatus 200 generates a bitstream from the partition shape pattern information used to partition the encoding unit based on the context model.
[0273] To determine the context model, the image coding apparatus 200 may obtain an array that maps at least one of the shape, orientation, aspect ratio, or size of the coding unit to an index of the context model. The image coding apparatus 200 may obtain the index of the context model from the array based on at least one of the shape, orientation, aspect ratio, or size of the coding unit. The image coding apparatus 200 may determine the context model based on the index of the context model.
[0274] To determine the context model, the image coding device 200 may further determine the context model based on block shape information, wherein the block shape information includes at least one of the shape, orientation, aspect ratio, or size of neighboring coding units adjacent to the coding unit. Furthermore, neighboring coding units may include at least one of the coding units located below, to the left, above, to the upper left, above, above, to the upper right, to the right, or below the lower right of the coding unit.
[0275] Furthermore, to determine the context model, the image coding device 200 can compare the width of the upper neighboring coding unit with the width of the coding unit. Additionally, the image coding device 200 can compare the height of the left and right neighboring coding units with the height of the coding unit. Furthermore, the image coding device 200 can determine the context model based on the comparison results.
[0276] Because the operation of the image encoding device 200 includes reference Figure 20 The operation of the image decoding device 100 described herein is similar, therefore its detailed description is not provided here.
[0277] Figure 20 This is a block diagram illustrating the configuration of an image decoding device 2000 according to an embodiment.
[0278] Reference Figure 19 The image decoding device 2000 may include an acquirer 2010 and a predictive decoder 2030.
[0279] According to an embodiment, the acquirer 2010 and the prediction decoder 2030 may be implemented as at least one processor. In an embodiment, the acquirer 2010 and the prediction decoder 2030 may operate according to at least one instruction stored in at least one memory.
[0280] The image decoding device 2000 may include at least one memory storing the input / output data of the storage acquirer 2010 and the predictive decoder 2030. Furthermore, the image decoding device 2000 may include a memory controller configured to control data input to / output from at least one memory.
[0281] In an embodiment, the acquirer 2010 may correspond to Figure 19 The entropy decoder 1955 shown, and the prediction decoder 2030, can correspond to Figures 22 to 38 The predictive decoder shown is from 1975.
[0282] The acquirer 2010 acquires the bitstream generated as the encoding result of the frame. The bitstream may include the encoding result of the current block. The current block may be the maximum coding unit, coding unit, transform unit, or prediction unit divided from the current frame to be decoded.
[0283] In an embodiment, the receiver 2010 may receive a bitstream from an image encoding device via a network.
[0284] In an embodiment, the acquirer 2010 can acquire bitstreams from data storage media including magnetic media (such as hard disks, floppy disks, and magnetic tapes), optical recording media (such as optical disc read-only memory (CD-ROM) and digital multifunction disks (DVDs)), magneto-optical media (such as optical floppy disks).
[0285] The acquirer 2010 can obtain the syntax elements used for decoding the picture from the bitstream. According to the layered structure of the picture, the values corresponding to the syntax elements can be included in the bitstream.
[0286] The acquirer 2010 can obtain syntax elements by entropy decoding of the binary bits included in the bit stream.
[0287] In an embodiment, the bitstream may include information about the prediction mode of the current block in the current frame. The prediction mode of the current block may be any one of a plurality of prediction modes, including intra-frame modes and inter-frame modes.
[0288] The prediction decoder 2030 can generate a prediction block for the current block by performing intra-frame prediction or inter-frame prediction on the current block based on the prediction mode of the current block, and can use the prediction block to reconstruct the current block.
[0289] In an embodiment, when the prediction mode of the current block is intra-frame mode, the acquirer 2010 can obtain information about the intra-frame prediction mode of the current block from the bit stream.
[0290] In an embodiment, information about the intra-prediction mode of the current block may include information indicating a method for determining the intra-prediction mode. In an embodiment, the method for determining the intra-prediction mode may include a method by which the decoder derives the intra-prediction mode or a method by using information obtained from the bitstream to determine the intra-prediction mode.
[0291] In embodiments, information indicating the method for determining the intra-frame prediction mode may be included in the sequence parameter set, frame parameter set, stripe header, or stripe data of the bitstream. In an example, the stripe data may include information that will be signaled at the levels of the coding tree, coding unit, transform tree, or transform unit.
[0292] In an embodiment, information indicating the method for determining the intra-prediction mode may not be included in the bitstream, and in this case, the prediction decoder 2030 may determine the intra-prediction mode of the current block according to a predetermined method.
[0293] In an embodiment, when the method for determining the intra-prediction mode corresponds to the method for using information obtained from the bitstream, the prediction decoder 2030 can determine the intra-prediction mode indicated by the information obtained from the bitstream among a plurality of intra-prediction modes as the intra-prediction mode for the current block. For example, the information indicating the intra-prediction mode for the current block may include a flag or index indicating any one of the plurality of intra-prediction modes.
[0294] In an embodiment, when the method for determining the intra-prediction mode corresponds to the method for the decoder to derive the intra-prediction mode, the prediction decoder 2030 can derive the intra-prediction mode of the current block based on gradients calculated from neighboring regions. The following will refer to... Figure 21 Describe in detail the method for deriving intra-frame prediction modes based on gradients.
[0295] When a prediction block is generated via intra-frame prediction for the current block, the prediction decoder 2030 can obtain the reconstructed current block by using the prediction block.
[0296] In an embodiment, the prediction decoder 2030 can determine the predicted block as the current block to be reconstructed.
[0297] In an embodiment, the prediction decoder 2030 can generate a reconstructed current block by combining the predicted block with residual data obtained from the bitstream by the acquirer 2010.
[0298] Figure 21 This is a diagram illustrating the intra-frame prediction mode according to an embodiment.
[0299] Reference Figures 22 to 38Intra-prediction modes can be predefined by the image encoding device and the image decoding device 2000. In this disclosure, it is assumed that 67 intra-prediction modes are defined. However, this is only an example, and fewer or more intra-prediction modes than 67 can be defined.
[0300] The predefined intra-frame prediction modes can include 2 non-angular modes and 65 angular modes. The non-angular modes can include planar modes and DC modes. The angular modes can include modes 2 through 66, each with a predetermined angle.
[0301] Specifically, modes 2, 34, and 66 can each be defined as diagonal modes, the intra-prediction modes between modes 2 and 34 can each be defined as horizontal angle modes, and the intra-prediction modes between modes 34 and 66 can each be defined as vertical angle modes. Furthermore, depending on the block shape, modes smaller than mode 2 or larger than mode 66 can be used in intra-prediction. For example, based on the ratio of block width to block height, angle prediction modes smaller than 2 or larger than 66 can be used in intra-prediction.
[0302] As the angular pattern becomes more refined—that is, as more prediction directions corresponding to the angular pattern are added—various prediction factors can be generated, leading to accurate prediction values; however, the amount of information to be transmitted increases. Therefore, in terms of rate-distortion performance, the continuous addition of intra-prediction patterns may have limitations. In other words, the amount of information transmitted about the intra-prediction pattern increases more than the gain gained by reducing prediction errors, potentially reducing compression efficiency.
[0303] A prediction method will now be described in which the decoder (i.e., the image decoding device 2000) directly derives the intra-prediction mode to reduce the overhead of transmitting intra-prediction mode information, thereby overcoming such limitations. In this disclosure, the prediction method of the decoder deriving the intra-prediction mode can be abbreviated as decoder-side intra-prediction mode derivation (DIMD).
[0304] In recent image compression techniques, methods for increasing the size of the accessible region of reconstructed samples are being discussed. As the accessible region of reconstructed samples increases, the image decoding device 2000 can efficiently derive the intra-prediction mode based on information calculated from the pre-reconstructed region. Since the image encoding device does not transmit intra-prediction mode information via signal transmission, but rather the image decoding device 2000 generates prediction factors by autonomously deriving the intra-prediction mode, the overhead caused by signal transmission can be reduced, and compression efficiency can be improved.
[0305] In the following text, reference will now be made to Figure 22 Describes the intra-prediction processing of the intra-prediction mode exported by the image decoding device 2000.
[0306] Figure 21 This is a flowchart of an image decoding method according to an embodiment.
[0307] In operation S2210, the image decoding device 2000 can derive the intra-frame prediction mode of the current block based on the gradient between at least two samples included in the neighboring regions of the current block.
[0308] Image decoding device 2000 can calculate gradients using at least two samples included in the neighboring region of the current block. Image decoding device 2000 can generate gradient information by accumulating the calculated gradients. In the example, it can be referenced from the previous... Figures 23 to 26 Select the intra prediction mode for the current block from the described intra prediction modes.
[0309] DIMD refers to a technique for directly deriving intra-prediction modes. When a DIMD mode is applied to the current block, the image decoding device 2000 can derive the angular intra-prediction mode in the reconstructed region surrounding the current block. The angular intra-prediction mode can be derived using gradient information established by collecting gradients at predefined locations in the reconstructed region surrounding the current block.
[0310] A gradient can indicate a variable computed using at least two samples included in the neighborhood of the current block. In the example, the gradient can include at least one of a horizontal gradient or a vertical gradient. In this disclosure, the gradient can be referred to as slope, variance, directionality, prediction directionality, etc. Furthermore, in this disclosure, the gradient can refer to gradient information obtained by accumulating computed gradients.
[0311] Gradient information may include information about the intra-prediction mode mapped to the computed gradient and / or information about the magnitude (or intensity) of that intra-prediction mode. In this disclosure, gradient information may also be referred to as gradient strength, gradient magnitude, gradient amplitude, gradient histogram (HoG), histogram strength, histogram size, histogram amplitude, etc.
[0312] In one embodiment, a gradient can be obtained by using a predefined filter, which includes the gradient between at least two samples in the neighborhood of the current block. Furthermore, gradient information for the current block can be generated based on the obtained gradient.
[0313] Reference Figures 29 to 38 as well as Figure 27 Describe a specific implementation method for generating gradient information.
[0314] In an embodiment, the image decoding device 2000 can derive intra-prediction modes based on the generated gradient information. In this example, the image decoding device 2000 can derive multiple intra-prediction modes based on the gradient information. A maximum number of intra-prediction modes to be derived can be predefined. For example, the maximum number can be defined as 2, 3, 4, 5, etc. For instance, a predetermined number of intra-prediction modes included in the generated gradient information, arranged in descending order of magnitude, can be derived as the intra-prediction modes for the current block.
[0315] In S2220, the image decoding device 2000 can generate a prediction block for the current block by performing intra-prediction on the current block using an intra-prediction mode.
[0316] Image decoding device 2000 can generate prediction factors by using a derived intra-frame prediction mode. In this disclosure, the prediction factors generated by image decoding device 2000 using a derived intra-frame prediction mode can be referred to as prediction samples, prediction blocks, temporary prediction samples, temporary prediction blocks, initial prediction samples, or initial prediction blocks.
[0317] Image decoding device 2000 can generate a final prediction block by performing a weighted summation on prediction factors generated according to a derived intra-prediction mode. In an example, image decoding device 2000 can generate a final prediction block by performing a weighted summation on prediction factors generated according to a derived intra-prediction mode and prediction factors generated according to a predetermined intra-prediction mode (e.g., a planar mode). (See also...) Figure 28 and Figure 23 A specific implementation of generating a final prediction block by using a weighted sum of predictor factors is described.
[0318] In operation S2230, the image decoding device 2000 can reconstruct the current block by using the predicted block.
[0319] In the example, the image decoding device 2000 may determine the predicted block as the current block to be reconstructed. Alternatively, in the example, the image decoding device 2000 may generate the current block to be reconstructed by combining residual data obtained from the bitstream with the predicted block.
[0320] Figure 23 This is a diagram illustrating an example of a method for calculating gradients according to an embodiment.
[0321] Reference Figure 23 The gradient can be calculated using pixels included in the neighboring region of the current block 2300. In an embodiment, a template 2310 for generating gradient information can be defined in the reconstructed region surrounding the current block 2300.
[0322] Template 2310 may include the left-hand region, the top-left region, and the top-hand region surrounding the current block 2300. In the example, as shown...Figure 24 As shown, template 2310 can be defined as an L-shaped region consisting of three pixel lines adjacent to the current block 2300. The gradient can be calculated using pixels included in template 2310 within the neighboring region of the current block 2300. In embodiments, the number of pixel lines available for template 2310 can be varied.
[0323] In this embodiment, the gradient can be calculated by filtering the pixels included in the template 2310. In this embodiment, filtering can be performed on pixels within a 3×3 pixel region included in the template 2310. The pixel region to which filtering is applied may be referred to as a window.
[0324] In the example, a 3×3 Sobel filter can be applied to window 2320. This disclosure primarily describes the case where window 2320 has a 3×3 size, but this is merely an example, and the disclosure is not limited thereto. For example, window 2320 can be defined as having sizes of 2×2, 4×4, 5×5, etc.
[0325] In an embodiment, a window 2320 can be determined for the pixels included in the center pixel line of the template 2310 with three pixel lines, and a filter can be applied to the window 2320 to enable the calculation of gradients.
[0326] Gradients can include at least one of horizontal or vertical gradients. Intra-prediction modes can be determined based on the calculated gradients. Angles (or prediction directions) can be calculated based on the gradients, and the calculated angles can be mapped to the nearest or most similar intra-prediction modes. In other words, intra-prediction modes can be calculated from gradients. Gradient information can be configured by using intra-prediction modes calculated from gradients.
[0327] Figure 24 This is a diagram illustrating a method for calculating gradients according to an embodiment.
[0328] Reference Figure 24 The gradient can be obtained using a Sobel filter. As mentioned above, the template 2310 of the current block 2300 can be configured by three pixel lines included in the left region, the upper region, and the upper left region. That is, the template 2310 can be used as a reference region for deriving the intra-prediction mode based on the gradient.
[0329] In an embodiment, a Sobel filter may be applied to a 3×3 window 2320 in template 2310. The Sobel filter may include at least one horizontal Sobel filter or a vertical Sobel filter. The Sobel filter may be applied to the 3×3 window 2320 relative to the pixels included in the center pixel line of template 2310.
[0330] In the example, the horizontal Sobel filter and the vertical Sobel filter can be as follows: Figure 25 The definition is shown.
[0331] In this embodiment, when a Sobel filter in the vertical direction is applied to template 2310, a gradient in the horizontal direction can be output. When a Sobel filter in the horizontal direction is applied to template 2310, a gradient in the vertical direction can be output.
[0332] In this embodiment, a Sobel filter in the vertical direction is applied to the window in template 2310, so that gradients in the horizontal direction corresponding to the window can be output. Furthermore, a Sobel filter in the horizontal direction is applied to the window in template 2310, so that gradients in the vertical direction corresponding to the window can be output.
[0333] Figure 25 This is a diagram illustrating a method for generating gradient information according to an embodiment.
[0334] Reference Figure 21 This can map (or transform) the angle (or prediction direction) calculated via filtering of window 2320 to one of the predefined intra-prediction modes. The angle derived from the gradient can be either the texture angle or the prediction direction of window 2320. In the example, it can be derived from the gradient as shown in the reference... angle The described intra-prediction mode. That is, the angle calculated by filtering over window 2320 can be mapped to one of 65 intra-prediction modes.
[0335] In an embodiment, the intra-frame prediction mode corresponding to the current window 2320 can be derived according to the description of Equation 1 below.
[0336] [Equation 1]
[0337] In equation 1, G hor Indicates the horizontal gradient of the current window 2320, G ver Indicates the vertical gradient of the current window 2320. The angle of the current window 2320 can be calculated using the horizontal and vertical gradients according to Equation 1. Figure 25 ).
[0338] In an embodiment, the intra-prediction mode corresponding to the angle adjacent to the angle calculated using Equation 1 can be derived as (or mapped to) the intra-prediction mode of the current window 2320.
[0339] In an embodiment, the intensity (or magnitude) of the intra-prediction mode corresponding to the current window 2320 can be calculated using Equation 2 below.
[0340] [Equation 2]
[0341] Referring to Equation 2, the intensity of the intra-frame prediction mode can be calculated as the sum of the absolute values of the horizontal gradient of the current window 2320 and the vertical gradient of the current window 2320.
[0342] In this embodiment, gradient information 2500 can be generated (or updated) based on the intra-prediction mode and its intensity. Gradient information 2500 can be generated by accumulating the intra-prediction modes derived from the gradients and the magnitudes (or intensities) corresponding to those modes. In other words, gradient information 2500 can be generated based on each corresponding intra-prediction mode by summing the magnitudes of the intra-prediction modes collected from template 2310.
[0343] In an embodiment, gradient information may include at least one intra-frame prediction mode and the magnitude corresponding to the at least one intra-frame prediction mode.
[0344] Furthermore, in an embodiment, the gradient information may include a first value corresponding to at least one intra-prediction mode and a second value corresponding to the intensity of the first value. In this regard, the first value may indicate an angle θ or an intra-prediction mode. The angle may be a prediction angle, prediction direction, texture angle, or texture direction. The intra-prediction mode may be mapped to a calculated angle θ. The second value may indicate intensity, magnitude, or size. The first and second values may be referred to as a first variable and a second variable, respectively.
[0345] Figure 25 It shows the gradient G in the horizontal direction hor and vertical gradient G ver The derived angle θ (or predicted direction) and intensity I θ Examples, and as a matter of angle θ and intensity I θ An example of accumulated gradient information of 2500.
[0346] In this embodiment, the x-axis of the gradient information 2500 can indicate an angle θ or an intra-frame prediction mode. Here, the angle can be a prediction angle, prediction direction, texture angle, or texture direction. The intra-frame prediction mode can be mapped to the calculated angle θ. In this example, the angle θ can be calculated using Equation 1 above.
[0347] The gradient information 2500 on the y-axis indicates the corresponding angle θ or magnitude of the intra-frame prediction mode. Figure 3 I θ It can be a variable indicating amplitude, intensity, or size.
[0348] In an embodiment, the angle (or intra-frame prediction mode) at all pixel positions (including pixel positions in the center pixel line) in template 2310 can be derived, and the intensity values of the derived angles can be summed to obtain the amplitudes of the angles of the current block 2300.
[0349] In this embodiment, the angle calculated from window 2320 can be mapped to the intra-prediction mode according to the following method. That is, the angle calculated from window 2320 can be mapped to the intra-prediction mode based on θ calculated based on Equation 1 above, and based on Equation 3 below.
[0350] [Equation 3]
[0351] Reference Figure 26 Assume that the tanθ value is 41 / 32 based on the angle calculated from window 2320. The tanθ value can be represented as an integer variable intraPredAngle. The calculated intraPredAngle value can then be mapped to the nearest neighbor value in Table 1 below. The intra-prediction mode with the corresponding value can be determined as the intra-prediction mode to be mapped to the angle calculated from window 2320.
[0352] [Table 1]
[0353] In detail, referring to Table 1, when assuming that the intraPredAngle calculated using Equation 3 is 41, mode 68, which has the nearest value to 41, can be determined as the intra-prediction mode mapped to the angle of the current window 2320. That is, the intraPredAngle value calculated using Equation 3 can be mapped to adjacent intraPredAngle values, and the intra-prediction mode with the corresponding intraPredAngle can be determined as the intra-prediction mode mapped to the angle of the current window 2320.
[0354] The corresponding intra-prediction mode for the entire window 2320 including pixels in the center pixel line of template 2310 can be determined, and gradient information can be generated / updated by accumulating the intensity of the corresponding intra-prediction mode.
[0355] Figure 26 This is a diagram illustrating a method for deriving intra-prediction modes from neighboring blocks according to an embodiment.
[0356] Reference Figures 23 to 25The image decoding device 2000 can derive the intra-prediction mode by using prediction information from neighboring blocks of the current block 2600. In other words, the intra-prediction mode of the current block 2600 can be derived by using prediction information from neighboring blocks, based on DIMD processing for the current block 2600. Here, the prediction information may include gradient information and / or DIMD mode information. Here, the DIMD mode may indicate the intra-prediction mode derived via DIMD.
[0357] In an embodiment, the method of performing DIMD processing by using prediction information from neighboring blocks can be referred to as the DIMD merging mode.
[0358] In an embodiment, when the DIMD merging mode is applied to the current block 2600, the intra-prediction mode of the current block 2600 can be derived by using prediction information stored in neighboring blocks. For example, gradient information combined for the current block 2600 can be derived by combining (or averaging) gradient information obtained from neighboring blocks.
[0359] Optionally, in an embodiment, when the DIMD merging mode is applied to the current block 2600, the image decoding device 2000 can export the DIMD mode of the neighboring block as the intra-prediction mode of the current block 2600.
[0360] In this embodiment, the DIMD merge mode is permitted only if at least one DIMD block (or DIMD merged block) exists among the neighboring blocks adjacent to the current block 2600. In the example, the neighboring blocks adjacent to the current block 2600 can be defined as the left block and the top block. However, this disclosure is not limited to this, and blocks at different locations can be defined as neighboring blocks. In this disclosure, a DIMD block indicates a block encoded via DIMD, and a DIMD merged block indicates a block encoded in the DIMD merge mode.
[0361] In an embodiment, when DIMD merge mode is enabled, a flag or index indicating whether DIMD merge mode is applied can be signaled. When DIMD merge is applied, the above reference can be omitted. Figure 27 The process described is for obtaining gradient information from template 2310.
[0362] Figure 27 This is a diagram illustrating the process of generating intra-frame prediction samples according to an embodiment.
[0363] Reference Figures 22 to 26 The image decoding device 2000 can be used by referring to the above. Figure 27 The described method derives the intra-prediction mode for the current block 2700. (See reference...) Figure 27 Assume that the current block 2700 has a size of 4×4.
[0364] In this embodiment, the maximum number of intra-prediction modes to be exported can be predefined. For example, the maximum number can be defined as 2, 3, 4, 5, etc. For example, a predetermined number of intra-prediction modes in descending order of amplitude from the intra-prediction modes included in the generated gradient information can be exported as the intra-prediction modes of the current block. In other words, the image decoding device 2000 can export a predetermined number of intra-prediction modes with the largest amplitude from the amplitudes corresponding to the intra-prediction modes included in the gradient information of the current block as the intra-prediction modes of the current block.
[0365] Reference Figure 28 Suppose that two intra-prediction modes are derived for the intra-prediction of the current block 2700. The first intra-prediction mode is designated M1, and the second is designated M2. In this example, the order of the intra-prediction modes can be determined based on the magnitude of the intra-prediction modes included in the gradient information. For example, the intra-prediction mode corresponding to the largest magnitude among the intra-prediction modes included in the gradient information can be designated as M1. The intra-prediction mode corresponding to the second largest magnitude among the intra-prediction modes included in the gradient information can be designated as M2.
[0366] In an embodiment, the image decoding device 2000 may configure the reference pixel 2710 of the current block 2700 for intra-frame prediction. The reference pixel 2710 of the current block 2700 may be configured to include the left sample line, the top sample line, and the top-left sample of the current block 2700.
[0367] Image decoding device 2000 can be used M 1 Intra-frame prediction is performed to generate a first prediction block 2720 of the current block 2700. The image decoding device 2000 can generate a second prediction block 2730 of the current block 2700 by performing intra-frame prediction using M2. The image decoding device 2000 can generate a third prediction block 2740 of the current block 2700 by performing intra-frame prediction using planar mode.
[0368] Image decoding device 2000 can generate final prediction block 2780 of current block 2700 by calculating a weighted sum of first prediction block 2720, second prediction block 2730, and third prediction block 2740. In embodiments, the weights used for the weighted sum can be predefined fixed values or values calculated using a predefined method.
[0369] In an embodiment, the first weight 2750, the second weight 2760, and the third weight 2770 used in the weighted sum of the first prediction block 2720, the second prediction block 2730, and the third prediction block 2740 can be derived using Equation 4 below. The first weight 2750, the second weight 2760, and the third weight 2770 indicate the weights that will be applied to the first prediction block 2720, the second prediction block 2730, and the third prediction block 2740, respectively.
[0370] [Equation 4]
[0371] In Equation 4, w1, w2, and w3 indicate the first weight 2750, the second weight 2760, and the third weight 2770, respectively. ampl(M1) indicates the magnitude corresponding to the intra-prediction mode M1, and ampl(M2) indicates the magnitude corresponding to the intra-prediction mode M2. In the example, a, b, and c can be predefined constant values. For example, a:b:c can be 2:2:1. Alternatively, for example, a can be 43 / 64, b can be 43 / 64, and c can be 21 / 64.
[0372] Optionally, in an embodiment, the weights to be used for the weighted sum of the predicted blocks can be determined based on gradient information of neighboring blocks. Reference will now be made to... Figure 28 This will be described.
[0373] Figure 28 This is a diagram illustrating a method for adaptively determining weights according to an embodiment.
[0374] Reference Figure 27 The sample-based mixing can be performed based on gradient information obtained from at least one of the left region 2810, the upper region 2820, or the upper left region 2830 of the current block 2800. Here, the sample-based mixing indicates a weighted sum method that adaptively determines the weights via region segmentation. In other words, the weights for the weighted sum used in DIMD processing can be adaptively determined based on gradient information obtained from at least one of the left region 2810, the upper region 2820, or the upper left region 2830 of the current block 2800.
[0375] In the embodiments, when sample-based mixing is not used, it can be achieved by using... Figures 22 to 26 The weighted sum of the predictors is calculated using the same method as described in the embodiments and Equation 4.
[0376] For sample-based blending, the neighboring blocks of the current block 2800 can be segmented into a left region 2810, an upper region 2820, and a top-left region 2830. Local gradient information can be obtained from each of the three segmented regions. Here, local gradient information refers to gradient information calculated based on the gradients between pixels included in each segmented region.
[0377] In an embodiment, local gradient information of at least one of the left region 2810, the upper region 2820, or the upper left region 2830 may be used to determine the weights for generating the final predicted block of the current block 2800.
[0378] In an embodiment, the magnitude corresponding to the DIMD mode can be identified in the local gradient information of the left region 2810, the upper region 2820, and the upper left region 2830. In this regard, the DIMD mode indicates the intra-prediction mode of the current block 2800 derived via DIMD processing. Here, the above reference can be applied. Figures 29 to 38 The described embodiments.
[0379] In this embodiment, the local gradient information to be used to determine the weights can be selected by comparing the magnitudes of the identified amplitudes. For example, among the local gradient information of the left region 2810, the upper region 2820, and the upper left region 2830, the local gradient information of the region with the largest amplitude among those corresponding to the DIMD pattern can be selected. In this case, the weights to be applied to the predictor generated according to the DIMD pattern can be determined by using the gradient information of the selected region. In this respect, when determining the weights to be applied to the predictor generated according to the DIMD pattern, the gradient information of regions other than the selected region can be disregarded.
[0380] Optionally, a comparison can be performed between the local gradient information of the left region 2810 and the local gradient information of the upper region 2820. For example, when the magnitude corresponding to the DIMD pattern in the local gradient information of the upper region 2820 is greater than the magnitude corresponding to the DIMD pattern in the local gradient information of the left region 2810, the weights to be applied to the predictors generated according to the DIMD pattern can be determined based on the gradient information of the upper region 2820. Optionally, in the example, when the magnitude corresponding to the DIMD pattern in the local gradient information of either the upper region 2820 or the left region 2810 is larger than the magnitude corresponding to the DIMD pattern in the local gradient information of the other by a predefined size or more, the weights can be determined by using the local gradient information of the corresponding region (magnitude larger than the predefined size or more). In the example, the predefined size could be twice as large.
[0381] In this embodiment, when using sample-based mixing, weights can be derived with additional signal transmission. Therefore, the encoder may not need to perform a new rate distortion (RD) check.
[0382] According to embodiments of this disclosure, gradient information for the current block can be generated by referring to gradient information of blocks decoded prior to the current block. In this disclosure, blocks decoded prior to the current block can be referred to as previous blocks. For example, when applying a DIMD merge mode, gradient information for the current block can be generated by referring to the gradient information of previous blocks.
[0383] When the current block is decoded, the gradient information of the previous block must have already been stored so that it can be referenced. The following will refer to... Figure 29 This section describes in detail efficient methods for storing gradient information from previous blocks and various methods for using the stored gradient information from previous blocks when predicting the current block.
[0384] Figure 29 This is a diagram illustrating a method for storing gradient information according to an embodiment.
[0385] Figure 29 This example shows gradient information for the previous block of the current block. The previous block of the current block can be a block included in a region encoded / decoded before the current block.
[0386] In an embodiment, gradient information of a previous block can be generated from the gradients of samples included in the previous block or reconstructed prior to the previous block. The gradient information of the previous block may include the magnitude of the intra-prediction mode and the intra-prediction mode.
[0387] As described above, in order to derive the intra-prediction mode of the current block using the gradient information of the previous block, the gradient information of the previous block must have already been stored when the current block is reconstructed. However, storing the gradient information of the previous block unchanged may increase the memory load, and therefore, it is preferable to reduce the amount of information included in the gradient information of the previous block and store the reduced gradient information.
[0388] In an embodiment, when storing gradient information of a previous block, the image decoding device 2000 may not store the gradient information of the corresponding block without modification, but may selectively store only information about intra-prediction modes (or angles) whose amplitude (or intensity) exceeds a predetermined threshold 2900. Optionally, in an embodiment, the image decoding device 2000 may selectively store only information about intra-prediction modes whose amplitude is equal to or greater than the predetermined threshold 2900.
[0389] The gradient information of the previous block that can be used when decoding the current block may include the intra-prediction mode corresponding to the magnitude exceeding the predefined threshold 2900, and the magnitude exceeding the predefined threshold 2900 among the magnitudes corresponding to the intra-prediction mode calculated based on the gradient between at least two samples included in the previous block or between at least two samples adjacent to the previous block.
[0390] like Figure 29 As shown, when deriving gradient information from the gradient between at least two samples included in the previous block or between at least two samples adjacent to the previous block, the magnitudes exceeding the threshold 2900 and the three intra-frame prediction modes 2910, 2920 and 2930 corresponding to these magnitudes can be stored as the gradient information of the previous block.
[0391] In an embodiment, the gradient information of the previous block may include representative intra-prediction modes whose magnitude exceeds a threshold of 2900 and information about the magnitude of the representative intra-prediction modes. That is, in this disclosure, representative intra-prediction modes may indicate intra-prediction modes that exceed the threshold of 2900. One or more representative intra-prediction modes may exist.
[0392] In an embodiment, the image decoding device 2000 can store the intra-prediction mode with an amplitude exceeding the threshold 2900 and the amplitude of the intra-prediction mode as representative values of the corresponding block. (Refer to...) Figure 30 The three intra-prediction modes 2910, 2920 and 2930 whose amplitudes exceed the threshold 2900, as well as the amplitudes of each intra-prediction mode, can be included in the gradient information as representative values, and the gradient information including the representative values can be stored.
[0393] In this embodiment, the unit used to store gradient information can be a coding unit (CU), a prediction unit (PU), or a transform unit (TU). Optionally, the unit used to store gradient information can be a predefined fixed unit. That is, for each predefined unit, intra-frame prediction modes exceeding a predefined threshold of 2900 and their corresponding amplitudes can be stored.
[0394] In the embodiments, the threshold 2900 can be determined using various methods. In the example, the threshold 2900 can be a predetermined value. In the example, the threshold 2900 can be a fixed value. For example, the predetermined value can be a value of 1, 2, 3, 4, etc. Furthermore, in the example, the threshold 2900 can be adaptively determined based on the bit depth of the image. For example, the threshold 2900 can be defined using Equation 5 below.
[0395] [Equation 5]
[0396] Furthermore, in the example, the threshold 2900 can be adaptively determined based on the channel (or color component). The channel can indicate whether the channel is a luminance component or a chrominance component. When the threshold 2900 is adaptively determined based on the channel, the predetermined value of the method described above or the N value in Equation 5 can be set differently depending on the channel.
[0397] The image decoding device 2000 can obtain the gradient information of the current block, reflecting the tilt of neighboring blocks, by accumulating and storing the gradient information of neighboring blocks, and can derive the intra-frame prediction mode based on the obtained gradient information. This will be referred to below. Figure 30 Detailed description.
[0398] Figure 30 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0399] Reference Figures 23 to 25 The image decoding device 2000 can use prediction information from previous blocks to derive the intra-prediction mode of the current block 3000. The prediction information may include gradient information, or it may include intra-prediction mode information derived based on gradient information. In other words, the prediction information can be based on a reference... Figure 30 The described embodiments may obtain all or part of the gradient information, or may be intra-frame prediction mode information derived based on the obtained gradient information.
[0400] Reference Figure 30 The gradient information for the current block 3000 can be generated by using the gradient information from the previous block. (See reference...) Figure 30 It is assumed that the previous block used to generate the gradient information of the current block 3000 is a neighboring block that is adjacent to the left, top, or upper left of the current block 3000, but this disclosure is not limited thereto.
[0401] For example, such as Figure 30 As shown, the previous block that can be used to generate gradient information for the current block 3000 can be a neighboring block that is adjacent to at least one of the left, top, or upper left sides of the current block 3000.
[0402] In an embodiment, the previous block that can be used to generate gradient information for the current block 3000 can be a block that is spatially or temporally adjacent to the current block 3000.
[0403] In an embodiment, the previous block used to generate gradient information for the current block 3000 can be a non-adjacent neighboring block that is not adjacent to the current block 3000. In an example, the previous block can be a reference block specified in the current frame or a reference frame based on motion information.
[0404] For each of the left neighboring blocks 3011 and 3012, the upper neighboring blocks 3021 and 3022, and the upper left neighboring block 3030, storage is possible. Figure 29 The gradient information shown is illustrated. In this regard, a reference can be applied. Figure 31 The described embodiment. That is, gradient information can be stored for each neighboring block, which includes the magnitude of the magnitude corresponding to the intra-prediction mode calculated from the gradient between at least two samples inside / outside the previous block that exceeds a threshold, and the intra-prediction mode corresponding to the magnitude exceeding the threshold.
[0405] In the embodiment, among the intra-prediction modes 3041 and 3042 derived from the first left neighboring block 3012, only the intra-prediction mode 3041 whose amplitude exceeds the threshold 3040 and its corresponding amplitude can be stored as the gradient information of the first left neighboring block 3012.
[0406] In an embodiment, the gradient information of the current block 3000 can be generated by summing the magnitudes of each intra-prediction mode included in the gradient information of the left neighboring blocks 3011 and 3012, the upper neighboring blocks 3021 and 3022, and the upper left neighboring block 3030 based on each corresponding intra-prediction mode. In other words, the gradient information of the current block 3000 can be generated by accumulating the magnitudes of the intra-prediction modes included in the gradient information of the neighboring blocks. The magnitudes of each intra-prediction mode can be summed. Referring to the following figures, the process for generating the gradient information of the current block 3000 will now be described in detail.
[0407] Figure 31 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0408] Reference Figure 31 It can be used for, for example Figure 32 The gradient information is stored in each of the first left neighboring block 3011, the second left neighboring block 3012, the first top neighboring block 3021, the second top neighboring block 3022, and the top left neighboring block 3030 of the current block 3000.
[0409] In this embodiment, the gradient information of the first left neighboring block 3011 may include angle pattern 8 and its corresponding amplitude a, and angle pattern 16 and its corresponding amplitude b. The gradient information of the second left neighboring block 3012 may include angle pattern 11 and its corresponding amplitude c, and angle pattern 16 and its corresponding amplitude d. The gradient information of the first upper neighboring block 3021 may include angle pattern 4 and its corresponding amplitude e, and angle pattern 42 and its corresponding amplitude f. The gradient information of the second upper neighboring block 3022 may include angle pattern 28 and its corresponding amplitude g. The gradient information of the upper left neighboring block 3030 may include angle pattern 42 and its corresponding amplitude h.
[0410] As described above, the gradient information of the current block 3000 can be generated by accumulating the intra-prediction modes and their magnitudes, which are included in the gradient information of the left neighboring blocks 3011 and 3012, the upper neighboring blocks 3021 and 3022, and the upper left neighboring block 3030. The magnitudes of each intra-prediction mode can be summed.
[0411] For example, when the gradient information of the first left neighboring block 3011 identifies the amplitude corresponding to angle mode 16 as b, and the gradient information of the second left neighboring block 3012 identifies the amplitude corresponding to angle mode 16 as d, the amplitude corresponding to angle mode 16 in the gradient information of the current block 3000 can be b+d.
[0412] Similarly, when the gradient information of the first upper neighboring block 3021 identifies the amplitude corresponding to angle mode 42 as f, and the gradient information of the upper left neighboring block 3030 identifies the amplitude corresponding to angle mode 42 as h, the amplitude corresponding to angle mode 42 in the gradient information of the current block 3000 can be f+h.
[0413] In an embodiment, the gradient information of the current block 3000 may include intra-prediction modes that are not redundantly included in the gradient information of the multiple neighboring blocks and are among the intra-prediction modes included in the gradient information of the left neighboring blocks 3011 and 3012, the upper neighboring blocks 3021 and 3022, and the upper left neighboring block 3030, without summing the magnitudes. In an embodiment, the image decoding device 2000 may derive the intra-prediction mode based on the obtained gradient information.
[0414] The image decoding device 2000 can derive multiple intra-prediction modes based on the generated gradient information. The maximum number of intra-prediction modes to be derived can be predefined. For example, the maximum number can be defined as 2, 3, 4, 5, etc. For instance, a predetermined number of intra-prediction modes from the intra-prediction modes included in the generated gradient information, arranged in descending order of magnitude, can be derived as the intra-prediction modes for the current block.
[0415] In an embodiment, the image decoding device 2000 can generate a final prediction block by combining prediction factors generated according to the derived intra-frame prediction mode.
[0416] Figure 32 This is a diagram illustrating an intra-frame prediction method that references gradient information from a previous block according to an embodiment.
[0417] Reference Figure 32 The image decoding device 2000 can store the magnitude obtained by summing gradients calculated from all pixel regions included in the previous block as a representative value. (See reference...) Figure 32 It is assumed that the previous block used to generate the gradient information of the current block 3200 is a neighboring block adjacent to the left, top, or upper left of the current block 3200, but this disclosure is not limited thereto. See also... Figure 33 The previous block can be represented as a sub-block. A sub-block can be a unit for storing gradient information.
[0418] In an embodiment, the magnitude stored for the previous block can be calculated by summing the sums of the horizontal and vertical gradients calculated from all pixel regions included in the previous block. All pixel regions included in the previous block may correspond to all windows where filtering can be applied in the previous block. In this disclosure, the pixel regions included in the previous block may be referred to as the sample set included in the previous block.
[0419] In an embodiment, the image decoding device 2000 can obtain the magnitude of a specific angle (or intra-prediction mode) by summing the gradients in all pixels of the block using Equation 6 below. In an embodiment, the specific angle (or intra-prediction mode) may be a representative intra-prediction mode.
[0420] [Equation 6]
[0421] Referring to Equation 6, the magnitude to be stored in the previous block can be obtained by summing the first result and the second result, wherein the first result is obtained by summing the horizontal gradients calculated from all sample sets included in the previous block, and the second result is obtained by summing the vertical gradients calculated from all sample sets included in the previous block.
[0422] In an embodiment, the gradient information of the previous block may include the amplitude (ampl). SB and amplitude SB The corresponding intra-frame prediction mode, where the amplitude (ampl) SB This corresponds to the third result obtained by summing the first and second results.
[0423] In an embodiment, normalization can be performed when the block size changes. For example, normalization can be performed by dividing the value calculated using Equation 6 by the total number of pixels. Alternatively, in an embodiment, normalization can be performed on the value calculated using Equation 6 based on the number of samples or sample sets included in all sample sets of the previous block. For example, normalization can be performed by dividing the value calculated using Equation 5 by the number of samples or sample sets included in all sample sets. Because the normalized values are stored, accurate comparisons between blocks can be made, and prediction accuracy can be improved.
[0424] In this embodiment, the block used as a unit for storing gradient information can be a CU, PU, or TU. Optionally, the block can be a unit with a predefined fixed size. In the example, within each block, the amplitude exceeding a predetermined threshold is amp. SBK It can be inferred as a representative intra-prediction mode, and therefore, it can be stored as a representative magnitude for the representative intra-prediction mode.
[0425] Figure 31 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0426] Reference Figure 33 The gradient information for the current block 3300 can be generated by using the gradient information from the previous block. (See reference...) Figure 33 It is assumed that the previous block used to generate the gradient information of the current block 3300 is a neighboring block that is adjacent to the left, top, or upper left of the current block 3300, but this disclosure is not limited thereto.
[0427] For example, a previous block to which this embodiment can be applied may be as follows: Figure 33 The neighboring blocks shown that are adjacent to the left, top, or upper left of the current block 3300 can be blocks that are spatially or temporally adjacent, non-adjacent neighboring blocks that are not adjacent to the current block 3300, or reference blocks that are specified in the current frame or reference frame based on motion information.
[0428] Storage can be performed on each of the left neighboring blocks 3311 and 3312, the upper neighboring blocks 3321, 3322, 3323 and 3324, and the upper left neighboring block 3330. Figure 32 The gradient information shown is illustrated. In this regard, a reference can be applied. Figure 34 The described embodiment. That is, the magnitude obtained by summing the horizontal and vertical gradients calculated from all sample sets included in the corresponding neighboring block, along with an intra-frame prediction mode, can be stored as gradient information in the corresponding neighboring block.
[0429] In an embodiment, the magnitude obtained by summing the horizontal and vertical gradients calculated from all sample sets included in the first left neighboring block 3312, and the intra-frame prediction mode 3340 corresponding to the magnitude, can be stored as gradient information of the first left neighboring block 3312.
[0430] In an embodiment, the gradient information of the current block 3300 can be generated by summing the magnitudes of each intra-prediction mode included in the gradient information of the left neighboring blocks 3311 and 3312, the upper neighboring blocks 3321, 3322, 3323 and 3324, and the upper left neighboring block 3330, based on each corresponding intra-prediction mode. In other words, the gradient information of the current block 3300 can be generated by accumulating the magnitudes of the intra-prediction modes included in the gradient information of the neighboring blocks and the corresponding intra-prediction modes. The magnitudes of each intra-prediction mode can be summed. Referring to the following figures, the process for generating the gradient information of the current block 3300 will now be described in detail.
[0431] Figure 34 This is a diagram illustrating a method for generating gradient information of the current block using gradient information of a previous block, according to an embodiment.
[0432] Reference Figure 31 It can be used for, for example Figures 23 to 25 The gradient information is stored in each of the following blocks in the current block 3300: the first left neighbor block 3311, the second left neighbor block 3312, the first top neighbor block 3321, the second top neighbor block 3322, the third top neighbor block 3323, the fourth top neighbor block 3324, and the top left neighbor block 3330.
[0433] In this embodiment, the gradient information of the first left neighboring block 3311 may include angle pattern 8 and its corresponding amplitude a. The gradient information of the second left neighboring block 3312 may include angle pattern 11 and its corresponding amplitude b. The gradient information of the first upper neighboring block 3321 may include angle pattern 4 and its corresponding amplitude c. The gradient information of the second upper neighboring block 3322 may include angle pattern 28 and its corresponding amplitude d. The gradient information of the third upper neighboring block 3323 may include angle pattern 16 and its corresponding amplitude e. The gradient information of the fourth upper neighboring block 3324 may include angle pattern 11 and its corresponding amplitude f. The gradient information of the upper left neighboring block 3330 may include angle pattern 42 and its corresponding amplitude g.
[0434] As described above, the gradient information of the current block 3300 can be generated by accumulating the intra-prediction modes and their magnitudes, which are included in the gradient information of the left neighboring blocks 3311 and 3312, the upper neighboring blocks 3321, 3322, 3323 and 3324, and the upper left neighboring block 3330. The magnitudes for each intra-prediction mode can be summed.
[0435] For example, when the gradient information of the second left neighboring block 3312 identifies the amplitude corresponding to angle mode 11 as b, and the gradient information of the second left neighboring block 3012 identifies the amplitude corresponding to angle mode 11 as f, the amplitude corresponding to angle mode 11 in the gradient information of the current block 3000 can be b+f.
[0436] In an embodiment, the gradient information of the current block 3300 may include intra-prediction modes that are not redundantly included in multiple neighboring blocks and are included in the intra-prediction modes in the left neighboring blocks 3311 and 3312, the upper neighboring blocks 3321, 3322, 3323 and 3324 and the upper left neighboring block 3330, without summing the magnitudes.
[0437] In this embodiment, the image decoding device 2000 can derive intra-prediction modes based on the generated gradient information. The image decoding device 2000 can derive multiple intra-prediction modes based on the generated gradient information. A maximum number of intra-prediction modes to be derived can be predefined. For example, the maximum number can be defined as 2, 3, 4, 5, etc. For example, a predetermined number of intra-prediction modes included in the generated gradient information, arranged in descending order of magnitude, can be derived as the intra-prediction modes for the current block.
[0438] In an embodiment, the image decoding device 2000 can generate a final prediction block by combining prediction factors generated according to the derived intra-frame prediction mode.
[0439] The previous blocks that can be used to generate the gradient information of the current block will now be described below.
[0440] In this embodiment, when configuring the gradient information of the current block, the image decoding device 2000 can refer to the gradient information of a reference block included in the current frame or a reference frame. That is, the image decoding device 2000 can generate / update the gradient information of the current block by referring to the gradient information stored in a reference block specified by a block vector (BV) in the current frame. In the example, in the current frame including the current block, the reference block can be specified by the block vector of the current block.
[0441] Optionally, the image decoding device 2000 can generate / update the gradient information of the current block by referring to the gradient information stored in a reference block specified by a motion vector in a reference frame. In the example, the reference block can be specified in the reference frame of the current block by the motion vector of a spatially or temporally neighboring block.
[0442] In the embodiments, when referring to the above references Figure 26 When configuring the gradient information of the current block in the described embodiment, the image decoding device 2000 may refer to the gradient information of a reference block. Optionally, when referring to the above... Figures 29 to 34 In the described embodiment, when the gradient information of the current block is configured according to the DIMD merging mode, the image decoding device 2000 can refer to the gradient information of the reference block.
[0443] In an embodiment, the gradient information referenced from a reference block specified by the motion vector or block vector can be based on the above reference. Figure 35 The described embodiment stores gradient information.
[0444] Furthermore, in this embodiment, when the gradient information of the current block is configured, the image decoding device 2000 may refer to the gradient information of the spatially neighboring blocks and / or temporally neighboring blocks of the current block. In the example, the image decoding device 2000 may configure the gradient information of the current block by referring to the gradient information of the spatially neighboring blocks and / or temporally neighboring blocks used for motion vector derivation. This will be referred to below. Figure 35 Describe it.
[0445] Figure 35 This is a diagram illustrating an example of the positions of spatially and temporally adjacent blocks according to an embodiment.
[0446] Reference Figure 35 The spatial and temporal neighboring blocks of the current block 3500 can be defined as blocks at various locations. In the example, spatial and temporal neighboring blocks can be merge candidates.
[0447] In this embodiment, the spatial neighboring blocks of the current block 3500 can be defined as... Figure 35 The blocks at positions A0, A1, A2, B0, B1, B2, and B3 are shown in the diagram. In this respect, some blocks at certain positions can be omitted, or all blocks except those shown can be omitted. Figure 32 Blocks located outside the positions shown are additionally used as spatial neighbor blocks.
[0448] Furthermore, the time neighboring block of the current block 3500 can be defined as Figure 35The block at position T is shown in the image. A time-nearest block can be a block included in a reference frame or a co-located frame. In the example, a block at a position other than position T can be defined as a time-nearest block of the current block 3500, and a block at a position other than position T can be defined as a time-nearest block of the current block 3500.
[0449] In this embodiment, when the gradient information of the current block 3500 is configured, the image decoding device 2000 can refer to Figure 35 The image decoding device 2000 can reference the gradient information of the spatial and / or temporal neighboring blocks at the location of the current block. Figure 36 The gradient information of the current block is generated / updated by using gradient information stored in the spatial and / or temporal neighboring blocks of the current block at the location shown in the figure.
[0450] Furthermore, in this embodiment, the image decoding device 2000 may reference gradient information of blocks at non-adjacent locations. In this context, a non-adjacent location can be a non-adjacent merging candidate location. A non-adjacent merging candidate location can be defined as a specific location within a grid with a predefined size.
[0451] According to this embodiment, the accuracy of DIMD-based intra-frame prediction can be improved by updating the gradient information of the current block based on the gradient information of neighboring blocks used for motion prediction.
[0452] Furthermore, when the gradient information of the current block is configured, the image decoding device 2000 can refer to the gradient information of a reference block in the current frame. Here, the reference block in the current frame can be specified by a block vector derived through intra-frame template matching prediction or intra-frame block copying.
[0453] A reference block, specified by motion vectors used in inter-frame prediction or block vectors used in intra-frame prediction, can have a high similarity to the current block. Therefore, by combining the gradient information of the current block with the gradient information of the reference block specified by the motion vectors and block vectors, the accuracy of DIMD-based intra-frame prediction can be improved.
[0454] According to traditional image compression techniques, gradient information is only used to find the predicted directionality in intra-frame mode. However, according to embodiments of this disclosure, gradient information can be used in various prediction methods. This will be referenced below. Figure 36 Describe it.
[0455] Figure 36 This is a diagram illustrating a method for referencing gradient information in inter-frame mode according to an embodiment.
[0456] Reference Figure 36Gradient information can be stored during inter-frame prediction processing. Gradient information can be stored in units of coding units (CUs), prediction units (PUs), or transform units (TUs). Optionally, gradient information can be stored in block units with predefined fixed sizes.
[0457] In an embodiment, when performing a weighted summation on reference blocks derived from reference images in two directions, gradient information of the reference blocks can be used. Figure 36 (a) indicates a bidirectional prediction of the current frame 3600 in time between the first reference frame 3610 and the second reference frame 3620. Figure 36 (b) indicates bidirectional prediction of the first reference screen 3610 and the second reference screen 3620 relative to the current screen 3600 in the same direction. Figure 36 (c) indicates that bidirectional prediction of two reference blocks is derived from the first reference frame 3610, which is the same reference frame.
[0458] Reference Figure 36 (d), calculated via such Figure 37 The weighted sum of the first reference block 3650 and the second reference block 3660 derived from the bidirectional predictions in (a) to (c) is used to generate a reference image 3640 for the current block 3630. The reference image 3640 can be a predicted block of the current block 3630.
[0459] In an embodiment, the weights used in the weighted sum of the first reference block 3650 and the second reference block 3660 can be determined based on the gradient information of the first reference block 3650 and the second reference block 3660. For example, the gradient information of the first reference block 3650 and the second reference block 3660 can be compared with the gradient information of the current block 3630, and relatively large weights can be applied to reference blocks with high similarity.
[0460] Furthermore, in the embodiments, in intra-frame template matching prediction or intra-frame block copy mode, prediction can be performed by referencing stored gradient information. For example, when multiple block vectors are found, a reference block with a tilt that is relatively more similar to the gradient information of the current block can be defined as the most similar block in the frame. In other words, when multiple reference blocks are specified by block vectors, a reference block with gradient information that is relatively similar to the gradient information of the current block can be selected.
[0461] That is, templates with similar gradient information can be added to the search candidate list, and the order of candidates in the search candidate list can be determined by considering the similarity of gradient information. The similarity of gradient information can be determined by comparing the magnitude values according to the intra-frame prediction patterns, or by comparing representative intra-frame prediction patterns of the mapping.
[0462] Furthermore, in this embodiment, when configuring the merge candidate list using spatial / temporal merge candidates, the merge candidates included in the merge candidate list can be reordered. In the example, the merge candidate list may include non-adjacent merge candidates.
[0463] Figure 37 This is a diagram illustrating the location of neighboring blocks used in intra-frame prediction according to an embodiment.
[0464] Reference Figure 37 The positions of the neighboring blocks of the current block 3700 are used as most probable mode (MPM) candidates. According to conventional image compression techniques, MPMs are used to transmit intra-prediction mode information via signals in order to efficiently encode / decode 67 intra-prediction modes. The neighboring blocks of the current block 3700 may include the blocks at positions A, B, C, D, and E. In this regard, some blocks at certain positions can be omitted, or blocks other than those at certain positions can be included. Figure 38 Blocks at locations other than those shown in the diagram are also considered as MPM candidates.
[0465] Six MPM candidates can be configured based on the intra-prediction modes of neighboring blocks of the current block 3700, using the feature that the intra-prediction modes of neighboring blocks are similarly determined when the block is encoded / decoded via intra-prediction. These six configured MPM candidates can then be included in the MPM list. In the example, the MPM list can be configured by excluding specific candidates from the entire MPM list. For example, specific candidates could be planar mode, DC mode, etc.
[0466] When the intra-prediction mode of the current block 3700 is included in the MPM list, i.e., when an MPM is used in the intra-prediction of the current block 3700, the MPM index can be signaled. The MPM index indicates the candidate among the MPM candidates included in the MPM list that will be used in the intra-prediction of the current block 3700. When the intra-prediction mode of the current block 3700 is not included in the MPM list, i.e., when an MPM is not used in the intra-prediction of the current block 3700, intra-prediction mode coding for the current block 3700 can be performed in the intra-prediction mode group configured when excluding the 6 MPM candidates.
[0467] In this embodiment, when the gradient information of the current block 3700 is configured, the image decoding device 2000 can refer to the gradient information of the MPM candidate blocks. That is, the gradient information of the current block 3700 can be generated / updated based on the gradient information stored in the neighboring blocks of the current block 37000, which is used as an MPM candidate. Since the gradient information of the blocks at the neighboring MPM candidate locations of the current block 3700 is combined with the gradient information of the current block 3700, the accuracy of DIMD prediction for the current block 3700 can be improved.
[0468] Furthermore, in an embodiment, when the MPM list for the current block 3700 is configured, the image decoding device 2000 can add the DIMD mode of the current block 3700 as an MPM candidate to the MPM list. Here, the DIMD mode indicates an intra-prediction mode derived by the decoder via DIMD processing. A DIMD mode may correspond to one intra-prediction mode or multiple intra-prediction modes. In this disclosure, the DIMD mode may be referred to as a representative intra-prediction mode. The number of DIMD modes added to the MPM list can be predefined. Optionally, when a DIMD mode corresponds to multiple intra-prediction modes, the DIMD mode can be added to the MPM list until the maximum number in the MPM list is met.
[0469] Furthermore, in an embodiment, the image decoding device 2000 may add the DIMD mode of the MPM candidate block of the current block 3700 as an MPM candidate to the MPM list.
[0470] Figure 38 This is a diagram illustrating an example of an intra-frame prediction method for chroma blocks according to an embodiment.
[0471] Reference Figure 38 DIMD processing can be performed on chroma blocks. When DIMD is applied to the current chroma block 3800, the image decoding device 2000 can refer to the gradient information of the corresponding luma block 3810 of the current chroma block 3800. That is, the gradient information of the current chroma block 3800 can be generated / updated by using the gradient information of the corresponding luma block 3810 of the current chroma block 3800.
[0472] In an embodiment, the position of the corresponding luma block 3810 referenced in the DIMD process relative to the current chroma block 3800 can be defined as various positions within the corresponding luma block 3810. For example, the position of the corresponding luma block 3810 referenced by the current chroma block 3800 in the DIMD process can be defined as the center position within the corresponding luma block 3810. Here, the center position can be defined as including, for example... Figure 39 The luminance block shown is the bottom-right center pixel, or it can be defined as a luminance block including the bottom-left center pixel, the top-right center pixel, and the top-left center pixel. In the example, the block at the center position of luminance block 3810 can be referred to as luminance block 3810.
[0473] Furthermore, in the embodiments, the position of the corresponding luma block 3810 of the current chroma block 3800 referenced in the DIMD processing for the current chroma block 3800 can be defined as the upper left, upper right, lower left, and lower right positions within the corresponding luma block 3810. Additionally, neighboring blocks around the center block within the corresponding luma block 3810 can be referenced in the DIMD processing for the current chroma block 3800. In the example, the gradient information of the current chroma block 3800 can be generated / updated by referencing the gradient information of all luma blocks within the corresponding luma block 3810.
[0474] In the case of I-striping, luma component blocks and chroma component blocks can have independent coding trees (i.e., a dual-tree structure). Here, there can be one or more luma component blocks corresponding to a chroma component block. Therefore, in DIMD prediction, not only the corresponding luma block but also its neighboring blocks can be referenced. That is, when referring to DIMD prediction information about one or more luma component blocks corresponding to a chroma component block, the accuracy of DIMD prediction for the chroma component block can be improved.
[0475] Figures 32 to 34 This is a flowchart of an image decoding method according to an embodiment.
[0476] In operation S3910, the image decoding device 2000 can obtain gradient information from multiple previous blocks decoded before the current block. Here, the gradient information may include a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the first value.
[0477] In an embodiment, gradient information satisfying predetermined conditions can be obtained from a first previous block among a plurality of previous blocks. The gradient information satisfying predetermined conditions obtained from the first previous block may include a second value that exceeds a predefined threshold from a second value calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block, and a first value corresponding to the second value that exceeds the threshold.
[0478] In an embodiment, the threshold may be predefined as a fixed value or a value determined based on the bit depth.
[0479] In an embodiment, gradient information satisfying predetermined conditions can be obtained from a second prior block among a plurality of prior blocks. The gradient information satisfying predetermined conditions obtained from the second prior block may include a second value corresponding to a third result and a first value corresponding to that second value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the second prior block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the second prior block. In the example, as referenced above… Figures 32 to 34The gradient information of the second previous block may include a first value.
[0480] Optionally, in an embodiment, gradient information satisfying predetermined conditions can be obtained from a third previous block among a plurality of previous blocks. The gradient information satisfying predetermined conditions obtained from the third previous block may include a value obtained by normalizing a second value corresponding to a third result based on the number of samples included in all sample sets, and a first value corresponding to that value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block. In the example, as referenced above… Figure 40 The gradient information of the third previous block may include a first value.
[0481] In an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0482] In an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0483] In operation S3920, the image decoding device 2000 can generate gradient information for the current block by using the obtained gradient information.
[0484] In an embodiment, the image decoding device 2000 can generate gradient information for the current block based on each corresponding intra-prediction mode by summing the magnitudes of each intra-prediction mode included in the gradient information of multiple previous blocks. In other words, the image decoding device 2000 can generate gradient information for the current block based on each corresponding intra-prediction mode by summing a second value included in the gradient information of multiple previous blocks.
[0485] When operating S3930, the image decoding device 2000 can derive the intra-frame prediction mode of the current block based on the gradient information of the current block.
[0486] In an embodiment, the image decoding device 2000 can derive the intra prediction modes corresponding to a predetermined number of the largest amplitudes among the amplitudes of the intra prediction modes included in the gradient information of the current block as the intra prediction modes of the current block. In other words, the image decoding device 2000 can derive the intra prediction modes corresponding to a predetermined number of the largest second values among the second values included in the gradient information of multiple previous blocks as the intra prediction modes of the current block.
[0487] In operation S3940, the image decoding device 2000 can generate a prediction block for the current block by performing intra-frame prediction on the current block using a derived intra-frame prediction mode.
[0488] In an embodiment, when multiple intra-prediction modes are derived using the gradient information of the current block, the image decoding device 2000 can generate a temporary prediction block based on each of the derived intra-prediction modes and a planar mode. The image decoding device 2000 can generate the prediction block of the current block by performing a weighted summation on the temporary prediction blocks.
[0489] In an embodiment, the image decoding device 2000 can reconstruct the current block using the predicted block.
[0490] In an embodiment, the image decoding device 2000 may determine the predicted block as the current block to be reconstructed.
[0491] In one embodiment, the image decoding device 2000 can generate a reconstructed current block by combining residual data obtained from the bitstream with the predicted block.
[0492] Figure 40 This is a block diagram illustrating the configuration of an image encoding device according to an embodiment.
[0493] Reference Figure 19 The image encoding device 4000 may include a predictive encoder 4010 and a generator 4020.
[0494] According to an embodiment, the predictive encoder 4010 and the generator 4020 may be implemented as at least one processor. In an embodiment, the predictive encoder 4010 and the generator 4020 may operate according to at least one instruction stored in at least one memory.
[0495] Image encoding device 4000 may include at least one memory for storing input / output data of predictive encoder 4010 and generator 4020. Furthermore, image encoding device 4000 may include a memory controller configured to control the input of data to / output of data from at least one memory.
[0496] In this embodiment, the predictive encoder 4010 may correspond to Figure 19 The predictive encoder 1915 is shown in the figure, and the generator 4020 can correspond to Figure 21 The entropy encoder 1925 is shown in the figure.
[0497] The predictive encoder 4010 determines the prediction mode of the current block. The current block can be the largest coding unit, coding unit, transform unit, or prediction unit divided from the current frame to be encoded.
[0498] In an embodiment, the prediction mode of the current block can be determined as one of a plurality of prediction modes, including intra-frame mode and inter-frame mode.
[0499] In an embodiment, when the prediction mode of the current block is intra-frame mode, the prediction encoder 4010 can determine the intra-frame prediction mode of the current block.
[0500] The intra-prediction mode for the current block can be one of several intra-prediction modes. (See reference...) Figures 23 to 26 The described multiple intra-frame prediction modes may include non-angular intra-frame modes and angular intra-frame modes.
[0501] In an embodiment, the predictive encoder 4010 may perform intra-frame prediction or inter-frame prediction on the current block according to the prediction mode of the current block, and may encode the current block by using the prediction block generated as a result of performing intra-frame prediction or inter-frame prediction.
[0502] In an embodiment, the encoding of the current block may indicate the processing that generates information to allow the image decoding device 2000 to reconstruct the current block. The information generated via encoding may be included in a bitstream.
[0503] In this embodiment, the predictive encoder 4010 may generate residual data corresponding to the difference between the predicted block and the current block. No residual data may be generated when the predicted block is determined to be the current block.
[0504] According to an embodiment, when the prediction mode of the current block is intra-frame mode, the prediction encoder 4010 can determine a method for determining the intra-frame prediction mode. Information indicating the method for determining the intra-frame mode can be included in the bitstream via generator 4020.
[0505] In an embodiment, the method for determining the intra-prediction mode may include a method for deriving the intra-prediction mode based on gradients or a method for selecting any one of multiple intra-prediction modes based on cost. Regarding rate distortion, the predictive encoder 4010 may choose between the method for deriving the intra-prediction mode based on gradients or the method for selecting any one of multiple intra-prediction modes based on cost.
[0506] In embodiments, information indicating the method for determining the intra-frame prediction mode may be included in the sequence parameter set, frame parameter set, stripe header, or stripe data of the bitstream. In an example, the stripe data may include information that will be signaled at the level of the coding tree, coding unit, transform tree, or transform unit.
[0507] In an embodiment, the prediction encoder 4010 may determine the intra-prediction mode of the current block according to any predetermined method.
[0508] In an embodiment, when the method for determining the intra-prediction mode corresponds to a method for selecting any one intra-prediction mode from multiple intra-prediction modes based on cost, the predictive encoder 4010 can select the intra-prediction mode with the lowest cost when encoding the current block from the multiple intra-prediction modes. Information indicating the selected intra-prediction mode can be included in the bitstream. For example, information indicating the intra-prediction mode of the current block may include a flag or index indicating any one of the multiple intra-prediction modes.
[0509] When the method for determining the intra-prediction mode corresponds to the method for deriving the intra-prediction mode based on gradients, the prediction encoder 4010 can derive the intra-prediction mode using the same method as the image decoding device 2000.
[0510] When a prediction block is generated via intra-frame prediction for the current block, the prediction encoder 4010 can encode the current block using the prediction block.
[0511] In one embodiment, the predictive encoder 4010 may generate residual data corresponding to the difference between the predicted block and the current block. The residual data may be included in the bitstream.
[0512] In an embodiment, the predictive encoder 4010 can derive the intra-prediction mode of the current block based on the gradient between at least two samples included in the neighborhood region of the current block. The predictive encoder 4010 can compute the gradient using at least two samples included in the neighborhood region of the current block. The predictive encoder 4010 can generate gradient information by accumulating the computed gradient.
[0513] In an embodiment, the predictive encoder 4010 can obtain gradients between at least two samples in the neighborhood of the current block by using a predefined filter. Furthermore, the predictive encoder 4010 can generate gradient information for the current block based on the obtained gradients.
[0514] Furthermore, in an embodiment, the predictive encoder 4010 can obtain gradient information of previous blocks encoded before the current block, and can generate gradient information of the current block by using the obtained gradient information.
[0515] The above reference Figures 29 to 38 as well as Figure 27 The described implementation of the gradient information configuration can be applied by the predictive encoder 4010 in essentially the same way. No further description is provided here.
[0516] In an embodiment, the predictive encoder 4010 may obtain gradient information of a previous block, the gradient information including a second value that exceeds a predefined threshold from a second value corresponding to an intra-prediction mode calculated from the gradient between at least two samples included in the previous block or between at least two samples adjacent to the previous block, and a first value corresponding to the second value that exceeds the predefined threshold.
[0517] In an embodiment, the threshold may be predefined as a fixed value or a value determined based on the bit depth.
[0518] In an embodiment, the predictive encoder 4010 can obtain gradient information of a previous block, which includes a second value corresponding to a third value and a first value corresponding to the second value, wherein the third value is the sum of the first result obtained by summing the horizontal gradients calculated from all sample sets included in the previous block and the second result obtained by summing the vertical gradients calculated from all sample sets included in the previous block.
[0519] Furthermore, in an embodiment, the predictive encoder 4010 can obtain gradient information of the previous block, which includes a value obtained by normalizing a second value corresponding to the third result based on the number of samples included in all sample sets, and a first value corresponding to the third value. The third result is the sum of the first result obtained by summing the horizontal gradients calculated from all sample sets included in the previous block and the second result obtained by summing the vertical gradients calculated from all sample sets included in the previous block.
[0520] In an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0521] In an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0522] In an embodiment, the predictive encoder 4010 can generate gradient information for the current block by using the obtained gradient information.
[0523] In an embodiment, the predictive encoder 4010 can generate the gradient information of the current block based on each corresponding intra-prediction mode by summing the magnitudes of each intra-prediction mode included in the gradient information of multiple previous blocks. In other words, the predictive encoder 4010 can generate the gradient information of the current block based on each corresponding intra-prediction mode by summing a second value included in the gradient information of multiple previous blocks.
[0524] In an embodiment, the predictive encoder 4010 can derive intra-prediction modes based on the generated gradient information. In this example, the predictive encoder 4010 can derive multiple intra-prediction modes based on the gradient information. A maximum number of intra-prediction modes to be derived can be predefined. For example, the maximum number can be defined as 2, 3, 4, 5, etc. For instance, a predetermined number of intra-prediction modes included in the generated gradient information, arranged in descending order of magnitude, can be derived as the intra-prediction modes for the current block.
[0525] In an embodiment, the prediction encoder 4010 can generate a prediction block for the current block by performing intra-prediction on the current block using an intra-prediction mode. The prediction encoder 4010 can generate prediction factors by using a derived intra-prediction mode.
[0526] In an embodiment, the predictive encoder 4010 can generate a final prediction block by combining predictive factors generated according to a derived intra-prediction mode. In an example, the predictive encoder 4010 can generate the final prediction block by performing a weighted summation of predictive factors generated according to the derived intra-prediction mode and predictive factors generated according to a planar mode. See also... Figure 28 and Figure 41 The described embodiment of generating the final prediction block by using a weighted sum of predictors can be applied substantially equivalently to this embodiment, and in this respect, no redundant description is provided.
[0527] In one embodiment, the predictive encoder 4010 can encode the current block using a predictive block. As a result of encoding the current block, a bitstream can be generated. In another embodiment, the image encoding device 4000 can obtain residual data corresponding to the difference between the predictive block and the original block, and information about the residual data can be included in the bitstream.
[0528] In the embodiments, the operation of the predictive encoder 4010 of the image encoding device 4000 is equivalent to the operation of the predictive decoder 2030 of the image decoding device 2000. Therefore, the description of the operation of the predictive decoder 2030 can also be applied to the predictive encoder 4010.
[0529] Generator 4020 can generate a bitstream that includes the result of encoding the image. The bitstream may include the result of encoding the current block.
[0530] In one embodiment, generator 4020 may send a bitstream to image decoding device 2000 via a network.
[0531] In an embodiment, generator 4020 may store the bitstream in a data storage medium, wherein the data storage medium includes magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as optical floppy disks, etc.
[0532] Generator 4020 can generate a bitstream that includes syntax elements generated by encoding the picture. Depending on the layered structure of the picture, the values corresponding to the syntax elements can be included in the bitstream.
[0533] Generator 4020 can obtain binary bits included in the bit stream by entropy encoding the syntax elements.
[0534] In an embodiment, the bitstream may include information about the prediction pattern of the current block in the current frame.
[0535] Figures 32 to 34 This is a flowchart of an image encoding method according to an embodiment.
[0536] In operation S4110, the image encoding device 4000 can obtain gradient information from multiple previous blocks encoded before the current block. Here, the gradient information may include a first value corresponding to at least one intra-prediction mode and a second value corresponding to the first value.
[0537] In an embodiment, gradient information satisfying predetermined conditions can be obtained from a first previous block among a plurality of previous blocks. The gradient information satisfying predetermined conditions obtained from the first previous block may include a second value in the amplitude corresponding to the intra-prediction mode that exceeds a predefined threshold and a first value corresponding to the second value that exceeds the threshold, wherein the amplitude is calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block.
[0538] In an embodiment, the threshold may be predefined as a fixed value or a value determined based on the bit depth.
[0539] In an embodiment, gradient information satisfying predetermined conditions can be obtained from a second prior block among a plurality of prior blocks. The gradient information satisfying predetermined conditions obtained from the second prior block may include a second value corresponding to a third result and a first value corresponding to the second value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the second prior block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the second prior block. In the example, as referenced above… Figures 32 to 34 The gradient information of the second previous block may include a first value.
[0540] Optionally, in an embodiment, gradient information satisfying predetermined conditions can be obtained from a third previous block among a plurality of previous blocks. The gradient information satisfying predetermined conditions obtained from the third previous block may include a value obtained by normalizing a second value corresponding to a third result based on the number of samples included in all sample sets, and a first value corresponding to that value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block. In the example, as referenced above… Figures 23 to 26 The gradient information of the third previous block may include a first value.
[0541] In an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0542] In an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0543] In operation S4120, the image encoding device 4000 can generate gradient information for the current block by using the obtained gradient information.
[0544] Reference above Figures 29 to 38 as well as The described implementation of the gradient information configuration can be applied by the image encoding device 4000 in essentially the same way. No further description is provided here.
[0545] In an embodiment, the image coding device 4000 can generate gradient information for the current block based on each corresponding intra-prediction mode by summing the magnitudes of each intra-prediction mode included in the gradient information of multiple previous blocks. In other words, the image coding device 4000 can generate gradient information for the current block based on each corresponding intra-prediction mode by summing a second value included in the gradient information of multiple previous blocks.
[0546] In operation S4130, the image coding device 4000 can derive the intra-prediction mode of the current block based on the gradient information of the current block.
[0547] In an embodiment, the image coding device 4000 can derive the intra prediction modes corresponding to a predetermined number of the largest amplitudes among the amplitudes of the intra prediction modes included in the gradient information of the current block as the intra prediction modes of the current block. In other words, the image coding device 4000 can derive the intra prediction modes corresponding to a predetermined number of the largest second values among the second values included in the gradient information of multiple previous blocks as the intra prediction modes of the current block.
[0548] In operation S4140, the image encoding device 4000 can generate a prediction block for the current block by performing intra-prediction on the current block using a derived intra-prediction mode.
[0549] In an embodiment, when multiple intra-prediction modes are derived using gradient information of the current block, the image coding device 4000 can generate a provisional prediction block based on each of the derived multiple intra-prediction modes and planar modes. The image coding device 4000 can generate the prediction block of the current block by performing a weighted summation on the provisional prediction blocks.
[0550] In one embodiment, the image encoding device 4000 can encode the current block using a predicted block. As a result of encoding the current block, a bitstream can be generated.
[0551] In an embodiment, the image encoding device 4000 may determine the predicted block as the current block to be reconstructed.
[0552] In an embodiment, the image encoding device 4000 can obtain residual data corresponding to the difference between the predicted block and the original block, and information about the residual data can be included in the bitstream.
[0553] According to an embodiment, an image encoding method and apparatus 4000 and an image decoding method and apparatus 2000 are provided to improve the performance of predictive encoding and predictive decoding for the current block.
[0554] According to an embodiment, an image encoding method and apparatus 4000 and an image decoding method and apparatus 2000 are provided to reduce the amount of data required to transmit intra-frame prediction modes with signals.
[0555] According to an embodiment, an image encoding method and apparatus 4000 and an image decoding method and apparatus 2000 are provided to reduce the bit rate of a bitstream.
[0556] The technical features intended to be implemented in this disclosure are not limited to those described above, and other unstated technical features will be clearly understood by those skilled in the art in light of the following description.
[0557] According to an embodiment, an image decoding method may include obtaining gradient information from a plurality of previous blocks decoded before the current block.
[0558] According to an embodiment, gradient information may include at least one intra-frame prediction mode and an amplitude corresponding to the at least one intra-frame prediction mode.
[0559] According to an embodiment, the gradient information may include a first value corresponding to the at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
[0560] According to an embodiment, the image decoding method may include generating gradient information for the current block by using the obtained gradient information.
[0561] According to an embodiment, the image decoding method may include deriving the intra-prediction mode of the current block based on at least one magnitude corresponding to the at least one intra-prediction mode included in the gradient information of the current block.
[0562] According to an embodiment, the image decoding method may include generating a prediction block for the current block by performing intra-frame prediction on the current block using a derived intra-frame prediction mode.
[0563] According to an embodiment, gradient information obtained from a first previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value that exceeds a predefined threshold from a second value calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block, and a first value corresponding to the second value that exceeds the threshold.
[0564] According to an embodiment, the threshold can be predefined as a fixed value or a value determined based on the bit depth.
[0565] According to an embodiment, multiple prior blocks may be provided.
[0566] According to an embodiment, the image decoding method may include: generating gradient information for the current block by summing the magnitudes of each intra-prediction mode included in the gradient information of multiple previous blocks, based on each corresponding intra-prediction mode.
[0567] According to an embodiment, the image decoding method may include: generating gradient information for the current block by summing a second value included in gradient information of a plurality of previous blocks, based on each corresponding intra-frame prediction mode.
[0568] According to an embodiment, the image decoding method may include: deriving the intra-prediction mode corresponding to a predetermined number of the largest second values among the second values included in the gradient information of the current block as the intra-prediction mode of the current block.
[0569] According to an embodiment, gradient information obtained from a second previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value corresponding to a third result and a first value corresponding to the second value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the second previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the second previous block.
[0570] According to an embodiment, gradient information satisfying predetermined conditions obtained from a third previous block among a plurality of previous blocks may include a value obtained by normalizing a second value corresponding to a third result based on the number of samples included in all sample sets, and a first value corresponding to the corresponding value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block.
[0571] According to an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0572] According to an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0573] According to an embodiment, block vectors can be derived based on intra-frame block copy mode or intra-frame template matching mode.
[0574] According to an embodiment, the image decoding method may include: when deriving multiple intra-prediction modes using gradient information of the current block, generating a temporary prediction block based on each of the multiple derived intra-prediction modes and the planar mode.
[0575] According to an embodiment, the image decoding method may include: generating a prediction block for the current block by performing a weighted summation on a temporary prediction block.
[0576] According to an embodiment, an image decoding device may include: at least one memory storing at least one instruction; and at least one processor configured to operate according to the at least one instruction.
[0577] In an embodiment, the at least one processor may be configured to obtain gradient information satisfying predetermined conditions from a plurality of previous blocks decoded before the current block.
[0578] According to an embodiment, gradient information may include at least one intra-frame prediction mode and the magnitude corresponding to the at least one intra-frame prediction mode.
[0579] According to an embodiment, the gradient information may include a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
[0580] In an embodiment, the at least one processor may be configured to use the obtained gradient information to generate gradient information for the current block.
[0581] In an embodiment, the at least one processor may be configured to derive the intra-prediction mode of the current block based on at least one magnitude corresponding to at least one intra-prediction mode included in the gradient information of the current block.
[0582] In an embodiment, the at least one processor may be configured to generate a predicted block for the current block by performing intra-prediction on the current block using a derived intra-prediction mode.
[0583] According to an embodiment, gradient information obtained from a first previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value that exceeds a predefined threshold from a second value calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block, and a first value corresponding to the second value that exceeds the threshold.
[0584] According to an embodiment, the threshold can be predefined as a fixed value or a value determined based on the bit depth.
[0585] According to an embodiment, multiple prior blocks may be provided.
[0586] In an embodiment, the at least one processor may be configured to generate gradient information for the current block by summing the magnitudes of each intra-prediction mode included in the gradient information for a plurality of previous blocks, based on each corresponding intra-prediction mode.
[0587] In an embodiment, the at least one processor may be configured to generate gradient information for the current block by summing a second value included in the gradient information of a plurality of previous blocks, based on each corresponding intra-prediction mode.
[0588] In an embodiment, the at least one processor may be configured to derive the intra-prediction mode corresponding to a predetermined number of the largest second values among the second values included in the gradient information of the current block as the intra-prediction mode of the current block.
[0589] According to an embodiment, gradient information obtained from a second previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value corresponding to a third result and a first value corresponding to the second value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the second previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the second previous block.
[0590] According to an embodiment, the gradient information obtained from a third previous block among a plurality of previous blocks that satisfies predetermined conditions may include a value obtained by normalizing a second value corresponding to a third result based on the number of samples included in all sample sets, and a first value corresponding to the corresponding value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block.
[0591] According to an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0592] According to an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0593] According to an embodiment, block vectors can be derived based on intra-frame block copy mode or intra-frame template matching mode.
[0594] In an embodiment, the at least one processor may be configured to generate a temporary prediction block based on each of the multiple intra-prediction modes and the planar mode when multiple intra-prediction modes are derived using gradient information of the current block.
[0595] In an embodiment, the at least one processor may be configured to generate a prediction block for the current block by performing a weighted summation on the temporary prediction blocks.
[0596] According to an embodiment, an image encoding method may include obtaining gradient information from a plurality of previous blocks encoded before the current block.
[0597] According to an embodiment, gradient information may include at least one intra-frame prediction mode and the magnitude corresponding to the at least one intra-frame prediction mode.
[0598] According to an embodiment, the gradient information may include a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
[0599] According to an embodiment, the image encoding method may include generating gradient information for the current block by using the obtained gradient information.
[0600] According to an embodiment, the image coding method may include deriving the intra-prediction mode of the current block based on at least one magnitude corresponding to at least one intra-prediction mode included in the gradient information of the current block.
[0601] According to an embodiment, the image encoding method may include generating a prediction block for the current block by performing intra-prediction on the current block using a derived intra-prediction mode.
[0602] According to an embodiment, gradient information obtained from a first previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value that exceeds a predefined threshold from a second value calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block, and a first value corresponding to the second value that exceeds the threshold.
[0603] According to an embodiment, the threshold can be predefined as a fixed value or a value determined based on the bit depth.
[0604] According to an embodiment, multiple prior blocks may be provided.
[0605] According to an embodiment, the image coding method may include: generating gradient information for the current block by summing the magnitudes of each intra-prediction mode included in the gradient information for a plurality of previous blocks, based on each corresponding intra-prediction mode.
[0606] According to an embodiment, the image encoding method may include: generating gradient information for the current block by summing a second value included in gradient information of a plurality of previous blocks, based on each corresponding intra-frame prediction mode.
[0607] According to an embodiment, the image encoding method may include: deriving the intra-prediction mode corresponding to the maximum number of second values among the second values included in the gradient information of the current block as the intra-prediction mode of the current block.
[0608] According to an embodiment, gradient information obtained from a second previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value corresponding to a third result and a first value corresponding to the second value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the second previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the second previous block.
[0609] According to an embodiment, the gradient information obtained from a third previous block among a plurality of previous blocks that satisfies predetermined conditions may include a value obtained by normalizing a second value corresponding to a third result based on the number of samples included in all sample sets, and a first value corresponding to the corresponding value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block.
[0610] According to an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0611] According to an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0612] According to an embodiment, block vectors can be derived based on intra-frame block copy mode or intra-frame template matching mode.
[0613] According to an embodiment, the image encoding method may include: when deriving multiple intra-prediction modes using gradient information of the current block, generating a temporary prediction block based on each of the multiple derived intra-prediction modes and the planar mode.
[0614] According to an embodiment, the image encoding method may include generating a prediction block for the current block by performing a weighted summation on temporary prediction blocks.
[0615] According to an embodiment, the image encoding method may include encoding the current block by using a prediction block.
[0616] According to an embodiment, an intra-frame prediction mode can be derived from a neighboring region, thereby reducing the bit rate of the bitstream.
[0617] According to an embodiment, an image encoding device may include: at least one memory storing at least one instruction; and at least one processor configured to operate according to the at least one instruction.
[0618] In an embodiment, the at least one processor may be configured to obtain gradient information that satisfies predetermined conditions from a plurality of previous blocks encoded before the current block.
[0619] According to an embodiment, gradient information may include at least one intra-frame prediction mode and the magnitude corresponding to the at least one intra-frame prediction mode.
[0620] According to an embodiment, the gradient information may include a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
[0621] In an embodiment, the at least one processor may be configured to use the obtained gradient information to generate gradient information for the current block.
[0622] In an embodiment, the at least one processor may be configured to derive an intra-prediction mode for the current block based on at least one magnitude corresponding to at least one intra-prediction mode included in the gradient information of the current block.
[0623] In an embodiment, the at least one processor may be configured to generate a predicted block for the current block by performing intra-prediction on the current block using a derived intra-prediction mode.
[0624] According to an embodiment, gradient information obtained from a first previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value that exceeds a predefined threshold among the second values calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block, and a first value corresponding to the second value that exceeds the threshold.
[0625] According to an embodiment, the threshold can be predefined as a fixed value or a value determined based on the bit depth.
[0626] According to an embodiment, multiple prior blocks may be provided.
[0627] In an embodiment, the at least one processor may be configured to generate gradient information for the current block by summing the magnitudes of each intra-prediction mode included in the gradient information for a plurality of previous blocks, based on each corresponding intra-prediction mode.
[0628] In an embodiment, the at least one processor may be configured to generate gradient information for the current block by summing a second value included in the gradient information of a plurality of previous blocks, based on each corresponding intra-prediction mode.
[0629] In one embodiment, the at least one processor may be configured to derive the intra prediction mode corresponding to the maximum number of the second values among the second values corresponding to the intra prediction modes included in the gradient information of the current block as the intra prediction mode of the current block.
[0630] According to an embodiment, gradient information obtained from a second previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value corresponding to a third result and a first value corresponding to the second value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the second previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the second previous block.
[0631] According to an embodiment, gradient information satisfying predetermined conditions obtained from a third previous block among a plurality of previous blocks may include a value obtained by normalizing a second value corresponding to a third result based on the number of samples included in all sample sets, and a first value corresponding to the corresponding value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block.
[0632] According to an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0633] According to an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0634] According to an embodiment, block vectors can be derived based on intra-frame block copy mode or intra-frame template matching mode.
[0635] In an embodiment, the at least one processor may be configured to generate a temporary prediction block based on each of the derived intra-prediction modes and planar modes when deriving multiple intra-prediction modes using gradient information of the current block.
[0636] In an embodiment, the at least one processor may be configured to generate a prediction block for the current block by performing a weighted summation on the temporary prediction blocks.
[0637] In an embodiment, the at least one processor may be configured to encode the current block using a prediction block.
[0638] According to an embodiment, in a computer-readable recording medium on which a bitstream is recorded, the bitstream may include the encoding result of the current block.
[0639] In one embodiment, the encoding result of the current block can be generated by obtaining gradient information from multiple previous blocks encoded before the current block.
[0640] According to an embodiment, gradient information may include at least one intra-frame prediction mode and the magnitude corresponding to the at least one intra-frame prediction mode.
[0641] According to an embodiment, the gradient information may include a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
[0642] In an embodiment, the encoding result of the current block can be generated by using the obtained gradient information to generate the gradient information of the current block.
[0643] In an embodiment, the encoding result of the current block can be generated by deriving the intra-prediction mode of the current block based on at least one magnitude corresponding to at least one intra-prediction mode included in the gradient information of the current block.
[0644] In an embodiment, the coding result of the current block can be generated by performing intra-prediction on the current block using a derived intra-prediction mode to produce a prediction block for the current block.
[0645] According to an embodiment, gradient information obtained from a first previous block among a plurality of previous blocks that satisfies predetermined conditions may include a second value that exceeds a predefined threshold from a second value calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block, and a first value corresponding to the second value that exceeds the threshold.
[0646] According to an embodiment, the threshold can be predefined as a fixed value or a value determined based on the bit depth.
[0647] According to an embodiment, multiple prior blocks may be provided.
[0648] According to an embodiment, the gradient information of the current block can be generated by summing the magnitudes for each intra-prediction mode included in the gradient information of multiple previous blocks based on each corresponding intra-prediction mode, thereby generating the coding result of the current block.
[0649] According to an embodiment, the gradient information of the current block can be generated by summing the second values included in the gradient information of multiple previous blocks based on each corresponding intra-prediction mode, thereby generating the encoding result of the current block.
[0650] In an embodiment, the encoding result of the current block can be generated by deriving the intra prediction mode corresponding to the maximum number of the second values among the second values corresponding to the intra prediction modes included in the gradient information of the current block as the intra prediction mode of the current block.
[0651] According to an embodiment, gradient information obtained from a second prior block among a plurality of prior blocks that satisfies predetermined conditions may include a second value corresponding to a third result and a first value corresponding to the second value. The third result is the sum of a first result obtained by summing the horizontal gradients calculated from all sample sets included in the second prior block and a second result obtained by summing the vertical gradients calculated from all sample sets included in the second prior block.
[0652] According to an embodiment, the gradient information obtained from a second previous block among a plurality of previous blocks that satisfies predetermined conditions may include a value obtained by normalizing a second value corresponding to a third result based on the number of samples included in all sample sets, and a first value corresponding to the corresponding value. The third result is the sum of the first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and the second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block.
[0653] According to an embodiment, the previous block may include a reference block specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
[0654] According to an embodiment, a previous block may include a reference block specified by the block vector of the current block in the current frame that includes the current block.
[0655] According to an embodiment, block vectors can be derived based on intra-frame block copy mode or intra-frame template matching mode.
[0656] In an embodiment, when multiple intra-prediction modes are derived using the gradient information of the current block, the encoding result of the current block can be generated by generating a temporary prediction block based on each of the multiple derived intra-prediction modes and the planar mode.
[0657] In an embodiment, the current block's encoding result can be generated by performing a weighted summation on the temporary prediction block to produce a prediction block for the current block.
[0658] In an embodiment, the encoding result of the current block can be generated by encoding the current block using a prediction block.
[0659] According to an embodiment, an image encoding method and apparatus 4000 and an image decoding method and apparatus 2000 are provided to improve the performance of predictive encoding and predictive decoding for the current block.
[0660] According to an embodiment, an image encoding method and apparatus 4000 and an image decoding method and apparatus 2000 are provided to reduce the amount of data required to transmit intra-frame prediction modes with signals.
[0661] According to an embodiment, an image encoding method and apparatus 4000 and an image decoding method and apparatus 2000 are provided to reduce the bit rate of a bitstream.
[0662] The effects intended to be achieved in this disclosure are not limited to those described above, and other unstated effects will be clearly understood by those skilled in the art in light of the following description.
[0663] The embodiments described above can be written as computer executable programs that can be stored in a machine-readable storage medium.
[0664] Machine-readable storage media may be provided in the form of non-transitory storage media. Here, "non-transitory storage media" refers only to tangible devices and does not contain signals (e.g., electromagnetic waves). This term does not distinguish between cases where data is stored semi-permanently in a storage medium and cases where data is temporarily stored in a storage medium. For example, "non-transitory storage media" may include buffers for temporarily storing data.
[0665] According to embodiments, methods according to various embodiments disclosed herein can be provided by including methods according to various embodiments disclosed herein in a computer program product. A computer program product is a product that can be traded between a seller and a buyer. A computer program product can be distributed in the form of a machine-readable storage medium (e.g., a compact disk read-only memory (CD-ROM)), or distributed (e.g., downloaded or uploaded) through an app store, or directly or online between two user devices (e.g., smartphones) (e.g., downloaded or uploaded). In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable application) can be at least temporarily generated or temporarily stored in a machine-readable storage medium (such as the memory of a manufacturer's server, an app store's server, or a relay server).
[0666] While one or more embodiments of the present disclosure have been described in detail with reference to the exemplary embodiments described above, those skilled in the art will understand that the present disclosure is not limited to these embodiments, and various changes in form and detail may be made therein without departing from the spirit and scope of the present disclosure.
Claims
1. An image decoding method, comprising: Gradient information that satisfies predetermined conditions is obtained from multiple previous blocks decoded before the current block; Use the obtained gradient information to generate the gradient information for the current block; The intra-prediction mode of the current block is derived based on the gradient information of the current block. and The predicted block for the current block is generated by performing intra-prediction on the current block using the exported intra-prediction mode. The gradient information includes a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
2. The image decoding method according to claim 1, wherein, The gradient information obtained from the first previous block of the plurality of previous blocks that satisfies the predetermined conditions includes a second value that exceeds a predefined threshold from the second value calculated from the gradient between at least two samples included in the first previous block or between at least two samples adjacent to the first previous block, and a first value corresponding to the second value that exceeds the threshold.
3. The image decoding method according to claim 2, wherein, The threshold is predefined as a fixed value or a value determined based on the bit depth.
4. The image decoding method according to claim 2, wherein, The steps for generating gradient information for the current block include: generating gradient information for the current block by summing a second value included in the gradient information of the plurality of previous blocks, based on each corresponding intra-prediction mode.
5. The image decoding method as described in claim 4, wherein, The step of deriving the intra prediction mode of the current block includes: deriving the intra prediction mode corresponding to the maximum number of second values among the second values included in the gradient information of the current block as the intra prediction mode of the current block.
6. The image decoding method according to claim 1, wherein, The gradient information obtained from the second previous block of the plurality of previous blocks that satisfies the predetermined conditions includes a second value corresponding to the third result and a first value corresponding to the second value, wherein the third result is the sum of the first result obtained by summing the horizontal gradients calculated from all sample sets included in the second previous block and the second result obtained by summing the vertical gradients calculated from all sample sets included in the second previous block.
7. The image decoding method according to claim 1, wherein, The gradient information satisfying the predetermined conditions obtained from the third previous block of the plurality of previous blocks includes a value obtained by normalizing a second value corresponding to the third result based on the number of samples included in all sample sets, and a first value corresponding to that value, wherein the third result is the sum of the first result obtained by summing the horizontal gradients calculated from all sample sets included in the third previous block and the second result obtained by summing the vertical gradients calculated from all sample sets included in the third previous block.
8. The image decoding method according to claim 1, wherein, The plurality of previous blocks include reference blocks specified in the reference frame of the current block based on motion information of spatially or temporally neighboring blocks of the current block.
9. The image decoding method according to any one of claims 1 to 8, wherein, The plurality of previous blocks include a reference block specified by the block vector of the current block in the current frame that includes the current block.
10. The image decoding method as described in claim 1, wherein, The steps to generate the prediction block for the current block include: When multiple intra-prediction modes are derived using the gradient information of the current block, a temporary prediction block is generated based on each of the derived intra-prediction modes and the planar mode; and The prediction block for the current block is generated by performing a weighted summation on the temporary prediction block.
11. An image decoding device, comprising: At least one memory, storing at least one instruction; and At least one processor is configured to operate according to said at least one instruction. Wherein, the at least one processor is configured to: Gradient information satisfying predetermined conditions is obtained from multiple previous blocks decoded before the current block. The gradient information for the current block is generated by using the obtained gradient information. Based on the gradient information of the current block, the intra-prediction mode of the current block is derived, and The predicted block for the current block is generated by performing intra-frame prediction on the current block using the intra-frame prediction mode. The gradient information includes a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
12. An image encoding method, comprising: Gradient information that satisfies predetermined conditions is obtained from multiple previous blocks encoded before the current block; The gradient information of the current block is generated by using the obtained gradient information; The intra-prediction mode of the current block is determined based on the gradient information of the current block. and The predicted block for the current block is generated by performing intra-frame prediction on the current block using the intra-frame prediction mode. The gradient information includes a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
13. An image encoding device, comprising: At least one memory, storing at least one instruction; and At least one processor is configured to operate according to said at least one instruction. Wherein, the at least one processor is configured to: Gradient information that satisfies predetermined conditions is obtained from multiple previous blocks encoded before the current block. The gradient information for the current block is generated by using the obtained gradient information. The intra-prediction mode of the current block is determined based on the gradient information of the current block. The predicted block for the current block is generated by performing intra-frame prediction on the current block using the intra-frame prediction mode. The gradient information includes a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.
14. A computer-readable recording medium recording a bitstream, wherein, The bitstream includes the encoding result of the current block, and The encoding result of the current block is produced through the following operations: Gradient information that satisfies predetermined conditions is obtained from multiple previous blocks encoded before the current block. The gradient information for the current block is generated by using the obtained gradient information. The intra-prediction mode of the current block is determined based on the gradient information of the current block. The predicted block for the current block is generated by performing intra-prediction on the current block using the intra-prediction mode, and The current block is encoded using the predicted block, and The gradient information includes a first value corresponding to at least one intra-frame prediction mode and a second value corresponding to the intensity of the first value.