Methods for decoding motion information

By identifying and obtaining motion information not included in the inter-frame prediction process, the problem of increased bit count caused by excessive motion information in inter-frame prediction is solved, thus improving coding efficiency.

CN114697680BActive Publication Date: 2026-07-17SAMSUNG ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SAMSUNG ELECTRONICS CO LTD
Filing Date
2018-03-30
Publication Date
2026-07-17

Smart Images

  • Figure CN114697680B_ABST
    Figure CN114697680B_ABST
Patent Text Reader

Abstract

An apparatus and method for encoding motion information, as well as a decoding apparatus and method, are disclosed. According to one embodiment, a method for decoding motion information is disclosed, the method comprising the steps of: identifying the type of omitted motion information not included in the bitstream from among multiple motion information used when decoding a current block of inter-frame prediction; obtaining the omitted motion information based on a predetermined method; and decoding the current block based on the multiple motion information including the obtained omitted motion information.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application filed on March 30, 2018, with application number "201880071146.1" and titled "Apparatus and method for encoding motion information and decoding apparatus and method". Technical Field

[0002] This disclosure relates to the field of video encoding and decoding. More specifically, this disclosure relates to a method and apparatus for encoding motion information of video and a method and apparatus for decoding motion information of video. Background Technology

[0003] In methods for encoding and decoding video, in order to encode an image, a frame can be divided into macroblocks, and each macroblock can be predictively encoded using inter-frame prediction or intra-frame prediction.

[0004] Inter-frame prediction refers to a method of compressing an image by removing temporal redundancy between frames, and a representative example is motion estimation coding. In motion estimation coding, blocks in the current frame are predicted using at least one reference frame. The reference block most similar to the current block can be found within a predetermined search range using a predefined evaluation function.

[0005] The current block is predicted based on a reference block, and the residual block generated by subtracting the predicted block from the current block is encoded. In this case, to perform prediction more accurately, interpolation is performed on the search range of the reference frame, which can produce sub-pixel units smaller than integer pixel units, and inter-frame prediction can be performed on the produced sub-pixel units.

[0006] In codecs such as H.264 Advanced Video Coding (AVC) and High Efficiency Video Coding (HEVC), in order to predict the motion vector of the current block, the motion vectors of previously encoded blocks adjacent to the current block or blocks included in previously encoded frames are used as the predicted motion vectors of the current block. Summary of the Invention

[0007] Problem Solution

[0008] The method for decoding motion information according to an embodiment includes: identifying the type of omitted motion information that is not included in the bitstream among multiple motion information used to decode the current block predicted by inter-frame; obtaining the omitted motion information by using a predetermined method; and decoding the current block based on the multiple motion information including the obtained omitted motion information.

[0009] Beneficial effects of this disclosure

[0010] The apparatus and method for encoding motion information and the apparatus and method for decoding motion information according to the embodiments can reduce the number of bits by omitting some of the various motion information required for decoding inter-frame prediction blocks. Attached Figure Description

[0011] To provide a more comprehensive understanding of the accompanying drawings, a brief explanation of each drawing is provided.

[0012] Figure 1 This is a block diagram of an image decoding device according to an embodiment, capable of decoding an image based on at least one of block shape information and segmentation shape information.

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

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

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

[0016] Figure 5 The process of dividing coding units based on at least one of block shape information and partition shape information according to an embodiment is illustrated.

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

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

[0019] 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 coding units cannot be processed in a predetermined order, according to an embodiment.

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

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

[0022] Figure 11The process of dividing a square encoding unit according to an embodiment is shown when the division shape information indicates that the square encoding unit will not be divided into four square encoding units.

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

[0024] 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 recursively dividing the coding unit such that multiple coding units are determined, according to an embodiment.

[0025] Figure 14 The diagram illustrates a depth that can be determined based on the shape and size of the coding unit, according to an embodiment, and a partial index used to distinguish the coding unit.

[0026] Figure 15 The illustration shows how multiple encoding units are determined based on multiple predetermined data units included in the image, according to an embodiment.

[0027] Figure 16 The diagram illustrates a processing block, according to an embodiment, used as a unit for determining the order of reference coding units included in a frame.

[0028] Figure 17 The diagram illustrates the encoding units that can be determined for each frame when the combination of shapes into which the encoding units can be divided differs for each frame, according to an embodiment.

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

[0030] Figure 19 Other shapes of coding units that can be determined based on partition shape information that can be represented as binary code, according to an embodiment, are shown.

[0031] Figure 20 This is a block diagram of an image encoding and decoding system used to perform loop filtering.

[0032] Figure 21 This is a diagram illustrating an example of a filtering unit included in a maximum coding unit and filtering performance information of the filtering unit according to an embodiment.

[0033] Figure 22 This illustrates a process of merging or dividing encoding units determined according to a predetermined encoding method, based on an embodiment.

[0034] Figure 23 The index is shown according to the zigzag scanning order of the encoding units according to an embodiment.

[0035] Figure 24 This is a diagram illustrating reference samples for intra-frame prediction of a coding unit according to an embodiment.

[0036] Figure 25 This is a block diagram illustrating the configuration of a motion information decoding device according to an embodiment.

[0037] Figure 26 This is a flowchart describing a motion information decoding method according to an embodiment.

[0038] Figure 27 This is a block diagram illustrating the configuration of a motion information encoding device according to an embodiment.

[0039] Figure 28 This is a flowchart describing a motion information encoding method according to an embodiment.

[0040] Figure 29 and Figure 30 It is a diagram used to describe multiple motion information used for decoding inter-frame prediction blocks.

[0041] Figure 31 and Figure 32 This is a diagram showing the omitted motion information corresponding to the motion information omission mode.

[0042] Figure 33 This is a diagram illustrating a candidate block for obtaining omitted information according to an embodiment.

[0043] Figure 34 The syntax for obtaining omitted information based on motion information omission patterns for bidirectional prediction blocks is shown.

[0044] Figure 35 This demonstrates the syntax for obtaining information indicating the motion vector resolution (MVR) of the current block.

[0045] Figure 36 This is a diagram showing the position of a pixel indicated by the motion vectors of 1 / 4 pixel unit MVR, 1 / 2 pixel unit MVR, 1 pixel unit MVR, and 2 pixel unit MVR when the smallest selectable MVR for the current block is 1 / 4 pixel unit MVR.

[0046] Figure 37 and Figure 38 This is a diagram used to describe a method for adjusting the predicted motion vector or the difference between motion vectors.

[0047] Best mode

[0048] The method for decoding motion information according to an embodiment includes: identifying the type of omitted motion information that is not included in the bitstream among multiple motion information used to decode the current block predicted by inter-frame; obtaining the omitted motion information by using a predetermined method; and decoding the current block based on the multiple motion information including the obtained omitted motion information.

[0049] The omitted motion information can be obtained by first determining the motion information of the candidate block that has motion information, based on the priority order of determining whether there is motion information of multiple candidate blocks that are spatially or temporally related to the current block.

[0050] The omitted motion information can be obtained by combining multiple motion information from multiple candidate blocks that are spatially or temporally related to the current block.

[0051] The omitted motion information can be obtained based on preset basic motion information.

[0052] The omitted motion information can be obtained based on the motion information derived through decoder-side motion vector derivation (DMVD).

[0053] When there are multiple omitted motion information, the step of obtaining the omitted motion information may include obtaining each of the multiple omitted motion information by using different methods.

[0054] The type of omitted motion information can be identified based on at least one of the following: the motion vector resolution of the current block, the prediction direction of the current block, information about the current block, information about previously decoded neighboring blocks, and information indicating the omission pattern of motion information.

[0055] The method may further include: obtaining information indicating whether motion information omission processing is applied, wherein when it is determined that the motion information omission processing is applied, the type of omitted motion information is identified.

[0056] Information indicating whether to apply the motion information omission process may include at least one of the following: the motion vector resolution of the current block, the prediction direction of the current block, information about the current block, information about previously decoded neighboring blocks, and a flag indicating whether to apply the motion information omission process.

[0057] When the current block is predicted bidirectionally, the method may further include: obtaining information indicating an omission mode of motion information, wherein the omission mode of motion information includes at least one of a first mode and a second mode, wherein in the first mode, the motion vector difference corresponding to a first reference image list is identified as the omission motion information, and in the second mode, the motion vector difference corresponding to a second reference image list is identified as the omission motion information.

[0058] The multiple motion information may include information about the motion vector resolution of the current block and information indicating the predicted motion vector, wherein the method further includes: adjusting the predicted motion vector according to the motion vector resolution of the current block.

[0059] The method may further include: obtaining motion information other than the omitted motion information from multiple motion information streams.

[0060] A method for decoding motion information according to an embodiment includes: obtaining information indicating the bidirectional prediction type of a current block that is bidirectionally predicted; and decoding the current block based on the information indicating the bidirectional prediction type by using motion information other than at least one of a first motion vector difference corresponding to a first reference image list and a second motion vector difference corresponding to a second reference image list.

[0061] An apparatus for decoding motion information according to an embodiment includes: a recognizer configured to identify the type of omitted motion information not included in a bitstream among multiple motion information used for decoding a current block predicted inter-frame; and a decoder configured to obtain the omitted motion information using a predetermined method and to decode the current block based on the multiple motion information including the obtained omitted motion information.

[0062] An embodiment of a method for encoding motion information includes: determining, from multiple motion information used for decoding a current block predicted inter-frames, the type of omitted motion information to be omitted from a bitstream; obtaining the omitted motion information using a predetermined method; and generating a bitstream including motion information from the multiple motion information other than the omitted motion information. Detailed Implementation

[0063] Publication method

[0064] Because this disclosure allows for various changes and numerous embodiments, exemplary embodiments will be shown in the accompanying drawings and described in detail in the written description. However, this is not intended to limit this disclosure to a particular mode of practice, and it should be understood that all changes, equivalents, and substitutions that do not depart from the spirit and technical scope of this disclosure are included herein.

[0065] In the description of this disclosure, specific detailed explanations of related technologies are omitted where it is believed that such explanations might unnecessarily obscure the essence of this disclosure. Furthermore, the numbers used in the description of embodiments of this disclosure (e.g., first and second) are intended to distinguish one component from another.

[0066] When a component is referred to as “connected” or “accessed” to or by any other component, it should be understood that the component may be directly connected to or accessed to or by said other component, but unless otherwise specifically indicated, another new component may also be inserted between them.

[0067] Regarding elements with suffixes such as "unit" or "module," two or more elements may be combined into one element according to function, or one element may be divided into two or more elements according to function. Furthermore, each of the components described below, in addition to performing its primary function, may additionally perform some or all of the functions of other components, and some of the primary functions of each component may be exclusively performed by other components.

[0068] In addition, the terms “image” or “picture” used in this article may refer to a still image or a moving image of a video (i.e., the video itself).

[0069] Furthermore, as used herein, the term "sample" refers to a sampling location assigned to an image and the data to be processed. For example, pixels in an image in the spatial domain or transform coefficients in the transform domain can be samples. A unit comprising one or more samples can be defined as a block.

[0070] Furthermore, the term "current block" as used in this paper may refer to the block of the largest coding unit, coding unit, prediction unit, or transform unit of the current image to be encoded or decoded.

[0071] Furthermore, the term "motion vector resolution (MVR)" as used herein refers to the precision of the position of a pixel within the pixels included in the reference image (or interpolated reference image) that can be indicated by a motion vector determined through inter-frame prediction. When the MVR has N pixel units (N being a rational number), this means that the motion vector can have a precision of N pixel units. For example, a 1 / 4 pixel unit MVR can mean that the motion vector can indicate a pixel position in the interpolated reference image at a precision of 1 / 4 pixel unit (i.e., a sub-pixel unit), and a 1 pixel unit MVR can mean that the motion vector can indicate a pixel position in the interpolated reference image corresponding to a precision of 1 pixel unit (i.e., an integer pixel unit).

[0072] Furthermore, as used herein, the term "candidate MVR" refers to one or more MVRs that can be selected as blocks, and the term "candidate block" refers to one or more blocks that are mapped to candidate MVRs and can be used as predicted motion vectors for blocks to be predicted inter-frame.

[0073] Furthermore, the term "pixel unit" used in this article is used interchangeably with the terms "pixel precision" and "pixel accuracy".

[0074] Reference Figures 1 to 24 This describes an image encoding method and apparatus, and an image decoding method and apparatus, based on a tree-structured transform unit and encoding unit, according to embodiments. Reference will be made to... Figures 1 to 24 The image encoding device 200 and image decoding device 100 described may each include a reference to Figures 25 to 38 The motion information encoding device 2700 and motion information decoding device 2500 are described.

[0075] Figure 1 This is a block diagram of an image decoding device 100 according to an embodiment, capable of decoding an image based on at least one of block shape information and segmentation shape information.

[0076] Reference Figure 1 According to an embodiment, the image decoding device 100 may include a bitstream acquirer 110 and a decoder 120, wherein the bitstream acquirer 110 is used to acquire predetermined information such as partition shape information and block shape information from the bitstream, and the decoder 120 is used to decode the image using the acquired information. When the bitstream acquirer 110 of the image decoding device 100 according to the embodiment acquires at least one of the block shape information and partition shape information, the decoder 120 of the image decoding device 100 may determine at least one encoding unit for partitioning the image based on at least one of the block shape information and partition shape information.

[0077] According to an embodiment, the decoder 120 of the image decoding device 100 can determine the shape of the coding unit based on block shape information. For example, the block shape information may include information indicating whether the coding unit has a square shape or a non-square shape. The decoder 120 can determine the shape of the coding unit by using the block shape information.

[0078] According to an embodiment, decoder 120 can determine which shape the coding unit will be divided into based on division shape information. For example, division shape information may indicate information about the shape of at least one coding unit included in the coding unit.

[0079] According to an embodiment, decoder 120 can determine whether a coding unit has been divided based on partition shape information. The partition shape information may include information about at least one coding unit included in the coding unit, and decoder 120 can determine that the coding unit including the partition shape information has not been divided when the partition shape information indicates that only one coding unit is included in the coding unit or that the coding unit has not been divided. When the partition shape information indicates that the coding unit is divided into multiple coding units, decoder 120 can divide the coding unit into multiple coding units included in the coding unit based on the partition shape information.

[0080] According to an embodiment, the division shape information may indicate the number of coding units into which the coding unit will be divided or the direction in which the coding unit will be divided. For example, the division shape information may indicate that the coding unit is divided or not divided in at least one of the vertical and horizontal directions.

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

[0082] The block shape may include 4N×4N, 4N×2N, 2N×4N, 4N×N, or N×4N. N can be a positive integer. Block shape information is information indicating at least one of the following: shape, orientation, aspect ratio, and size of the coding unit.

[0083] The shape of the encoding unit can include a square shape and a non-square shape. 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 a square shape. The image decoding device 100 can also determine the shape of the encoding unit as a non-square shape.

[0084] 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, or N×4N), 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, and 8:1. Furthermore, the image decoding device 100 can determine whether the coding unit is horizontal or vertical based on the length of its width and the length of its height. Additionally, the image decoding device 100 can determine the size of the coding unit based on at least one of the length of its width, the length of its height, and its area.

[0085] 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 which shape the coding unit is divided into by using partition shape pattern information. That is, the coding unit partitioning method indicated by the partition shape pattern information can be determined according to which block shape is indicated by the block shape information used by the image decoding device 100.

[0086] Image decoding device 100 can obtain partition shape pattern information from a bitstream. However, this disclosure is 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 size of the largest coding unit to be 256×256. Image decoding device 100 can determine that the pre-agreed partition shape pattern information indicates a four-part partition. A four-part partition is a partition shape pattern that divides the width and height of the coding unit into two equal parts. Image decoding device 100 can obtain a coding unit of size 128×128 from the largest coding unit of size 256×256 based on the partition shape pattern information. Furthermore, image decoding device 100 can determine the size of the smallest coding unit to be 4×4. Image decoding device 100 can obtain partition shape pattern information indicating "no partitioning" for the smallest coding unit.

[0087] 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 coding unit into squares, whether to divide the coding unit into squares vertically, whether to divide the coding unit into squares horizontally, or whether to divide the coding unit into four coding units based on the division shape pattern information. (See also...) Figure 3When the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 can determine that the coding unit 310a with the same size as the current coding unit 300 will not be divided based on the partitioning shape pattern information indicating that partitioning will not be performed, or it can determine the coding units 310b, 310c and 310d divided based on the partitioning shape pattern information indicating a predetermined partitioning method.

[0088] Reference Figure 3 According to an embodiment, the image decoding device 100 can determine two coding units 310b obtained by vertically dividing the current coding unit 300 based on the division shape pattern information indicating that the division is performed vertically. The image decoding device 100 can determine two coding units 310c obtained by horizontally dividing the current coding unit 300 based on the division shape pattern information indicating that the division is performed horizontally. The image decoding device 100 can determine four coding units 310d obtained by vertically and horizontally dividing the current coding unit 300 based on the division shape pattern information indicating that the division is performed both vertically and horizontally. However, the method for dividing square coding units is not limited to the above methods, and the division shape pattern information can include various methods. The predetermined division method for dividing square coding units will be described in detail below through various embodiments.

