Method and apparatus for encoding image using probability value adjustment, and method and apparatus for decoding image

By adjusting the probability values ​​of image patches and context modeling, the image encoding and decoding process was optimized, solving the problem of low efficiency in inter-frame and intra-frame prediction, and achieving more efficient encoding and decoding results.

CN121569480APending Publication Date: 2026-02-24SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480049183.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-10-31
Filing Date
2024-05-13
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In existing image encoding and decoding technologies, inter-frame prediction and intra-frame prediction are inefficient in handling image redundancy, and the probability value update of context modeling during entropy coding is not accurate enough, resulting in low coding efficiency.

Method used

By adjusting the probability values ​​of previous blocks, storing and updating the probability values ​​of the context, more accurate entropy decoding and entropy encoding are achieved, and the number of bits is limited to optimize the processing of coding units.

Benefits of technology

It improves the efficiency of image encoding and decoding, reduces redundant information, and enhances encoding quality and compression performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121569480A_ABST
    Figure CN121569480A_ABST
Patent Text Reader

Abstract

Provided is an image decoding method according to an embodiment, comprising: storing, according to a context of a syntax element, binary bits obtained by entropy decoding with respect to coding units within a first maximum coding unit; obtaining a probability value of a context of the syntax element after entropy decoding for the coding unit within the second maximum coding unit is completed, so as to perform entropy decoding for the current coding unit; updating a probability value of the context based on the stored bin; and reconstructing a syntax element for the current coding unit based on the updated probability value of the context, in which the total number of bins stored is less than or equal to a predetermined first threshold value and the number of bins stored for any one context is less than or equal to a limit value, or less than or equal to the smaller one of the limit value and a predetermined second threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image encoding and decoding, and more specifically, to an apparatus and method for encoding and decoding a current block by adjusting the probability values ​​of a previous block. Background Technology

[0002] In image encoding and decoding, the image is divided into blocks, and each block is predicted encoded and predicted decoded through inter-frame prediction or intra-frame prediction.

[0003] Inter-frame prediction is a technique used to compress images by removing temporal redundancy between them. Inter-frame prediction predicts blocks in the current image using a reference image. A reference block most similar to the current block is searched within a preset search range in the reference image. The current block is predicted based on the reference block, and the predicted block is subtracted from the current block to generate a residual block.

[0004] Intra-frame prediction is a technique used to compress images by removing spatial redundancy. Intra-frame prediction generates a prediction block based on the neighboring pixels of the current block according to an intra-frame prediction mode. A residual block is then generated by subtracting the prediction block from the current block.

[0005] Syntax elements containing information about residual blocks generated during image encoding can be entropy encoded and included in the bitstream, and the decoder can entropy decode the bitstream to reconstruct the syntax elements. Summary of the Invention

[0006] Solution to the problem The image decoding method according to the embodiment may include: storing binary bits obtained by entropy decoding of at least one coding unit within a first maximum coding unit, based on the context of the syntax element, wherein the at least one coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0007] The image decoding method according to the embodiment may include: obtaining the probability value of the context of the syntax element after entropy decoding of at least one coding unit within the second maximum coding unit is completed, so as to perform entropy decoding on the current coding unit within the current maximum coding unit 2350, and the first maximum coding unit and the second maximum coding unit may be reconstructed before the current maximum coding unit 2350.

[0008] The image decoding method according to the embodiment may include updating the probability value of the context based on binary bits stored in the context.

[0009] The image decoding method according to the embodiment may include: reconstructing the syntax elements for the current coding unit based on the updated probability values ​​of the context.

[0010] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0011] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0012] The image decoding apparatus according to an embodiment may include: a context modeler 2010, configured to obtain binary bits obtained by entropy decoding of at least one coding unit within a first maximum coding unit based on the context storage of the syntax element, obtain a probability value of the context of the syntax element after entropy decoding of at least one coding unit within a second maximum coding unit is completed, so as to perform entropy decoding of the current coding unit within the current maximum coding unit 2350, and update the probability value of the context based on the binary bits stored in the context.

[0013] The image decoding apparatus according to an embodiment may include an arithmetic decoder 2030 configured to reconstruct syntax elements for the current coding unit based on context-updated probability values.

[0014] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0015] According to an embodiment, the first maximum coding unit and the second maximum coding unit can be reconstructed before the current maximum coding unit 2350.

[0016] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0017] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0018] The image encoding method according to the embodiment may include: storing binary bits corresponding to the syntax elements of at least one encoding unit within a first maximum encoding unit, based on the context of the syntax elements, wherein the at least one encoding unit may be adjacent to the lower boundary or the right boundary of the first maximum encoding unit.

[0019] The image encoding method according to the embodiment may include: obtaining the probability value of the context of a syntax element after entropy encoding of at least one encoding unit within a second maximum encoding unit is completed, so as to entropy encode the current encoding unit within the current maximum encoding unit 2350, wherein the first maximum encoding unit and the second maximum encoding unit may be encoded before the current maximum encoding unit 2350.

[0020] The image encoding method according to the embodiments may include: updating the probability value of the context based on binary bits stored in the context.

[0021] The image encoding method according to the embodiments may include: performing arithmetic encoding on the syntax elements used for the current encoding unit based on the updated probability values ​​of the context.

[0022] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0023] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0024] The image encoding apparatus according to an embodiment may include: a context modeler 3430, configured to obtain a probability value of the context of a syntax element after entropy encoding of at least one encoding unit in a second maximum encoding unit is completed, based on the context storage of the syntax element and the corresponding binary bits of the syntax element of at least one encoding unit in a first maximum encoding unit, so as to perform entropy encoding on the current encoding unit in the current maximum encoding unit 2350, and update the probability value of the context based on the binary bits stored in the context.

[0025] The image encoding apparatus according to an embodiment may include: an arithmetic encoder 3450 configured to perform arithmetic encoding on syntax elements for the current encoding unit based on context-updated probability values.

[0026] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0027] According to an embodiment, the first maximum coding unit and the second maximum coding unit may be encoded before the current maximum coding unit 2350.

[0028] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0029] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0030] In a computer-readable recording medium on which a bitstream is recorded according to an embodiment, the bitstream may correspond to the result of arithmetic encoding of the syntax elements used for the current coding unit.

[0031] According to an embodiment, the result of arithmetic encoding of a syntax element can be obtained by storing the binary bits corresponding to the syntax element of at least one encoding unit within the first maximum encoding unit based on the context of the syntax element.

[0032] According to an embodiment, the result of arithmetic encoding of a syntax element can be obtained by obtaining the probability value of the syntax element context after entropy encoding of at least one coding unit within the second largest coding unit, so as to entropy encode the current coding unit within the current largest coding unit 2350.

[0033] According to an embodiment, the result of arithmetic encoding of syntax elements can be obtained by updating the context based on the probability value of updating the context according to the binary bits stored in the context.

[0034] According to an embodiment, the result of arithmetic encoding of the syntax elements can be obtained by performing arithmetic encoding on the syntax elements used for the current coding unit using the probability value updated based on the context.

[0035] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0036] According to an embodiment, the first maximum coding unit and the second maximum coding unit may be encoded before the current maximum coding unit 2350.

[0037] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0038] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold. Attached Figure Description

[0039] Figure 1 This is a block diagram of an image decoding device according to an embodiment.

[0040] Figure 2 This is a block diagram of an image encoding device according to an embodiment.

[0041] Figure 3 The process of determining at least one coding unit by dividing the current coding unit is illustrated according to an embodiment.

[0042] Figure 4 The process of determining at least one coding unit by dividing non-square coding units according to an embodiment is illustrated.

[0043] Figure 5 The 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.

[0044] Figure 6 A method for determining a preset coding unit from an odd number of coding units is shown according to an embodiment.

[0045] Figure 7 The following illustration shows 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.

[0046] 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 preset order, according to an embodiment.

[0047] Figure 9 The process of determining at least one coding unit by dividing a first coding unit is illustrated according to an embodiment.

[0048] Figure 10 The embodiment shows that when a non-square second coding unit determined by dividing a first coding unit satisfies a preset condition, the shape into which the second coding unit can be divided is limited.

[0049] Figure 11 The process of dividing square coding units is shown according to an embodiment when the division shape pattern information does not indicate that the division is performed in units of four square coding units.

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

[0051] Figure 13 The illustration shows the process of determining the depth of a coding unit as the shape and size of the coding unit change when the coding unit is recursively divided to determine multiple coding units, according to an embodiment.

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

[0053] Figure 15This illustrates how multiple encoding units are determined based on multiple preset data units included in the screen, according to an embodiment.

[0054] Figure 16 The diagram illustrates the encoding units of each frame when each frame has different combinations of division shapes of encoding units, according to an embodiment.

[0055] Figure 17 Various shapes of coding units, which can be determined based on partition shape pattern information represented in binary code, are shown according to embodiments.

[0056] Figure 18 Other shapes of coded units, which can be determined based on partition shape pattern information represented in binary code, are shown according to an embodiment.

[0057] Figure 19 This is a block diagram of an image encoding and decoding system that performs loop filtering according to an embodiment.

[0058] Figure 20 This is a block diagram of an image decoding device according to an embodiment.

[0059] Figure 21 This is a diagram used to describe the arithmetic coding process according to an embodiment.

[0060] Figure 22 This is a diagram used to describe the arithmetic decoding process according to an embodiment.

[0061] Figure 23 This is a diagram illustrating a method for explaining, according to an embodiment, the probability value of the context used in the process of entropy decoding of a previous coding unit in order to entropy decode the current coding unit.

[0062] Figure 24 This is a diagram illustrating a method for obtaining probability values ​​of the context used in the process of entropy decoding of a previous coding unit in order to entropy decode the current coding unit, according to an embodiment.

[0063] Figure 25 This is a diagram used to explain the method, according to an embodiment, for updating the probability value of the context based on binary bits stored in the context.

[0064] Figure 26 It is a graph showing the trends of the first probability value and the second probability value updated according to the first factor and the second factor, respectively, according to the embodiment.

[0065] Figure 27 This is a table showing binary bits obtained by entropy decoding of at least one coding unit within the largest coding unit according to an embodiment.

[0066] Figure 28This is a table showing the probability values ​​of the context of a syntax element stored after entropy decoding of a previous coding unit has been completed, according to an embodiment.

[0067] Figure 29 This illustrates the embodiment based on... Figure 27 The binary bit update shown Figure 28 The table shows the processing of probability values ​​for the context.

[0068] Figure 30 This is a table showing a comparison between the number of adjustable contexts when the number of bits is limited to a second threshold according to an embodiment and the number of adjustable contexts when the number of bits is limited to the smaller of the second threshold and the limit value.

[0069] Figure 31 This is a diagram illustrating a previous encoding unit that can be used to update the probability value of the context according to an embodiment.

[0070] Figure 32 This is a diagram illustrating a previous encoding unit that can be used to update the probability value of the context according to an embodiment.

[0071] Figure 33 This is a flowchart of an image decoding method according to an embodiment.

[0072] Figure 34 This is a block diagram of the structure of an image encoding device according to an embodiment.

[0073] Figure 35 This is a flowchart of an image encoding method according to an embodiment. Detailed Implementation

[0074] The best mode for realizing the present invention The image decoding method according to the embodiment may include: storing binary bits obtained by entropy decoding of at least one coding unit within a first maximum coding unit, based on the context of the syntax element, wherein the at least one coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0075] The image decoding method according to the embodiment may include obtaining the probability value of the context of the syntax element after completing the entropy decoding of at least one coding unit within the second maximum coding unit, so as to perform entropy decoding on the current coding unit within the current maximum coding unit 2350, and the first maximum coding unit and the second maximum coding unit may be reconstructed before the current maximum coding unit 2350.

[0076] The image decoding method according to the embodiment may include updating the probability value of the context based on binary bits stored in the context.

[0077] The image decoding method according to the embodiment may include: reconstructing the syntax elements for the current coding unit based on the updated probability values ​​of the context.

[0078] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0079] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0080] Invention Model 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 particular embodiments, and all modifications, equivalents, and alternatives are included in this disclosure without departing from the spirit and scope of the disclosure.

[0081] In the description of the embodiments, certain detailed explanations of the related technologies may be omitted when it is believed that such detailed explanations may unnecessarily obscure the essence of this disclosure. Terms used to describe the embodiments (e.g., "first" and "second") may correspond to identifiers that distinguish one component from another.

[0082] Throughout this disclosure, the expression "at least one of a, b, or c" may indicate 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.

[0083] When a component is "attached to" or "connected to" another component, the component may be directly attached to or connected to that other component, or unless otherwise stated, there may be an intermediate component between them.

[0084] Regarding the components referred to as “devices” or “modules” as used herein, two or more components may be combined into one component, or one component may be divided into two or more components. Furthermore, in addition to their primary functions, each component described below may additionally perform some or all of the functions performed by another component, and some of the primary functions of each component may be entirely performed by another component.

[0085] As used in this article, “image” can refer to a picture, still image, frame, moving image including multiple consecutive still images, or video.

[0086] As used in this paper, "sample point" can refer to the data to be processed as a sampling location assigned to an image. For example, pixels in a frame in the spatial domain can correspond to samples. A unit comprising multiple samples can be defined as a block.

[0087] In this disclosure, entropy decoding of a block or unit may refer to the processing of obtaining the syntax elements of a block or unit from a bit stream (or bits included in a bit stream), or the processing of obtaining the binary bit string corresponding to the syntax elements.

[0088] In this disclosure, entropy coding for a block or unit may refer to the process of generating a bit stream (or bits constituting a bit stream) from the syntax elements of the block or unit, or the process of generating a bit stream (or bits constituting a bit stream) from the binary bit string corresponding to the syntax elements.

[0089] In the following text, refer to Figures 1 to 19 The present invention describes an image encoding method and apparatus based on an encoding unit and a transformation unit having a tree structure, and an image decoding method and apparatus according to embodiments.

[0090] Figure 1 This is a block diagram of an image decoding device 100 according to an embodiment.

[0091] 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. The bitstream acquirer 110 and decoder 120 may include memory storing instructions to be executed by the at least one processor.

[0092] Bitstream acquirer 110 can receive bitstreams. The bitstream may include information obtained through image encoding by image encoding device 200, which will be described later. Furthermore, bitstreams can be transmitted from image encoding device 200. Image decoding device 100 can be connected to image encoding device 200 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 an 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.

[0093] The operation of the image decoding device 100 is described in detail, and the bit stream receiver 110 can receive bit streams.

[0094] 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. 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 range as an allowable size range 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 range as an allowable size range of the coding unit according to the partition shape pattern of the coding unit in order to determine the partitioning rules.

[0095] The division of the coding units according to the embodiments will be described in detail below.

[0096] First, a frame can be divided into one or more slices or one or more parallel blocks. A slice or a parallel block can be a sequence of one or more maximum coding units (code tree units (CTUs)). Depending on the implementation example, a slice may include one or more parallel blocks, or a slice may include one or more maximum coding units. A slice comprising one or more parallel blocks can be determined within a frame.

[0097] There exists a maximum coding block (coding tree block (CTB)) that is conceptually compared to the maximum coding unit (CTU). A maximum coding block (CTB) represents 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.

[0098] When the image has three sample arrays (sample arrays for the Y, Cr, and Cb components), the maximum coding unit (CTU) includes a maximum coding block for the luma samples, two corresponding maximum coding blocks for the chroma samples, and a unit for the syntax structure used to encode the luma and chroma samples. When the image is monochrome, the maximum coding unit includes a maximum coding block for the monochrome samples and a unit for the syntax structure used to encode the monochrome samples. When the image is encoded in a color plane separated according to the color components, the maximum coding unit includes a syntax structure used to encode the image and units for the image samples.

[0099] A maximum code block (CTB) can be divided into an M×N code block containing M×N samples (M and N are integers).

[0100] When the image has a sample array for the Y, Cr, and Cb components, the encoding unit (CU) includes an encoding block for the luminance samples, two corresponding encoding blocks for the chrominance samples, and a unit for the syntax structure used to encode the luminance and chrominance samples. When the image is monochrome, the encoding unit includes an encoding block for the monochrome samples and a unit for the syntax structure used to encode the monochrome samples. When the image is encoded in a color plane separated according to the color components, the encoding unit includes a syntax structure used to encode the image and units for the image's samples.