[0089] 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 non-square coding units.

[0090] According to an embodiment, the image decoding device 100 can use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 100 can determine whether the current coding unit is not divided into non-square shapes or is divided into non-square shapes using a predetermined method based on the division shape pattern information. (Refer to...) Figure 4 When the block shape information of the current encoding unit 400 or 450 indicates a non-square shape, the image decoding device 100 can determine 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 determine encoding units 420a and 420b, encoding units 430a to 430c, encoding units 470a and 470b, or encoding units 480a to 480c partitioned based on the partitioning shape pattern information indicating a predetermined partitioning method. The predetermined partitioning method for partitioning non-square encoding units will be described in detail below through various embodiments.

[0091] 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 coding units 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.

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

[0093] According to an embodiment, when the partitioning shape pattern information indicates that the coding unit is divided (tripartitely 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. 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 coding units 480a, 480b and 480c.

[0094] According to an embodiment, the aspect ratio of the current encoding unit 400 or 450 can be 4:1 or 1:4. When the aspect ratio is 4:1, the width is greater than the height, so the block shape information can be horizontal. When the aspect ratio is 1:4, the width is less than the height, so the block shape information can be vertical. The image decoding device 100 can determine whether to divide the current encoding unit into an odd number of blocks based on the division shape pattern information. Furthermore, the image decoding device 100 can determine the division direction of the current encoding unit 400 or 450 based on the block shape information of the current encoding unit 400 or 450. For example, when the current encoding unit 400 is in the vertical direction, the image decoding device 100 can divide the current encoding unit 400 horizontally and determine encoding units 430a, 430b, and 430c. Similarly, when the current encoding unit 450 is in the horizontal direction, the image decoding device 100 can divide the current encoding unit 450 vertically and determine encoding units 480a, 480b, and 480c.

[0095] 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 the sizes of all determined coding units may be different. For example, a predetermined coding unit 430b or 480b in the determined odd number of coding units 430a, 430b, and 430c, or coding units 480a, 480b, and 480c, may have a different size than the other coding units 430a and 430c or other coding units 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 the odd number of coding units 430a, 430b, and 430c, or coding units 480a, 480b, and 480c, may have different sizes.

[0096] According to an embodiment, when the partitioning 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 can impose a predetermined restriction on at least one of the odd number of coding units generated by partitioning the current coding unit 400 or 450. (Refer to...) Figure 4 The image decoding device 100 may allow the decoding method of encoding unit 430b or encoding unit 480b to differ from the decoding methods of other encoding units 430a and 430c or other encoding units 480a and 480c, wherein encoding unit 430b or encoding unit 480b is located at the center position among the three encoding units 430a, 430b and 430c or encoding units 480a, 480b and 480c generated by dividing the current encoding unit 400 or 450. For example, unlike other encoding units 430a and 430c or other encoding units 480a and 480c, the image decoding device 100 may restrict the encoding unit 430b or encoding unit 480b at the center position to no longer be divided or to be divided only a predetermined number of times.

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

[0098] According to an embodiment, the image decoding device 100 may determine whether to divide the first coding unit 500 of the square into coding units or not to divide the first coding unit 500 of the square based on at least one of block shape information and partition shape pattern information. According to an embodiment, when the partition shape pattern information indicates that the first coding unit 500 is divided in the horizontal direction, the image decoding device 100 may determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The terms first coding unit, second coding unit, and third coding unit used according to the embodiment are terms used to understand the relationship before and after the division of coding units. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit applies to the following description.

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

[0100] Reference Figure 5The predetermined coding units (e.g., coding units at the center position or square coding units) in an odd number of third coding units 520b, 520c, and 520d, determined by dividing the non-square second coding unit 510, can be recursively divided. According to an embodiment, the non-square third coding unit 520b in the odd number of third coding units 520b, 520c, and 520d can be horizontally divided into a plurality of fourth coding units 530a, 530b, 530c, and 530d. The non-square fourth coding units 530b or 530d in the plurality of fourth coding units 530a, 530b, 530c, and 530d can be further divided into a plurality of coding units. For example, the non-square fourth coding unit 530b or 530d can be further divided into an odd number of coding units. Methods for recursively dividing coding units will be described below through various embodiments.

[0101] According to an embodiment, the image decoding device 100 may divide each of the third coding unit 520a or the third coding units 520b, 520c, and 520d into coding units based on at least one of block shape information and division shape pattern information. Furthermore, the image decoding device 100 may determine not to divide the second coding unit 510 based on at least one of block shape information and division shape pattern information. According to an embodiment, the image decoding device 100 may divide the non-square second coding unit 510 into an odd number of third coding units 520b, 520c, and 520d. The image decoding device 100 may impose predetermined restrictions on predetermined third coding units among the odd number of third coding units 520b, 520c, and 520d. For example, the image decoding device 100 may restrict the third coding unit 520c located at the center position among the odd number of third coding units 520b, 520c, and 520d to not be divided or to be divided a set number of times.

[0102] Reference Figure 5 The image decoding device 100 may restrict the third coding unit 520c located at the center of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510 to no longer be divided, to be divided using a predetermined division method (e.g., divided into only four coding units or divided using the division method of the second coding unit 510), or to be divided only a predetermined number of times (e.g., divided only n times (where n>0)). However, the restriction on the third coding unit 520c at the center position is not limited to the above examples and may include various restrictions on decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.

[0103] According to an embodiment, the image decoding device 100 can obtain at least one of block shape information and partitioning shape pattern information for dividing the current coding unit from a predetermined position in the current coding unit.

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

[0105] Reference Figure 6 At least one of block shape information and partition shape pattern information of the current encoding unit 600 or 650 can be obtained from a sample at a predetermined position among a plurality of samples included in the current encoding unit 600 or 650 (e.g., sample 640 or 690 at the center position). However, the predetermined position from which at least one of the block shape information and partition shape pattern information can be obtained from the current encoding unit 600 is not limited to... Figure 6 The predetermined position can be the center position within the current encoding unit 600, and may include various positions included in the current encoding unit 600 (e.g., above, below, left, right, upper left, lower left, upper right, and lower right positions). The image decoding device 100 can obtain at least one of block shape information and division shape pattern information from the predetermined position, and can determine whether to divide the current encoding unit into encoding units of various shapes and sizes or not to divide the current encoding unit.

[0106] According to an embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding device 100 can select one coding unit from the coding units. Various methods for selecting one coding unit from a plurality of coding units will be described below through various embodiments.

[0107] According to an embodiment, the image decoding device 100 can divide the current encoding unit into multiple encoding units and determine the encoding unit at a predetermined position.

[0108] 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 6The 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 the coding unit 620b at the center position or the coding unit 660b at the center position by using information about the positions of the odd number of coding units 620a, 620b, and 620c or the odd number of coding units 660a, 660b, and 660c. For example, the image decoding device 100 can determine the coding unit 620b at the center position by determining the positions of coding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in coding units 620a, 620b, and 620c. In detail, the image decoding device 100 can determine the position of the encoding units 620a, 620b and 620c based on the information indicating the positions of the upper left samples 630a, 630b and 630c of the encoding units 620a, 620b and 620c, and determine the encoding unit 620b at the center position.

[0109] According to an embodiment, the information indicating the positions of the top-left samples 630a, 630b, and 630c respectively included in encoding units 620a, 620b, and 620c 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 respectively included in encoding units 620a, 620b, and 620c may include information indicating the width or height of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, and the width or height may correspond to information indicating the difference between the coordinates of the encoding units 620a, 620b, and 620c in the image. That is, the image decoding device 100 can determine the encoding unit 620b at the center position by directly using information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the image, or by using information about the width or height corresponding to the difference between the coordinates of the encoding units.

[0110] 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 middle 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 middle 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 620 determined by the current encoding unit 600. However, the coordinates indicating the positions of the top-left sample points 630a, 630b, and 630c may include coordinates indicating absolute positions within the screen, or coordinates (dxb, dyb) indicating the relative position of the top-left sample point 630b of the intermediate encoding unit 620b relative to the top-left sample point 630a of the upper encoding unit 620a, and coordinates (dxc, dyc) indicating the relative position of the top-left sample point 630c of the lower encoding unit 620c relative to the top-left sample point 630a of the upper encoding unit 620a. Furthermore, the method for determining the encoding unit at a predetermined position by using the coordinates of the sample points included in the encoding unit as information indicating the position 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.

[0111] According to an embodiment, the image decoding device 100 can divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and can select one of the encoding units 620a, 620b, and 620c based on a predetermined criterion. For example, the image decoding device 100 can select encoding unit 620b from the encoding units 620a, 620b, and 620c that has a size different from the sizes of the other encoding units.

[0112] According to an embodiment, the image decoding device 100 can determine the width or height of 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 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. The image decoding device 100 can determine the height of the upper encoding unit 620a as yb-ya. According to an embodiment, the image decoding device 100 can determine the width of the intermediate encoding unit 620b as the width of the current encoding unit 600. The image decoding device 100 can determine the height of the intermediate encoding unit 620b as yc-yb. According to an embodiment, the 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 and the width or height of the upper encoding unit 620a and the intermediate encoding unit 620b. The 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 to 620c. (Refer to...) Figure 6 The image decoding device 100 can determine an intermediate encoding unit 620b, which has a size different from that of the upper encoding unit 620a and the lower encoding unit 620c, as an encoding unit at a predetermined position. However, the method described above by the image decoding device 100 for determining an encoding unit with a size different from that of other encoding units corresponds only to the example of determining an encoding unit at a predetermined position by using the size of the encoding unit determined based on the coordinates of the sample points. Therefore, various methods for determining an encoding unit at a predetermined position by comparing the size of the encoding unit determined based on the coordinates of the predetermined sample points can be used.

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

[0114] According to an embodiment, the image decoding device 100 can determine the width of the left coding unit 660a as xe-xd. The image decoding device 100 can determine the height of the left coding unit 660a as the height of the current coding unit 650. According to an embodiment, the image decoding device 100 can determine the width of the middle coding unit 660b as xf-xe. The image decoding device 100 can determine the height of the middle coding unit 660b as the height of the current coding unit 600. According to an embodiment, the image decoding device 100 can determine the width or height of the right coding unit 660c by using the width or height of the current coding unit 650 and the width and 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 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 predetermined position. However, the method described above by the image decoding device 100 for determining an encoding unit with a size different from that of the other encoding units corresponds only to the example of determining an encoding unit at a predetermined position by using the size of the encoding unit determined based on the coordinates of the sample points. Therefore, various methods for determining an encoding unit at a predetermined position by comparing the size of the encoding unit determined based on the coordinates of the predetermined sample points can be used.

[0115] However, the position of the sample points considered for 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.

[0116] According to an embodiment, the image decoding device 100 may consider the shape of the current coding unit and select a coding unit at a predetermined position from an odd number of coding units determined by dividing 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 may determine a coding unit at a predetermined position in the horizontal direction. That is, the image decoding device 100 may determine one coding unit from different positions in the horizontal direction and 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 may determine a coding unit at a predetermined position in the vertical direction. That is, the image decoding device 100 may determine one coding unit from different positions in the vertical direction and impose restrictions on that coding unit.

[0117] According to an embodiment, the image decoding device 100 can use information indicating the positions of an even number of coding units to determine a coding unit at a predetermined position among the even number of coding units. The image decoding device 100 can determine the even number of coding units by dividing the current coding unit (bipartitioning), and can determine the coding unit at the predetermined position by using information about the positions of the even number of coding units. The related operations are as described above. Figure 6 The operation corresponding to determining the coding unit at a predetermined position (e.g., the center position) among an odd number of coding units has already been described in detail, so its detailed description is not provided here.

[0118] According to an embodiment, when a non-square current coding unit is divided into multiple coding units, predetermined information about the coding unit at a predetermined position can be used in the division operation to determine the coding unit at the predetermined position among the multiple coding units. For example, the image decoding device 100 can use at least one of block shape information and division shape pattern information stored in the samples included in the coding unit at the center position in the division operation to determine the coding unit at the center position among the multiple coding units determined by dividing the current coding unit.

[0119] Reference Figure 6The image decoding device 100 can divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on at least one of block shape information and partition shape pattern information, and can determine the coding unit 620b at the center position among the plurality of 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 position of at least one of the obtained block shape information and partition shape pattern information. That is, at least one of the block shape information and partition 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 a plurality of coding units 620a, 620b, and 620c based on at least one of the block shape information and partition 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 location is not limited to at least one of block shape information and partition shape pattern information, and various types of information can be used to determine the coding unit at the center location.

[0120] According to an embodiment, predetermined information for identifying the coding unit at a predetermined location can be obtained from predetermined samples included in the coding unit to be determined. (Refer to...) Figure 6 The image decoding device 100 can determine the coding unit at a predetermined position (e.g., the coding unit at the center of the multiple coding units 620a, 620b, and 620c determined by dividing the current coding unit 600) using at least one of block shape information and partition shape pattern information obtained from samples at predetermined positions in the current coding unit 600 (e.g., samples at the center of the multiple partitioned coding units). That is, the image decoding device 100 can determine the samples at predetermined positions by considering the block shape of the current coding unit 600, can determine the coding unit 620b including samples from the multiple coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and can impose predetermined limitations on the coding unit 620b. (Refer to...) Figure 6 According to an embodiment, the image decoding device 100 can determine a sample 640 at the center position of the current encoding unit 600 as a sample that can obtain predetermined information, and can impose a predetermined restriction on the encoding unit 620b including the sample 640 during the decoding operation. However, the position of the sample that can obtain predetermined information is not limited to the above-described position, and can include any position of the sample included in the encoding unit 620b that will be determined for restriction.

[0121] According to an embodiment, the location of a sample point from which predetermined information can be obtained can be determined based on the shape of the current encoding unit 600. According to an embodiment, block shape information can indicate whether the current encoding unit has a square shape or a non-square shape, and the location of the sample point from which predetermined information can be obtained can be determined based on said shape. For example, the image decoding device 100 can determine a sample point located on a boundary that bisects at least one of the width and height of the current encoding unit as a sample point from which predetermined information can be obtained by using at least one of information about the width and information about the height of the current encoding unit. As another example, when the block shape information of the current encoding unit indicates a non-square shape, the image decoding device 100 can determine one of the sample points adjacent to the boundary that bisects the long side of the current encoding unit as a sample point from which predetermined information can be obtained.

[0122] According to an embodiment, when the current coding unit is divided into multiple coding units, the image decoding device 100 can use at least one of block shape information and partition shape pattern information to determine the coding unit at a predetermined position among the multiple coding units. According to an embodiment, the image decoding device 100 can obtain at least one of block shape information and partition shape pattern information from samples at predetermined positions in the coding unit, and can divide the multiple coding units generated by dividing the current coding unit by using at least one of the block shape information and partition shape pattern information obtained from samples at predetermined positions in each of the multiple coding units generated by dividing the current coding unit. That is, the coding units can be recursively divided based on at least one of the block shape information and partition shape pattern information obtained from samples at predetermined 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.

[0123] 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 in which the one or more coding units are decoded based on a predetermined block (e.g., the current coding unit).

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

[0125] According to an embodiment, the image decoding device 100 may determine second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, and by dividing the first coding unit 700 in the horizontal direction, or by dividing the first coding unit 700 in both the vertical and horizontal directions, based on block shape information and division shape pattern information.

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

[0127] 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 second coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d by dividing a first coding unit 700, and can recursively divide each of the determined plurality of second coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The method of dividing the plurality of second coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can correspond to the method of dividing the first coding unit 700. In this way, each of the plurality of second coding units 710a, 710b, 730a, 730b, 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.

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

[0129] 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 they are divided is not limited to the example above, and various methods can be used to process the divided coding units and the coding units that have been determined to be of various shapes independently in a predetermined order.

[0130] Figure 8 The illustration shows a process performed by an image decoding device 100 according to an embodiment, in which the current coding unit is determined to be divided into an odd number of coding units when the coding units cannot be processed in a predetermined order.

[0131] According to an embodiment, the image decoding device 100 can determine whether the current coding unit is divided into an odd number of coding units based on the obtained block shape information and partition shape pattern information. (See also...) Figure 8 The square first coding unit 800 can be divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b can be independently divided into third coding units 820a and 820b and third coding units 820c to 820e. According to an embodiment, the image decoding device 100 can determine a plurality of third coding units 820a and 820b by dividing the left second coding unit 810a in the horizontal direction, and can divide the right second coding unit 810b into an odd number of third coding units 820c to 820e.

[0132] According to an embodiment, the image decoding device 100 can determine whether to divide any coding unit into an odd number of coding units by determining whether the third coding units 820a and 820b and the third coding units 820c to 820e can be processed in a predetermined order. (See also...) Figure 8 The image decoding device 100 can determine the third coding units 820a and 820b, and the third coding units 820c to 820e, by recursively dividing the first coding unit 800. The image decoding device 100 can determine whether any one of the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a and 820b, and the third coding units 820c, 820d, and 820e is divided into an odd number of coding units based on at least one of block shape information and division shape pattern information. For example, the right-hand second coding unit 810b can be divided into an odd number of third coding units 820c, 820d, and 820e. The processing order of the plurality of coding units included in the first coding unit 800 can be a predetermined order (e.g., zigzag scanning order 830), and the image decoding device 100 can determine whether the third coding units 820c, 820d, and 820e, which are determined by dividing the right second coding unit 810b into an odd number of coding units, meet the condition of being processed in a predetermined order.

[0133] According to an embodiment, the image decoding device 100 can determine whether the third encoding units 820a and 820b, and the third encoding units 820c, 820d, and 820e included in the first encoding unit 800 meet the condition of being processed in a predetermined order, and this condition relates to whether at least one of the width and height of the second encoding units 810a and 810b is halved along the boundary of the third encoding units 820a and 820b, and the third encoding units 820c, 820d, and 820e. For example, the third encoding units 820a and 820b, determined by halving the height of the non-square left second encoding unit 810a, meet the condition. However, since the boundary of the third encoding units 820c, 820d, and 820e, determined by dividing the right second encoding unit 810b into three encoding units, does not 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 meet the condition. When the conditions described above are not met, the image decoding device 100 can determine that the scanning order is discontinuous, and based on the determined result, determine that the second coding unit 810b on the right is divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose a predetermined restriction on the coding units at predetermined positions in the divided coding units, and the restriction or predetermined position has been described above through various embodiments, so its detailed description will not be provided here.

[0134] Figure 9 The illustration shows a process performed by an image decoding device 100 according to an embodiment, which involves dividing a first coding unit 900 to determine at least one coding unit.

[0135] According to an embodiment, the image decoding device 100 can divide the first coding unit 900 based on at least one of block shape information and partition 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 block shape information indicates that the first encoding unit 900 has a square shape and the partition shape pattern information indicates that the first encoding unit 900 should be divided into non-square encoding units, the image decoding device 100 may divide the first encoding unit 900 into a plurality of non-square encoding units. Specifically, when the partition shape pattern information indicates that an odd number of encoding units are determined by partitioning the first encoding unit 900 in the horizontal or vertical direction, the image decoding device 100 may divide the square first encoding unit 900 into an odd number of encoding units, for example, by second encoding units 910a, 910b, and 910c determined by partitioning the square first encoding unit 900 in the vertical direction, or by second encoding units 920a, 920b, and 920c determined by partitioning the square first encoding unit 900 in the horizontal direction.

[0136] 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 condition of being processed in a predetermined order, and the condition relates to whether at least one of the width and height of the first encoding unit 900 is divided in half along the boundary of the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c. (Refer to...) Figure 9Because the boundaries of the second coding units 910a, 910b, and 910c, determined by dividing the first coding unit 900 into squares in the vertical direction, do not halve the width of the first coding unit 900, it can be determined that the first coding unit 900 does not meet the condition of being processed in a predetermined order. Furthermore, because the boundaries of the second coding units 920a, 920b, and 920c, determined by dividing the first coding unit 900 into squares in the horizontal direction, do not halve the height of the first coding unit 900, it can be determined that the first coding unit 900 does not meet the condition of being processed in a predetermined order. When the conditions are not met as described above, the image decoding device 100 can determine that the scanning order is discontinuous and, based on the determination, can determine that the first coding unit 900 is divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose a predetermined restriction on the coding units at predetermined positions within the divided coding units. Since the restriction or predetermined position has been described above through various embodiments, its detailed description will not be provided here.

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

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

[0139] Figure 10 The embodiment shows that when a second encoding unit with a non-square shape, determined by dividing the first encoding unit 1000, satisfies a predetermined condition, the shape into which the second encoding unit can be divided by the image decoding device 100 is limited.

[0140] According to an embodiment, the image decoding device 100 can determine, based on at least one of block shape information and partition shape pattern information obtained by the bitstream acquirer 110, whether to divide a square first coding unit 1000 into non-square second coding units 1010a, 1010b, 1020a, and 1020b. The second coding units 1010a, 1010b, 1020a, and 1020b can be divided independently. Therefore, the image decoding device 100 can determine, based on at least one of the block shape information and partition shape pattern information of each of the second coding units 1010a, 1010b, 1020a, and 1020b, whether to divide the first coding unit 1000 into multiple coding units or not to divide the first coding unit 1000. According to an embodiment, the image decoding device 100 can determine third coding units 1012a and 1012b by dividing the left-hand second coding unit 1010a, which is a non-square 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 where the left second coding unit 1010a is divided. When the third coding units 1014a and 1014b are determined by dividing the right second coding unit 1010b in the same direction, the third coding units 1012a, 1012b, 1014a, and 1014b can be determined because the left second coding unit 1010a and the right second second coding unit 1010b are divided independently in the horizontal direction. However, this situation is equivalent to the case where the image decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on at least one of block shape information and division shape pattern information, and may be inefficient in terms of image decoding.

[0141] According to an embodiment, the image decoding device 100 can determine third coding units 1022a, 1022b, 1024a, and 1024b by dividing a non-square second coding unit 1020a or 1020b, determined by dividing a first coding unit 1000 in the horizontal direction, in the vertical direction. However, when a 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.

[0142] Figure 11The illustration shows a process performed by an image decoding device 100 according to an embodiment, whereby the division shape pattern information indicates that a square encoding unit will not be divided into four square encoding units, and the process of dividing the square encoding unit is performed.

[0143] According to an embodiment, the image decoding device 100 can determine second coding units 1110a, 1110b, 1120a, 1120b, etc., by dividing the first coding unit 1100 based on at least one of block shape information and 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 about coding units used to divide the coding unit into four squares. Based on such division shape pattern information, the image decoding device 100 may not divide the square first coding unit 1100 into four square second coding units 1130a, 1130b, 1130c, and 1130d. The image decoding device 100 can determine non-square second coding units 1110a, 1110b, 1120a, 1120b, etc., based on the division shape pattern information.

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

[0145] 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 having the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d, which are the four squares divided from the first coding unit 1100, can be determined.

[0146] 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 having the same shape as the four squares divided from the first coding unit 1100, namely the second coding units 1130a, 1130b, 1130c, and 1130d, can be determined.

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

[0148] According to an embodiment, the image decoding device 100 can divide the first coding unit 1200 based on block shape information and division shape pattern information. When the block shape information 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 can determine second coding units 1210a, 1210b, 1220a, 1220b, etc., by dividing the first coding unit 1200. (Refer to...) Figure 12 The non-square second coding units 1210a, 1210b, 1220a, and 1220b, determined by dividing the first coding unit 1200 only in the horizontal or vertical direction, can be independently divided based on the block shape information and division shape pattern information of each coding unit. For example, the image decoding device 100 can determine the third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can determine the third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction. (The above has already been referred to...) Figure 11 The operation of dividing the second coding units 1210a, 1210b, 1220a and 1220b is described, so its detailed description will not be provided here.

[0149] According to an embodiment, the image decoding device 100 can process the encoding units in a predetermined order. (See above for reference.) Figure 7The operation of processing encoded units in a predetermined 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 of the four squares, as well as the third encoding units 1226a, 1226b, 1226c, and 1226d, 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 the third encoding units 1226a, 1226b, 1226c, and 1226d, based on the division method of the first encoding unit 1200.

[0150] 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 a processing order 1217, wherein the processing order 1217 is as follows: 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.

[0151] 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 a processing order 1227, wherein the processing order 1227 is as follows: first, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.

[0152] Reference Figure 12The third coding units 1216a, 1216b, 1216c and 1216d of the square, as well as the third coding units 1226a, 1226b, 1226c and 1226d, can be determined by dividing the second coding units 1210a, 1210b, 1220a and 1220b respectively. Although the second coding units 1210a and 1210b determined by dividing the first coding unit 1200 in the vertical direction are different from the second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c and 1216d and the third coding units 1226a, 1226b, 1226c and 1226d derived from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b ultimately show coding units of the same shape derived from the first coding unit 1200. Thus, by recursively dividing the coding units in different ways based on at least one of block shape information and division shape pattern information, even if the coding units are ultimately determined to have the same shape, the image decoding device 100 can process multiple coding units in different orders.

[0153] Figure 13 The illustration shows a process for determining the depth of a coding unit as the shape and size of the coding unit change when multiple coding units are determined by recursively dividing the coding units according to an embodiment.

[0154] According to an embodiment, the image decoding device 100 can determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may 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 times the length of the long side of the current coding unit after it was divided (n>0), the image decoding device 100 can determine that the depth of the current coding unit is increased by n from the depth of the coding unit before it was divided. In the following description, the coding unit with the increased depth is referred to as a deeper coding unit.

[0155] Reference Figure 13According to an embodiment, the image decoding device 100 can determine deeper second coding units 1302, third coding units 1304, etc., by dividing a square into first coding units 1300 based on block shape information indicating the shape of a square (e.g., the block shape information can be represented as "0:SQUARE"). Assuming the size of the first coding unit 1300 is 2N×2N, the second coding unit 1302, determined by dividing the width and height of the first coding unit 1300 by 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.

[0156] According to an embodiment, the image decoding device 100 can determine a deeper second coding unit 1312 or 1322, a third coding unit 1314 or 1324, etc., by dividing a non-square first coding unit 1310 or 1320 based on block shape information indicating a non-square shape (for example, the block shape information can be represented as "1:NS_VER" indicating a non-square shape with a height greater than its width, or "2:NS_HOR" indicating a non-square shape with a width greater than its height).

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

[0158] 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 with a size of N×N or the second encoding unit 1312 with a size of N / 2×N by dividing the first encoding unit 1320 in the vertical direction, or it can determine 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.

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

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

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

[0162] 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 determining the depth 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.

[0163] According to an embodiment, the width and height of the third encoding unit 1314 or 1324 can be 1 / 4 times the width and height of the first encoding unit 1310 or 1320. When the depth of the first encoding unit 1310 or 1320 is D, the depth of the second encoding unit 1312 or 1322, whose width and height are 1 / 2 times the width and height of the first encoding unit 1310 or 1320, can be D+1, and the depth of the third encoding unit 1314 or 1324, whose width and height are 1 / 4 times the width and height of the first encoding unit 1310 or 1320, can be D+2.

[0164] Figure 14 The diagram illustrates a depth that can be determined based on the shape and size of the coding unit, according to an embodiment, and a partial index used to distinguish the coding unit.

[0165] 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. That is, the image decoding device 100 can determine the second coding units 1402a and 1402b, second coding units 1404a and 1404b, and second coding units 1406a, 1406b, 1406c, and 1406d based on the division shape pattern information of the first coding unit 1400.

[0166] 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 square first coding unit 1400, can be determined based on the length of their longer sides. For example, since the side length of the square first coding unit 1400 is equal to the length of the longer side of the non-square second coding units 1402a and 1402b and second coding units 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and second coding units 1404a and 1404b 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.

[0167] According to an embodiment, the image decoding device 100 can determine a plurality of second encoding units 1412a and 1412b, as well as second encoding units 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 second encoding units 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.

[0168] According to an embodiment, the depths of the second coding units 1412a and 1412b, 1414a, 1414b and 1414c, 1422a and 1422b, and 1424a, 1424b and 1424c, determined based on the division shape pattern information of the non-square first coding unit 1410 or 1420, can be determined based on the length of their longer sides. For example, since the length of the side of the square second coding units 1412a and 1412b is half the length of the longer side of the non-square first coding unit 1410, which has a height greater than its width, the depth of the square second coding units 1412a and 1412b is D+1 deeper than the depth D of the non-square first coding unit 1410.

[0169] Furthermore, the image decoding device 100 can divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division shape pattern information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are 1 / 2 times the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c can be D+1, which is 1 deeper than the depth D of the non-square first coding unit 1410. The image decoding device 100 can determine the depth of the coding unit divided from the first coding unit 1420, which has a width greater than its height, by using the method described above for determining the depth of the coding unit divided from the first coding unit 1410.

[0170] According to an embodiment, when the odd number of 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. (Refer to...) Figure 14 The coding unit 1414b at the center of the odd-numbered coding units 1414a, 1414b, and 1414c may have a width equal to that of the other coding units 1414a and 1414c and a height twice that of the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b at the center may include either two other coding units 1414a or 1414c. Therefore, when the PID of the coding unit 1414b at the center is 1 based on the scanning order, the PID of the next coding unit 1414c located at the center may be increased by 2 and thus may be 3. That is, the PID values ​​may be discontinuous. According to an embodiment, the image decoding device 100 may determine whether the odd-numbered coding units are not of equal size based on whether there is a discontinuity in the PID used to identify the divided coding units.

[0171] 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 greater than its width. The image decoding device 100 can use a PID to identify each coding unit. According to an embodiment, the PID can be obtained from a sample point at a predetermined position of each coding unit (e.g., the upper left sample point).

[0172] According to an embodiment, the image decoding device 100 can determine the coding unit at a predetermined 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 greater 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 these coding units. The image decoding device 100 can determine the coding unit 1414b with the PID corresponding to the middle value among the PIDs of these 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 the PID used to distinguish 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 next 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 to divide the coding unit into a plurality of coding units, wherein the plurality of coding units includes coding units having dimensions different from those of the other coding units. According to an embodiment, when the division shape pattern information indicates that the coding unit should be divided into an odd number of coding units, the image decoding device 100 can divide the current coding unit in such a way that the coding unit at a predetermined position in the odd number of coding units (e.g., the coding unit at the center position) has a dimension different from that of the other coding units. In this case, the image decoding device 100 can determine the coding unit at the center position with a different dimension by using the PID of the coding unit. However, the PID and size or position of the encoding unit at the predetermined position to be determined are not limited to the examples above, and various PIDs of the encoding unit as well as various positions and sizes can be used.

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

[0174] Figure 15 The illustration shows how multiple encoding units are determined based on multiple predetermined data units included in the image, according to an embodiment.

[0175] According to an embodiment, a predetermined data unit can be defined as a data unit that begins to recursively divide coding units using at least one of block shape information and division shape pattern information. That is, a predetermined data unit can correspond to a coding unit used to determine the highest depth of a plurality of coding units divided from the current frame. In the following description, for ease of explanation, the predetermined data unit is referred to as a reference data unit.

[0176] According to an embodiment, the reference data unit may have a predetermined size and a predetermined shape. According to an embodiment, the reference data unit may include M×N sample points. In this document, M and N may be equal to each other and may be integers expressed 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.

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

[0178] According to an embodiment, the image decoding device 100 may predetermine the minimum size allowed for reference data units included in the current frame. Therefore, the image decoding device 100 may determine various reference data units having sizes equal to or greater than the minimum size, and may, with reference to the determined reference data units, determine one or more encoding units by using partition shape pattern information and block shape information.

[0179] 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, maximum coding units, etc.) that can include one or more reference coding units.

[0180] 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 the various data units. The above has already mentioned... Figure 3 The operation of dividing the current coding unit 300 describes the operation of determining one or more coding units included in the reference coding unit 1500 within the square, and the above has already been discussed... Figure 4 The operation of dividing the current coding unit 400 or 450 describes the operation of determining one or more coding units included in the non-square reference coding unit 1502, therefore, its detailed description will not be provided here.

[0181] According to an embodiment, the image decoding device 100 can use a PID for identifying the size and shape of a reference coding unit to determine the size and shape of the reference coding unit based on some data units previously determined based on predetermined conditions. That is, the bitstream acquirer 110 can obtain from the bitstream only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, or maximum coding unit, wherein each slice, slice segment, or maximum coding unit is a data unit among various data units (e.g., sequence, frame, slice, slice segment, maximum coding unit, etc.) that satisfies predetermined conditions (e.g., a data unit with a size equal to or smaller than the slice). The image decoding device 100 can determine the size and shape of the reference data unit for each data unit that satisfies the predetermined conditions 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; therefore, only the PID can be obtained and used, rather than directly obtaining the reference coding unit shape information and reference coding unit size information. In this case, at least one of the size and shape of the reference coding unit corresponding to the PID used for identifying the size 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 predetermined reference coding unit based on the PID.

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

[0183] Figure 16 The diagram shows a processing block according to an embodiment, which serves as a unit for determining the order of reference coding units included in the frame 1600.

[0184] According to an embodiment, the image decoding device 100 can determine one or more processing blocks divided from the image. A processing block is a data unit comprising one or more reference coding units divided from the image, and the one or more reference coding units included in the processing block can be determined according to a specific order. That is, the determination order of the one or more reference coding units determined in each processing block can correspond to one of various types of orders used to determine reference coding units, and can vary depending on the processing block. The determination order of the reference coding units determined for each processing block can be one of various orders (e.g., raster scanning, zigzag scanning, N-shaped scanning, upper right diagonal scanning, horizontal scanning, and vertical scanning), but is not limited to the above scanning orders.

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

[0186] According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can obtain processing block size information from the bitstream based on each specific data unit. For example, the processing block size information can be obtained from the bitstream according to data units (such as images, sequences, frames, stripes, or strip segments). That is, the bitstream acquirer 110 can obtain processing block size information from the bitstream based on each data unit among various data units, and the image decoding device 100 can determine the size of one or more processing blocks divided from the frame by using the obtained processing block size information, and the size of the processing block can be an integer multiple of the size of the reference coding unit.