[0101] 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. In other words, the (maximum) coding unit refers to a data structure that includes the (maximum) coding block containing the corresponding samples and the corresponding syntax structure of the (maximum) coding block. However, since those skilled in the art understand that the (maximum) coding unit or the (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.

[0102] The 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, the embodiments are not limited to this.

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

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

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

[0106] 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 quad partition is performed, information indicating whether a multi-partition is performed, partition direction information, and partition type information.

[0107] For example, information indicating whether a quad partition is performed can indicate whether the current coding unit has been quad partitioned (QUAD_SPLIT).

[0108] When the current coding unit is not partitioned by a quad, the information indicating whether to perform a multipartition can indicate whether the current coding unit will not be partitioned again (NO_SPLIT) or will be partitioned by a binary / triple.

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

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

[0111] The partitioning mode of the current coding unit can be determined based on the partitioning direction information and partitioning type information. The partitioning mode when the current coding unit is partitioned by a binary in the horizontal direction can be determined as a binary horizontal partitioning mode (SPLIT_BT_HOR), the partitioning mode when the current coding unit is partitioned by a ternary in the horizontal direction can be determined as a ternary horizontal partitioning mode (SPLIT_TT_HOR), the partitioning mode when the current coding unit is partitioned by a binary in the vertical direction can be determined as a binary vertical partitioning mode (SPLIT_BT_VER), and the partitioning mode when the current coding unit is partitioned by a ternary in the vertical direction can be determined as a ternary vertical partitioning mode (SPLIT_TT_VER).

[0112] Image decoding device 100 can obtain partitioning shape pattern information from a bit stream through a binary bit string. 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 in binary bits. 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.

[0113] A coding unit can be smaller than or the same as the maximum coding unit. For example, since the maximum 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 maximum coding unit indicates that partitioning is not performed, the coding units determined within the maximum coding unit have the same size as the maximum coding unit. When the partitioning shape pattern information regarding the maximum coding unit indicates that partitioning is performed, the maximum 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 maximum coding unit and coding units may not be distinguished. (Refer to...) Figures 3 to 16 Describe in detail the division of coding units.

[0114] Furthermore, one or more prediction blocks for prediction can be determined from the coding unit. The prediction blocks may be the same as 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.

[0115] The shapes and sizes of the transform blocks and the prediction blocks can be independent of each other.

[0116] In another embodiment, prediction can be performed by using the coding unit as a predictor. Furthermore, transformation can be performed by using the coding unit as a transform block.

[0117] Reference Figures 3 to 16 The division of coding units is described in detail. The current block and adjacent 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 divided. Adjacent blocks can be blocks reconstructed before the current block. Adjacent blocks can be spatially or temporally adjacent to the current block. Adjacent 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.

[0118] The above embodiments relate to operations related to an image decoding method performed by the image decoding device 100. Hereinafter, the operations of an image encoding device 200 performing an image encoding method corresponding to the inverse processing of the image decoding method are described according to embodiments.

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

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

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

[0122] 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, and 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.

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

[0124] 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 200 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 partitioning". 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 "do not perform partitioning" for the smallest coding unit.

[0125] 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 division is not performed, or may determine the coding units 310b, 310c, 310d, 310e or 310f divided based on the division shape pattern information indicating a preset division method.

[0126] 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 will describe in detail, with reference to various embodiments, a preset partitioning method for dividing square coding units.

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

[0128] 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, based on the partitioning shape pattern information, whether not to partition the non-square current coding unit or whether to partition the non-square current coding unit using a preset partitioning method. (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 an encoding unit 410 or 460 with the same size as the current encoding unit 400 or 450 based on the partitioning shape pattern information indicating that partitioning is not performed, or it can determine encoding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c partitioned based on the partitioning shape pattern information indicating a preset partitioning method. The preset partitioning method for partitioning non-square encoding units will be described in detail below with reference to various embodiments.

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

[0130] According to an embodiment, when the image decoding device 100 divides a current coding unit 400 or 450 with a non-square shape based on the division shape pattern information, the image decoding device 100 may consider the position of the long side of the current coding unit 400 or 450 with a non-square shape to facilitate the division of 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.

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

[0132] According to an embodiment, the aspect ratio of the current coding 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 indicate the horizontal direction. When the aspect ratio is 1:4, because the width is shorter than the height, the block shape information can indicate the vertical direction. The image decoding device 100 can determine whether to divide the current coding 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 coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is in the vertical direction, the image decoding device 100 can determine coding units 430a, 430b, and 430c by dividing the current coding unit 400 in the horizontal direction. Similarly, when the current coding unit 450 is in the horizontal direction, the image decoding device 100 can determine coding units 480a, 480b, and 480c by dividing the current coding unit 450 in the vertical direction.

[0133] 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 preset 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.

[0134] According to an embodiment, when the shape pattern information indicates that the coding unit is 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 further, can impose a preset 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 can 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 can restrict the encoding unit 430b or 480b at the center position from being divided again or only divided a preset number of times.

[0135] Figure 5 This illustrates a process performed by an image decoding device 100 according to an embodiment, which involves dividing an encoding unit based on at least one of block shape information and segmentation shape pattern information.

[0136] According to an embodiment, the image decoding device 100 can determine whether to divide a first coding unit 500 having a square shape into coding units 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 partitioned in the horizontal direction, the image decoding device 100 can determine a second coding unit 510 by partitioning 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 partitioning the coding units. For example, the second coding unit can be determined by partitioning the first coding unit, and the third coding unit can be determined by partitioning the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit follows the above description.

[0137] According to an embodiment, the image decoding device 100 can determine whether to divide the determined second coding unit 510 into coding units based on the division shape pattern information. (Refer to...) Figure 5The image decoding device 100 can divide a second coding unit 510 with a non-square shape, determined by dividing the first coding unit 500, into one or more third coding units 520a, 520b, 520c, and 520d based on at least one of the division shape pattern information and the division shape pattern information, or it can choose not to divide the second coding unit 510 with a non-square shape. The image decoding device 100 can obtain the division shape pattern information and can obtain multiple second coding units (e.g., 510) of various shapes by dividing the first coding unit 500 based on the obtained division shape pattern information, and can divide the second coding unit 510 based on the division shape pattern information by 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 about the first coding unit 500, the second coding unit 510 can also be divided into third coding units (e.g., 520a or 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, coding units with square shapes can be determined by partitioning coding units with non-square shapes, and coding units with non-square shapes can be determined by recursively partitioning coding units with square shapes.

[0138] Reference Figure 5 The predetermined coding units (e.g., coding units located at the center or coding units with a square shape) among an odd number of third coding units 520b, 520c, and 520d determined by dividing a second coding unit 510 with a non-square shape can be recursively divided. According to an embodiment, the square third coding unit 520c among the odd number of third coding units 520b, 520c, and 520d can be divided into multiple fourth coding units in the horizontal direction. The fourth coding units 530b or 530d among the multiple fourth coding units 530a, 530b, 530c, and 530d with a non-square shape can be further divided into multiple coding units. For example, the fourth coding units 530b or 530d with a non-square shape can again be divided into an odd number of coding units. A method for recursively dividing coding units will now be described with reference to various embodiments.

[0139] 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 second coding unit 510, which has a non-square shape, into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 can impose a preset restriction on a predetermined number of 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.

[0140] 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 preset 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 preset 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.

[0141] According to an embodiment, the image decoding device 100 can obtain partitioning shape pattern information for partitioning the current encoding unit from a preset position in the current encoding unit.

[0142] Figure 6 This illustrates a method performed by an image decoding device 100 according to an embodiment to determine a preset coding unit from an odd number of coding units.

[0143] Reference Figure 6 The segmentation shape pattern information of the current encoding unit 600 or 650 can be obtained from a sample at a preset position (e.g., sample 640 or 690 at the center position) among a plurality of sample points included in the current encoding unit 600 or 650. However, the preset position in the current encoding unit 600 from which at least one of the segmentation 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, bottom, left, right, upper left, lower left, upper right, and lower right positions). The image decoding device 100 can obtain the division shape pattern information from the preset 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.

[0144] According to an embodiment, when the current coding unit is divided into a preset 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, as will be described below with reference to various embodiments.

[0145] 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 preset position.

[0146] 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 preset 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.

[0147] 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 this 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.

[0148] According to an embodiment, the information indicating the position of the upper left sample 630a of the upper encoding unit 620a may include coordinates (xa, ya), the information indicating the position of the upper left sample 630b of the center encoding unit 620b may include coordinates (xb, yb), and the information indicating the position of the upper left sample 630c of the lower encoding unit 620c may include coordinates (xc, yc). The image decoding device 100 can determine the intermediate encoding unit 620b by using the coordinates of the upper left samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the upper 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 upper left sample points 630a, 630b, and 630c may include coordinates indicating the absolute positions in the image, or coordinates (dxb, dyb) indicating the relative positions of the upper left sample point 630b of the middle encoding unit 620b and the upper left sample point 630a of the upper encoding unit 620a, and coordinates (dxc, dyc) indicating the relative positions of the upper left sample point 630c of the lower encoding unit 620c and the upper left sample point 630a of the upper encoding unit 620a, respectively. The method of determining the encoding unit at a preset position by using the coordinates of the sample points included in the encoding unit as information indicating the positions of the sample points is not limited to the methods described above, and may include various arithmetic methods capable of using the coordinates of the sample points.

[0149] 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 preset standard. 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.

[0150] 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 620c by using the width or height of the current encoding unit 600 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 preset 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 preset position by using the size of the encoding unit determined based on the coordinates of the sample points, and therefore, various methods can be used to determine an encoding unit at a preset position by comparing the size of the encoding unit determined based on the coordinates of the preset sample points.

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

[0152] 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 650. 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 preset position. However, the method described above by the image decoding device 100 for determining an encoding unit with a size different from that of the other encoding units corresponds only to the example of determining an encoding unit at a preset position by using the size of the encoding unit determined based on the coordinates of the sample points, and therefore, various methods can be used to determine an encoding unit at a preset position by comparing the size of the encoding unit determined based on the coordinates of the preset sample points.

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

[0154] According to an embodiment, the image decoding device 100 can select a coding unit at a preset position from an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than its height, the image decoding device 100 can determine a coding unit at a preset 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 preset 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.

[0155] 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 the coding unit at a preset 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 preset position by using information about the positions of the even number of coding units. The related operations are consistent with those already referred to above. Figure 6 The operation corresponding to determining the coding unit at a preset 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.

[0156] According to an embodiment, when a non-square current coding unit is divided into multiple coding units, preset information about the coding unit at a preset position can be used in the division operation to determine the coding unit at the preset 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.

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

[0158] According to an embodiment, preset information for identifying the coding unit at a preset location can be obtained from preset samples included in the coding unit to be determined. (Refer to...) Figure 6 The image decoding device 100 can use the partitioning shape pattern information obtained from samples at preset positions in the current encoding unit 600 (e.g., samples at the center of the current encoding unit 600) to determine the encoding unit at a preset position (e.g., the encoding unit at the center of the partitioned encoding units) among the plurality of encoding units 620a, 620b, and 620c determined by partitioning the current encoding unit 600. That is, the image decoding device 100 can determine the samples at the preset positions by considering the block shape of the current encoding unit 600, and can determine the encoding unit 620b, which includes samples from the plurality of encoding units 620a, 620b, and 620c determined by partitioning the current encoding unit 600, and can impose preset constraints on the encoding unit 620b. (Refer to...) Figure 6 According to an embodiment, during the decoding operation, the image decoding device 100 can determine the sample 640 at the center position of the current encoding unit 600 as a sample that can obtain preset information, and can impose a preset restriction on the encoding unit 620b including the sample 640. However, the position of the sample that can obtain preset information is not limited to the above-mentioned position, and can include any position of the sample included in the encoding unit 620b that will be determined to be restricted.

[0159] According to an embodiment, the location of a sample point from which preset 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 preset 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 preset 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 preset information can be obtained.

[0160] 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 preset position among the multiple coding units. According to an embodiment, the image decoding device 100 can obtain partition shape pattern information from samples at preset 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 preset positions in each of the multiple coding units. That is, the coding units can be recursively partitioned based on the partition shape pattern information obtained from samples at preset positions in each coding unit. (Referring to the above...) Figure 5 The operation of recursively dividing the coding unit is described, so its detailed description will not be provided here.

[0161] 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 preset block (e.g., the current coding unit).

[0162] Figure 7 This illustrates the order in which the image decoding device 100 processes multiple coding units when it determines multiple coding units by dividing the current coding unit, according to an embodiment.

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

[0164] Reference Figure 7 The image decoding device 100 can determine to process the second coding units 710a and 710b, which are determined by dividing the first coding unit 700 in the vertical direction, in a horizontal order 710c. The image decoding device 100 can also determine to process the second coding units 730a and 730b, which are determined by dividing the first coding unit 700 in the horizontal direction, in a vertical order 730c. The image decoding device 100 can further determine the second coding units 750a, 750b, 750c, and 750d, which are determined by dividing the first coding unit 700 in both the vertical and horizontal directions, in a preset order (e.g., raster scan order or zigzag scan order 750e), which processes coding units in one row and then processes coding units in the next row.

[0165] According to an embodiment, the image decoding device 100 can recursively divide encoding units. (See also...) Figure 7 The image decoding device 100 can determine a plurality of coding units 710a and 710b, 730a and 730b, or 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 and 710b, 730a and 730b, or 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 and 710b, 730a and 730b, or 750a, 750b, 750c and 750d can be independently divided into a plurality of coding units. (Refer to...) Figure 7 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.

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

[0167] According to an embodiment, the processing order of coding units can be determined based on the operation 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 order 720c. Because the left second coding unit 710a and the right second coding unit 710b are processed in the horizontal 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 order 720c. The operation of determining the processing order of coding units based on the coding units before division is as described above and is not limited to the above example. Various methods can be used to independently process the coding units that have been divided and determined into various shapes in a preset order.

[0168] Figure 8 The illustration shows a process performed by an image decoding device to determine that the current encoding unit will be divided into an odd number of encoding units when the encoding unit 100 cannot be processed in a preset order, according to an embodiment.

[0169] According to an embodiment, the image decoding device 100 can determine, based on the obtained partition shape pattern information, that the current coding unit will be divided into an odd number of coding units. (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, 820d, and 820e.

[0170] 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 preset order. (See also...) Figure 8The 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, based on at least one of block shape information and division shape pattern information, whether any of the following coding units is divided into an odd number of coding units: the first coding unit 800, the second coding units 810a and 810b, or the third coding units 820a and 820b, as well as 820c, 820d, and 820e. For example, the coding unit on the right side 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 multiple encoding units included in the first encoding unit 800 can be a preset order (e.g., zigzag scanning order 830), and the image decoding device 100 can 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 preset order.

[0171] 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 preset order, and this condition is related to whether at least one of the width and height of the second encoding units 810a and 810b will be 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 this 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 this condition. When the condition described above is not met, the image decoding device 100 can determine that the scanning order is discontinuous, and based on the determination result, can determine that the right-side second coding unit 810b will be 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 apply a preset restriction to the coding units at preset positions within the divided coding units. This restriction or preset position has been described above with reference to various embodiments, and therefore will not be described in detail here.

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

[0173] 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 first coding unit 900 has a square shape and the division 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 division 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, for example, second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in the vertical direction, or second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction.

[0174] According to an embodiment, the image decoding device 100 can determine whether the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first encoding unit 900 meet the conditions for processing in a preset order, and these conditions are related to whether at least one of the width and height of the first encoding unit 900 will be divided in half along the boundaries of the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c. (Refer to...) Figure 9 Because the boundaries of the second encoding units 910a, 910b, and 910c, determined by dividing the first encoding unit 900 into squares in the vertical direction, do not halve the width of the first encoding unit 900, it can be determined that the first encoding unit 900 does not meet the conditions for processing in a preset order. Furthermore, because the boundaries of the second encoding units 920a, 920b, and 920c, determined by dividing the first encoding unit 900 into squares in the horizontal direction, do not halve the height of the first encoding unit 900, it can be determined that the first encoding unit 900 does not meet the conditions for processing in a preset 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 encoding unit 900 is divided into an odd number of encoding units. According to an embodiment, when the encoding unit is divided into an odd number of encoding units, the image decoding device 100 can apply a preset restriction to the encoding units at preset positions among the divided encoding units. This restriction or preset position has been described above with reference to an embodiment, and therefore its detailed description will not be provided here.

[0175] According to an embodiment, the image decoding device 100 can determine coding units of various shapes by dividing a first coding unit.

[0176] Reference Figure 9 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.

[0177] Figure 10 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 the preset conditions, the shape into which the second encoding unit can be divided is limited.

[0178] According to an embodiment, the image decoding device 100 can determine, based on the partition shape pattern information obtained by the bitstream acquirer 110, whether to divide the square first coding unit 1000 into non-square second coding units 1010a and 1010b or 1020a and 1020b. The second coding units 1010a and 1010b or 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 and 1010b or 1020a and 1020b into multiple coding units or not to divide each of the second coding units 1010a and 1010b or 1020a and 1020b. According to an embodiment, the image decoding device 100 can determine the third coding units 1012a and 1012b by dividing the non-square left second coding unit 1010a, determined by dividing the first coding unit 1000 in the vertical direction, in the horizontal direction. However, when the left second coding unit 1010a is divided in the horizontal direction, the image decoding device 100 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, since the left second coding unit 1010a and the right second coding unit 1010b are divided independently in the horizontal direction, the third coding units 1012a and 1012b or 1014a and 1014b can be determined. However, this situation is the same 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.

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

[0180] Figure 11 The illustration shows the process of dividing square coding units performed by the image decoding device 100 according to an embodiment when the division shape pattern information indicates that the square coding unit will not be divided into four square coding units.

[0181] According to an embodiment, the image decoding device 100 can determine second coding units 1110a and 1110b, or 1120a and 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, or 1120a and 1120b, etc.

[0182] According to an embodiment, the image decoding device 100 can independently divide non-square second coding units 1110a, 1110b or 1120a and 1120b, etc. Each of the second coding units 1110a, 1110b or 1120a and 1120b, etc., can be recursively divided in a preset order, and this division method can correspond to the method of dividing the first coding unit 1100 based on the division shape pattern information.

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

[0184] As 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.

[0185] Figure 12 This illustrates that the processing order among multiple coding units according to an embodiment can be changed based on the process of dividing the coding units.

[0186] 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 second coding units 1210a and 1210b or 1220a and 1220b, etc., by dividing the first coding unit 1200. (See also...) Figure 12The non-square second coding units 1210a and 1210b or 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 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 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. (Referring to the above...) Figure 11 The operation of dividing the second coding unit 1210a and 1210b or 1220a and 1220b is described, so its detailed description will not be provided here.

[0187] According to an embodiment, the image decoding device 100 can process the encoding units in a preset order. (Refer to the above...) Figure 7 The operation of processing encoded units in a preset order is described, therefore its detailed description will not be 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 shape of the first encoding unit 1200.

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

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

[0190] Reference Figure 12 The 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 differently by dividing the first coding unit 1200 in the vertical direction than 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 the third coding units 1226a, 1226b, 1226c, and 1226d derived from them, ultimately show coding units of the same shape as those divided from the first coding unit 1200. Thus, by recursively dividing the coding units in different ways based on the division shape pattern information, even if coding units with the same shape are finally determined, the image decoding device 100 can process multiple coding units in different orders.

[0191] Figure 13 The illustration shows the process of 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 to determine multiple coding units.

[0192] According to an embodiment, the image decoding device 100 can determine the depth of the coding unit based on a preset standard. For example, the preset standard 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 description, the coding unit with the increased depth is referred to as a coding unit with a lower layer depth.

[0193] Reference Figure 13According to an embodiment, the image decoding device 100 can determine a second coding unit 1302 and a third coding unit 1304 at a lower layer depth 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.

[0194] According to an embodiment, the image decoding device 100 can determine a second encoding unit 1312 or 1322 and a third encoding unit 1314 or 1324 at a lower layer depth 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).

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

[0196] According to an embodiment, 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 1320, which has a size of 2N×N. That is, the image decoding device 100 can determine the second encoding unit 1302 or the second encoding unit 1312 with a size of N×N by dividing the first encoding unit 1320 in the vertical direction, or it can determine the 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.

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

[0198] According to an embodiment, the image decoding device 100 can determine the third encoding unit 1304, 1314, or 1324 by dividing the width and height of the second encoding unit 1312, which has a size of N / 2 × N. That is, the image decoding device 100 can determine the third encoding unit 1304 or the 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 the 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.

[0199] According to an embodiment, the image decoding device 100 can determine the third encoding unit 1304, 1314, or 1324 by dividing the width and height of the second encoding unit 1322, which has a size of N×N / 2. That is, the image decoding device 100 can determine the third encoding unit 1304 or the third encoding unit 1314 with a size of N / 2×N / 2 by dividing the second encoding unit 1322 in the vertical direction, or it can determine the third encoding unit 1324 with a size of N / 2×N / 4 by dividing the second encoding unit 1322 in both the vertical and horizontal directions.

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

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

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

[0203] 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 second coding units 1402a and 1402b, second coding units 1404a and 1404b, and second coding units 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.

[0204] According to an embodiment, the depths of the second coding units 1402a and 1402b, second coding units 1404a and 1404b, and second coding units 1406a, 1406b, 1406c, and 1406d, determined based on the division shape pattern information of the first coding unit 1400, which has a square shape, can be determined based on the length of their long sides. For example, since the length of the side of the first coding unit 1400, which has a square shape, is equal to the length of the long side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the second coding units 1402a and 1402b, which all have non-square shapes, can have the same depth, for example, 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.

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

[0206] According to an embodiment, the depths of second coding units 1412a and 1412b, as well as 1414a, 1414b and 1414c, or 1422a and 1422b, as well as 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 depths of the square second coding units 1412a and 1412b are D+1, which is 1 lower than the depth D of the non-square first coding unit 1410.

[0207] 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 half 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 lower 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.

[0208] 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 may be equal to the widths of the other coding units 1414a and 1414c, and its height may be twice the height of the other coding units 1414a and 1414c. That is, in this case, the central coding unit 1414b may include 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 located adjacent to the central coding unit 1414b may be increased by 2 and thus may be 3. That is, there may be discontinuous PID values. According to an embodiment, the image decoding device 100 may 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.

[0209] 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 point at a preset position (e.g., the upper left sample point) of each coding unit.

[0210] According to an embodiment, the image decoding device 100 can determine the coding unit at a preset position among the divided coding units by using a PID for distinguishing coding units. According to an embodiment, when the division shape pattern information of 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 among the coding units. The image decoding device 100 can determine the coding unit 1414b, whose PID corresponds to the median value of the PIDs of the coding units, as the coding unit at the center position among the coding units determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding device 100 can determine a PID for distinguishing the divided coding units based on the size ratio between the coding units. (Refer to...) Figure 14The 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 located 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 a size different from the size 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 preset position in the odd number of coding units (e.g., the coding unit at the center position) has a size different from the size of other coding units. In this case, the image decoding device 100 can determine the coding unit at the center position with a different size by using the PID of the coding unit. However, the size or position of the PID and the encoding unit at the preset position are not limited to the examples above, and various PIDs and various positions and sizes of the encoding unit can be used.

[0211] According to an embodiment, the image decoding device 100 may use a preset data unit, in which encoding units are recursively divided.

[0212] Figure 15 This illustrates how multiple encoding units are determined based on multiple preset data units included in the screen, according to an embodiment.

[0213] According to an embodiment, a preset data unit can be defined as a data unit that recursively divides coding units by using division shape pattern information. The preset 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 explanation, the preset data unit is referred to as a reference data unit.

[0214] According to an embodiment, the reference data unit may have a preset size and a preset size 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.

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

[0216] According to an embodiment, the image decoding device 100 can predetermine the minimum allowed size of the reference data units included in the current frame. Therefore, the image decoding device 100 can determine various reference data units having sizes equal to or greater than the minimum size, and can determine one or more coding units by referring to the determined reference data units and using partitioning shape pattern information.

[0217] Reference Figure 15 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.

[0218] 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. (Refer to above) Figure 3 The operation of dividing the current coding unit 300 describes the operation of dividing the square reference coding unit 1500 into one or more coding units, and the above reference... Figure 4 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 will not be provided here.

[0219] 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 predetermined based on preset 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 preset conditions. The image decoding device 100 can determine the size and shape of the reference data unit for each data unit that meets the preset 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, instead of 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 predetermined. 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 dimensions and shapes of the reference coding unit predetermined based on the PID.

[0220] According to embodiments, the image decoding device 100 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the 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 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.

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

[0222] The method for determining partitioning rules according to embodiments of the present disclosure will be described in detail below.

[0223] Image decoding device 100 can determine the partitioning rules of an image. The partitioning rules can be predetermined 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, and 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.

[0224] 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 pre-determine partitioning rules based on the block shape of the coding unit. However, embodiments are not limited to this. Image decoding device 100 may determine partitioning rules based on information obtained from the bitstream received from image encoding device 200.

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

[0226] The size of the coding unit can include various sizes, such as 4×4, 8×4, 4×8, 8×8, 16×4, 16×8, ..., up to 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.

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

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

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

[0230] The image decoding device 100 can adaptively determine the partitioning rules based on the position of the coding units in the image.

[0231] Furthermore, the image decoding device 100 can determine partitioning rules such that encoding units generated via different partitioning paths do not have the same block shape. However, the embodiments are not limited to this, and encoding units generated via different partitioning paths may have the same block shape. Encoding units generated via different partitioning paths may have different decoding processing orders. Because of the above reference... Figure 12 The decoding process order has been described, so its details will not be provided again here.

[0232] Figure 16The diagram illustrates the encoding units of each frame when each frame has different combinations of division shapes of encoding units, according to an embodiment.

[0233] Reference Figure 16 The image decoding device 100 can determine different combinations of division shapes for encoding units for each frame. For example, the image decoding device 100 can decode an image by using a frame 1600, which can be divided into four encoding units, a frame 1610, which can be divided into two or four encoding units, and a frame 1620, which can be divided into two, three, or four encoding units, included in at least one frame in the image. To divide frame 1600 into multiple encoding units, the image decoding device 100 can use only the division shape information indicating division into four square encoding units. To divide frame 1610, the image decoding device 100 can use only the division shape information indicating division into two or four encoding units. To divide frame 1620, the image decoding device 100 can use only the division shape information indicating division into two, three, or four encoding units. The above-described combinations of division shapes are embodiments used to describe the operation of the image decoding device 100, and therefore, the above-described combinations of division shapes should not be construed as limited to the above embodiments. It should be understood that various combinations of division shapes can be used for each preset data unit.

[0234] According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can acquire a bitstream including indices representing combinations of partition shape information for each preset data unit (e.g., sequence, frame, strip, strip segment, parallel block, parallel block group, etc.). For example, the bitstream acquirer 110 can acquire indices representing combinations 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. The bitstream acquirer 110 of the image decoding device 100 can use the acquired indices to determine the partition shape combinations into which the encoding unit can be divided for each preset data unit, and accordingly, the bitstream acquirer 110 can use different partition shape combinations for each preset data unit.

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

[0236] 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 by the bitstream acquirer 110. The shapes into which the encoding unit can be divided can be various shapes including those described above in the embodiments.

[0237] Reference Figure 17The image decoding device 100 can divide coding units with square shapes in at least one of the horizontal and vertical directions based on the division shape pattern information, and divide coding units with non-square shapes in either the horizontal or vertical direction.

[0238] According to an embodiment, when the image decoding device 100 can divide a square-shaped coding unit in the horizontal and vertical directions to determine four square coding units, the division shape pattern information of the square coding unit can represent four division shapes. According to an embodiment, the division shape pattern information can be represented as a two-digit binary code, and each division shape can be assigned a binary code. 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 in the horizontal and vertical directions, the division shape pattern information can be represented as (01)b; when the coding unit is divided in the horizontal direction, the division shape pattern information can be represented as (10)b; and when the coding unit is divided in the vertical direction, the division shape pattern information can be represented as (11)b.

[0239] According to an embodiment, when the image decoding device 100 divides coding units with non-square shapes in the horizontal or vertical direction, the type of division shape, which can be represented by division shape pattern information, may depend on the number of coding units into which the coding unit will be divided. (Refer to...) Figure 17 According to an embodiment, the image decoding device 100 can divide a coding unit having a non-square shape into up to three coding units. Furthermore, the image decoding device 100 can divide a coding unit into two coding units. In this case, the division shape pattern information can be represented as (10)b. The image decoding device 100 can divide a coding unit into three coding units. In this case, the division shape pattern information can be represented as (11)b. The image decoding device 100 can determine not to divide the coding unit. In this case, the division shape pattern information can be represented as (0)b. That is, in order to use the binary code indicating the division shape pattern information, the image decoding device 100 can use variable-length coding (VLC) instead of fixed-length coding (FLC).

[0240] According to the embodiments, refer to Figure 17 The binary code representing the partition shape pattern information that does not divide the coding unit can be represented as (0)b. When the binary code representing the partition shape pattern information that does not divide the coding unit is set to (00)b, although there is no partition shape pattern information set to (01)b, it may be necessary to use the entire 2-bit binary code of the partition shape pattern information. However, as... Figure 17As shown, when using three partitioning shapes for coding units with non-square shapes, the image decoding device 100 can effectively use the bitstream by using a 1-bit binary code (0)b as partitioning shape pattern information to determine that the coding unit is not partitioned. However, the partitioning shape of the coding unit with a non-square shape represented by the partitioning shape pattern information should not be interpreted as limited to... Figure 17 The three types of shape division shown are not intended to be interpreted as including all shapes in the above embodiments.

[0241] Figure 18 Other shapes of coding units, which can be determined based on partition shape pattern information that can be represented by binary code, are shown according to embodiments.

[0242] Reference Figure 18 The image decoding device 100 can divide coding units with square shapes along the horizontal or vertical direction and coding units with non-square shapes along the horizontal or vertical direction based on the division shape pattern information. That is, the division shape pattern information can indicate the division of coding units with square shapes in one direction. In this case, the binary code of the division shape pattern information indicating that coding units with square shapes are not divided can be represented as (0)b. When the binary code of the division shape pattern information indicating that coding units are not divided is set to (00)b, although there is no division shape pattern information set to (01)b, it may be necessary to use the binary code of the division shape pattern information that is 2 bits. However, when using the three division shapes of coding units with square shapes, such as Figure 18 As shown, the image decoding device 100 can efficiently utilize the bitstream by using a 1-bit binary code (0)b as partitioning shape pattern information to determine that the coding unit is not partitioned. However, the partitioning shape of the coding unit with a square shape, represented by the partitioning shape pattern information, should not be interpreted as limited to... Figure 18 The three shapes shown are intended to be interpreted as including all shapes described in the above embodiments.

[0243] According to embodiments, block shape information or partition shape pattern information can be represented using binary code, and the block shape information or partition shape pattern information can be directly generated as a bitstream. Furthermore, the block shape information or partition shape pattern information that can be represented using binary code can be used as input binary code in Context Adaptive Binary Arithmetic Coding (CABAC), instead of being directly generated as a bitstream.

[0244] The image decoding apparatus 100 according to an embodiment will be described in the process of obtaining a grammar for block shape information or partition shape pattern information via CABAC. The image decoding apparatus 100 may obtain a bitstream including binary codes for the grammar via a bitstream acquirer 110. The image decoding apparatus 100 may debinarize the binary bit strings included in the obtained bitstream to detect grammar elements representing block shape information or partition shape pattern information. According to an embodiment, the image decoding apparatus 100 may obtain a set of binary bit strings corresponding to the grammar element to be decoded, and decode each binary bit using probability information. The image decoding apparatus 100 may repeat this operation until the binary bit string configured with the decoded binary bits is identical to one of the previously obtained binary bit strings. The image decoding apparatus 100 may perform debinarization on the binary bit strings to determine the grammar element.

[0245] According to an embodiment, the image decoding device 100 can perform adaptive binary arithmetic encoding decoding processing to determine the syntax for the binary bit string, and the image decoding device 100 can update the probability model of the binary bits obtained by the bit stream acquirer 110. (Refer to...) Figure 17 According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can acquire a bitstream representing binary code, wherein the binary code represents shape pattern information. The image decoding device 100 can determine the syntax for the shape pattern information by using the acquired binary code of size 1 bit or 2 bits. The image decoding device 100 can update the probability of each bit of the 2-bit binary code to determine the syntax used for the shape pattern information. 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 of the 2-bit binary code is 0 or 1.

[0246] According to an embodiment, in the process of determining the syntax, the image decoding device 100 may update the probability of the binary bits used in the process of decoding the binary bits of the binary bit string of the syntax, and the image decoding device 100 may determine that a particular bit of the binary bit string has the same probability without updating the probability of that particular bit.

[0247] Reference Figure 17In the process of determining the syntax by using a binary bit string representing the partitioning shape pattern information of coding units with non-square shapes, when coding units with non-square shapes are not partitioned, the image decoding device 100 can determine the syntax for 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 has a non-square shape, the first binary bit of the binary bit string used for partitioning the shape pattern information can be 0 when coding units with non-square shapes are not partitioned, and the first binary bit of the binary bit string used for partitioning the shape pattern information can be 1 when the coding unit is partitioned into two or three coding units. Therefore, the probability that the first binary bit of the binary bit string for partitioning the shape pattern information of coding units with non-square shapes will be 0 can be 1 / 3, and the probability that the first binary bit will be 1 can be 2 / 3. As described above, since the partitioning shape pattern information indicating that coding units with non-square shapes are not partitioned can be expressed using a 1-bit binary bit string with a value of 0, the image decoding device 100 can determine whether the second binary bit is 0 or 1 only when the first binary bit of the partitioning shape pattern information is 1, in order to determine the syntax for the partitioning shape pattern information. According to an embodiment, when the first binary bit for dividing shape pattern information is 1, the image decoding device 100 can determine that the probability that the second binary bit will be 0 is equal to the probability that the second binary bit will be 1, and decode the second binary bit.

[0248] Therefore, the image decoding device 100 can use various probabilities of each binary bit in the process of determining the binary bits of the binary bit string for dividing shape pattern information. According to an embodiment, the image decoding device 100 can determine different probabilities of the binary bits for dividing shape pattern information based on the width of the current coding unit or the length of the long side of the current coding unit. According to an embodiment, the image decoding device 100 can determine different probabilities of the binary bits for dividing shape pattern information based on the area of ​​the current coding unit or the length of the long side of the current coding unit. According to an embodiment, the image decoding device 100 can determine different probabilities of the binary bits for dividing shape pattern information based on at least one of the shape of the current coding unit and the length of the long side of the current coding unit.

[0249] According to an embodiment, the image decoding device 100 can determine that the probability of dividing shape pattern information into binary bits is the same for encoding units with a size equal to or greater than a preset size. For example, the image decoding device 100 can determine that for encoding units with a long side length equal to or greater than 64 samples, the probability of dividing shape pattern information into binary bits is the same.

[0250] 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).

[0251] Figure 19 This is a block diagram of an image encoding and decoding system that performs loop filtering.

[0252] The encoding end 1910 of the image encoding and decoding system 1900 can transmit the encoded bitstream of the image, and the decoding end 1950 of the image encoding and decoding system 1900 can receive the bitstream and decode the bitstream to output a reconstructed image. Here, the encoding end 1910 can be configured similarly to the image encoding device 200 described below, and the decoding end 1950 can be configured similarly to the image decoding device 100.

[0253] In the encoding stage 1910, the predictive encoder 1915 outputs predicted data through inter-frame 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 encodes the quantized transform coefficients and outputs the encoded quantized transform coefficients as a bitstream. The quantized transform coefficients are reconstructed into spatial domain data via the dequantizer and inverse transformer 1930, and the reconstructed spatial domain data can be 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 in the predictive encoder 1915.

[0254] 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 predicted data and residual data output by the predictor 1975 are combined, the spatial domain image data can be configured, and the deblocking filter 1965 and loop filter 1970 can output a reconstructed image for the current original image by filtering the spatial domain image data. The reconstructed image can be used by the predictor 1975 as a reference image for the next original image.

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

[0256] The various embodiments described above describe operations related to the image decoding method performed by the image decoding device 100. Hereinafter, the operation of the image encoding device 200, which performs an image encoding method corresponding to the reverse order of the image decoding method, will be described through various embodiments.

[0257] Figure 2 This is a block diagram of an image encoding device 200 according to an embodiment, capable of encoding an image based on at least one of block shape information and segmentation shape pattern information.

[0258] Image encoding device 200 may include encoder 220 and bitstream generator 210. Encoder 220 may receive and encode an input image. Encoder 220 may encode the input image to obtain at least one syntax element. Syntax element 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.

[0259] Bitstream generator 210 can generate a bitstream based on an encoded input image. For example, bitstream generator 210 can generate a bitstream by performing entropy encoding on syntax elements based on a context model. Image encoding device 200 can send the bitstream to image decoding device 100.

[0260] 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 representing such a shape may be included in the block shape information.

[0261] According to an embodiment, encoder 220 can determine the shape into which the encoding unit will be divided. 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.

[0262] According to an embodiment, encoder 220 can determine whether to divide the coding unit. When encoder 220 determines that the coding unit includes only one coding unit or the coding unit is not divided, bitstream generator 210 can generate a bitstream including division shape pattern information indicating that the coding unit is not divided. Encoder 220 can divide the coding unit into multiple coding units included in the coding unit, and bitstream generator 210 can generate a bitstream including division shape pattern information indicating that the coding unit will be divided into multiple coding units.

[0263] According to an embodiment, information indicating the number of coding units into which a coding unit is divided, or the direction in which the coding units are divided, may 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.

[0264] Image encoding device 200 can determine partition shape pattern information based on the partition shape pattern of the encoding unit. Image encoding device 200 can determine a context model based on at least one of the shape, orientation, aspect ratio, or size of the encoding unit. Image encoding device 200 can generate a bitstream based on the context model regarding the partition shape pattern used to partition the encoding unit.

[0265] To determine the context model, the image coding apparatus 200 may obtain an arrangement that corresponds at least one of the shape, orientation, aspect ratio, or size of the coding units to the index of the context model. The image coding apparatus 200 may obtain the index of the context model from the arrangement based on at least one of the shape, orientation, aspect ratio, or size of the coding units. The image coding apparatus 200 may determine the context model based on the index of the context model.

[0266] 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 the surrounding coding units adjacent to the coding unit. The surrounding coding units may include at least one of the coding units located to the lower left, left, upper left, upper, upper right, right, or lower right of the coding unit.

[0267] To determine the context model, the image coding device 200 can compare the length of the width of the upper surrounding coding unit with the length of the coding unit's width. The image coding device 200 can also compare the lengths of the heights of the left and right surrounding coding units with the lengths of the coding unit's height. The image coding device 200 can determine the context model based on the comparison results.

[0268] The operation of the image encoding device 200 includes the above references. Figures 3 to 19 The content of the image decoding device 100 described is similar, therefore, its detailed description will be omitted.

[0269] Figure 20 This is a block diagram of the structure of an image decoding device 2000 according to an embodiment.

[0270] Reference Figure 20 The image decoding device 2000 may include a context modeler 2010, an arithmetic decoder 2030, and a reconstructor 2070.

[0271] The context modeler 2010, arithmetic decoder 2030, and reconstructor 2070 according to the embodiments can be implemented as at least one processor. According to the embodiments, the context modeler 2010, arithmetic decoder 2030, and reconstructor 2070 can operate according to at least one instruction stored in at least one memory.

[0272] The image decoding device 2000 may include at least one memory for storing input / output data of the context modeler 2010, the arithmetic decoder 2030, and the reconstructor 2070. The image decoding device 2000 may also include a memory controller for controlling the data input / output of the at least one memory.

[0273] According to an embodiment, the context modeler 2010 and the arithmetic decoder 2030 may correspond to Figure 19 The entropy decoder 1955 shown, and the reconstructor 2070, can correspond to Figure 19 The inverse quantizer and inverse transformer 1960 and the predictive decoder 1975 are shown in the figure.

[0274] According to an embodiment, the device including a context modeler 2010 and an arithmetic decoder 2030 may be referred to as an entropy decoding device 2050.

[0275] The image decoding device 2000 can obtain a bitstream corresponding to the result of image encoding and reconstruct the image from the bitstream.

[0276] According to an embodiment, the image decoding device 2000 can receive a bitstream from the image encoding device via a network.

[0277] According to an embodiment, the image decoding device 2000 can obtain a bitstream from a data storage medium including magnetic media (such as hard disks, floppy disks, or magnetic tapes), optical recording media (such as CD-ROMs or DVDs), or magneto-optical media (such as optical floppy disks).

[0278] According to an embodiment, the bits included in the bitstream can correspond to the result of entropy encoding of the binary bit string corresponding to the syntax element. The syntax element can be generated through image encoding.

[0279] According to an embodiment, the context modeler 2010 can determine a probability value for each context of a syntax element in order to reconstruct binary bits from the bits included in the bitstream. One or more contexts may exist for each syntax element. The probability value may refer to the probability of occurrence of a preset binary bit (e.g., 0 or 1). According to an embodiment, the probability value may represent the probability of a symbol with a lower probability of occurrence among 0 and 1 (e.g., the least likely symbol (LPS)).

[0280] According to an embodiment, when the syntax element to be reconstructed currently meets predetermined conditions, for example, when the syntax element to be reconstructed is the first syntax element of an independent stripe fragment, the context modeler 2010 can determine an initial probability value for each context of the syntax element. The process of determining the initial probability value for each context can be referred to as context initialization. The initial probability value for each context can be updated during bit reconstruction.

[0281] According to an embodiment, the context modeler 2010 can obtain information indicating a specific context (e.g., ctxIdx) by using, for example, the type of the syntax element to be reconstructed, the position information of the bits within the binary bit string, and information about neighboring blocks. The context modeler 2010 can determine the probability value of a specific context from the various probability values ​​of the context of the syntax element to be reconstructed based on the obtained information (e.g., ctxIdx).

[0282] According to an embodiment, when the probability value of a binary bit is determined by the context modeler 2010, the arithmetic decoder 2030 can obtain a binary bit string corresponding to a syntax element from the bits included in the bitstream based on the probability value of the binary bit. According to an embodiment, the binary bit string can be converted into a syntax element by inverse binarization.

[0283] Whenever a binary bit is reconstructed by the arithmetic decoder 2030, the context modeler 2010 can update the probability value of the binary bit, and the arithmetic decoder 2030 can reconstruct the binary bit by using the updated probability value of the binary bit.

[0284] According to an embodiment, the arithmetic decoder 2030 can reconstruct a binary bit string by repeatedly dividing a predetermined integer range according to the probability value of the binary bits.

[0285] According to an embodiment, when the binary bit string is reconstructed by the entropy decoder 2050, the reconstructor 2070 can reconstruct the image by using syntax elements obtained via debinarization of the binary bit string.

[0286] Now refer to Figure 21 and Figure 22 Describe arithmetic encoding and arithmetic decoding processes.

[0287] Figure 21 This is a diagram used to describe the arithmetic coding process according to an embodiment.

[0288] To perform arithmetic encoding on the binary sequence 01111 (binary bit string), the initial probability value p(0) of 0 can be set to 0.25, and the initial probability value p(1) of 1 can be set to 0.75.

[0289] exist Figure 21In this context, since C(0) is the value obtained by accumulating the occurrences of 0, and C(1) is the value obtained by accumulating the occurrences of 1, C(0) can be 1, and C(1) can be 3. p(0) can be obtained by dividing C(0) by the sum of C(0) and C(1), and p(1) can be obtained by dividing C(1) by the sum of C(0) and C(1).

[0290] Based on the initial probability value of 0 (i.e., 0.25) and the initial probability value of 1 (i.e., 0.75), the predetermined range from 0 to 1 can be divided into the range from 0 to 0.25 and the range from 0.25 to 1.

[0291] Since the initial binary bit value to be encoded is 0, a range from 0 to 0.25 can be chosen. Since the value of C(0) has changed to 2, the probability value p(0) of 0 can be updated to 0.4, and the probability value p(1) of 1 can be updated to 0.6.

[0292] The range of 0 to 0.25 can be divided into a range of 0 to 0.1 and a range of 0.1 to 0.25 based on the probability value of 0 (i.e., 0.4) and the probability value of 1 (i.e., 0.6). Since the next bit to be encoded is 1, the range of 0.1 to 0.25 can be chosen. Since the value of C(1) has changed to 4, the probability value of 0, p(0), can be updated to 2 / 6, and the probability value of 1, p(1), can be updated to 4 / 6.

[0293] The range of 0.1 to 0.25 can be divided into a range of 0.1 to 0.15 and a range of 0.15 to 0.25 based on the probability values ​​of 0 (i.e., 2 / 6) and 1 (i.e., 4 / 6). Since the binary bit value to be encoded next is 1, the range of 0.15 to 0.25 can be chosen. Since the value of C(1) has changed to 5, the probability value of 0, p(0), can be updated to 2 / 7, and the probability value of 1, p(1), can be updated to 5 / 7.

[0294] The range of 0.15 to 0.25 can be divided into a range of 0.15 to 0.1786 and a range of 0.1786 to 0.25 based on the probability values ​​of 0 (i.e., 2 / 7) and 1 (i.e., 5 / 7). Since the next bit to be encoded is 1, the range of 0.1786 to 0.25 can be chosen. Since the value of C(1) has changed to 6, the probability value of 0, p(0), can be updated to 2 / 8, and the probability value of 1, p(1), can be changed to 6 / 8.

[0295] The range of 0.1786 to 0.25 can be divided into the range of 0.1786 to 0.19645 and the range of 0.19645 to 0.25 based on the probability values ​​of 0 (i.e., 2 / 8) and 1 (i.e., 6 / 8). Since the binary bit value to be encoded next is 1, the range of 0.19645 to 0.25 can be chosen.

[0296] Since no more binary bits will be encoded, the bit (001111) representing any value in the range of 0.19645 to 0.25 that was ultimately chosen can be output as the result of arithmetic encoding.

[0297] Figure 22 This is a diagram used to describe the arithmetic decoding process according to an embodiment.

[0298] Figure 22 The arithmetic decoding process shown can correspond to the above reference. Figure 21 The inverse processing described in the arithmetic encoding process.

[0299] Similar to arithmetic encoding, in arithmetic decoding, the initial probability value p(0) of 0 can be set to 0.25, and the initial probability value p(1) of 1 can be set to 0.75.

[0300] Based on the initial probability value of 0 (i.e., 0.25) and the initial probability value of 1 (i.e., 0.75), the predetermined range from 0 to 1 can be divided into the range from 0 to 0.25 and the range from 0.25 to 1.

[0301] Because the values ​​in the range of 0.19645 to 0.25 represented by the bit (001111) of the bit stream are included in the range of 0 to 0.25, the range of 0 to 0.25 can be selected, and thus the binary bit 0 can be reconstructed.

[0302] Since 0 is reconstructed, the value of C(0) can be changed to 2, the probability value of 0 p(0) can be updated to 0.4, and the probability value of 1 p(1) can be updated to 0.6.

[0303] Based on the probability values ​​of 0 (i.e., 0.4) and 1 (i.e., 0.6), the range of 0 to 0.25 can be divided into the range of 0 to 0.1 and the range of 0.1 to 0.25. Since values ​​in the range of 0.19645 to 0.25 are included in the range of 0.1 to 0.25, the range of 0.1 to 0.25 can be selected, and therefore 1 can be reconstructed.

[0304] Since 1 is reconstructed, the value of C(1) can be changed to 4, the probability value of 0 p(0) can be updated to 2 / 6, and the probability value of 1 p(1) can be updated to 4 / 6.

[0305] The range of 0.1 to 0.25 can be divided into the range of 0.1 to 0.15 and the range of 0.15 to 0.25 based on the probability values ​​of 0 (i.e., 2 / 6) and 1 (i.e., 4 / 6). Since values ​​in the range of 0.19645 to 0.25 are included in the range of 0.15 to 0.25, the range of 0.15 to 0.25 can be selected, and thus 1 can be reconstructed.

[0306] Since 1 is reconstructed, the value of C(1) can be changed to 5, the probability value of 0 p(0) can be updated to 2 / 7, and the probability value of 1 p(1) can be updated to 5 / 7.

[0307] The range of 0.15 to 0.25 can be divided into a range of 0.15 to 0.1786 and a range of 0.1786 to 0.25 based on the probability values ​​of 0 (i.e., 2 / 7) and 1 (i.e., 5 / 7). Since values ​​in the range of 0.19645 to 0.25 are included in the range of 0.1786 to 0.25, the range of 0.1786 to 0.25 can be selected, and therefore 1 can be reconstructed.

[0308] Since 1 is reconstructed, the value of C(1) can be changed to 6, the probability value of 0 p(0) can be updated to 2 / 8, and the probability value of 1 p(1) can be updated to 6 / 8.

[0309] The range of 0.1786 to 0.25 can be divided into the ranges of 0.1786 to 0.19645 and 0.19645 to 0.25 based on the probability values ​​of 0 (i.e., 2 / 8) and 1 (i.e., 6 / 8). Since values ​​in the range of 0.19645 to 0.25 are included within the range of 0.19645 to 0.25, 1 can be reconstructed.

[0310] When there are no more binary bits to be reconstructed, the binary string 01111 can be output as the result of arithmetic decoding.

[0311] Typically, when the initial probability of a binary bit is not accurately predicted, the number of bits generated by arithmetic coding increases, which increases the bit rate of the bitstream. Therefore, in terms of bit rate, it is important to accurately predict the probability values ​​of the binary bits used for encoding and decoding, and video standards such as HEVC and VVC have proposed tools for accurately predicting the probability values ​​of binary bits.

[0312] According to an embodiment, in order to perform entropy decoding on the current block, which is derived from the current parent block, the context modeler 2010 can obtain the probability value of the context of the syntax elements stored after entropy decoding of the previous block reconstructed before the current block. The context modeler 2010 can then use the obtained probability value of the context to perform entropy decoding on the syntax elements of the current block.

[0313] Because the current block and the previous block are adjacent to each other in the intrinsic space of the current image, their image features may be similar. Therefore, the efficiency of entropy coding / decoding can be improved by using the probability value of the context for the current block, where the probability value of the context is ultimately updated by entropy decoding of the previous block.

[0314] According to an embodiment, the upper-layer block may include stripes, parallel blocks, or maximum coding units (MCUs) divided from the image. Furthermore, the blocks divided from the upper-layer block may include parallel blocks divided from stripes, maximum coding units divided from stripes, coding units divided from stripes, maximum coding units divided from parallel blocks, coding units divided from parallel blocks, or coding units divided from maximum coding units.

[0315] We will now assume that the upper-level block is the largest coding unit, and that the blocks derived from the upper-level block are coding units for interpretation.

[0316] According to an embodiment, when the current coding unit corresponds to a first decoding target in at least one coding unit partitioned from the current maximum coding unit, the context modeler 2010 can obtain a probability value for each context stored after the entropy decoding of the previous maximum coding unit reconstructed before the current maximum coding unit is completed. The context modeler 2010 can use the obtained probability value of each context as a probability value for each context of the syntax element for the current coding unit.

[0317] According to an embodiment, when the current coding unit does not correspond to the first decoding target among the coding units partitioned from the current maximum coding unit, the context modeler 2010 can obtain the probability value of each context of the syntax element stored after completing the entropy decoding of the previous coding units reconstructed before the current coding unit in the coding units included in the current maximum coding unit. The context modeler 2010 can use the obtained probability value of each context as the probability value of each context for the syntax element of the current coding unit.

[0318] The largest coding unit partitioned from the image can be reconstructed according to the raster scan order, and at least one coding unit partitioned from the largest coding unit can be reconstructed according to the nested tree order. Therefore, when the current coding unit corresponds to the first decoding target within the current largest coding unit, the current coding unit and the previous coding unit can be spatially distant from each other. In other words, since the current coding unit is not adjacent to the previous coding unit, the probability value of the context stored after entropy decoding for the previous coding unit may not be suitable for entropy decoding for the current coding unit.

[0319] Now refer to Figure 23 and Figure 24This describes the case where the current coding unit is not adjacent to the previous coding unit.

[0320] Figure 23 This is a diagram illustrating a method for explaining, according to an embodiment, obtaining the probability value of the context used in the entropy decoding process of a previous coding unit in order to perform entropy decoding for the current coding unit.

[0321] Reference Figure 23 The current image 2300 can be divided into multiple maximum coding units, including a first maximum coding unit 2310, a second maximum coding unit 2320, a third maximum coding unit 2330, a fourth maximum coding unit 2340, and a current maximum coding unit 2350.

[0322] Reconstruction can be performed in the order of the first maximum coding unit 2310, the second maximum coding unit 2320, the third maximum coding unit 2330, the fourth maximum coding unit 2340, and the current maximum coding unit 2350, depending on the raster scanning order.

[0323] The fourth largest coding unit 2340 can be divided into multiple coding units, and these multiple coding units can be reconstructed according to the nested tree order. Figure 23 In the above, the numbers marked on the coding units within the fourth largest coding unit 2340 may refer to the reconstruction order.

[0324] According to an embodiment, when entropy decoding of the fifth coding unit within the fourth maximum coding unit 2340 is completed, the context modeler 2010 may store the probability value of the final update of each context of the syntax element.

[0325] According to an embodiment, the completion of entropy decoding can indicate that the reconstruction of the last grammatical element required to reconstruct the coding unit has been completed.

[0326] According to an embodiment, in order to accurately predict the probability value for the current coding unit, the context modeler 2010 can use the probability value of each context stored after the entropy decoding of the fifth coding unit within the fourth maximum coding unit 2340 has been completed. However, as mentioned above, because the fifth coding unit within the fourth maximum coding unit 2340 is located on the lower right side of the fourth maximum coding unit 2340, and the current coding unit is located on the upper left side of the current maximum coding unit 2350, the probability value of each context stored after the entropy decoding of the fifth coding unit within the fourth maximum coding unit 2340 has been completed may not be optimized for the current coding unit.

[0327] Figure 24 This is a diagram illustrating a method for explaining, according to an embodiment, obtaining the probability value of the context used in the entropy decoding process of a previous coding unit in order to perform entropy decoding for the current coding unit.

[0328] Reference Figure 24 The current image 2300 can be divided into multiple maximum coding units, including a first maximum coding unit 2310, a second maximum coding unit 2320, a third maximum coding unit 2330, and a current maximum coding unit 2350.

[0329] Reconstruction can be performed in the order of the first maximum coding unit 2310, the second maximum coding unit 2320, the third maximum coding unit 2330, and the current maximum coding unit 2350, depending on the raster scanning order.

[0330] The third maximum coding unit 2330 is included in the same line along with the first maximum coding unit 2310 and the second maximum coding unit 2320. Because the third maximum coding unit 2330 is located at the end of the line, the current maximum coding unit 2350, which is the first maximum coding unit in the next line, can be reconstructed after the third maximum coding unit 2330 is reconstructed.

[0331] According to an embodiment, when entropy decoding of the fifth coding unit within the third maximum coding unit 2330 is completed, the context modeler 2010 may store the probability value of the final update of each context of the syntax element.

[0332] According to an embodiment, the context modeler 2010 can reconstruct the syntax elements for the current coding unit within the current maximum coding unit 2350 by using the probability values ​​of each context stored after the entropy decoding of the fifth coding unit within the third maximum coding unit 2330 is completed.

[0333] like Figure 24 As shown, since the fifth coding unit within the third maximum coding unit 2330 is located in the lower right part of the row including the third maximum coding unit 2330, while the current coding unit is located in the upper left part of the row including the current maximum coding unit 2350, the probability value for each context of the fifth coding unit within the third maximum coding unit 2330 may not be optimized for the current coding unit.

[0334] According to an embodiment, to compensate for discontinuities between the current coding unit and previous coding units, the context modeler 2010 may adjust the probability value of each context stored after entropy decoding for the previous coding unit based on the binary bits of each context used to reconstruct the syntax elements of the previous maximum coding unit or previous coding unit. The context modeler 2010 may use the adjusted probability value of each context in the entropy decoding for the current coding unit. This will refer to... Figure 25 Describe it.

[0335] Figure 25This is a diagram used to explain the method, according to an embodiment, for updating the probability value of the context based on binary bits stored in the context.

[0336] As described above, the context modeler 2010 can obtain the probability value of each context of the syntax element stored after the entropy decoding of the fifth coding unit within the fourth maximum coding unit 2340 is completed, so as to perform entropy decoding on the first coding unit corresponding to the current coding unit among the coding units within the current maximum coding unit 2350.

[0337] According to an embodiment, the context modeler 2010 can obtain binary bits by entropy decoding of at least one coding unit included in at least one of the first maximum coding unit 2310, the second maximum coding unit 2320, or the fourth maximum coding unit 2340, based on the context storage of the syntax element. The context modeler 2010 can adjust the probability value of each context of the syntax element obtained from the fifth coding unit within the fourth maximum coding unit 2340 by using the binary bits based on the context storage.

[0338] According to an embodiment, binary bits can be stored for coding units adjacent to the right or lower boundary in coding units included in the first maximum coding unit 2310, the second maximum coding unit 2320, or the fourth maximum coding unit 2340.

[0339] For example, the context modeler 2010 can perform entropy decoding on the second, third, sixth, and seventh coding units of the second maximum coding unit 2320, and when the binary bits corresponding to the syntax elements are obtained, the binary bits can be stored in memory (or buffer) according to the context.

[0340] The context modeler 2010 can adjust the probability value of each context of the syntax element stored after entropy decoding of the fifth coding unit within the fourth maximum coding unit 2340, based on the binary bits stored in memory.

[0341] According to the embodiment, adjusting the probability value of each context can be understood as updating the probability value based on the binary bits of each context.

[0342] As described above, the probability value of the binary bit can be updated whenever the binary bit is reconstructed during entropy decoding. According to an embodiment, the context modeler 2010 can update the probability value of each context obtained from previous coding units based on the binary bit for each context obtained from at least one previous coding unit adjacent to the current coding unit, such that the probability value for the current coding unit is more optimized for the current coding unit.

[0343] According to an embodiment, the sum of the binary bits stored for each context can be set to be less than or equal to a first threshold predetermined for the maximum coding unit. This is to prevent excessive load due to buffering and probability value updates.

[0344] For example, the binary bits generated during entropy decoding of the second, third, sixth, and seventh coding units within the second maximum coding unit 2320 can be stored in memory, and the context modeler 2010 can allow the sum of the binary bits stored in memory to be less than or equal to 512. Here, 512 is an example, and various values ​​can be set as a first threshold.

[0345] Additionally, according to an embodiment, the number of binary bits stored for a given context can be set to be less than or equal to a second threshold. This is to prevent the storage of binary bits for other contexts from being impossible due to the storage of multiple binary bits for a specific context in memory. According to an embodiment, the second threshold can be, but is not limited to, 32. For example, the second threshold can be 2^n (where n is an integer).

[0346] In summary, according to the embodiments, the context modeler 2010 may store binary bits generated during entropy decoding of a previous maximum coding unit reconstructed prior to the current maximum coding unit 2350 in memory, depending on the context. The context modeler 2010 may ensure that the number of binary bits stored for a particular context does not exceed a second threshold, and that the total number of binary bits stored for a context does not exceed a first threshold.

[0347] According to an embodiment, when the current maximum coding unit 2350 is located at the leftmost position of the row including the current maximum coding unit 2350, the context modeler 2010 can use the binary bits generated during entropy decoding for the maximum coding unit located above the current maximum coding unit 2350 to adjust the probability value of each context.

[0348] According to an embodiment, the probability value for each context of a grammatical element may include a first probability value and a second probability value. The first probability value may be a probability value updated based on a first factor, and the second probability value may be a probability value updated based on a second factor. According to an embodiment, the first factor and the second factor are integer values, and the first factor may be less than the second factor.

[0349] The context modeler 2010 can determine the final probability value for each context by weighted summing of a first probability value and a second probability value for each context, and the arithmetic decoder 2030 can reconstruct the binary bits corresponding to the syntax elements based on the determined final probability value.

[0350] According to the embodiment, the first probability value and the second probability value can be updated according to the following equations 1 and 2.

[0351] [Equation 1] The updated first probability = first probability value – (first probability value >> shift0) + (a * binVal >> shift0) [Equation 2] The updated second probability value = second probability value – (second probability value >> shift1) + (b * binVal >> shift1) In equations 1 and 2, >> can be a bit shift operator, shift0 can correspond to the first factor, and shift1 can correspond to the second factor. In equations 1 and 2, binVal can represent the value of the binary bits reconstructed based on the first probability value and the second probability value. In equations 1 and 2, a and b can be predetermined constants.

[0352] Shift0 and Shift1 can be determined independently for each context of a syntax element.

[0353] For example, shift0 and shift1 for a first context of a first syntactic element and shift0 and shift1 for a second context of a first syntactic element can be determined independently of each other. According to an embodiment, shift0 and shift1 for the first context of a first syntactic element and shift0 and shift1 for the second context of a first syntactic element can be the same as each other or can be different from each other.

[0354] For example, shift0 and shift1 for the first context of the first grammatical element and shift0 and shift1 for the first context of the second grammatical element can be determined independently of each other. According to an embodiment, shift0 and shift1 for the first context of the first grammatical element and shift0 and shift1 for the first context of the second grammatical element can be the same as each other or can be different from each other.

[0355] According to an embodiment, shift0 can be less than shift1. This may mean that the range by which the first probability value changes with the update of the first probability value is greater than the range by which the second probability value changes with the update of the second probability value. In other words, the degree to which the first probability value changes with the update can be large, and the degree to which the second probability value changes with the update can be relatively small.

[0356] Figure 26 It is a graph showing the trends of the first probability value and the second probability value updated according to the first factor and the second factor, respectively, according to the embodiment.

[0357] Reference Figure 26 It can be seen that because the first probability value p1 is updated based on the first factor which is less than the second factor, the first probability value p1 has greater variability than the second probability value p2 updated based on the second factor.

[0358] The weighted sum of a first probability value p1 with high variability and a second probability value p2 with low variability can be used for entropy coding so that the probability value of each context can quickly and stably approach the actual probability value of the binary bit.

[0359] According to an embodiment, when updating the probability value of each context, the context modeler 2010 can update both the first probability value and the second probability value for each context based on the binary bits stored for each context.

[0360] According to an embodiment, when updating the probability value of each context, based on the binary bits stored according to each context, the context modeler 2010 may only update the first probability value for each context and the second probability value for each context.

[0361] According to an embodiment, when updating the probability value of each context, based on the binary bits stored according to each context, the context modeler 2010 may only update the second probability value for each context in the first probability value for each context and the second probability value for each context.

[0362] According to an embodiment, the probability value for each context may include only one probability value representing the probability of a binary bit occurring. In this case, the context modeler 2010 may update the probability value for each context based on a factor.

[0363] Now refer to Figures 27 to 29 Describes the process of determining the probability value for each context of the current coding unit.

[0364] Figure 27 This is a table showing binary bits obtained by entropy decoding of at least one coding unit within the largest coding unit according to an embodiment.

[0365] Figure 27 This shows the binary bits stored according to the context of the syntax element, and Figure 27 The binary bits shown can be, for example, by targeting Figure 25 The binary bits are reconstructed by entropy decoding of the second, third, sixth, and seventh coding units within the second largest coding unit 2320 shown in the figure.

[0366] Reference Figure 27As can be seen, for the syntax element merge_flag, there are ctx0 and ctx1. The binary bits of 1 and 0 have been reconstructed based on ctx0, and the binary bits of 0 have been reconstructed based on ctx1.

[0367] It can also be seen that for the syntax element abs_mvd_greater0_flag, there are ctx2, ctx3, ctx4 and ctx5, and for the syntax element abs_mvd_greater1_flag, there are ctx6, ctx7, ctx8 and ctx9.

[0368] exist Figure 27 In this example, no binary bits are stored for ctx5 of the syntax element abs_mvd_greater0_flag. This means that there are no binary bits reconstructed from ctx5 in the bit string corresponding to abs_mvd_greater0_flag.

[0369] Figure 27 Only merge_flag, abs_mvd_greater0_flag, and abs_mvd_greater1_flag are shown as syntax elements, but this is just an example. Binary bits can be stored for various types of syntax elements not shown.

[0370] Figure 28 It is a table showing the probability values ​​of the context of a syntax element stored after entropy decoding of a previous encoding unit is completed, according to an embodiment.

[0371] Figure 28 The first and second probability values ​​are shown for each context of the syntax element. Figure 28 The first and second probability values ​​shown for each context can be, for example, for... Figure 25 The first and second probability values ​​for each context are stored after the entropy decoding of the fifth coding unit in the fourth maximum coding unit 2340 shown is completed.

[0372] According to an embodiment, whenever binary bits are reconstructed during entropy decoding of a fifth coding unit within the fourth maximum coding unit 2340, the context modeler 2010 may update a first probability value and / or a second probability value for each context, and when the reconstruction of the last syntax element of the fifth coding unit is completed, the final updated first probability value and the final updated second probability value for each context may be used in the entropy decoding of the current coding unit.

[0373] For example, in Figure 28In the syntax element merge_flag, the first probability value of ctx0 is 15 and the second probability value is 23. These can be the first and second probability values ​​that are updated each time the binary bits corresponding to the syntax element merge_flag of the coding unit within the fourth maximum coding unit 2340 are reconstructed based on ctx0 after the initial probability value of ctx0 of the syntax element merge_flag is determined.

[0374] Figure 29 This illustrates the embodiment based on... Figure 27 The binary bit update shown Figure 28 The table shows the processing of probability values ​​for the context.

[0375] According to an embodiment, the context modeler 2010 may adjust the probability value for each context of a syntax element after entropy decoding of a previous coding unit is completed, based on the binary bits obtained by entropy decoding of at least one coding unit within the previous maximum coding unit, and may use the adjusted probability value in the entropy decoding of the current coding unit.

[0376] As previously Figure 27 and Figure 28 As shown, the first probability value of ctx0 in the syntax element merge_flag can be 15, and the second probability value can be 23. For ctx0 of the syntax element merge_flag, binary bits of 1 and binary bits of 0 can be stored.

[0377] Reference Figure 29 The context modeler 2010 can update the first and second probability values ​​of ctx0 of the syntax element merge_flag based on binary bits 1 and 0, respectively. Because two bits are already stored for ctx0 of the syntax element merge_flag, each of the first and second probability values ​​can be updated twice.

[0378] According to an embodiment, the context modeler 2010 may first consider the later-stored bits when updating the first probability value and the second probability value. For example, when storing a bit 1 and then a bit 0 for ctx0 of the syntax element merge_flag, the context modeler 2010 may first update the first and second probability values ​​of ctx0 of the syntax element merge_flag based on bit 0, and then update them based on bit 1. Using the later-stored bits to update the probability values ​​first may mean first updating the probability values ​​using the bits obtained through entropy decoding of coding units with a later decoding order.

[0379] When a single binary bit has already been stored for ctx1 of the syntax element merge_flag, the first probability value and the second probability value can be updated once, such as... Figure 29 As shown in the image.

[0380] exist Figure 29 In this case, the first probability value and the second probability value of ctx5 of the syntax element abs_mvd_greater0_flag are not updated because the binary bits corresponding to ctx5 of the syntax element abs_mvd_greater0_flag are not stored.

[0381] According to an embodiment, the context modeler 2010 can update the first probability value and the second probability value for each context of a grammatical element based on both Equations 1 and 2 described above.

[0382] Figure 29 The diagram illustrates a first probability value and a second probability value for each context, which update syntax elements based on binary bits. However, according to an embodiment, only one of the first and second probability values ​​can be updated based on a range.

[0383] As described above, the binary bits obtained during entropy decoding of at least one coding unit within the previous maximum coding unit are stored in memory, depending on the context. In this case, the number of binary bits stored for any one context can be limited to a second threshold or less, and the total number of binary bits stored for any one context can be limited to a first threshold or less.

[0384] For example, when the first threshold is 512 and the second threshold is 32, the minimum number of contexts that can be adjusted is 16 (512 / 32). This means that the probability values ​​of 16 contexts can be updated based on binary bits.

[0385] The VVC standard defines more than 300 contexts in total. Therefore, when only 16 contexts are adjusted, it may be difficult to derive the probability value optimized for entropy decoding of the current coding unit.

[0386] According to an embodiment, when binary bits obtained during entropy decoding of at least one coding unit within a previous maximum coding unit are stored in memory, the number of binary bits stored for any given context can be limited to no greater than the smaller of a second threshold and a limit value.

[0387] According to an embodiment, the constraint value may be a value corresponding to a first factor of the first probability value used to update the context. For example, the constraint value may be a value corresponding to 2^the first factor (2^... firstfactor ).

[0388] By considering a first factor that limits the number of binary bits, the accurate probability value of the current coding unit can be appropriately predicted simply by updating the first probability value using the binary bits.

[0389] Specifically, the first factor, which is the value of the first probability value used to update the context, can be smaller than the second factor used to update the second probability value.

[0390] The above Equation 1 is calculated based on the assumption that there are N binary bits for a specific context, and 2^the first factor can correspond to N. This will be explained in reference to Equations 3 and 4 below.

[0391] [Equation 3]

[0392] In Equation 3, P indicates the probability value of the binary bits of a preset value (e.g., 1), and P' indicates the updated probability value. N indicates the number of binary bits existing for a specific context, and Y indicates the value of the reconstructed binary bits.

[0393] When N + 1 corresponding to the window size is approximated as N' to eliminate the division operation in Equation 3 and N' is changed to 1 << W, Equation 3 is changed to the following Equation 4.

[0394] [Equation 4]

[0395] It can be seen that when comparing Equation 1 and Equation 2 with Equation 4, except for the constants a and b, Equation 1 and Equation 2 are the same as Equation 4. That is, W in Equation 4 can correspond to shift0 and shift1 in Equation 1 and Equation 2.

[0396] W in Equation 4 is a value determined based on the number of binary bits N existing for a specific context. The larger N is, the larger W can be determined, and the smaller N is, the smaller W can be determined. Since N is approximated as 1 << W above, N becomes 2^W.

[0397] Setting the above limit value to 2^the first factor can mean that the number of binary bits to be stored is limited to be less than or equal to the number of binary bits N considered when updating the first probability value.

[0398] By storing to update the number of binary bits of the first probability value to not exceed the limit value calculated from the first factor, an accurate probability value can be derived even when only a small number of binary bits are used to update the first probability value.

[0399] Reference will be made to Figure 30Explain the difference between limiting the number of bits for any given context storage by considering only the second threshold and limiting the number of bits for any given context storage by considering both the limit value and the second threshold.

[0400] Figure 30 This is a table showing a comparison between the number of adjustable contexts when the number of bits is limited to a second threshold according to an embodiment and the number of adjustable contexts when the number of bits is limited to the smaller of the second threshold and the limit value.

[0401] Suppose that the total number of binary bits that can be stored for a context is limited by a first threshold of 512.

[0402] like Figure 30 As shown, when the number of binary bits stored according to the context is limited by the second threshold 32, binary bits can be stored only for ctx0 to ctx15. Therefore, probability value adjustment can be performed only for the 16 contexts from ctx0 to ctx15.

[0403] When the number of bits stored according to the context is limited by the smaller of the second threshold 32 and the limit value corresponding to the first factor 2, bits can be stored for 32 contexts from ctx0 to ctx31. Therefore, probability value adjustment can be performed for 32 contexts.

[0404] like Figure 30 As shown, since the first factor of most contexts has a value of 5 or less, the number of contexts that can be adjusted by using 2^first factor as the limit value can be increased compared to the case where only the second threshold of 32 is used to limit the number of bits.

[0405] According to an embodiment, the limit value can be set independently for each context, regardless of the first factor. For example, the limit value can be set to 32 for one context and to 16 for another.

[0406] According to an embodiment, the context modeler 2010 can control the number of binary bits stored for each context by using a table that shows the limit values ​​for each context.

[0407] According to an embodiment, the context modeler 2010 can control the number of bits stored for each context by using only a limit value for each context. For example, the context modeler 2010 can control the number of bits stored for each context to not exceed the limit value for each context.

[0408] Now refer to Figure 31 and Figure 32 This describes which bit of the coding unit can be used to adjust the probability value of the current coding unit.

[0409] Figure 31 This is a diagram illustrating a previous encoding unit that can be used to update the probability value of the context according to an embodiment.

[0410] exist Figure 31 In the context modeler 2010, when the current coding unit within the current maximum coding unit 2350 corresponds to the first coding unit, the context modeler 2010 can obtain the probability value of each context after the entropy decoding of the fifth coding unit within the fourth maximum coding unit 2340 is completed. The context modeler 2010 can adjust the probability value of each context according to the binary bits of each context stored in memory.

[0411] According to an embodiment, the context modeler 2010 can store binary bits obtained by entropy decoding of at least one coding unit (e.g., at least one of the third coding unit, the fifth coding unit, or the seventh coding unit) adjacent to the lower boundary within the first maximum coding unit 2310, based on the context storage.

[0412] According to an embodiment, the context modeler 2010 can obtain binary bits by entropy decoding of at least one coding unit (e.g., at least one of the second coding unit, the third coding unit, the sixth coding unit, or the seventh coding unit) adjacent to the lower boundary in the coding unit within the second maximum coding unit 2320, based on the context storage.

[0413] According to an embodiment, the context modeler 2010 can store binary bits obtained by entropy decoding of at least one coding unit (e.g., at least one of the second, third, or fifth coding units) adjacent to the right boundary within the fourth maximum coding unit 2340, based on the context storage.

[0414] In the following text, the binary bits of a maximum coding unit can be represented as binary bits obtained by entropy decoding of at least one coding unit within the maximum coding unit and stored according to the context. The binary bits of a coding unit can be represented as binary bits obtained by entropy decoding of the coding unit and stored according to the context.

[0415] According to an embodiment, the context modeler 2010 can use the bits of the second maximum coding unit 2320 located above the current maximum coding unit 2350 in the maximum coding unit adjacent to the current maximum coding unit 2350 to adjust the probability value for each context of the current coding unit.

[0416] According to an embodiment, the context modeler 2010 can use the bits of the coding units adjacent to the current coding unit in the coding units within the second large coding unit 2320 (e.g., the bits of the second coding unit within the second large coding unit 2320) to adjust the probability value for each context of the current coding unit.

[0417] According to an embodiment, the context modeler 2010 can identify, based on information included in the bitstream, which bit of the largest coding unit adjacent to the current largest coding unit 2350 was used to adjust the probability value for the current coding unit.

[0418] For example, when the information included in the bitstream indicates the second maximum coding unit 2320 among the first maximum coding unit 2310, the second maximum coding unit 2320, and the fourth maximum coding unit 2340, the context modeler 2010 can perform probability value adjustment by using the binary bits of the second maximum coding unit 2320.

[0419] For example, when the information included in the bitstream indicates the fourth maximum coding unit 2340 among the first maximum coding unit 2310, the second maximum coding unit 2320, and the fourth maximum coding unit 2340, the context modeler 2010 can perform probability value adjustment by using the binary bits of the fourth maximum coding unit 2340.

[0420] According to an embodiment, the context modeler 2010 can determine from information included in the bitstream which of the previous coding units adjacent to the current coding unit can be used for probability value adjustment for the current coding unit. The previous coding units adjacent to the current coding unit may include the second coding unit within the second maximum coding unit 2320 and the second coding unit within the fourth maximum coding unit 2340. For example, the previous coding units adjacent to the current coding unit may include the eleventh coding unit within the first maximum coding unit 2310, the second coding unit within the second maximum coding unit 2320, and the second coding unit within the fourth maximum coding unit 2340. For example, the previous coding units adjacent to the current coding unit may include the coding unit adjacent to the lower boundary within the second maximum coding unit 2320 and the coding unit adjacent to the right boundary within the fourth maximum coding unit 2340. For example, the previous coding units adjacent to the current coding unit may include the coding units adjacent to the lower boundary in the coding units within the first maximum coding unit 2310, the coding units adjacent to the lower boundary in the coding units within the second maximum coding unit 2320, and the coding units adjacent to the right boundary in the coding units within the fourth maximum coding unit 2340.

[0421] According to an embodiment, the context modeler 2010 can identify, based on the size of the current coding unit, which of the largest coding units adjacent to the current largest coding unit 2350 has its binary bits used for probability value adjustment for the current coding unit. According to an embodiment, the size of the current coding unit can correspond to a comparison between the width and height of the current coding unit.

[0422] For example, when the width of the current coding unit is greater than its height, the context modeler 2010 can adjust the probability value by using the bits of the second maximum coding unit 2320 located above the current maximum coding unit 2350 or the bits of the second coding unit within the second maximum coding unit 2320 located above the current coding unit.

[0423] For example, when the height of the current coding unit is greater than its width, the context modeler 2010 can use the bits of the fourth maximum coding unit 2340 located to the left of the current maximum coding unit 2350 or the bits of the second coding unit located within the fourth maximum coding unit 2340 to the left of the current coding unit to adjust the probability value.

[0424] For example, when the width and height of the current coding unit are the same, the context modeler 2010 can adjust the probability value by using the binary bits of the largest coding unit or the coding unit located at a predetermined position (e.g., the upper left).

[0425] According to an embodiment, the context modeler 2010 can identify, based on the size of the boundary in the boundary of the current coding unit that contacts the current coding unit, which bit of the maximum coding unit adjacent to the current maximum coding unit 2350 was used for the probability value adjustment of the current coding unit.

[0426] Reference Figure 31 The lower boundary of the second coding unit within the second maximum coding unit 2320, the lower boundary of the third coding unit, and the right boundary of the second coding unit within the fourth maximum coding unit 2340 contact the current coding unit. According to an embodiment, the context modeler 2010 can identify the maximum coding unit available for probability value adjustment based on a comparison between the length (i.e., width) of the lower boundary of the second coding unit within the second maximum coding unit 2320, the length (i.e., width) of the lower boundary of the third coding unit, and the length (i.e., height) of the right boundary of the second coding unit within the fourth maximum coding unit 2340.

[0427] For example, in Figure 31In this context, because the height of the second coding unit within the fourth maximum coding unit 2340 is greater than the width of the second coding unit within the second maximum coding unit 2320 and the width of the third coding unit, the context modeler 2010 can perform probability value adjustment by using the bits of the fourth maximum coding unit 2340 or the bits of the second coding unit within the fourth maximum coding unit 2340.

[0428] For example, because the width of the second coding unit within the second maximum coding unit 2320 is greater than the width of the third coding unit within the second maximum coding unit 2320 and the height of the second coding unit within the fourth maximum coding unit 2340, the context modeler 2010 can perform probability value adjustment by using the bits of the second maximum coding unit 2320 or the bits of the second coding unit within the second maximum coding unit 2320.

[0429] For example, since the width of the second coding unit within the second maximum coding unit 2320, the width of the third coding unit within the second maximum coding unit 2320, and the height of the second coding unit within the fourth maximum coding unit 2340 are all the same to each other, the context modeler 2010 can perform probability value adjustment by using the bits of the maximum coding unit or the coding unit located at a predetermined position (e.g., on the top).

[0430] According to an embodiment, the context modeler 2010 can identify, based on the area of ​​the coding units adjacent to the current coding unit, which bit of the largest coding unit adjacent to the current largest coding unit 2350 was used for the probability value adjustment of the current coding unit.

[0431] For example, the context modeler 2010 can adjust the probability value of the current coding unit by using the bits of the largest coding unit that includes the largest coding unit in the coding units adjacent to the current coding unit, or the bits of the largest coding unit in the coding unit.

[0432] For example, when the areas of the coding cells adjacent to the current coding cell are the same, the context modeler 2010 can adjust the probability value by using the binary bits of the largest coding cell or the coding cell located at a predetermined position (e.g., above).

[0433] exist Figure 31 In this context, because the area of ​​the second coding unit within the fourth maximum coding unit 2340 is the largest among the coding units adjacent to the current coding unit, the context modeler 2010 can perform probability value adjustment by using the bits of the fourth maximum coding unit 2340 or the bits of the second coding unit within the fourth maximum coding unit 2340.

[0434] Figure 32This is a diagram illustrating a previous encoding unit that can be used to update the probability value of the context according to an embodiment.

[0435] exist Figure 32 In this context, the current coding unit is the fifth coding unit adjacent to the left boundary of the current largest coding unit 2350, and it is assumed that the reconstruction of the first, second, third, and fourth coding units has been completed.

[0436] According to the embodiment, since the reconstruction of the fourth coding unit has been completed immediately before the current coding unit, the context modeler 2010 can obtain the probability value of each context after performing entropy decoding on the fourth coding unit within the current maximum coding unit 2350, so as to perform entropy decoding on the current coding unit.

[0437] According to an embodiment, the context modeler 2010 may selectively adjust the probability value of each context after entropy decoding for the fourth coding unit within the current maximum coding unit 2350, based on the binary bits stored in memory for each context.

[0438] For example, the context modeler 2010 can obtain information from the bit stream indicating whether the probability value needs to be adjusted, and when the obtained information indicates that the probability value needs to be adjusted, the context modeler 2010 can adjust the probability value according to the binary bits stored in memory for each context.

[0439] According to the embodiment, since the current coding unit is adjacent to the left boundary of the current maximum coding unit 2350, but not to the upper boundary of the current maximum coding unit 2350, the context modeler 2010 can use the bits of the fourth maximum coding unit 2340 closest to the current coding unit or the bits of the third coding unit adjacent to the current coding unit in the coding units of the fourth maximum coding unit 2340 to adjust the probability value.

[0440] According to an embodiment, when it is necessary to adjust the probability value for the current coding unit, the context modeler 2010 can refer to a reference... Figure 31 The described embodiments (e.g., embodiments that identify which bit of a coding unit is used in the probability value adjustment for the current coding unit) are used to identify the coding unit used in the probability value adjustment.

[0441] According to an embodiment, the context modeler 2010 can determine whether to perform probability value adjustment for the current coding unit based on the size of the current coding unit. According to an embodiment, the size of the current coding unit can correspond to the comparison result between the width and height of the current coding unit.

[0442] For example, when the height of the current coding unit is greater than its width, the context modeler 2010 can use bits from the fourth largest coding unit 2340 or bits from the third coding unit adjacent to the left of the current coding unit within the fourth largest coding unit 2340 to adjust the probability value. The fact that the height of the current coding unit is greater than its width means that, because many areas of the current coding unit are in contact with the fourth largest coding unit 2340, bits from the fourth largest coding unit 2340 are used to adjust the probability value.

[0443] For example, when the width of the current coding unit is greater than its height, the context modeler 2010 may not perform probability value adjustment on the current coding unit. In other words, the probability value of each context stored after entropy decoding for the fourth coding unit within the current largest coding unit 2350 can be used for entropy decoding of the current coding unit.

[0444] For example, when the height and width of the current coding unit are the same, the context modeler 2010 can determine whether to perform probability value adjustment for the current coding unit based on information included in the bitstream.

[0445] Figure 33 This is a flowchart of an image decoding method according to an embodiment.

[0446] Figure 33 The image decoding method can be executed by the aforementioned image decoding device 2000.

[0447] In operation S3310, the image decoding device 2000 can obtain binary bits by entropy decoding of at least one coding unit within the first maximum coding unit, based on the context storage of the syntax element.

[0448] The first maximum coding unit may be reconstructed earlier than the current maximum coding unit, and the first maximum coding unit may include at least one of the maximum coding unit located to the left of the current maximum coding unit, the maximum coding unit located above the current maximum coding unit, and the maximum coding unit located to the upper left of the current maximum coding unit.

[0449] For example, the first maximum coding unit may include Figure 31 At least one of the first maximum coding unit 2310, the second maximum coding unit 2320, or the fourth maximum coding unit 2340 shown in the figure.

[0450] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0451] According to an embodiment, the image decoding device 2000 can identify at least one coding unit adjacent to the boundary of the current maximum coding unit or the current coding unit within the current maximum coding unit from the boundary of the first maximum coding unit, and can store the binary bits obtained by entropy decoding for the identified at least one coding unit according to the context of the syntax element.