[0187] According to an embodiment, the image decoding device 100 can determine the sizes of processing blocks 1602 and 1612 included in the frame 1600. For example, the image decoding device 100 can determine the size of the processing blocks based on processing block size information obtained from the bitstream. (Refer to...) Figure 16 According to an embodiment, the image decoding device 100 may determine the width of processing blocks 1602 and 1612 to be four times the width of the reference coding unit, and may determine the height of processing blocks 1602 and 1612 to be four times the height of the reference coding unit. The image decoding device 100 may determine the determination order of one or more reference coding units in one or more processing blocks.

[0188] According to an embodiment, the image decoding device 100 may determine processing blocks 1602 and 1612 included in the frame 1600 based on the size of the processing blocks, and may determine the determination order of one or more reference coding units included in processing blocks 1602 and 1612. According to an embodiment, the operation of determining the reference coding units may include determining the size of the reference coding units.

[0189] According to an embodiment, the image decoding device 100 can obtain determination order information of one or more reference coding units included in one or more processing blocks from a bitstream, and can determine a determination order for one or more reference coding units based on the obtained determination order information. The determination order information can be defined as the order or direction of the reference coding units in a processing block. That is, the determination order of the reference coding units can be determined independently for each processing block.

[0190] According to an embodiment, the image decoding device 100 can obtain deterministic order information of reference coding units from the bitstream based on each specific data unit. For example, the bitstream obtainr 110 can obtain deterministic order information of reference coding units from the bitstream based on each data unit (such as an image, sequence, frame, strip, strip fragment, or processing block). Because the deterministic order information of the reference coding units indicates the order of the reference coding units used to determine the processing block, the deterministic order information can be obtained for each specific data unit comprising an integer number of processing blocks.

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

[0192] According to an embodiment, the bitstream acquirer 110 can obtain the determination order information of reference coding units from the bitstream as information related to processing blocks 1602 and 1612, and the image decoding device 100 can determine the determination order of one or more reference coding units included in processing blocks 1602 and 1612, and determine one or more reference coding units included in frame 1600 based on the determination order. (Refer to...) Figure 16The image decoding device 100 can determine the determination order 1604 and 1614 of one or more reference coding units in processing blocks 1602 and 1612, respectively. For example, when obtaining the determination order information of reference coding units for each processing block, determination order information of different types of reference coding units can be obtained for processing blocks 1602 and 1612. When the determination order 1604 of reference coding units in processing block 1602 is a raster scan order, the reference coding units included in processing block 1602 can be determined according to the raster scan order. Conversely, when the determination order 1614 of reference coding units in another processing block 1612 is a backward raster scan order, the reference coding units included in processing block 1612 can be determined according to the backward raster scan order.

[0193] According to an embodiment, the image decoding device 100 can decode one or more determined reference coding units. The image decoding device 100 can decode an image based on the reference coding units determined as described above. Methods for decoding the reference coding units may include various image decoding methods.

[0194] 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 block shape information or partition shape pattern information can be included in the bitstream associated with various data units. For example, the image decoding device 100 can use the block shape information or partition shape pattern information included in a sequence parameter set, a picture parameter set, a video parameter set, a strip header, or a strip segment header. Furthermore, the image decoding device 100 can obtain syntax elements corresponding to the block shape information or partition shape pattern information from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and can use the obtained syntax elements.

[0195] Figure 17 The diagram illustrates the encoding units that can be determined for each frame when the combination of shapes into which the encoding units can be divided differs for each frame, according to an embodiment.

[0196] Reference Figure 17The image decoding device 100 can determine the combination of shapes into which the encoding units can be divided according to each frame. For example, the image decoding device 100 can decode the image using a frame 1700 that can be divided into 4 encoding units, a frame 1710 that can be divided into 2 or 4 encoding units, and a frame 1720 that can be divided into 2, 3, or 4 encoding units, which are included in one or more frames of the image. To divide the frame 1700 into multiple encoding units, the image decoding device 100 can use only the division shape information indicating that the frame 1700 is divided into 4 square encoding units. To divide the frame 1710, the image decoding device 100 can use only the division shape information indicating that the frame 1710 is divided into 2 or 4 encoding units. To divide the frame 1720, the image decoding device 100 can use only the division shape information indicating that the frame 1720 is divided into 2, 3, or 4 encoding units. Since such a combination of dividing shapes is merely an embodiment used to describe the operation of the image decoding device 100, the combination of dividing shapes should not be construed as being limited to this embodiment, and various combinations of dividing shapes can be used according to a predetermined data unit.

[0197] According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can acquire a bitstream including indices indicating combinations of partition shape information based on predetermined data units (e.g., sequences, frames, or stripes). For example, the bitstream acquirer 110 can acquire indices indicating combinations of partition shape information from a sequence parameter set, a frame parameter set, or a stripe header. The image decoding device 100 can determine combinations of partition shapes into which encoding units can be divided according to predetermined data units by using the acquired indices, and thus can use different combinations of partition shapes according to predetermined data units.

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

[0199] According to an embodiment, the image decoding device 100 can divide the encoding unit into various shapes using block shape information and partition shape information obtained by the bitstream acquirer 110. The shapes into which the encoding unit can be divided can correspond to various shapes including those described with reference to the above embodiments.

[0200] Reference Figure 18 The image decoding device 100 can divide square coding units in at least one direction, either horizontal or vertical, based on the division shape information, and can also divide non-square coding units in either the horizontal or vertical direction.

[0201] According to an embodiment, when the image decoding device 100 is able to divide square coding units in the horizontal and vertical directions to obtain four square coding units, the number of division shapes indicated by the division shape information of the square coding units can be four. According to an embodiment, the division shape information can be represented as a 2-bit binary code, and the binary code can be assigned to each division shape. For example, when the coding unit is not divided, the division shape information can be represented as (00)b; when the coding unit is divided in the horizontal and vertical directions, the division shape information can be represented as (01)b; when the coding unit is divided in the horizontal direction, the division shape information can be represented as (10)b; and when the coding unit is divided in the vertical direction, the division shape information can be represented as (11)b.

[0202] According to an embodiment, when the image decoding device 100 divides non-square coding units in the horizontal or vertical direction, the type of division shape that can be indicated by the division shape information can be determined based on the number of coding units into which the coding units are divided. (Refer to...) Figure 18 According to the embodiment, the image decoding device 100 can divide a non-square coding unit into up to three coding units. The image decoding device 100 can divide a coding unit into two coding units, and in this case, the division shape information can be represented as (10)b. The image decoding device 100 can divide a coding unit into three coding units, and in this case, the division shape information can be represented as (11)b. The image decoding device 100 can determine not to divide the coding unit, and in this case, the division shape information can be represented as (0)b. That is, in order to use the binary code indicating the division shape information, the image decoding device 100 can use variable-length coding (VLC) instead of fixed-length coding (FLC).

[0203] According to the embodiments, refer to Figure 18 The binary code indicating that the coding unit is not divided can be represented as (0)b. When the binary code indicating that the coding unit is not divided is set to (00)b, although there is no dividing shape information set to (01)b, all 2 bits of the dividing shape information must be used. However, as Figure 18 As shown, when three partition shapes are used for non-square coding units, the image decoding device 100 can determine that coding units are not partitioned even if 1 bit binary code (0)b is used as partition shape information, thereby effectively using the bit stream. However, the partition shape of the non-square coding unit indicated by the partition shape information should not be interpreted as limited to Figure 18 The three shapes shown are intended to be interpreted as including various shapes from the above embodiments.

[0204] Figure 19Other shapes of coding units that can be determined based on partition shape information that can be represented as binary code, according to an embodiment, are shown.

[0205] Reference Figure 19 Based on the division shape information, the image decoding device 100 can divide square coding units in the horizontal or vertical direction, and can also divide non-square coding units in the horizontal or vertical direction. That is, the division shape information can indicate that square coding units are divided in one direction. In this case, the binary code of the division shape information indicating that square coding units are not divided can be represented as (0)b. When the binary code of the division shape information indicating that coding units are not divided is set to (00)b, although there is no division shape information set to (01)b, all 2 bits of the division shape pattern information must still be used. However, as Figure 19 As shown, when three partition shapes are used for a square coding unit, even if 1 bit of binary code (0)b is used as partition shape information, the image decoding device 100 can determine that no coding unit is partitioned, thereby effectively using the bit stream. However, the partition shape of the square coding unit indicated by the partition shape information should not be interpreted as limited to Figure 19 The three shapes shown are intended to be interpreted as including various shapes from the above embodiments.

[0206] According to an embodiment, block shape information or partition shape information can be represented using binary code, and such information can be immediately generated as a bitstream. Alternatively, the block shape information or partition shape information that can be represented as binary code may not be immediately generated as a bitstream, and may be used as binary code input during context-adaptive binary arithmetic coding (CABAC).

[0207] According to an embodiment, the process of obtaining syntax regarding block shape information or partition shape information via CABAC, performed by the image decoding device 100, will be described. A bitstream including binary codes for the syntax can be obtained by a bitstream acquirer 110. The image decoding device 100 can detect syntax elements indicating block shape information or partition shape information by debinarizing the binary bit strings included in the obtained bitstream. According to an embodiment, the image decoding device 100 can obtain a set of binary bit strings corresponding to the syntax elements to be decoded, and can decode each binary bit using probability information. The image decoding device 100 can repeatedly perform this process until the binary bit string including such decoded binary bits is identical to one of the pre-obtained binary bit strings. The image decoding device 100 can determine the syntax elements by debinarizing the binary bit strings.

[0208] According to an embodiment, the image decoding device 100 can determine the syntax of the binary bit string by performing decoding processing of adaptive binary arithmetic encoding, and can update the probability model for the binary bits obtained by the bit stream acquirer 110. (Refer to...) Figure 18 According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can acquire a bitstream indicating binary code representing segmentation shape information. The image decoding device 100 can determine the syntax regarding the segmentation shape information using the acquired binary code having a size of 1 bit or 2 bits. To determine the syntax regarding the segmentation shape information, the image decoding device 100 can update the probability of each of the 2 bits of the binary code. That is, the image decoding device 100 can update the probability that the next binary bit has a value of 0 or 1 during decoding based on whether the value of the first binary bit in the 2 bits of the binary code is 0 or 1.

[0209] According to an embodiment, while determining the syntax, the image decoding device 100 may update the probabilities 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 specific bits in the binary bit string have the same probability without updating the probabilities.

[0210] Reference Figure 18 While determining the syntax using a binary bit string indicating the partition shape information related to non-square coding units, the image decoding device 100 can determine the syntax regarding the partition shape information by using a binary bit with a value of 0 when non-square coding units are not partitioned. 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 partition shape information can be 0 when non-square coding units are not partitioned, and the first binary bit of the binary bit string used for partition shape information can be 1 when a non-square coding unit is partitioned into two or three coding units. Therefore, the probability that the first binary bit of the binary bit string of partition shape information related to non-square coding units is 0 can be 1 / 3, and the probability that the first binary bit of the binary bit string of partition shape information related to non-square coding units is 1 can be 2 / 3. As described above, since the partition shape information indicating that non-square coding units are not partitioned can only represent a 1-bit binary bit string with a value of 0, the image decoding device 100 can determine the syntax regarding the partition shape information by determining whether the second binary bit is 0 or 1 only when the first binary bit of the partition shape information is 1. According to an embodiment, when the first binary bit used to divide shape information is 1, the image decoding device 100 can decode the binary bit by determining that the probability of the second binary bit being 0 and 1 is the same.

[0211] According to an embodiment, the image decoding device 100 can use various probabilities for each binary bit while determining the binary bits used to segment the shape information binary bit string. According to an embodiment, the image decoding device 100 can determine the probability of the binary bits used to segment the shape information differently based on the orientation of the non-square block. According to an embodiment, the image decoding device 100 can determine the probability of the binary bits used to segment the shape information differently based on the area of ​​the current encoding unit or the length of its long side. According to an embodiment, the image decoding device 100 can determine the probability of the binary bits used to segment the shape information differently based on at least one of the shape of the current encoding unit and the length of its long side.

[0212] According to an embodiment, the image decoding device 100 can determine that the probability of binary bits used to divide shape information is the same for encoding units having a predetermined size or larger. For example, the image decoding device 100 can determine that the probability of binary bits used to divide shape information is the same for encoding units having a size equal to or greater than 64 samples based on the length of the long side of each encoding unit.

[0213] According to an embodiment, the image decoding device 100 can determine the initial probability of the binary bits constituting the binary bit string that divides the shape information based on the strip type (e.g., I strip, P strip, B strip, etc.).

[0214] Figure 20 This is a block diagram of the image encoding and decoding system 2000 used to perform loop filtering.

[0215] The image encoding and decoding system 2000 has an encoding end 2010 that transmits an encoded bitstream of an image, and a decoding end 2050 that receives the bitstream, decodes it, and outputs a reconstructed image. The encoding end 2010 may have a configuration similar to that of the image encoding device 200 described below, and the decoding end 2050 may have a configuration similar to that of the image decoding device 100.

[0216] At the encoding end 2010, the predictive encoder 2015 outputs a reference image through inter-frame prediction and intra-frame prediction. The transformer and quantizer 2020 transform and quantize the residual data between the reference image and the current input image into quantized transform coefficients, and output the quantized transform coefficients. The entropy encoder 2025 encodes the quantized transform coefficients into a bitstream and outputs the bitstream. The quantized transform coefficients are reconstructed into spatial domain data by the inverse quantizer and inverse transformer 2030, and the reconstructed data in the spatial domain is output as a reconstructed image by the deblocking filter 2035 and the loop filter 2040. The reconstructed image can be used by the predictive encoder 2015 as a reference image for the next input image.

[0217] The encoded image data in the bitstream received by the decoder 2050 is reconstructed into residual data in the spatial domain by the entropy decoder 2055, dequantizer, and inverse converter 2060. As the residual data and a reference image output from the predictive decoder 2075 are combined, image data in the spatial domain is formed. The deblocking filter 2065 and the loop filter 2070 filter the image data in the spatial domain, outputting a reconstructed image for the current original image. This reconstructed image can be used by the predictive decoder 2075 as a reference image for the next original image.

[0218] The loop filter 2040 of the encoder 2010 performs loop filtering by using filter information input according to user input or system settings. The filter information used by the loop filter 2040 is output to the entropy encoder 2025 and sent to the decoder 2050 along with the encoded image data. The loop filter 2070 of the decoder 2050 can perform loop filtering based on the filter information input from the decoder 2050.

[0219] Figure 21 This is a diagram illustrating an example of a filtering unit included in a maximum coding unit and filtering performance information of the filtering unit according to an embodiment.

[0220] When the loop filter 2040 of the encoding end 2010 and the loop filter 2070 of the decoding end 2050 include the filtering units according to reference Figures 3 to 5 When the data unit of the described embodiment is similar to the encoding unit, the filtering information may include block shape information and partition shape information of the data unit for indicating the filtering unit, and loop filtering execution information indicating whether loop filtering is performed on the filtering unit.

[0221] The filtering units included in the maximum coding unit 2100 according to the embodiment may have the same block shape and partition shape as the coding units included in the maximum coding unit 2100. Furthermore, the filtering units included in the maximum coding unit 2100 according to the embodiment may be partitioned based on the size of the coding units included in the maximum coding unit 2100. (Refer to...) Figure 21 For example, the filtering unit may include a filtering unit 2140 having a square shape and a depth of D, filtering units 2132 and 2134 having a non-square shape and a depth of D, filtering units 2112, 2114, 2116, 2152, 2154 and 2164 having a square shape and a depth of D+1, filtering units 2162 and 2166 having a non-square shape and a depth of D+1, and filtering units 2122, 2124, 2126 and 2128 having a square shape and a depth of D+2.

[0222] As shown in Table 1, the block shape information, partition shape information (depth), and loop filtering execution information of the filtering units included in the maximum encoding unit 2100 can be encoded.

[0223] [Table 1]

[0224]

[0225] According to the embodiment, the processing and reference of determining multiple coding units by recursively dividing coding units based on block shape information and block partitioning information is described. Figure 13 The processing described is the same. According to the embodiment, the loop filtering execution information of the filtering unit indicates that loop filtering is performed on the filtering unit when the flag value is 1, and indicates that loop filtering is not performed on the filtering unit when the flag value is 0. Referring to Table 1, the information of the data units of the filtering units used to determine which will be filtered by loop filters 2040 and 2070 can all be encoded as filter information and transmitted.

[0226] Because the encoding unit configured according to the embodiment is configured to minimize the error with the original image, high spatial correlation is desired within the encoding unit. Therefore, since the filtering unit is determined based on the encoding unit according to the embodiment, the operation of determining the filtering unit, which is separate from the operation of determining the encoding unit, can be omitted. Furthermore, since the filtering unit is determined based on the encoding unit according to the embodiment, and therefore the information for determining the partition shape of the filtering unit can be omitted, the transmission bit rate of filter information can be saved.

[0227] Although the above embodiments describe determining the filtering unit based on the encoding unit according to the embodiments, the filtering unit can be determined only up to the arbitrary depth based on the encoding unit being divided up to an arbitrary depth.

[0228] The deterministic filtering unit described in the above embodiments can be applied not only to loop filtering, but also to various embodiments such as deblocking filtering and adaptive loop filtering.