[0452] In operation S3320, the image decoding device 2000 can obtain the probability value of the context of the syntax element after the entropy decoding of at least one coding unit within the second maximum coding unit is completed, so as to perform entropy decoding for the current coding unit within the current maximum coding unit.

[0453] According to an embodiment, the second maximum coding unit may be reconstructed earlier than the current maximum coding unit.

[0454] According to an embodiment, the second maximum coding unit may be located to the left of the current maximum coding unit. For example, the second maximum coding unit may be... Figure 31 The fourth largest coding unit 2340 is shown in the figure.

[0455] According to an embodiment, the second maximum coding unit may be located at the rightmost end of the upper row, which is above the maximum coding unit that includes the current maximum coding unit. For example, the second maximum coding unit may be... Figure 31 The third largest coding unit 2330 is shown in the figure.

[0456] According to an embodiment, the image decoding device 2000 can update the probability value of each context while reconstructing the binary bits of the syntax elements of at least one coding unit within the second maximum coding unit, and obtain the final updated probability value for each context of the current coding unit.

[0457] In operation of S3330, image decoding device 2000 can update the probability value of the context based on the binary bits stored in the context.

[0458] According to an embodiment, the probability value of the context may include a first probability value of the context and a second probability value of the context. The image decoding device 2000 can update the first probability value of the context by using a first factor set independently according to the context and binary bits stored according to the context, and can update the second probability value of the context by using a second factor set independently according to the context and binary bits stored according to the context.

[0459] According to an embodiment, the image decoding device 2000 may also update only one of the first probability value and the second probability value of the context based on binary bits.

[0460] In operation S3340, the image decoding device 2000 can reconstruct the syntax elements for the current coding unit based on the updated probability values ​​of the context.

[0461] According to an embodiment, the image decoding device 2000 can reconstruct the binary bits of the syntax element for the current coding unit based on the updated probability value of the context, and obtain the syntax element by debinarizing the binary bit string including the reconstructed binary bits.

[0462] In the above operation S3310, when storing binary bits according to the context, the image decoding device 2000 may limit the number of binary bits to be stored.

[0463] According to an embodiment, the image decoding device 2000 can limit the total number of binary bits stored for any one maximum coding unit to be less than or equal to a first threshold. For example, when the first threshold is 512, a maximum of 512 binary bits can be stored for any one maximum coding unit, and a maximum of 512 binary bits can be stored for another maximum coding unit.

[0464] According to an embodiment, the image decoding device 2000 may limit the number of binary bits stored for any one maximum coding unit to a smaller value between a limit value and a predetermined second threshold.

[0465] According to an embodiment, the limit value can be a value set independently for each context, and the second threshold can be a value set for the same context.

[0466] For example, the same second threshold of 32 can be set for both the first and second contexts, while a limit value of 16 can be set for the first context and a limit value of 32 can be set for the second context. In this case, up to 16 bits can be stored for the first context and up to 32 bits can be stored for the second context.