[0229] According to an embodiment, the image decoding device 100 can divide the current coding unit using at least one of block shape information and partition shape information. The block shape information can be predetermined to indicate the use of only square shapes, and the partition shape information can be predetermined to indicate that the current coding unit is not divided or is divided into four square coding units. That is, the coding unit of the current coding unit can always have a square shape based on the block shape information, and the current coding unit can be either not divided or divided into four square coding units based on the partition shape information. The image decoding device 100 can obtain a bitstream generated using a predetermined encoding method using a bitstream acquirer 110, which is predetermined to use only such block shapes and partition shapes, and the image decoding device 100 can use only the predetermined block shapes and partition shapes. In this case, the image decoding device 100 can solve the compatibility problem with the predetermined encoding method by using a predetermined decoding method similar to the predetermined encoding method. According to an embodiment, when the image decoding device 100 uses a predetermined decoding method that uses only predetermined block shapes and partition shapes among various shapes indicated by block shape information and partition shape information, the block shape information only indicates a square shape. Therefore, the image decoding device 100 can omit the processing of obtaining block shape information from the bitstream. A syntax indicating whether the predetermined decoding method is used can be used, and such a syntax can be obtained from the bitstream based on data units of various shapes that may include multiple coding units (such as sequences, frames, stripe units, and maximum coding units). That is, the bitstream obtainr 110 can determine whether to obtain the syntax indicating block shape information from the bitstream based on the syntax indicating whether the predetermined decoding method is used.

[0230] Figure 23 The index is shown according to the zigzag scanning order of the encoding units according to an embodiment.

[0231] The image decoding apparatus 100 according to the embodiment can scan the lower-level data units included in the upper-level data units according to the zigzag scanning order. Furthermore, the image decoding apparatus 100 according to the embodiment can access data sequentially according to the zigzag scanning index of the encoding units included in the processing block or the maximum encoding unit.

[0232] According to an embodiment, the image decoding device 100 can divide the reference coding unit into, as shown in the example, a reference coding unit. Figure 3 and Figure 4At least one coding unit is described. In this case, coding units with a square shape and coding units with a non-square shape can coexist in the reference coding unit. The image decoding device 100 according to the embodiment can access data based on a zigzag scan index in each coding unit included in the reference coding unit. In this case, the method of applying the zigzag scan index can vary depending on whether there are coding units with a non-square shape in the reference coding unit.

[0233] According to an embodiment, when no non-square-shaped coding unit exists in the reference coding unit, the lower-depth coding units in the reference coding unit may have consecutive zigzag scan indices. For example, according to an embodiment, the higher-depth coding unit may include four lower-depth coding units. The boundaries of the four lower-depth coding units may be consecutive, and the lower-depth coding units may be scanned in a zigzag scan order according to an index indicating the zigzag scan order. According to an embodiment, the index indicating the zigzag scan order may be set to a number that increases according to the zigzag scan order used for the coding units. In this case, deeper coding units of the same depth may be scanned according to the zigzag scan order.

[0234] According to an embodiment, when at least one coding unit with a non-square shape exists in a reference coding unit, the image decoding device 100 can divide each coding unit in the reference coding unit into sub-blocks, and can scan the divided sub-blocks according to a zigzag scanning sequence. For example, when there are coding units with non-square shapes along the vertical or horizontal direction in the reference coding unit, zigzag scanning can be performed using the divided sub-blocks. Furthermore, for example, when the reference coding unit is divided into an odd number of coding units, zigzag scanning can be performed using sub-blocks. Sub-blocks are coding units that are no longer divided or coding units obtained by dividing arbitrary coding units, and can have a square shape. For example, four sub-blocks with square shapes can be divided from coding units with square shapes. Furthermore, for example, two sub-blocks with square shapes can be divided from coding units with non-square shapes.

[0235] Reference Figure 23For example, the image decoding device 100 according to the embodiment may scan the lower-depth coding units 2302, 2304, 2306, 2308, and 2310 in the coding unit 2300 according to a zigzag scanning sequence. Coding unit 2300 and coding units 2302, 2304, 2306, 2308, and 2310 are respectively upper-layer coding units and lower-layer coding units. Coding unit 2300 includes coding units 2306 and 2310 with non-square shapes along the horizontal direction. The non-square-shaped coding units 2306 and 2310 have discontinuous boundaries with the adjacent square-shaped coding units 2302 and 2304. Furthermore, coding unit 2308 has a square shape and is the coding unit located at the center when the non-square-shaped coding units are divided into an odd number of coding units. Similar to the non-square-shaped coding units 2306 and 2310, coding unit 2308 has discontinuous boundaries with the adjacent square-shaped coding units 2302 and 2304. When coding unit 2300 includes non-square-shaped coding units 2306 and 2310, or when coding unit 2308 is located at the center of a group of non-square-shaped coding units, continuous zigzag scan indices may not be possible because the adjacent boundaries between coding units are discontinuous. Therefore, image decoding device 100 can continuously set zigzag scan indices by dividing coding units into sub-blocks. Furthermore, image decoding device 100 can perform continuous zigzag scans on coding units 2306 and 2310 with non-square shapes, or on coding unit 2308 located at the center of an odd number of coding units.

[0236] This is achieved by dividing coding units 2302, 2304, 2306, 2308, and 2310 in coding unit 2300 into sub-blocks. Figure 23 The encoding unit 2320. Because a zigzag scan index can be set for each sub-block and the adjacent boundaries between sub-blocks are continuous, the sub-blocks can be scanned according to the zigzag scan order. For example, in the decoding device according to the embodiment, the encoding unit 2308 can be divided into sub-blocks 2322, 2324, 2326, and 2328. In this case, sub-blocks 2322 and 2324 can be scanned after data processing is performed on sub-block 2330, and sub-blocks 2326 and 2328 can be scanned after data processing is performed on sub-block 2332. Furthermore, the sub-blocks can be scanned according to the zigzag scan order.

[0237] In the above embodiment, data units are scanned according to a zigzag scanning sequence for data storage, data loading, and data access.

[0238] Furthermore, in the above embodiments, although data units can be scanned according to a zigzag scanning sequence, the scanning sequence of data units can be one of various sequences (such as raster scanning sequence, N-shaped scanning sequence, upper right diagonal scanning sequence, horizontal scanning sequence, and vertical scanning sequence), and should not be limited to the zigzag scanning sequence.

[0239] Furthermore, in the above embodiments, although the coding units in the reference coding unit are scanned, this disclosure is not limited thereto, and the target to be scanned can be any block in the processing block or the largest coding unit.

[0240] Furthermore, in the above embodiments, although the block is divided into sub-blocks and scanned according to the zigzag scan order only when there is at least one block with a non-square shape, in the simplified embodiment, the block can be divided into sub-blocks and scanned according to the zigzag scan order even when there is no block with a non-square shape.

[0241] The image decoding apparatus 100 according to the embodiment can generate prediction data by performing inter-frame prediction or intra-frame prediction on the coding unit, generate residual data by performing inverse transformation on the transform unit included in the current coding unit, and reconstruct the current coding unit by using the generated prediction data and residual data.

[0242] The prediction mode of the coding unit according to the embodiment can be at least one of intra-frame mode, inter-frame mode, and skip mode. According to the embodiment, the prediction mode can be selected independently for each coding unit.

[0243] According to an embodiment, when a coding unit with a 2N×2N shape is divided into two coding units with a 2N×N shape or an N×2N shape, inter-frame mode prediction and intra-frame mode prediction can be performed separately for each coding unit. Furthermore, according to an embodiment, a skip mode can be applied to coding units with a 2N×N or N×2N shape.

[0244] The image decoding apparatus 100 according to an embodiment allows bidirectional prediction to be performed in a skip mode for coding units having an 8×4 or 4×8 shape. Because only skip mode information about the coding unit is received in the skip mode, the use of residual data for the coding unit is omitted. Therefore, the overhead of inverse quantization and inverse transform can be reduced in this case. In other words, the image decoding apparatus 100 according to an embodiment allows bidirectional prediction to be performed on coding units to which the skip mode is applied, thereby improving decoding efficiency. Furthermore, the image decoding apparatus 100 according to an embodiment can set the number of interpolation taps to a relatively small value during motion compensation while allowing bidirectional prediction to be performed on coding units having an 8×4 or 4×8 shape, thereby effectively utilizing storage bandwidth. For example, an interpolation filter with fewer than 8 taps (e.g., a 2-tap interpolation filter) can be used instead of an 8-tap interpolation filter.

[0245] Furthermore, the image decoding device 100 according to the embodiment can transmit intra-frame prediction information or inter-frame prediction information about each region by dividing each region included in the current coding unit into a preset shape (e.g., based on diagonal division).

[0246] The image decoding apparatus 100 according to an embodiment can obtain the predicted sample points of the current coding unit using an intra-frame mode by using neighboring sample points of the current coding unit. In this case, intra-frame prediction is performed by using pre-reconstructed neighboring sample points, and these sample points are referred to as reference sample points.

[0247] Figure 24 This is a diagram illustrating reference samples for intra-frame prediction of a coding unit according to an embodiment. (Refer to...) Figure 24 For a coding unit 2400 with a non-square shape, a horizontal length of w, and a vertical length of h, w+h top reference samples 2402, w+h left reference samples 2404, and one top-left reference sample 2406 are required, that is, a total of 2(w+h)+1 reference samples are needed. To prepare the reference samples, padding can be performed on the parts where no reference samples are available, and reference sample filtering can be performed for each prediction mode to reduce the quantization error included in the reconstructed reference samples.

[0248] Although the number of reference samples when the block shape of the current coding unit is not square has been described in the above embodiments, the number of reference samples is applied equally even when the current coding unit is a rectangular block shape.

[0249] The various embodiments described above describe operations related to the image decoding method performed by the image decoding device 100. The operation of the image encoding device 200 for performing an image encoding method corresponding to the reverse processing of the image decoding method will be described through various embodiments.

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

[0251] 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 and obtain at least one syntax element. Syntax element may include at least one of the following elements: skip flag, prediction mode, motion vector difference, motion vector prediction method (or index), transform quantization coefficient, coding block pattern, coding block flag, intra-prediction mode, direct flag, merge flag, differential QP (delta QP), reference index, prediction direction, and transform index. Encoder 220 may determine a context model based on block shape information including at least one of the following: shape, orientation, aspect ratio, and size of coding units.

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

[0253] According to an embodiment, the encoder 220 of the image encoding device 200 can determine the shape of the encoding unit. For example, the encoding unit may have a square shape or a non-square shape, and information indicating the shape may be included in the block shape information.

[0254] According to an embodiment, encoder 220 can determine which shape the encoding unit will be divided into. Encoder 220 can determine the shape of at least one encoding unit included in the encoding unit, and bitstream generator 210 can generate a bitstream including division shape information, which includes information about the shape of the encoding unit.

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

[0256] According to an embodiment, information indicating the number of coding units to be divided into or the direction in which the coding units will be divided may be included in the division shape information. For example, the division shape information may indicate whether the coding unit is divided or not in at least one of the vertical and horizontal directions.

[0257] Image encoding device 200 determines partition shape pattern information based on the partition shape pattern of the coding unit. Image encoding device 200 determines a context model based on at least one of the shape, orientation, aspect ratio, and size of the coding unit. Image encoding device 200 generates a bitstream of partition shape pattern information for partitioning coding units based on the context model.

[0258] 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, and size of the coding units to an index used for the context model. The image coding apparatus 200 may obtain the index for the context model based on at least one of the shape, orientation, aspect ratio, and size of the coding units in the arrangement. The image coding apparatus 200 may determine the context model based on the index used for the context model.

[0259] To determine the context model, the image coding device 200 may also determine the context model based on block shape information including at least one of the shape, orientation, aspect ratio, and size of neighboring coding units adjacent to the coding unit. Furthermore, neighboring coding units may include at least one coding unit located to the lower left, left, upper left, upper, upper right, right, or lower right of the coding unit.

[0260] Furthermore, to determine the context model, the image coding device 200 can compare the length of the width of the upper neighboring coding unit with the length of the width of the coding unit. Additionally, the image coding device 200 can compare the lengths of the heights of the left and right neighboring coding units with the length of the height of the coding unit. Furthermore, the image coding device 200 can determine the context model based on the comparison results.

[0261] The operation of the image encoding device 200 is similar to that of the reference. Figures 3 to 24 The operation of the image decoding device 100 is described, therefore its detailed description is not provided here.

[0262] Reference Figures 25 to 38 The motion information decoding device 2500 and method and the motion information encoding device 2700 and method according to embodiments are described.

[0263] Reference Figure 25 According to an embodiment, the motion information decoding device 2500 may include a bitstream acquirer 2510, a recognizer 2530, and a decoder 2550.

[0264] Motion information decoding device 2500 may be included in image decoding device 100. For example, bitstream acquirer 2510 may be included. Figure 1 The image decoding device 100 may include a bitstream acquirer 110, and the recognizer 2530 and the decoder 2550 may be included in the decoder 120 of the image decoding device 100.

[0265] The motion information decoding device 2500 can obtain multiple motion information sequences for decoding blocks encoded via inter-frame prediction. The block type can be square, rectangular, or of any geometric shape. According to embodiments, the block is not limited to data units of a predetermined size and can include the maximum coding unit, coding unit, prediction unit, and transform unit in a tree-structured coding unit.

[0266] Inter-frame prediction in image coding and decoding refers to a prediction method that uses the similarity between the current image and another image. It detects reference blocks similar to the current block in the current image from a reference image that was decoded earlier than the current image, and uses motion vectors to represent the distance between the current block and the predicted block determined based on the reference block. Furthermore, the difference in pixel values ​​between the current block and the predicted block can be represented as residual data. Instead of directly outputting the image information of the current block, it can output the index, motion vectors, and residual data indicating the reference image, thereby improving coding and decoding efficiency.

[0267] Figure 29 This is a diagram used to describe the decoding of multiple motion information sequences for a block that is unidirectionally predicted. (See reference...) Figure 29 The reference image referenced by the current block is specified based on the information Ref_idx indicating the reference image. Furthermore, prediction candidates for the current block's predicted motion vector are determined from the prediction candidates based on the information MVP_idx indicating the predicted motion vector. The prediction candidates can be the motion vectors of blocks spatially or temporally related to the current block. The predicted motion vector of the current block can be determined based on the information indicating the predicted motion vector, and the motion vector (MV) of the current block can be determined by combining the predicted motion vector with the motion vector difference (MVD).

[0268] When a reference block in a reference image is specified by the motion vector of the current block, the current block can be decoded by combining the specified reference block (or the prediction block determined based on the reference block) with the residual data.

[0269] Reference Figure 29 In order to decode the blocks predicted by unidirectional inter-frame, the information Ref_idx indicating the reference image, the information MVP_idx indicating the predicted motion vector, and the motion vector difference MVD can be used as motion information.

[0270] Figure 30 This is a diagram illustrating the multiple motion information sequences used to decode a bidirectionally predicted block. (See reference...) Figure 30 For a list 0 that includes at least one reference image, the information Ref_idx0 indicating the reference image, the information MVP_idx0 indicating the predicted motion vector, and the motion vector difference MVD0 can be used to determine the reference block in the reference image included in list 0.

[0271] Furthermore, for List 1, which includes at least one reference image, the information Ref_idx1 indicating the reference image, the information MVP_idx1 indicating the predicted motion vector, and the motion vector difference MVD1 can be used to determine the reference block in the reference image included in List 1.

[0272] A prediction block can be generated by combining the reference block corresponding to list 0 with the reference block corresponding to list 1, and the current block can be decoded by combining the prediction block with the residual data.

[0273] Reference Figure 30 In order to decode the block predicted by bidirectional inter-frame, the information Ref_idx0 indicating the reference image, the information MVP_idx0 indicating the predicted motion vector and the motion vector difference MVD0 associated with list 0, and the information Ref_idx1 indicating the reference image, the information MVP_idx1 indicating the predicted motion vector and the motion vector difference MVD1 associated with list 1 can be used as motion information.

[0274] In codecs such as HEVC, the encoder sends all the motion information used to decode the inter-frame prediction block to the decoder, and the decoder decodes the inter-frame prediction block based on the received motion information. However, because the amount of motion information sent to the decoder increases significantly with the resolution of the image, it can be inefficient in terms of bit rate.

[0275] In this disclosure, the bit rate can be reduced because the encoder can omit some or all of the motion information used to decode the block instead of sending all the motion information to the decoder, and the decoder can directly obtain the omitted motion information.

[0276] Reference Figure 25 The bitstream acquirer 2510 acquires a bitstream that includes information for decoding the image.

[0277] In an embodiment, some of the motion information among the multiple motion information used to decode the current block may be included in the bitstream, while the remaining motion information may not be included in the bitstream.

[0278] Furthermore, in this embodiment, all multiple motion information used to decode the current block may not be included in the bitstream.

[0279] In this disclosure, motion information that is not included in the bitstream among the multiple motion information used to decode the current block is referred to as omitted motion information.