[0467] According to an embodiment, the limit value may be a value corresponding to a first factor set for each context, in order to update the first probability value of the context. For example, the limit value may be 2^the first factor.

[0468] According to an embodiment, when the syntax elements used for the current coding unit are reconstructed, the image decoding device 2000 can reconstruct the current coding unit by using the reconstructed syntax elements.

[0469] The probability value of the context of the syntax element after entropy decoding of the current coding unit can be used to entropy decode the next coding unit.

[0470] Figure 34 This is a block diagram of the structure of the image encoding device 3400 according to an embodiment.

[0471] Reference Figure 34 The image encoding device 3400 may include an encoder 3410, a context modeler 3430, and an arithmetic encoder 3450.

[0472] The encoder 3410, context modeler 3430, and arithmetic encoder 3450 according to the embodiments can be implemented as at least one processor. According to the embodiments, the encoder 3410, context modeler 3430, and arithmetic encoder 3450 can operate according to at least one instruction stored in at least one memory.

[0473] Image encoding device 3400 may include at least one memory for storing input / output data of encoder 3410, context modeler 3430, and arithmetic encoder 3450. Image encoding device 3400 may include a memory controller for controlling the data input / output of at least one memory.

[0474] According to an embodiment, the acquirer 3410 can correspond to Figure 19 The predictive encoder 1915, transformer and quantizer 1920, dequantizer and inverse transformer 1930, deblocking filter 1935, and loop filter 1940 are shown. According to an embodiment, the context modeler 3430 and arithmetic encoder 3450 can be coupled with… Figure 19 The entropy encoder 1925 shown in the figure corresponds to this.

[0475] According to an embodiment, the device including a context modeler 3430 and an arithmetic encoder 3450 may be referred to as an entropy coding device 3470.

[0476] Image encoding device 3400 can generate bitstreams by encoding images.

[0477] According to an embodiment, the image encoding device 3400 can transmit a bitstream to the image decoding device 2000 via a network. According to an embodiment, the image encoding device 3400 can store the bitstream in a data storage medium including magnetic media (such as hard disks, floppy disks, and magnetic tapes), optical recording media (such as CD-ROMs and DVDs), and magneto-optical media (such as optical floppy disks).

[0478] According to an embodiment, encoder 3410 can encode an image to obtain syntax elements as the encoding result.

[0479] According to an embodiment, encoder 3410 can divide the current image into maximum coding units, and further divide the maximum coding units into at least one coding unit. Encoder 3410 can encode each coding unit according to a prediction mode such as intra-frame mode or inter-frame mode.

[0480] The syntax elements obtained by encoder 3410 can be transformed into binary bit strings through binarization, and the binary bit strings can be input into entropy coding device 3470.

[0481] According to an embodiment, the context modeler 3430 can determine the probability value of each context of a syntax element in order to entropy encode the bits of a binary bit string.

[0482] According to an embodiment, when the syntax element to be encoded currently meets a predetermined condition, for example, when the syntax element to be encoded currently is the first syntax element of an independent stripe fragment, the context modeler 3430 can determine the initial probability value of each context of the syntax element.