[0280] The multiple motion information used to decode the current block may include information indicating a reference image (hereinafter referred to as reference image information), information indicating predicted motion vectors (hereinafter referred to as predicted motion vector information), and motion vector differences. In an embodiment, when determining the motion vector of the current block based on an MVR selected from a plurality of MVRs, information about the MVR of the current block (hereinafter referred to as MVR information) may also be included in the motion information used to decode the current block.

[0281] When the current block is predicted unidirectionally, the number of MVR information entries for the current block can be 1. For example, the MVR information for the current block may include an index MVR_idx indicating one of a plurality of MVRs. Furthermore, when the current block is predicted bidirectionally, the number of MVR information entries can be 1 or 2. For example, the MVR information for the current block may include an index MVR_idx indicating one of a plurality of MVRs or indices MVR_idx0 and MVR_idx1 indicating two of the plurality of MVRs. The motion vector MV0 corresponding to list 0 can be derived from the MVR indicated by index MVR_idx0, and the motion vector MV1 corresponding to list 1 can be derived from the MVR indicated by index MVR_idx1.

[0282] The recognizer 2530 identifies the type of omitted motion information that is not included in the bitstream from the multiple motion information used to decode the current block.

[0283] In an embodiment, the recognizer 2530 can obtain some motion information from multiple motion information from the bit stream, and can identify motion information not obtained from the bit stream as omitted motion information.

[0284] In an embodiment, when no information is obtained from the bitstream, the recognizer 2530 can identify all motion information in multiple motion information as omitted motion information.

[0285] In an embodiment, the recognizer 2530 can determine whether motion information omission processing is applied to the current block, and when motion information omission processing is applied to the current block, the recognizer 2530 can determine that omitted motion information exists. In an embodiment, when it is determined that motion information omission processing is applied, the recognizer 2530 can determine that at least some motion information of a preset type is not included in the bitstream. In other words, when it is determined that motion information omission processing is applied, the recognizer 2530 can determine that at least some of the preset type of motion information must be obtained according to a predetermined method.

[0286] In an embodiment, it can be determined whether motion information omission processing is applied to the current block based on at least one of the current block's MVR, the current block's prediction direction, information about the current block, information about previously decoded neighboring blocks, and a flag indicating whether motion information omission processing is applied.

[0287] When using at least one of the current block's MVR, the current block's prediction direction, information about the current block, and information about previously decoded neighboring blocks, the decoder 2550 can determine whether motion information omission processing is applied to the current block based on the same criteria as the motion information encoding device 2700.

[0288] For example, when the MVR of the current block corresponds to a predetermined MVR (e.g., 1 / 4 pixel unit resolution), the recognizer 2530 can determine that motion information omission processing is applied to the current block.

[0289] For example, when the current block is predicted bidirectionally, the recognizer 2530 can determine that motion information omission processing is applied to the current block.

[0290] Furthermore, for example, the recognizer 2530 can determine whether motion information omission processing is applied based on information about the current block. The recognizer 2530 can determine whether motion information omission processing is applied by comparing the size of the current block with a preset size. Specifically, when the horizontal or vertical size of the current block is equal to or greater than the preset size, the recognizer 2530 can determine that motion information omission processing is applied to the current block.

[0291] For example, the recognizer 2530 can determine whether motion information omission processing is applied based on information about the size, MVR, prediction mode, or prediction direction of previously decoded neighboring blocks.

[0292] Furthermore, for example, the recognizer 2530 can determine whether motion information omission processing is applied to the current block based on a flag obtained from the bitstream indicating whether motion information omission processing is applied. For example, when the flag corresponds to 1, the recognizer 2530 can determine that motion information omission processing is applied to the current block.

[0293] In an embodiment, the recognizer 2530 can determine the omission pattern of motion information and identify which motion information is omitted based on the determined omission pattern.

[0294] The omission mode of motion information can be determined based on at least one of the following: the MVR of the current block, the prediction direction of the current block, information about the current block, information about previously decoded neighboring blocks, and an index (or flag) indicating the omission mode.

[0295] In an embodiment, when using at least one of the current block's MVR, the current block's prediction direction, information about the current block, and information about previously decoded neighboring blocks, the decoder 2550 may determine the motion information omission mode based on the same criteria as the motion information encoding device 2700.

[0296] For each ellipsis pattern of motion information, at least one of the quantity and type of omitted motion information can be determined. For example, at least one of the quantity and type of omitted motion information in a first ellipsis pattern and at least one of the quantity and type of omitted motion information in a second ellipsis pattern can be determined independently. In embodiments, at least one of the quantity and type of omitted motion information can vary according to each ellipsis pattern of motion information.

[0297] Figure 31 and Figure 32 This is a diagram showing the types of omitted motion information corresponding to the motion information omission mode.

[0298] Reference Figure 31 In Mode 1, the omitted motion information can be the reference image information Ref_idx and the predicted motion vector information MVP_idx. In Mode 2, the omitted motion information can be the reference image information Ref_idx. Furthermore, in Mode 3, the omitted motion information can be the reference image information Ref_idx, the predicted motion vector information MVP_idx, and the motion vector difference MVD.

[0299] Reference Figure 32 In mode 1, the omitted motion information may not exist. In mode 2, the omitted motion information may be the motion vector difference MVD0 corresponding to list 0. In mode 3, the omitted motion information may be the motion vector difference MVD1 corresponding to list 1.

[0300] When the current block is predicted unidirectionally and when the current block is predicted bidirectionally, at least one of the type and quantity of omitted motion information corresponding to the motion information omission mode can be determined individually. For example, when the current block is predicted unidirectionally, the omitted motion information corresponding to mode 1 can be reference image information, and when the current block is predicted bidirectionally, the omitted motion information corresponding to mode 1 can be the reference image information corresponding to list 0 and the motion vector difference corresponding to list 0. In other words, the recognizer 2530 can determine the prediction direction and motion information omission mode of the current block, and can identify the type of omitted motion information based on the determined prediction direction and motion information omission mode.

[0301] Figure 31 and Figure 32 The number of patterns and the number and type of omitted motion information corresponding to each pattern are merely examples, and the number of patterns and the number and type of omitted motion information corresponding to each pattern can be modified in various ways without departing from the scope of this disclosure.

[0302] As described above, the recognizer 2530 can determine the omission pattern of motion information and identify the type of omitted motion information based on the determined omission pattern.

[0303] For example, the recognizer 2530 can determine the omission mode of motion information based on the MVR of the current block. For example, when the MVR of the current block is 1 / 4 pixel unit resolution, the recognizer 2530 can determine the first mode as the omission mode, and when the MVR of the current block is 1 / 2 pixel unit resolution, the recognizer 2530 can determine the second mode as the omission mode.

[0304] Furthermore, for example, the recognizer 2530 can determine the omission mode based on whether the current block is predicted from a reference image in reference list 0 (i.e., one-way prediction), a reference image in reference list 1 (i.e., one-way prediction), or a combination of reference images in reference list 0 and reference images in list 1 (i.e., two-way prediction). For example, when the current block references a reference image in reference list 0, the recognizer 2530 can determine the first mode as the omission mode; when the current block references a reference image in reference list 1, the recognizer 2530 can determine the second mode as the omission mode; and when the current block references both reference images in reference list 0 and reference images in list 1, the recognizer 2530 can determine the third mode as the omission mode.

[0305] Furthermore, for example, the recognizer 2530 can determine the omission mode of motion information based on information about the current block. For example, the recognizer 2530 can determine the omission mode of motion information by comparing the size of the current block with a preset size. Specifically, when the horizontal or vertical size of the current block is equal to or greater than the preset size, the recognizer 2530 can determine a first mode as the omission mode, and when the horizontal or vertical size of the current block is less than the preset size, the recognizer 2530 can determine a second mode as the omission mode.

[0306] Furthermore, for example, the recognizer 2530 may determine the omission pattern of motion information based on information about previously decoded neighboring blocks. For example, the recognizer 2530 may determine the omission pattern of motion information based on information about the size, MVR, prediction mode, or prediction direction of previously decoded neighboring blocks.

[0307] Furthermore, for example, the recognizer 2530 can obtain an index (or flag) indicating an ellipsis mode from the bitstream, and can determine the ellipsis mode based on the obtained index (or flag). For example, when the obtained index corresponds to 0, the recognizer 2530 can determine mode 1 as the ellipsis mode; when the index corresponds to 1, the recognizer 2530 can determine mode 2 as the ellipsis mode; and when the index corresponds to 2, the recognizer 2530 can determine mode 3 as the ellipsis mode.

[0308] When the type of omitted motion information is identified by the recognizer 2530, the decoder 2550 obtains the omitted motion information using a predetermined method. The decoder 2550 can decode the current block using multiple pieces of motion information, including the omitted motion information and motion information obtainable from the bitstream.

[0309] As described above, multiple motion information may include reference image information, predicted motion vector information, and motion vector difference. Decoder 2550 obtains the motion vector of the current block by adding the predicted motion vector to the motion vector difference, and searches for a reference block in the reference image based on the motion vector. Decoder 2550 reconstructs the current block in the spatial domain by adding the residual data that has been dequantized and inversely transformed to the reference block (or the predicted block). The image including the reconstructed current block can be filtered, and the filtered image can be used as a reference image for the next image.

[0310] The method for obtaining omitted motion information, performed by decoder 2550, will now be described in detail.

[0311] In an embodiment, the decoder 2550 can obtain omitted motion information by using motion information of at least one candidate block that is spatially or temporally associated with the current block.

[0312] Figure 33Candidate blocks spatially or temporally related to the current block are shown. A candidate block is a block that was decoded earlier than the current block, and a spatial block may include at least one block spatially adjacent to the current block. Furthermore, a temporal block may include a block located at the same position as the current block in a reference image having a Frame Order Count (POC) different from the current frame, and at least one block spatially adjacent to the block located at the same position as the current block.

[0313] Reference Figure 33 Spatially related spatial blocks to the current block 3300 may include lower left outer block A, lower left block B, upper right outer block C, upper right block D, and upper left outer block E. Furthermore, temporally related temporal blocks to the current block 3300 may include block F, located at the same position as the current block 3300 in a reference image having a POC different from that of the current block 3300, and block G, adjacent to block F located at the same position as the current block 3300. Figure 33 The candidate blocks may be merely examples, and in an embodiment, one or more candidate blocks used to obtain omitted motion information may include only spatial blocks that are spatially related to the current block or only temporal blocks that are temporally related to the current block.

[0314] In an embodiment, the decoder 2550 can determine whether there is motion information for multiple candidate blocks spatially or temporally related to the current block according to a preset priority order, and can obtain omitted motion information based on the motion information of candidate blocks whose motion information is first determined to exist. For example, when the priority order is set from block A to block G, the decoder 2550 searches for candidate blocks with motion information sequentially from block A to block G. The decoder 2550 can obtain omitted motion information by using the motion information of candidate blocks whose motion information is first determined to exist. For example, when the type of omitted motion information is reference image information and predicted motion vector information, the decoder 2550 can determine the motion information of candidate blocks whose motion information is first determined to exist (specifically, reference image information and predicted motion vector information), and can determine the determined information as omitted motion information.

[0315] Furthermore, in an embodiment, the decoder 2550 can obtain omitted motion information by combining multiple motion information from multiple candidate blocks that have motion information and are spatially or temporally related to the current block. For example, the decoder 2550 can combine multiple motion information from multiple candidate blocks that have motion information according to a predetermined equation and obtain the combined result as omitted motion information. The predetermined equation may include equations for deriving averages, medians, etc. For example, assuming the type of omitted motion information is reference image information Ref_idx, when the reference image information Ref_idx of block A is 1 and the reference image information Ref_idx of block B is 3, the decoder 2550 can obtain 2 as the average value as the reference image information of the current block. The reference image information and predicted motion vector information in the motion information can be represented by integer values, and when the value derived by the predetermined equation is not an integer value, the value can be rounded up, rounded down, or rounded off, and the omitted motion information can be obtained. For example, when the reference image information Ref_idx of block A is 1 and the reference image information Ref_idx of block B is 2, the decoder 2550 can determine 2, which is obtained by rounding 1.5, which is the average value between them, as the reference image information Ref_idx of the current block.

[0316] In an embodiment, the decoder 2550 can determine omitted motion information based on preset basic motion information. In an embodiment, the decoder 2550 can set the basic motion information at the frame unit, strip unit, or block unit level. Optionally, the decoder 2550 can obtain the basic motion information from the bitstream at the frame unit, strip unit, or block unit level.

[0317] The decoder 2550 can use basic motion information to obtain omitted motion information. For example, as basic motion information, the reference image information Ref_idx can be set to 0, the predicted motion vector information MVP_idx can be set to 0, and the motion vector difference MVD can be set to 0. When the omitted motion information is of the type of reference image information Ref_idx and predicted motion vector information MVP_idx, the decoder 2550 can determine that the values ​​of the reference image information Ref_idx and predicted motion vector information MVP_idx for the current block are 0. The values ​​set to basic motion information can be modified in various ways without departing from the scope of this disclosure.

[0318] Furthermore, in this embodiment, the decoder 2550 can obtain omitted motion information based on motion information derived through decoder-side motion vector derivation (DMVD). DMVD is a technique that directly derives motion information at the decoder side rather than explicitly including the motion information in the bitstream and having the decoder obtain that motion information; it is a technique that derives the motion information of the current block through template matching or bidirectional template matching. Template matching is a method that uses the correlation between pixels in blocks adjacent to the predicted target block and pixels in a previously decoded reference image.

[0319] In an embodiment, when multiple methods exist for obtaining omitted motion information, the decoder 2550 can obtain the omitted motion information by using at least one method. In an embodiment, the decoder 2550 can select a method based on the type of omitted motion information to be obtained, and can obtain the omitted motion information according to the selected method. For example, when the omitted motion information to be obtained is reference image information, the omitted motion information can be obtained using a first method; when the omitted motion information is predicted motion vector information, the omitted motion information can be obtained using a second method; and when the omitted motion information is motion vector difference, the omitted motion information can be obtained using a third method.

[0320] Furthermore, in the embodiments, when there are multiple omitted motion information to be obtained, the decoder 2550 can obtain each of the multiple omitted motion information by using different methods.

[0321] In an embodiment, when the method for obtaining omitted motion information based on the motion information of candidate blocks is a first method, the method for obtaining omitted motion information based on basic motion information is a second method, and the method for obtaining omitted motion information based on motion information determined by DMVD is a third method, each of the multiple omitted motion information can be obtained by using different methods from the first, second, and third methods. For example, the reference image information can be determined by using the first method, the predicted motion vector information can be determined by using the second method, and the motion vector difference can be determined by using the third method.

[0322] Figure 34 The syntax for obtaining omitted motion information based on the motion information omission mode used for bidirectional prediction blocks is shown.

[0323] When it is determined that the current block is bidirectionally predicted. Figure 34 The syntax indicates the following process: determining that motion information omission processing is applied to the current block, identifying the type of omitted motion information based on the bi_type_idx information indicating the bidirectional prediction type, and obtaining the omitted motion information according to a predetermined method.

[0324] Reference Figure 34 In the phrase "a", when the current block is bidirectionally predicted, bi_type_idx is extracted. When the current block is bidirectionally predicted, it can be determined that motion information omission processing is applied to the current block.

[0325] `bi_type_idx` is an index indicating the omission mode, and when the index `bi_type_idx` corresponds to 0, the omission mode is determined to be mode 1. Referring to the phrase "b", in mode 1, the motion vector difference and reference image index corresponding to list 0 and the motion vector difference and reference image index corresponding to list 1 are parsed, i.e., obtained from the bitstream. The predicted motion vectors corresponding to list 0 and list 1 are identified as omitted motion information. The predicted motion vectors corresponding to list 0 and list 1 can be determined according to a predetermined method.

[0326] When bi_type_idx corresponds to 1, the omission method is determined to be mode 2. Referring to the phrase "c", in mode 2, only the motion vector difference corresponding to list 1 is parsed. The motion vector difference, reference image index, and predicted motion vector corresponding to list 0, as well as the reference image index and predicted motion vector corresponding to list 1, are determined as omitted motion information. The predicted motion vector and reference image index corresponding to list 0, as well as the predicted motion vector and reference image index corresponding to list 1, can be determined according to a predetermined method. In mode 2, the motion vector difference corresponding to list 0 can be determined as 0 (or zero vector) as a preset value. Therefore, the predicted motion vector corresponding to list 0 can be the motion vector MV0 of the current block. According to an embodiment, in mode 2, at least one reference image index from the reference image index corresponding to list 0 and the reference image index corresponding to list 1 can be parsed from the bitstream without determining the at least one reference image index as omitted motion information.

[0327] According to an embodiment, in mode 2, the motion vector difference corresponding to list 0 may not be included in the multiple motion information used to decode the current block. Therefore, even when the motion vector difference corresponding to list 0 is not available from the bitstream, the decoder 2550 may not recognize the motion vector difference corresponding to list 0 as omitted motion information, and can search for the reference block using only the reference image index and the predicted motion vector corresponding to list 0.