[0483] According to an embodiment, the context modeler 3430 can obtain information indicating a specific context (e.g., ctxIdx) by using, for example, the type of the syntax element currently to be encoded, the position information of the bits within the binary bit string, and surrounding block information. The context modeler 3430 can determine the probability value of a specific context from the various probability values ​​of the context of the syntax element currently to be encoded based on the obtained information (e.g., ctxIdx).

[0484] According to an embodiment, when the probability value of a binary bit is determined by the context modeler 3430, the arithmetic encoder 3450 can perform arithmetic encoding on the binary bits included in the binary bit string based on the probability value of the binary bit, and can obtain a bit stream as the result of the arithmetic encoding.

[0485] Whenever a binary bit is arithmetically encoded by the arithmetic encoder 3450, the context modeler 3430 can update the probability value of the binary bit, and the arithmetic encoder 3450 can arithmetically encode the binary bit by using the updated probability value of the binary bit.

[0486] According to an embodiment, the arithmetic encoder 3450 can perform arithmetic encoding on binary bits included in a binary bit string, while repeatedly dividing a predetermined range of integers according to the probability value of the binary bits.

[0487] According to an embodiment, in order to perform entropy encoding on the current block, which is derived from the current parent block, the context modeler 3430 can obtain a probability value of the context of the syntax elements stored after entropy encoding of the previous block that was encoded before the current block. The context modeler 3430 can also perform entropy encoding on the syntax elements of the current block using the obtained probability value of the context.

[0488] According to an embodiment, the upper block may include stripes, parallel blocks, or maximum coding units divided from an image, and the blocks divided from the upper block may include parallel blocks divided from stripes, maximum coding units divided from stripes, coding units divided from stripes, maximum coding units divided from parallel blocks, coding units divided from parallel blocks, or coding units divided from maximum coding units.

[0489] The explanation will now proceed under the assumption that the upper-level block is the largest coding unit and therefore the blocks derived from the upper-level block are coding units.

[0490] According to an embodiment, when the current coding unit corresponds to a first coding target in at least one coding unit partitioned from the current maximum coding unit, the context modeler 3430 can obtain each context probability value of a syntax element stored after entropy encoding for a previous maximum coding unit, which was encoded before the current maximum coding unit. The context modeler 3430 can use the obtained probability value of each context as the probability value of each context for the syntax element of the current coding unit.

[0491] According to an embodiment, when the current coding unit does not correspond to a first coding target among the coding units partitioned from the current maximum coding unit, the context modeler 3430 can obtain each context probability value of a syntax element stored after entropy encoding of a previous coding unit among the coding units included in the current maximum coding unit, which was encoded before the current coding unit. The context modeler 3430 can use the obtained probability value of each context as the probability value of each context for the syntax element of the current coding unit.

[0492] According to an embodiment, to compensate for discontinuities between the current coding unit and previous coding units, the context modeler 3430 may adjust the probability value of each context stored after entropy encoding for the previous coding unit based on the binary bits of each context for the syntax elements of the previous maximum coding unit or the previous coding unit. The context modeler 3430 may use the adjusted probability value of each context in the entropy encoding for the current coding unit.

[0493] According to the embodiments, refer to Figure 25 The context modeler 3430 can obtain the probability value of each context of the syntax element stored after entropy encoding of the fifth coding unit within the fourth maximum coding unit 2340, so as to entropy encode the current coding unit (first coding unit) within the current maximum coding unit 2350.

[0494] According to an embodiment, the context modeler 3430 can store binary bits for each context of a syntax element by entropy encoding at least one of at least one of a first maximum coding unit 2310, a second maximum coding unit 2320, or a fourth maximum coding unit 2340.

[0495] The context modeler 3430 can adjust the probability value of each context of the syntax element obtained from the fifth coding unit within the fourth maximum coding unit 2340 by using the binary bits stored according to each context.

[0496] According to an embodiment, binary bits can be stored for coding units adjacent to the right or lower boundary in coding units included in the first maximum coding unit 2310, the second maximum coding unit 2320, or the fourth maximum coding unit 2340.

[0497] According to an embodiment, the total number of binary bits stored for each context can be set to be less than or equal to a first threshold predetermined for the maximum coding unit.

[0498] According to an embodiment, the number of binary bits for a context storage can be set to be less than or equal to the smaller of the second threshold and the limit value.

[0499] According to an embodiment, the limit value can be a value set independently for each context, and the second threshold can be a value set for contexts that are equal.

[0500] According to an embodiment, the context modeler 3430 can control the number of binary bits stored for each context by using a table that shows the limit values ​​for each context.

[0501] According to an embodiment, the probability value of each context of a syntax element may include a first probability value and a second probability value, and the first probability value may be updated according to a first factor, and the second probability value may be updated according to a second factor. According to an embodiment, the first factor may be less than the second factor.

[0502] According to an embodiment, the constraint value may be a value corresponding to a first factor of the first probability value used to update the context. For example, the constraint value may be a value corresponding to 2^the first factor (2^... firstfactor The value of ).

[0503] According to an embodiment, the context modeler 3430 can update a first probability value and a second probability value for each context based on the binary bits stored in the context.

[0504] According to an embodiment, the context modeler 3430 can update only the first probability value for each context in the first probability value and the second probability value for each context, based on the binary bits stored according to the context.

[0505] According to an embodiment, the context modeler 3430 can update only the second probability value for each context in the first probability value and the second probability value for each context based on the binary bits stored in the context.

[0506] According to an embodiment, the probability value for each context may include only one probability value representing the generation probability of a binary bit. In this case, the context modeler 3430 may update the probability value for each context based on a factor.

[0507] According to an embodiment, the context modeler 3430 can determine which bit of a coding unit (which largest coding unit) can be used for probability value adjustment for the current coding unit by considering at least one of the following: information included in the bit stream, the size of the current coding unit, the size of the boundary of the coding unit adjacent to the current coding unit that contacts the current coding unit, or the region of the coding unit adjacent to the current coding unit.

[0508] According to an embodiment, the context modeler 3430 can determine whether a probability value adjustment needs to be performed on the current coding unit by considering at least one of the information included in the bitstream or the size of the current coding unit.

[0509] Already referenced Figure 31 and Figure 32 The method for determining which bit of a coding unit (or which maximum coding unit) is used for probability value adjustment for the current coding unit and whether probability value adjustment needs to be performed on the current coding unit is described, so its detailed description is omitted here.

[0510] Figure 35 This is a flowchart of an image encoding method according to an embodiment.

[0511] Figure 35 The image encoding method can be executed by the aforementioned image encoding device 3400.

[0512] In operation S3510, the image encoding device 3400 can store binary bits corresponding to the syntax elements of at least one encoding unit within the first maximum encoding unit, according to the context of the syntax elements.

[0513] The first maximum coding unit may be encoded earlier than the current maximum coding unit, and the first maximum coding unit may include at least one of the maximum coding unit located to the left of the current maximum coding unit, the maximum coding unit located above the current maximum coding unit, and the maximum coding unit located to the upper left of the current maximum coding unit.

[0514] For example, the first maximum coding unit may include Figure 31 At least one of the first maximum coding unit 2310, the second maximum coding unit 2320, or the fourth maximum coding unit 2340 shown in the figure.

[0515] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0516] According to an embodiment, the image encoding device 3400 can identify at least one encoding unit adjacent to the boundary of the current maximum encoding unit or the current encoding unit within the current maximum encoding unit from the boundary of the first maximum encoding unit, and can store the binary bits corresponding to the syntax elements of the identified at least one encoding unit according to the context of the syntax elements.

[0517] In operation S3520, the image coding device 3400 can obtain the probability value of the context of the syntax element after entropy coding for at least one coding unit within the second maximum coding unit, so as to perform entropy coding for the current coding unit within the current maximum coding unit.

[0518] According to an embodiment, the second maximum coding unit may be encoded earlier than the current maximum coding unit. According to an embodiment, the encoding order of the second maximum coding unit may be later than the encoding order of the first maximum coding unit.

[0519] According to an embodiment, the second maximum coding unit may be located to the left of the current maximum coding unit. For example, the second maximum coding unit may be... Figure 31 The fourth largest coding unit 2340 is shown in the figure.

[0520] According to an embodiment, the second maximum coding unit may be located at the rightmost end of the row above the maximum coding unit row that includes the current maximum coding unit. For example, the second maximum coding unit may be... Figure 31 The third largest coding unit 2330 is shown in the figure.

[0521] According to an embodiment, the image encoding device 3400 can update the probability value of each context while performing arithmetic encoding on the binary bits of the syntax elements of at least one encoding unit within the second maximum encoding unit, and obtain the final updated probability value for each context of the current encoding unit.

[0522] In operation of S3530, the image encoding device 3400 can update the probability value of the context based on the binary bits stored in the context.

[0523] According to an embodiment, the probability value of the context may include a first probability value and a second probability value of the context. The image encoding device 3400 can update the first probability value of the context by using a first factor set independently according to the context and binary bits stored according to the context, and can update the second probability value of the context by using a second factor set independently according to the context and binary bits stored according to the context.

[0524] According to an embodiment, the image encoding device 3400 may update only one of the first probability value and the second probability value of the context based on binary bits.

[0525] In operation S3540, the image encoding device 3400 can perform arithmetic encoding on the syntax elements used for the current encoding unit based on the updated probability values ​​of the context.

[0526] According to an embodiment, the image encoding device 3400 can obtain a binary bit string by binarizing the syntax elements used for the current encoding unit, and obtain a bit stream by arithmetically encoding the binary bits in the binary bit string according to the probability value of context updates.

[0527] In the above operation S3510, when storing binary bits according to the context, the image encoding device 3400 may limit the number of binary bits to be stored.

[0528] According to an embodiment, the image encoding device 3400 can limit the total number of binary bits stored for any one maximum encoding unit to be less than or equal to a first threshold. For example, when the first threshold is 512, a maximum of 512 binary bits can be stored for any one maximum encoding unit, and a maximum of 512 binary bits can be stored for another maximum encoding unit.

[0529] According to an embodiment, the image encoding device 3400 may limit the number of binary bits stored for any one maximum encoding unit to a smaller value between a limit value and a predetermined second threshold.

[0530] According to an embodiment, the limit value can be a value set independently for each context, and the second threshold can be a value set equally for the contexts.

[0531] For example, the same second threshold of 32 can be set for both the first and second contexts, while a limit value of 16 can be set for the first context and a limit value of 32 can be set for the second context. In this case, up to 16 bits can be stored for the first context and up to 32 bits can be stored for the second context.

[0532] According to an embodiment, the limit value may be a value corresponding to a first factor set for each context, in order to update the first probability value of the context. For example, the limit value may be 2^the first factor.

[0533] The probability value of the syntax element context after entropy encoding of the current coding unit can be used for entropy decoding of the next coding unit.

[0534] The embodiments aim to reduce the bit rate of a bitstream by using probability-adjusted entropy coding.

[0535] The implementation aims to stably maintain the load by limiting the number of bits stored in the buffer based on a preset block limit, and adjusting according to the buffer and probability values.

[0536] The embodiment aims to enable the adjustment of probability values ​​for multiple contexts by adjusting the number of bits stored in the buffer based on the context.

[0537] The technical problems to be solved by this disclosure are not limited to those described above, and those skilled in the art to which this disclosure pertains will clearly understand from the following description other technical problems not mentioned.

[0538] The image decoding method according to the embodiment may include: storing binary bits obtained by entropy decoding of at least one coding unit within a first maximum coding unit, based on the context of the syntax element, wherein the at least one coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0539] The image decoding method according to the embodiment may include obtaining the probability value of the context of the syntax element after entropy decoding of at least one coding unit within the second maximum coding unit is completed, so as to perform entropy decoding on the current coding unit within the current maximum coding unit 2350, and the first maximum coding unit and the second maximum coding unit may be reconstructed before the current maximum coding unit 2350.

[0540] The image decoding method according to the embodiment may include updating the probability value of the context based on binary bits stored in the context.

[0541] The image decoding method according to the embodiment may include: reconstructing the syntax elements for the current coding unit based on the updated probability values ​​of the context.

[0542] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0543] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0544] According to the image decoding method of the embodiment, the probability values ​​of multiple contexts can be adjusted by adjusting the number of binary bits stored in the buffer based on the context.

[0545] According to the embodiment, a limit value can be set independently for each context, and a second threshold can be determined to be the same value for each context. Therefore, the probability values ​​for multiple contexts can be adjusted.

[0546] According to an embodiment, the limit value may be a value corresponding to a first factor set independently for each context, in order to update the probability value.

[0547] According to an embodiment, the probability value of a context includes a first probability value updated based on a first factor and a second probability value updated based on a second factor, and the size of the first factor can be smaller than the size of the second factor. Therefore, the probability values ​​of multiple contexts can be adjusted, and by setting a limit value based on the first factor, the probability of the context can quickly converge to an accurate probability.

[0548] According to the embodiment, the first maximum coding unit may be located above, to the left or to the upper left of the current maximum coding unit 2350, while the second maximum coding unit may be located to the left of the current maximum coding unit 2350 or to the rightmost position of the row above the maximum coding unit row that includes the current maximum coding unit 2350.

[0549] According to an embodiment, the update may include: identifying any one of the following based on information included in the bitstream: a first maximum coding unit 2340 located to the left of the current maximum coding unit 2350, a first maximum coding unit 2320 located above the current maximum coding unit 2350, and a first maximum coding unit 2310 located to the upper left of the current maximum coding unit 2350; and updating the probability value of the context based on binary bits obtained by entropy decoding of at least one coding unit within the identified first maximum coding unit. According to an embodiment, appropriate context probability value adjustment may be performed.

[0550] According to an embodiment, the update may include: identifying one of a first maximum coding unit 2340 located to the left of the current maximum coding unit 2350 and a first maximum coding unit 2320 located above the current maximum coding unit 2350, based on a comparison between the width and height of the current coding unit; and updating the probability value of the context based on binary bits obtained by entropy decoding of at least one coding unit within the identified first maximum coding unit. According to an embodiment, appropriate probability value adjustment of the context may be performed.

[0551] According to an embodiment, the update may include: identifying one of the first maximum coding unit 2340 to the left of the current maximum coding unit 2350 and the first maximum coding unit 2320 above the current maximum coding unit 2350, based on a comparison between the height of the coding unit adjacent to the left side of the current coding unit in the first maximum coding unit 2340 located to the left of the current maximum coding unit 2350 and the width of the coding unit adjacent to the upper side of the current coding unit in the first maximum coding unit 2320 located above the current maximum coding unit 2350; and updating the probability value of the context based on the binary bits obtained by entropy decoding of at least one coding unit within the identified first maximum coding unit. According to an embodiment, appropriate context probability value adjustment may be performed.

[0552] According to an embodiment, the update may include: identifying one of the following based on a comparison result between the area of ​​the coding unit within the first maximum coding unit 2340 to the left of the current maximum coding unit 2350, the area of ​​the coding unit within the first maximum coding unit 2320 above the current maximum coding unit 2350, and the area of ​​the first maximum coding unit 2310 to the upper left of the current maximum coding unit 2350: the first maximum coding unit 2340 to the left of the current maximum coding unit 2350, the first maximum coding unit 2320 above the current maximum coding unit 2350, and the first maximum coding unit 2310 to the upper left of the current maximum coding unit 2350; and updating the probability value of the context based on the binary bits obtained by entropy decoding of at least one coding unit within the identified first maximum coding unit. According to an embodiment, appropriate context probability value adjustments may be performed.

[0553] According to an embodiment, the image decoding method may further include: obtaining a probability value of the context of a syntax element after entropy decoding of a coding unit reconstructed before the current coding unit among the coding units included in the current maximum coding unit 2350, and updating may include: updating the probability value of the context of the syntax element after entropy decoding of the coding unit reconstructed before the current coding unit is completed based on binary bits stored in the context.

[0554] According to an embodiment, the current coding unit may be adjacent to the left boundary of the current maximum coding unit 2350, the first maximum coding unit 2340 may be located to the left of the current maximum coding unit 2350, and the update may include: when the height of the current coding unit is greater than the width of the current coding unit, updating the probability value of the context of the syntax element after the entropy decoding of the coding units reconstructed before the current coding unit is completed, based on the binary bits obtained by entropy decoding of at least one coding unit within the first maximum coding unit 2340 located to the left of the current maximum coding unit 2350. According to an embodiment, appropriate context probability value adjustment may be performed.

[0555] The image decoding apparatus according to an embodiment may include a context modeler 2010, which is configured to obtain a probability value of the context of the syntax element based on binary bits obtained by entropy decoding for at least one coding unit within a first maximum coding unit, after entropy decoding for at least one coding unit within a second maximum coding unit, in order to perform entropy decoding on the current coding unit within the current maximum coding unit 2350, and update the probability value of the context based on the binary bits stored in the context. The image decoding apparatus according to an embodiment may also include an arithmetic decoder 2030, which is configured to reconstruct the syntax element for the current coding unit based on the updated probability value of the context.

[0556] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0557] According to an embodiment, the first and second maximum coding units can be reconstructed before the current maximum coding unit 2350.

[0558] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0559] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0560] According to the image decoding device of the embodiment, the probability values ​​of multiple contexts can be adjusted by adjusting the number of binary bits stored in the buffer based on the context.

[0561] The image encoding method according to the embodiment may include: storing binary bits corresponding to the syntax elements of at least one encoding unit within a first maximum encoding unit, based on the context of the syntax elements, wherein the at least one encoding unit may be adjacent to the lower boundary or the right boundary of the first maximum encoding unit.

[0562] The image encoding method according to the embodiment may include: obtaining the probability value of the context of a syntax element after entropy encoding of at least one encoding unit within a second maximum encoding unit is completed, so as to entropy encode the current encoding unit within the current maximum encoding unit 2350, wherein the first maximum encoding unit and the second maximum encoding unit may be encoded before the current maximum encoding unit 2350.

[0563] The image encoding method according to the embodiments may include: updating the probability value of the context based on binary bits stored in the context.

[0564] The image encoding method according to the embodiments may include: performing arithmetic encoding on the syntax elements used for the current encoding unit based on the updated probability values ​​of the context.

[0565] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0566] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0567] According to the image encoding method of the embodiment, the bit rate of the bit stream can be reduced by using entropy encoding with probability value adjustment.

[0568] The image encoding apparatus according to an embodiment may include a context modeler 3430, which is configured to obtain a probability value of the context of a syntax element after entropy encoding of at least one encoding unit in a second maximum encoding unit is completed, based on the context storage of the syntax element and the corresponding binary bits of the syntax element of at least one encoding unit in a first maximum encoding unit, so as to entropy encode the current encoding unit in the current maximum encoding unit 2350, and update the probability value of the context based on the binary bits stored in the context.

[0569] The image encoding apparatus according to an embodiment may include an arithmetic encoder 3450, which is configured to perform arithmetic encoding on syntax elements for the current encoding unit based on context-updated probability values.

[0570] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0571] According to an embodiment, the first maximum coding unit and the second maximum coding unit may be encoded before the current maximum coding unit 2350.

[0572] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0573] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0574] According to the image encoding apparatus of the embodiment, the bit rate of the bit stream can be reduced by using entropy encoding with probability value adjustment.

[0575] In a computer-readable recording medium on which a bitstream is recorded according to an embodiment, the bitstream may correspond to the result of arithmetic encoding of the syntax elements used for the current coding unit.

[0576] According to an embodiment, the result of arithmetic encoding of a syntax element can be obtained by storing the binary bits corresponding to the syntax element of at least one encoding unit within the first maximum encoding unit based on the context of the syntax element.

[0577] According to an embodiment, the result of arithmetic encoding of a syntax element can be obtained by obtaining the probability value of the context of the syntax element after entropy encoding of at least one coding unit within the second largest coding unit, so as to entropy encode the current coding unit within the current largest coding unit 2350.

[0578] According to an embodiment, the result of arithmetic encoding of syntax elements can be obtained by updating the context based on the probability value of updating the context according to the binary bits stored in the context.

[0579] According to an embodiment, the result of arithmetic encoding of the syntax elements can be obtained by performing arithmetic encoding on the syntax elements used for the current coding unit using the probability value updated based on the context.

[0580] According to an embodiment, at least one coding unit within the first maximum coding unit may be adjacent to the lower boundary or the right boundary of the first maximum coding unit.

[0581] According to an embodiment, the first maximum coding unit and the second maximum coding unit may be encoded before the current maximum coding unit 2350.

[0582] According to an embodiment, the total number of binary bits stored according to the context may be less than or equal to a predetermined first threshold.

[0583] According to an embodiment, the number of binary bits stored for any given context may be less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

[0584] The implementation can reduce the bit rate of the bitstream by using entropy coding with probability value adjustment.

[0585] The implementation can stably maintain the load by limiting the number of bits stored in the buffer based on a preset block limit, and adjusting according to the buffer and probability value.

[0586] The implementation can enable the adjustment of probability values ​​for multiple contexts by adjusting the number of bits stored in the buffer based on the context.

[0587] The effects that can be obtained from this disclosure are not limited to the technical effects described above, and other effects not mentioned will be clearly understood by those skilled in the art from the following description.

[0588] The embodiments described above can be written as computer executable programs, and the written computer executable programs can be stored in machine-readable storage media.

[0589] Machine-readable storage media can be provided as non-transitory storage media. "Non-transitory storage media" is a tangible device and simply means that it does not contain signals (e.g., electromagnetic waves). This term does not distinguish between cases where data is stored semi-permanently in the storage medium and cases where data is temporarily stored. For example, a non-transitory recording medium may include a buffer for temporarily storing data.

[0590] According to embodiments, methods according to various disclosed embodiments can be provided by including them in a computer program product. The computer program product, as a commodity, can be traded between a seller and a buyer. The computer program product is distributed in the form of a device-readable storage medium (e.g., an optical disc read-only memory (CD-ROM)), or can be distributed directly and online (e.g., downloaded or uploaded) between two user devices (e.g., smartphones) through an app store. In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable app) can be stored at least temporarily in a device-readable storage medium, such as the memory of a manufacturer's server, an app store's server, or a relay server, or can be temporarily generated.

[0591] While one or more embodiments of this disclosure have been described with reference to the accompanying drawings, those skilled in the art will understand that various changes in form and detail may be made therein without departing from the spirit and scope defined by the following claims.

Claims

1. An image decoding method, comprising: Based on the context of the syntax element, store the binary bits obtained by entropy decoding of at least one coding unit within the first maximum coding unit, wherein the at least one coding unit is adjacent to the lower or right boundary of the first maximum coding unit; After entropy decoding of at least one coding unit within the second maximum coding unit is completed, the probability value of the context of the syntax element is obtained so as to perform entropy decoding of the current coding unit within the current maximum coding unit (2350), wherein the first maximum coding unit and the second maximum coding unit are reconstructed before the current maximum coding unit (2350). The probability value of updating the context is based on the binary bits stored in the context; and Context-based probability value updates reconstruct the syntax elements for the current coding unit. Wherein, the total number of binary bits stored according to the context is less than or equal to a predetermined first threshold, and The number of binary bits stored for any given context is less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

2. The image decoding method according to claim 1, wherein, The limit value is set independently for each context, and The second threshold is determined to be the same value used for the context.

3. The image decoding method according to any one of claims 1 and 2, wherein, The constraint value is a value corresponding to a first factor that is set independently for each context in order to update the probability value.

4. The image decoding method according to any one of claims 1 to 3, wherein, The context probability values ​​include a first probability value updated based on a first factor and a second probability value updated based on a second factor, and The size of the first factor is smaller than the size of the second factor.

5. The image decoding method according to any one of claims 1 to 4, wherein, The first largest coding unit is located above, to the left, or to the upper left of the current largest coding unit (2350). The second largest coding unit is located to the left of the current largest coding unit (2350), or to the right of the row above the row of the largest coding unit that includes the current largest coding unit (2350).

6. The image decoding method according to any one of claims 1 to 5, wherein, The update steps include: Based on the information included in the bitstream, identify any one of the following: the first maximum coding unit (2340) located to the left of the current maximum coding unit (2350), the first maximum coding unit (2320) located above the current maximum coding unit (2350), and the first maximum coding unit (2310) located to the upper left of the current maximum coding unit (2350); and The probability value of the context is updated based on the binary bits obtained by entropy decoding of at least one coding unit within the first largest coding unit of the identification.

7. The image decoding method according to any one of claims 1 to 6, wherein, The update steps include: Based on the comparison between the width and height of the current coding unit, identify one of the first maximum coding unit (2340) located to the left of the current maximum coding unit (2350) and the first maximum coding unit (2320) located above the current maximum coding unit (2350); and The probability value of the context is updated based on the binary bits obtained by entropy decoding of at least one coding unit within the first largest coding unit of the identification.

8. The image decoding method according to any one of claims 1 to 7, wherein, The update steps include: Based on the comparison between the height of the coding unit adjacent to the left side of the current coding unit in the first maximum coding unit (2340) located to the left of the current coding unit (2350) and the width of the coding unit adjacent to the upper side of the current coding unit in the first maximum coding unit (2320) located above the current maximum coding unit (2350), one of the first maximum coding unit (2340) located to the left of the current maximum coding unit (2350) and the first maximum coding unit (2320) located above the current maximum coding unit (2350) is identified; and The probability value of the context is updated based on the binary bits obtained by entropy decoding of at least one coding unit within the first largest coding unit of the identification.

9. The image decoding method according to any one of claims 1 to 8, wherein, The update steps include: Based on the comparison results between the area of ​​the coding unit in the first maximum coding unit (2340) to the left of the current maximum coding unit (2350), the area of ​​the coding unit in the first maximum coding unit (2320) above the current maximum coding unit (2350), and the area of ​​the coding unit in the first maximum coding unit (2310) to the upper left of the current maximum coding unit (2350), one of the first maximum coding unit (2340) to the left of the current maximum coding unit (2350), the first maximum coding unit (2320) above the current maximum coding unit (2350), and the first maximum coding unit (2310) to the upper left of the current maximum coding unit (2350) is identified; and The probability value of the context is updated based on the binary bits obtained by entropy decoding of at least one coding unit within the first largest coding unit of the identification.

10. The image decoding method according to any one of claims 1 to 9, Also includes: After entropy decoding of the coding units reconstructed before the current coding unit, which are included in the current largest coding unit (2350), the probability value of the context of the syntax element is obtained. The update step includes: The probability value of updating the context of a syntax element is based on the binary bits stored in the context, after the entropy decoding of the encoding unit reconstructed before the current encoding unit is completed.

11. The image decoding method according to any one of claims 1 to 10, wherein, The current coding unit is adjacent to the left boundary of the current largest coding unit (2350). The first largest coding unit (2340) is located to the left of the current largest coding unit (2350), and The update step includes: When the height of the current coding unit is greater than the width of the current coding unit, the probability value of updating the context of the syntax element is based on the binary bits obtained by entropy decoding of at least one coding unit in the first maximum coding unit (2340) located to the left of the current maximum coding unit (2350), after the entropy decoding of the coding unit reconstructed before the current coding unit is completed.

12. An image decoding device, comprising: The context modeler (2010) is configured to obtain the probability value of the context of the syntax element by entropy decoding of at least one coding unit within a first maximum coding unit based on the context storage of the syntax element, after entropy decoding of at least one coding unit within a second maximum coding unit is completed, so as to perform entropy decoding of the current coding unit within the current maximum coding unit (2350), and update the probability value of the context based on the binary bits stored in the context. as well as The arithmetic decoder (2030) is configured to reconstruct the syntax elements for the current coding unit based on context-updated probability values. Wherein, at least one coding unit within the first maximum coding unit is adjacent to the lower boundary or the right boundary of the first maximum coding unit. The first and second largest coding units are reconstructed before the current largest coding unit (2350). The total number of binary bits stored according to the context is less than or equal to a predetermined first threshold, and The number of binary bits stored for any given context is less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

13. An image encoding method, comprising: Based on the context of the syntax element, store the binary bits corresponding to the syntax element of at least one coding unit within the first maximum coding unit, wherein the at least one coding unit is adjacent to the lower or right boundary of the first maximum coding unit. After entropy encoding of at least one coding unit within the second maximum coding unit is completed, the probability value of the context of the syntax element is obtained so as to perform entropy encoding of the current coding unit within the current maximum coding unit (2350), wherein the first maximum coding unit and the second maximum coding unit are encoded before the current maximum coding unit (2350). The probability value of updating the context is based on the binary bits stored in the context; and The probability value updated based on the context is used to perform arithmetic encoding on the syntax elements used for the current coding unit. Wherein, the total number of binary bits stored according to the context is less than or equal to a predetermined first threshold, and The number of binary bits stored for any given context is less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

14. An image encoding device, comprising: The context modeler (3430) is configured to obtain the probability value of the context of the syntax element after entropy encoding of at least one coding unit in the second maximum coding unit is completed, based on the context storage of the syntax element and the corresponding binary bits of the syntax element of at least one coding unit in the first maximum coding unit, so as to perform entropy encoding for the current coding unit in the current maximum coding unit (2350) and update the probability value of the context based on the binary bits stored in the context. as well as An arithmetic encoder (3450) is configured to perform arithmetic encoding on the syntax elements used for the current coding unit based on the updated probability values ​​of the context. Wherein, at least one coding unit within the first maximum coding unit is adjacent to the lower boundary or the right boundary of the first maximum coding unit. The first and second largest coding units are encoded before the current largest coding unit (2350). The total number of binary bits stored according to the context is less than or equal to a predetermined first threshold, and The number of binary bits stored for any given context is less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.

15. A computer-readable recording medium on which a bitstream is recorded, in, The bitstream corresponds to the result of arithmetic encoding of the syntax elements used for the current coding unit. The result of arithmetic encoding of the syntax elements used for the current coding unit is obtained in the following way: Based on the context of the syntax element, store the binary bits corresponding to the syntax element of at least one coding unit within the first maximum coding unit; After entropy encoding of at least one coding unit within the second maximum coding unit is completed, the probability value of the context of the syntax element is obtained so as to perform entropy encoding of the current coding unit within the current maximum coding unit (2350). The probability value of updating the context is based on the binary bits stored in the context. as well as The probability value updated based on the context is used to perform arithmetic encoding on the syntax elements used for the current coding unit. Wherein, at least one coding unit within the first maximum coding unit is adjacent to the lower boundary or the right boundary of the first maximum coding unit. The first and second largest coding units are encoded before the current largest coding unit (2350). The total number of binary bits stored according to the context is less than or equal to a predetermined first threshold, and The number of binary bits stored for any given context is less than or equal to a limit value set for any given context, or less than or equal to the smaller of the limit value and a predetermined second threshold.