[0328] When bi_type_idx corresponds to 2, the omission mode is determined to be mode 3. Referring to the phrase "d", in mode 3, only the motion vector difference corresponding to list 0 is parsed. The reference image index and predicted motion vector corresponding to list 0, as well as the reference image index, predicted motion vector, and motion vector difference corresponding to list 1, are determined as omitted motion information. The predicted motion vector and reference image index corresponding to list 0, as well as the predicted motion vector and reference image index corresponding to list 1, can be determined according to a predetermined method. In mode 3, the motion vector difference corresponding to list 1 can be determined as 0 (or zero vector) as a preset value. Therefore, the predicted motion vector corresponding to list 1 can be the motion vector MV1 of the current block. According to an embodiment, in mode 3, at least one reference image index from the reference image index corresponding to list 0 and the reference image index corresponding to list 1 can be parsed from the bitstream without determining the at least one reference image index as omitted motion information.

[0329] According to an embodiment, in mode 3, the motion vector difference corresponding to list 1 may not be included in the multiple motion information used to decode the current block. Therefore, even when the motion vector difference corresponding to list 1 is not available from the bitstream, the decoder 2550 may not recognize the motion vector difference corresponding to list 1 as omitted motion information, and can search for the reference block using only the reference image index and predicted motion vector corresponding to list 1.

[0330] In an embodiment, when the MVR of the current block is included in the motion information used to decode the current block, the bitstream acquirer 2510 can obtain information indicating the MVR of the current block from the bitstream.

[0331] Figure 35 This is a diagram illustrating the syntax used to obtain information about the MVR from the bitstream.

[0332] Reference Figure 35 When the stripe containing the current coding unit in phrase "a" is not an I stripe, `cu_skip_flag` is extracted from phrase "b". `cu_skip_flag` indicates whether a skip mode will be applied to the current coding unit. When it is determined that a skip mode will be applied in phrase "c", the current coding unit is processed in skip mode. When it is determined that a skip mode will not be applied in phrase "d", `pred-mode_flag` is extracted from phrase "e". `pred_mode_flag` indicates whether the current coding unit is intra-predicted or inter-predicted. When the current coding unit is not intra-predicted in phrase "f", i.e., inter-predicted, `pred_mvr_idx` is extracted from phrase "g". `pred_mvr_idx` can be an index indicating the MVR of the current coding unit, and the MVR corresponding to each index is shown in Table 2.

[0333] [Table 2]

[0334]

[0335] The MVR of the current block can refer to the precision of the position of a pixel among the pixels included in the reference image (or interpolated reference image), which can be indicated by the motion vector of the current block. The MVR of the current block can be selected from one or more candidate MVRs. One or more candidate MVRs may include, but are not limited to, at least one of 1 / 8 pixel unit MVR, 1 / 4 pixel unit MVR, 1 / 2 pixel unit MVR, 1 pixel unit MVR, 2 pixel unit MVR, 4 pixel unit MVR, and 8 pixel unit MVR.

[0336] In an embodiment, the bitstream acquirer 2510 can obtain MVR information about the current block from the bitstream at the block unit, strip unit, or picture unit level. In an embodiment, when the MVR information of the current block is identified as omitted motion information, the decoder 2550 can determine the MVR of the current block according to a predetermined method.

[0337] In an embodiment, when the motion vector of the current block is determined according to a predetermined MVR, the decoder 2550 may adjust the predicted motion vector and / or motion vector difference. Adjusting the predicted motion vector and / or motion vector difference of the current block may indicate a change in the position of the pixel indicated by the predicted motion vector and / or motion vector difference of the current block, based on the MVR of the current block. The following will refer to... Figures 36 to 38 Describe a method for adjusting the predicted motion vector and / or motion vector difference of the current block.

[0338] Figure 26 This is a flowchart describing a motion information decoding method according to an embodiment.

[0339] In operation S2610, the motion information decoding device 2500 identifies the type of omitted motion information not included in the bitstream from multiple motion information used to decode the current block predicted by inter-frame.

[0340] In this embodiment, when it is determined that motion information omission processing is applied to the current block, the motion information decoding device 2500 can identify the presence of omitted motion information. The motion information decoding device 2500 can determine the motion information omission pattern and identify the type of omitted motion information based on the determined motion information omission pattern.

[0341] During operation S2620, the motion information decoding device 2500 can obtain omitted motion information based on a predetermined method.

[0342] For example, the motion information decoding device 2500 can obtain omitted motion information based on the motion information of at least one candidate block.

[0343] For example, the motion information decoding device 2500 can obtain omitted motion information based on preset basic motion information.

[0344] Furthermore, for example, the motion information decoding device 2500 can obtain omitted motion information based on the motion information obtained through DMVD.

[0345] The method for obtaining omitted motion information has been described in detail above, and will not be described in detail here.

[0346] The motion information decoding device 250 can obtain motion information from multiple motion information streams, excluding omitted motion information.

[0347] In operation S2630, the motion information decoding device 250 decodes the current block based on multiple motion information, including the obtained omitted motion information.

[0348] Figure 27 This is a block diagram illustrating the configuration of a motion information encoding device 2700 according to an embodiment.

[0349] Reference Figure 27 The motion information encoding device 2700 according to the embodiment may include a determiner 2710, an encoder 2730, and a bitstream generator 2750. The motion information encoding device 2700 may be included in the image encoding device 200. For example, the determiner 2710 and encoder 2730 of the motion information encoding device 2700 may be included in the encoder 220 of the image encoding device 200, and the bitstream generator 2750 of the motion information encoding device 2700 may be included in the bitstream generator 210 of the image encoding device 200.

[0350] Determiner 2710 determines the type of omitted motion information to be omitted from the bitstream from multiple motion information used to decode the current block to be inter-frame predicted.

[0351] As described above, the multiple motion information used to decode the current block may include reference image information, predicted motion vector information, and motion vector difference, and may also include MVR information of the current block according to the embodiment.

[0352] Before determining whether some or all of the multiple motion information items are omitted, the determiner 2710 can determine whether motion information omission processing will be applied to the current block.

[0353] In an embodiment, the determiner 2710 may determine whether motion information omission processing is applied based on predetermined criteria.

[0354] In an embodiment, the determiner 2710 may determine whether motion information omission processing is applied based on at least one of the MVR of the current block, the prediction direction of the current block, information about the current block, and information about previously encoded neighboring blocks.

[0355] In an embodiment, considering that the information indicating whether motion information omission processing is applied is not sent to the motion information decoding device 2500, the determiner 2710 may determine whether motion information omission processing is applied based on the same criteria as the motion information decoding device 2500.

[0356] For example, when the MVR of the current block corresponds to a predetermined MVR (e.g., 1 / 4 pixel unit resolution), the determiner 2710 can determine that motion information omission processing is applied to the current block.

[0357] For example, when the current block is predicted bidirectionally, the determiner 2710 can determine that motion information omission processing is applied to the current block.

[0358] Furthermore, for example, the determiner 2710 can determine whether motion information omission processing is applied based on information about the current block. The determiner 2710 can determine whether motion information omission processing is applied by comparing the size of the current block with a preset size.

[0359] For example, the determiner 2710 may determine whether motion information omission processing is applied based on information about the size of previously decoded neighboring blocks, MVR, prediction mode, or prediction information.

[0360] In an embodiment, the determiner 2710 can determine the motion information omission mode of the current block, and can determine the type of omitted motion information not included in the bitstream based on the determined motion information omission mode.

[0361] In an embodiment, the determiner 2710 may determine the motion information omission mode according to a predetermined criterion.

[0362] In an embodiment, the determiner 2710 may determine the motion information omission mode based on at least one of the MVR of the current block, the prediction direction of the current block, information about the current block, and information about previously encoded neighboring blocks.

[0363] In an embodiment, considering that information indicating a motion information omission mode is not sent to the motion information decoding device 2500, the determiner 2710 may determine the motion information omission mode based on the same criteria as the motion information decoding device 2500.

[0364] For each ellipsis pattern of motion information, at least one of the quantity and type of omitted motion information can be determined. For example, at least one of the quantity and type of omitted motion information in a first ellipsis pattern and at least one of the quantity and type of omitted motion information in a second ellipsis pattern can be determined separately. The quantity and type of omitted motion information can vary according to each ellipsis pattern.

[0365] When the current block is predicted unidirectionally and when the current block is predicted bidirectionally, the type of omitted motion information corresponding to the motion omission information pattern can be determined separately.

[0366] In an embodiment, the determiner 2710 may determine the omission mode of motion information based on the MVR of the current block. For example, when the MVR of the current block is 1 / 4 pixel unit resolution, the determiner 2710 may determine the first mode as the omission mode, and when the MVR of the current block is 1 / 2 pixel unit resolution, the determiner 2710 may determine the second mode as the omission mode.

[0367] Furthermore, in an embodiment, the determiner 2710 may determine the omission mode based on whether the current block references a reference image in list 0 (i.e., one-way prediction), whether the current block references a reference image in list 1 (i.e., one-way prediction), or whether the current block references both a reference image in list 0 and a reference image in list 1 (i.e., two-way prediction).

[0368] Furthermore, in this embodiment, the determiner 2710 may determine the omission mode of motion information based on information about the current block. For example, the determiner 2710 may determine the omission mode of motion information by comparing the size of the current block with a preset size. Specifically, when the horizontal or vertical size of the current block is equal to or greater than the preset size, the determiner 2710 may determine a first mode as the omission mode, and when the horizontal or vertical size of the current block is less than the preset size, the determiner 2710 may determine a second mode as the omission mode.

[0369] Furthermore, in an embodiment, the determiner 2710 may determine the omitting pattern of motion information based on information about previously decoded neighboring blocks. For example, the determiner 2710 may determine the omitting pattern of motion information based on information about the size, MVR, prediction mode, or prediction direction of previously decoded neighboring blocks.

[0370] When the type of omitted motion information is determined by the determiner 2710, the encoder 2730 obtains the omitted motion information based on a predetermined method.

[0371] In an embodiment, encoder 2730 can obtain omitted motion information by using motion information of at least one candidate block that is spatially or temporally associated with the current block.

[0372] In the embodiment, the encoder 2730 can determine whether there is motion information of multiple candidate blocks that are spatially or temporally related to the current block according to a preset priority order, and can obtain omitted motion information based on the motion information of the candidate blocks that are first determined to exist.

[0373] Furthermore, in this embodiment, the encoder 2730 can obtain omitted motion information by combining multiple motion information from multiple candidate blocks that have motion information and are spatially or temporally related to the current block. For example, the encoder 2730 can combine multiple motion information from multiple candidate blocks that have motion information according to a predetermined equation, and can obtain the combined result as omitted motion information. The predetermined equation may include equations for deriving average values, medians, etc.

[0374] In an embodiment, encoder 2730 may determine omitted motion information based on basic motion information. The basic motion information may be preset in encoder 2730. In an embodiment, encoder 2730 may set the basic motion information at the frame unit, strip unit, or block unit level. In an embodiment, bitstream generator 2750 may include the basic motion information determined at the frame unit, strip unit, or block unit level in the bitstream.

[0375] Furthermore, in an embodiment, encoder 2730 may obtain omitted motion information based on motion information derived through DMVD.

[0376] In an embodiment, when multiple methods exist for obtaining omitted motion information, the encoder 2730 can obtain the omitted motion information by using at least one method. In an embodiment, the encoder 2730 can select a method based on the type of omitted motion information to be obtained, and can obtain the omitted motion information according to the selected method. For example, when the omitted motion information to be obtained is reference image information, the omitted motion information can be obtained using a first method; when the omitted motion information is predicted motion vector information, the omitted motion information can be obtained using a second method; and when the omitted motion information is motion vector difference, the omitted motion information can be obtained using a third method.

[0377] Furthermore, in the embodiments, when there are multiple omitted motion information to be obtained, the encoder 2730 can obtain each of the multiple omitted motion information by using different methods.

[0378] Furthermore, encoder 2730 can determine the remaining motion information based on the obtained omitted motion information. For example, encoder 2730 can determine the remaining motion information based on the overhead. Rate distortion overhead can be used during overhead calculation.

[0379] For example, when the omitted motion information includes reference image information, the reference image referenced by the current block can be specified based on the reference image information determined by a predetermined method, and a prediction candidate to be used as the predicted motion vector can be selected from one or more prediction candidates based on the overhead. The encoder 2730 can determine the distance between the current block and the reference block searched in the reference image as the motion vector, and can determine the difference between the motion vector of the current block and the predicted motion vector as the motion vector difference.

[0380] Furthermore, for example, when the omitted motion information includes predicted motion vector information, encoder 2730 obtains the predicted motion vector based on a predetermined method and determines one or more reference images for the current block from previously encoded images based on the overhead. Encoder 27360 can determine the motion vector based on the determined reference images and can determine the difference between the predicted motion vector obtained according to the predetermined method and the motion vector of the current block as the motion vector difference.

[0381] Furthermore, for example, when the omitted motion information includes motion vector differences, encoder 2730 determines the motion vector differences based on a predetermined method. For example, encoder 2730 may determine the motion vector difference as a zero vector. Encoder 2730 may determine a reference image for the current block based on the overhead, and derive a motion vector corresponding to each prediction candidate by combining each prediction candidate with the motion vector difference determined according to the predetermined method. Encoder 2730 may determine a motion vector from the motion vectors based on the overhead, and may determine the prediction candidate corresponding to the determined motion vector as the predicted motion vector.

[0382] Furthermore, for example, when the omitted motion information includes MVR information, the encoder 2730 can obtain the MVR of the current block based on a predetermined method, and can determine the reference image, predicted motion vector, and motion vector difference based on the overhead.

[0383] In an embodiment, when the current block is bidirectionally predicted, the encoder 2730 can determine that motion information omission processing is applied to the current block, and can determine the motion information omission mode of mode 1, mode 2 or mode 3.

[0384] For example, when the motion information omission mode is mode 1, the encoder 2730 can determine the motion vector difference and reference image index corresponding to list 0 and the motion vector difference and reference image index corresponding to list 1 as the motion information to be included in the bitstream, and can determine the predicted motion vector corresponding to list 0 and the predicted motion vector corresponding to list 1 as the omitted motion information. The predicted motion vector corresponding to list 0 and the predicted motion vector corresponding to list 1 can be determined according to a predetermined method.

[0385] For example, when the motion information omission mode is mode 2, encoder 2730 can determine the motion vector difference corresponding to list 1 as the motion information to be included in the bitstream. Encoder 2730 can determine the motion vector difference, reference image index, and predicted motion vector corresponding to list 0, as well as the reference image index and predicted motion vector corresponding to list 1, as the omitted motion information. The predicted motion vector and reference image index corresponding to list 0, as well as the predicted motion vector and reference image index corresponding to list 1, can be determined according to a predetermined method. In mode 2, the motion vector difference corresponding to list 0 can be determined as 0 (or zero vector) as a preset value. According to an embodiment, in mode 2, the motion vector difference corresponding to list 0 may not be included in the multiple motion information used for decoding the current block. Therefore, even when the motion vector difference corresponding to list 0 is not included in the bitstream, encoder 2730 may not obtain the motion vector difference separately.

[0386] For example, when the motion information omission mode is mode 3, encoder 2730 can determine the motion vector difference corresponding to list 0 as the motion information to be included in the bitstream. Encoder 2730 can determine the reference image index and predicted motion vector corresponding to list 0, and the reference image index, predicted motion vector, and motion vector difference corresponding to list 1 as omitted motion information. The predicted motion vector and reference image index corresponding to list 0, and the predicted motion vector and reference image index corresponding to list 1, can be obtained according to a predetermined method. In mode 3, the motion vector difference corresponding to list 1 can be determined as 0 (or zero vector) as a preset value. According to an embodiment, in mode 3, the motion vector difference corresponding to list 1 may not be included in the multiple motion information used for decoding the current block. Therefore, even when the motion vector difference corresponding to list 1 is not included in the bitstream, encoder 2730 may not obtain the motion vector difference separately.

[0387] Bitstream generator 2750 generates a bitstream that includes information related to the current block being encoded according to inter-frame prediction.

[0388] In an embodiment, the bitstream may include at least one of the following: information indicating whether motion information omission processing is applied, information indicating the motion information omission mode, and motion information other than the omitted motion information in a plurality of motion information.

[0389] In addition, the bitstream may also include information indicating the MVR of the current block as part of the motion information. A bitstream including information indicating the MVR may have, for example... Figure 35 The structure of the syntax.

[0390] In an embodiment, when the motion vector of the current block is determined according to a predetermined MVR, the encoder 2730 may adjust the predicted motion vector and / or motion vector difference. Adjusting the predicted motion vector and / or motion vector difference of the current block may indicate a change in the position of the pixel indicated by the predicted motion vector and / or motion vector difference of the current block, based on the MVR of the current block. Reference will be made below. Figures 36 to 38 Describe a method for adjusting the predicted motion vector and / or motion vector difference of the current block.

[0391] Figure 28 This is a flowchart describing a motion information encoding method according to an embodiment.

[0392] In operation S2810, the motion information encoding device 2700 determines the type of omitted motion information that will not be included in the bitstream from multiple motion information used to decode the current block.

[0393] In an embodiment, the motion information encoding device 2700 may first determine whether motion information omission processing will be applied to the current block.

[0394] In an embodiment, the motion information encoding device 2700 can determine a motion information omission mode and determine the type of omitted motion information that will not be included in the bitstream based on the determined motion information omission mode.

[0395] In an embodiment, the motion information encoding device 2700 may first determine the type of omitted motion information that will not be included in the bitstream, and may determine the motion information omission mode corresponding to the determined omitted motion information.

[0396] In operation S2820, the motion information encoding device 2700 obtains omitted motion information by using a predetermined method.

[0397] For example, the motion information encoding device 2700 can obtain omitted motion information based on the motion information of at least one candidate block.

[0398] For example, the motion information encoding device 2700 can obtain omitted motion information based on preset basic motion information.

[0399] Furthermore, for example, the motion information encoding device 2700 can obtain omitted motion information based on the motion information obtained through DMVD.

[0400] The method for obtaining omitted motion information has been described in detail above, and will not be described in detail here.

[0401] The motion information encoding device 2700 can obtain motion information, excluding omitted motion information, from multiple motion information based on overhead.

[0402] During operation S2830, the motion information encoding device 2700 generates a bitstream that includes motion information excluding omitted motion information.

[0403] In an embodiment, the bitstream may further include at least one of information indicating whether motion information omission processing is applied and information indicating the motion information omission mode.

[0404] When determining the MVR for the current block and determining the motion vector based on the MVR, a method for adjusting the predicted motion vector and / or motion vector difference will be described.

[0405] Motion information encoding device 2700 and motion information decoding device 2500 can determine a candidate MVR as the MVR of the current block from one or more candidate MVRs selectable for the current block. Motion information decoding device 2500 can determine the MVR of the current block based on MVR information obtained from the bitstream. When determining the MVR of the current block, the predicted motion vector and / or motion vector difference can be adjusted according to the MVR of the current block.

[0406] Figure 36 This shows the position of a pixel indicated by the motion vectors of 1 / 4 pixel unit MVR, 1 / 2 pixel unit MVR, 1 pixel unit MVR, and 2 pixel unit MVR when the smallest selectable MVR is 1 / 4 pixel unit MVR.

[0407] Figure 36 (a), (b), (c) and (d) show the coordinates of pixels (marked by black squares) that can be indicated by motion vectors based on coordinates (0, 0) for 1 / 4 pixel unit MVR, 1 / 2 pixel unit MVR, 1 pixel unit MVR and 2 pixel unit MVR.

[0408] When the minimum MVR is a 1 / 4 pixel unit MVR, the coordinates of the pixel indicated by the motion vector of the 1 / 4 pixel unit MVR are (a / 4, b / 4) (a and b are integers), the coordinates of the pixel indicated by the motion vector of the 1 / 2 pixel unit MVR are (2c / 4, 2d / 4) (c and d are integers), the coordinates of the pixel indicated by the motion vector of the 1 pixel unit MVR are (4e / 4, 4f / 4) (e and f are integers), and the coordinates of the pixel indicated by the motion vector of the 2 pixel unit MVR are (8g / 4, 8h / 4) (g and h are integers). That is, when the minimum MVR has 2 m When m is an integer and the pixel unit is used, it can be derived from 2. n (n is an integer) The pixel coordinates indicated by the MVR (Mean View Volume) are (2... n-m *i / 2 -m ,2 n-m *j / 2 -m(i and j are integers). Although the motion vector is determined according to a specific MVR, it is represented by coordinates in the image interpolated according to 1 / 4 pixel units of the smallest MVR.

[0409] In an embodiment, because the motion information encoding device 2700 determines the motion vector in the image interpolated according to the minimum MVR, in order to represent the motion vector using integers, the motion vector can be multiplied by the reciprocal of the pixel unit value of the minimum MVR (e.g., when the minimum MVR has 2). m When m is an integer and the pixel unit is used, multiply by 2. -m The integer unit motion vector can be represented by 2. The integer unit motion vector can be multiplied by 2 in both the motion information encoding device 2700 and the motion information decoding device 2500. -m .

[0410] When the motion vector of the 1 / 2 pixel unit MVR starting from coordinates (0, 0) indicates coordinates (2 / 4, 6 / 4) and the smallest MVR has 1 / 4 pixel units, the motion information encoding device 2700 can determine (2, 6) as the motion vector by multiplying the motion vector by an integer 4.

[0411] When the MVR of the current block is greater than the minimum MVR among the selectable candidate MVRs, the motion information encoding device 2700 and the motion information decoding device 2500 can adjust the predicted motion vector of the current block. When the MVR of the current block is greater than the minimum MVR, this can mean that the pixel unit of the current block's MVR is greater than the pixel unit of the minimum MVR. For example, an MVR of 1 pixel unit is greater than an MVR of 1 / 2 pixel unit, and an MVR of 1 / 2 pixel unit is greater than an MVR of 1 / 4 pixel unit.

[0412] In order to adjust the predicted motion vector represented by the coordinates in the image interpolated according to the minimum MVR by using the MVR of the current block, the motion information encoding device 2700 and the motion information decoding device 2500 may adjust the predicted motion vector to indicate the neighboring pixel instead of the pixel indicated by the predicted motion vector.

[0413] For example, in order to base the instruction on Figure 37 The predicted motion vector A of pixel 3710 with coordinates (19, 27) at coordinates (0, 0) in the current block is adjusted to 1 pixel unit MVR as the MVR of the current block. The coordinates (19, 27) of pixel 3710 indicated by the predicted motion vector A can be divided by an integer 4 (i.e., can be reduced), and the coordinates (19 / 4, 27 / 4) obtained as the result of the division can not indicate an integer pixel unit.

[0414] The motion information encoding device 2700 and the motion information decoding device 2500 can adjust the scaled-down predicted motion vector to indicate integer pixel units. For example, the coordinates of the neighboring integer pixels around coordinates (19 / 4, 27 / 4) are (16 / 4, 28 / 4), (16 / 4, 24 / 4), (20 / 4, 28 / 4), and (20 / 4, 24 / 4). In this case, the motion information encoding device 2700 and the motion information decoding device 2500 can adjust the scaled-down predicted motion vector A to indicate the coordinates (20 / 4, 28 / 4) located in the upper right corner instead of the coordinates (19 / 4, 27 / 4), and can multiply by an integer of 4 (i.e., magnify) so that the final adjusted predicted motion vector D indicates pixel 3740 corresponding to coordinates (20, 28).

[0415] In an embodiment, the motion information encoding device 2700 and the motion information decoding device 2500 can adjust the scaled-down predicted motion vector to indicate coordinates located in the lower left, upper right, or lower right.

[0416] In an embodiment, when either the x-coordinate value or the y-coordinate value indicated by the reduced predicted motion vector corresponds to an integer, the motion information encoding device 2700 and the motion information decoding device 2500 may only increase or decrease the coordinate values ​​that do not correspond to integers to correspond to integers. That is, when only the x-coordinate value indicated by the reduced predicted motion vector corresponds to an integer, the motion information encoding device 2700 and the motion information decoding device 2500 may position the adjusted predicted motion vector indication above or below the pixel indicated by the original predicted motion vector by an integer pixel. Optionally, when only the y-coordinate value indicated by the reduced predicted motion vector corresponds to an integer, the motion information encoding device 2700 and the motion information decoding device 2500 may position the adjusted predicted motion vector indication to the left or right of the pixel indicated by the original predicted motion vector by an integer pixel.

[0417] When the predicted motion vector is adjusted, the motion information encoding device 2700 and the motion information decoding device 2500 can select the point indicated by the adjusted predicted motion vector according to the MVR of the current block.

[0418] For example, such as Figure 38As shown, when the MVR of the current block is a 1 / 2 pixel unit MVR, the motion information encoding device 2700 and the motion information decoding device 2500 can make the adjusted predicted motion vector indicate the pixel 3830 to the upper left of the pixel indicated by the unadjusted predicted motion vector; when the MVR of the current block is a 1 pixel unit MVR, the motion information encoding device 2700 and the motion information decoding device 2500 can make the adjusted predicted motion vector indicate the pixel 3820 to the upper right of the pixel indicated by the unadjusted predicted motion vector; and when the MVR of the current block is a 2 pixel unit MVR, the motion information encoding device 2700 and the motion information decoding device 2500 can make the adjusted predicted motion vector indicate the pixel 3840 to the lower right of the pixel indicated by the unadjusted predicted motion vector.

[0419] Reference Figure 37 and Figure 38 The described process for adjusting the predicted motion vector can also be applied to the process for adjusting the motion vector difference. When the motion vector difference is determined to be omitted motion information and is derived by the motion information encoding device 2700 and the motion information decoding device 2500 according to a predetermined method, the accuracy of the motion vector difference corresponds to the accuracy of the motion vector of the current block because the derived motion vector difference indicates the coordinates in the image interpolated according to the minimum MVR, just like the predicted motion vector.

[0420] When adjusting the predicted motion vector by taking into account the MVR and minimum MVR of the current block, the motion information encoding device 2700 and the motion information decoding device 2500 can adjust the predicted motion vector according to Equation 1.

[0421] [Equation 1]

[0422] MVP' = ((MVP >> k) + offset) <k

[0423] In Equation 1, MVP' represents the adjusted predicted motion vector, and when the MVR of the current block is 2... m The pixel unit (m is an integer) and the minimum MVR is 2. n When n is an integer and m > n, k, which is determined based on the difference between the MVR of the current block and the minimum MVR, can be mn. In an embodiment, k can be an index of the MVR, and when candidate MVRs include 1 / 4 pixel unit MVR, 1 / 2 pixel unit MVR, 1 pixel unit MVR, 2 pixel unit MVR, and 4 pixel unit MVR, the MVRs corresponding to the index are shown in Table 2. When the MVR index is received from the bitstream, the motion information decoding device 2500 can adjust the predicted motion vector according to Equation 1 by using the MVR index as k.

[0424] Furthermore, in Equation 1, the >> or << operations, used as bit shifting operations, refer to operations that decrease or increase the size of the predicted motion vector. Additionally, the offset represents the value added or subtracted to indicate an integer pixel when the predicted motion vector, reduced according to the k value, does not indicate an integer pixel. The offset can be determined differently for each of the x-coordinate and y-coordinate values ​​of the predicted motion vector.

[0425] When the motion vector difference is adjusted, Equation 1 can be modified into Equation 1-1.

[0426] [Equation 1-1]

[0427] MVD' = ((MVD >> k) + offset) < <k

[0428] In Equation 1-1, MVD' represents the adjusted motion vector difference, and MVD represents the unadjusted motion vector difference obtained according to a predetermined method.

[0429] In an embodiment, when the reduced predicted motion vector (or motion vector difference) is changed to indicate an integer pixel, the motion information encoding device 2700 and the motion information decoding device 2500 can change the reduced predicted motion vector according to the same standard.

[0430] In an embodiment, when the x-coordinate and y-coordinate values ​​of the reduced predicted motion vector (or motion vector difference) do not indicate integer pixels, the motion information encoding device 2700 and the motion information decoding device 2500 may always increase or decrease the x-coordinate and y-coordinate values ​​of the reduced predicted motion vector (or motion vector difference) to indicate integer pixels. Optionally, the motion information encoding device 2700 and the motion information decoding device 2500 may round the x-coordinate and y-coordinate values ​​of the reduced predicted motion vector (or motion vector difference) to indicate integer pixels.

[0431] In an embodiment, when adjusting the predicted motion vector (or motion vector difference), the motion information encoding device 2700 and the motion information decoding device 2500 may omit the scaling down and scaling up of the predicted motion vector (or motion vector difference), and may adjust the predicted motion vector (or motion vector difference) in the coordinate plane of the reference image interpolated according to the minimum MVR to indicate the pixel unit corresponding to the MVR of the current block.

[0432] Furthermore, in the embodiments, when adjusting the predicted motion vector and motion vector difference by taking into account the MVR and minimum MVR of the current block, the motion information encoding device 2700 and the motion information decoding device 2500 may adjust the predicted motion vector and motion vector difference according to Equations 2 and 2-1 (instead of Equations 1 and 1-1).

[0433] [Equation 2]

[0434] MVP' = ((MVP + offset) >> k) <k

[0435] [Equation 2-1]

[0436] MVD' = ((MVD + offset) >> k) <k

[0437] Although Equations 2 and 2-1 are similar to Equations 1 and 1-1, unlike Equations 1 and 1-1 where offset is applied to the reduced predicted motion vector and the reduced motion vector difference, offset is applied to the original predicted motion vector and the original motion vector difference, and then the original predicted motion vector and the original motion vector difference with offset applied are reduced according to k.

[0438] When the motion vector difference is included in the bitstream, the motion information encoding device 2700 can reduce the motion vector difference as shown in Equation 3, and can make information indicating the reduced motion vector difference included in the bitstream.

[0439] [Equation 3]

[0440] MVD' = (MVD >> k)

[0441] In Equation 3, MVD' represents the reduced motion vector difference, and k, which is determined based on the difference between the minimum MVR and the current block's MVR, is the same as k in Equation 1.

[0442] In an embodiment, the motion information encoding device 2700 can reduce the motion vector of the current block and the adjusted predicted motion vector according to the k value, and then encode the difference between the reduced motion vector and the reduced adjusted predicted motion vector as a motion vector difference.

[0443] In an embodiment, the motion information encoding device 2700 may calculate the reduced motion vector difference according to Equation 4 (instead of Equation 3).

[0444] [Equation 4]

[0445] MVD' = (MV - PMV') / (R * S)

[0446] In Equation 4, MVD' represents the reduced motion vector difference, MV represents the motion vector of the current block, and PMV' represents the adjusted predicted motion vector. Furthermore, R represents the pixel unit value of the MVR of the current block (e.g., R is 1 / 4 when the MVR of the current block is 1 / 4 pixel unit MVR). Additionally, S represents the reciprocal of the pixel unit value of the minimum MVR (e.g., S is 4 when the minimum MVR is 1 / 4 pixel unit MVR).

[0447] When the MVR of the current block is greater than the minimum MVR, the motion information decoding device 2500 can amplify the residual motion data obtained from the bit stream as shown in Equation 5.

[0448] [Equation 5]

[0449] MVD”=(MVD'< <k)

[0450] In Equation 5, MVD' represents the motion vector difference reduced by the encoding device, and MVD" represents the amplified motion vector difference. The value of k, determined based on the difference between the minimum MVR and the MVR of the current block, is the same as k in Equation 1.

[0451] In an embodiment, the motion information decoding device 2500 may determine the amplified motion vector difference according to Equation 6 (instead of Equation 5).

[0452] [Equation 6]

[0453] MVD” = MVD' * (R * S)

[0454] In Equation 6, MVD' represents the scaled-down motion vector difference, and R represents the pixel unit value of the MVR of the current block (e.g., R is 1 / 4 when the MVR of the current block is 1 / 4 pixel unit MVR). Furthermore, S represents the reciprocal of the pixel unit value of the minimum MVR (e.g., S is 4 when the minimum MVR is 1 / 4 pixel unit MVR).

[0455] The embodiments may be implemented as computer-executable programs, and the programs may be stored in media.

[0456] The medium may continuously store a computer-executable program, or temporarily store a computer-executable program for execution or download. Furthermore, the medium can be any of a variety of recording or storage devices comprising a single piece of hardware or a combination of multiple pieces of hardware, and may be distributed across a network, not limited to media directly connected to a computer system. The medium may be configured to store program instructions, and examples of the medium may include magnetic media (such as hard disks, floppy disks, or magnetic tape), optical recording media (such as CD-ROMs or DVDs), magneto-optical media (such as floppy disks), ROM, random access memory (RAM), and flash memory. Other examples of the medium may include recording and storage media managed by application stores that distribute applications or by sites or servers that supply or distribute various other software.

[0457] Although this disclosure has been specifically shown and described with reference to embodiments thereof, 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 of this disclosure as defined by the appended claims.

Claims

1. A method for decoding motion information, the method comprising: When the current block is bidirectionally predicted, first information indicating whether motion information has been omitted is obtained from the bit stream; Second information is obtained from the bitstream, wherein the second information indicates the motion vector resolution of the current block among a plurality of motion vector resolutions, the plurality of motion vector resolutions including motion vector resolutions larger than 1 pixel unit; If the first information has a first value, then obtain the motion vector difference for list 1, the reference screen index for list 0, and the reference screen index for list 1 from the bit stream. If the first information has a second value: then a predetermined first method is used to determine the motion vector difference for list 1 that is not included in the bitstream, and a predetermined second method is used to determine the reference screen index for list 0 and the reference screen index for list 1 that are not included in the bitstream, wherein the motion vector difference for list 0 is obtained from the bitstream, regardless of whether the first information has a first value or a second value. The motion vector prediction factor for list 0 and the motion vector prediction factor for list 1 are obtained using at least one neighboring block adjacent to the current block. When the motion vector resolution of the current block is greater than the minimum motion vector resolution, based on the second information, the motion vector difference for list 0 and the motion vector difference for list 1 are amplified through bit shifting operations; Based on the second information, the motion vector prediction factors for list 0 and list 1 are adjusted through bit shifting operations; and The motion vector for the current block of list 0 is obtained using the adjusted motion vector prediction factor for list 0 and the amplified motion vector difference for list 0. The motion vector for the current block of list 1 is obtained using the adjusted motion vector prediction factor for list 1 and the amplified motion vector difference for list 1.