Encoding apparatus and method and decoding apparatus and method
Patent Information
- Application Number
- CN202310356867.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-09-13
- Filing Date
- 2018-03-30
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2038-03-30
AI Technical Summary
[0010] The apparatus and method for encoding motion vectors and the apparatus and method for decoding motion vectors according to the embodiments can reduce the bit rate used to represent residual motion vectors and improve the quality of reconstructed images by using default motion vectors to determine accurate predicted motion vectors for the current block.
Smart Images

Figure CN116389747B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on March 30, 2018, with application number "201880056184.X" and titled "Apparatus and method for encoding motion vectors using basic motion vectors, 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 methods and apparatus for encoding motion vectors of video and methods and apparatus for decoding motion vectors of video. Background Technology
[0003] In video encoding and decoding methods, in order to encode an image, a frame can be divided into macroblocks, and each macroblock can be encoded by using inter-frame prediction or intra-frame prediction.
[0004] Inter-frame prediction is a method for compressing images by removing temporal redundancy between frames. A representative example of this method is motion estimation coding. In motion estimation coding, each block of the current frame is predicted using at least one reference frame. A reference block most similar to the current block is found within a predetermined search range using a predefined evaluation function.
[0005] The current block is predicted based on the reference block, and the residual block obtained by subtracting the predicted block generated as the prediction result from the current block is encoded. In this case, in order to perform prediction more accurately, interpolation is performed on the search range of the reference frame to generate sub-pel-unit pixels smaller than integer-pel-unit pixels, and inter-frame prediction can be performed on the generated sub-pel-unit pixels.
[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] Solution to the problem
[0008] According to an embodiment, a method for decoding motion vectors may include: determining at least one PMV candidate block for determining a predicted motion vector (PMV) of a current block; determining the availability of motion vectors for the at least one PMV candidate block; determining the PMV of the current block by using a default motion vector (MV) when there is a PMV candidate block that is determined to be unavailable; and obtaining the motion vector of the current block based on the determined PMV.
[0009] Beneficial effects of this disclosure
[0010] The apparatus and method for encoding motion vectors and the apparatus and method for decoding motion vectors according to the embodiments can reduce the bit rate used to represent residual motion vectors and improve the quality of reconstructed images by using default motion vectors to determine accurate predicted motion vectors for the current block. Attached Figure Description
[0011] A brief description is provided for each figure to help you understand the figures more fully.
[0012] Figure 1 This is a block diagram of an image decoding device according to an embodiment for 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 for encoding an image based on at least one of block shape information and segmentation shape information.
[0014] Figure 3 The illustration shows the current coding unit being divided to determine the processing of at least one coding unit 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 the coding unit 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 the plurality of coding units are processed when a plurality of 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 the 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 10The embodiment shows that when a second coding unit having a non-square shape, determined by dividing the first coding unit, satisfies a predetermined condition, the shape into which the second coding unit can be divided is limited.
[0022] Figure 11 The process of dividing a square coding unit is shown according to an embodiment when the division shape information indicates that the square coding unit will not be divided into four square coding 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 a process for determining the depth of a coding unit as the shape and size of the coding unit change when the coding unit is recursively divided such that multiple coding units are determined, according to an embodiment.
[0025] Figure 14 The diagram illustrates a depth that can be determined based on the shape and size of the coding unit, and a partial index (PID) used to distinguish the coding unit, according to an embodiment.
[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 standard 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 An example is shown, according to an embodiment, of a filtering unit and filtering execution information of the filtering unit, including the maximum encoding unit.
[0033] Figure 22This 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 of 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 vector decoding device according to an embodiment.
[0037] Figure 26 This is a flowchart describing a method for decoding motion vectors according to an embodiment.
[0038] Figure 27 This is a block diagram illustrating the configuration of a motion vector encoding device according to an embodiment.
[0039] Figure 28 This is a flowchart describing a method for encoding motion vectors according to an embodiment.
[0040] Figure 29 This is a diagram showing the spatial and temporal blocks associated with the current block.
[0041] Figure 30 This is a diagram showing the default MV candidate blocks used to determine the default motion vector (MV).
[0042] Figure 31 and Figure 32 This is a diagram showing the PMV candidate blocks used to determine the predicted motion vector (PMV).
[0043] Figure 33 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 minimum selectable motion vector resolution (MVR) for the current block is 1 / 4 pixel unit MVR, 1 / 2 pixel unit MVR, 1 pixel unit MVR, and 2 pixel unit MVR.
[0044] Figure 34 and Figure 35 This is a diagram used to describe the method of adjusting the default MV.
[0045] Figure 36 This is a diagram illustrating example syntax used to describe the process of obtaining the MVR index of the current block. Detailed Implementation
[0046] Best mode
[0047] According to an embodiment, a method for decoding motion vectors may include: determining at least one PMV candidate block for determining a predicted motion vector (PMV) of a current block; determining the availability of motion vectors for the at least one PMV candidate block; determining the PMV of the current block by using a default motion vector (MV) when there is a PMV candidate block that is determined to be unavailable; and obtaining the motion vector of the current block based on the determined PMV.
[0048] The method may further include: determining the default MV based on the motion vectors of multiple default MV candidate blocks associated with the current block.
[0049] The step of determining the default MV may include: sequentially determining whether there is a motion vector for the plurality of default MV candidate blocks based on priority order; and determining the default MV based on the motion vectors of the plurality of default MV candidate blocks according to the order in which the motion vectors are identified.
[0050] The method may further include: determining the motion vector derived by decoder-side motion vector derivation (DMVD) as the default MV.
[0051] The step of determining the default MV may include: determining the default MV based on the motion vector of a default MV candidate block having the same reference image index as the current block.
[0052] The steps for determining the default MV may include: changing the priority order by considering the reference image index of the current block and the reference image indices of multiple default MV candidate blocks.
[0053] The step of determining the default MV may include: selecting at least one default MV candidate block based on the magnitude of the motion vector of the plurality of default MV candidate blocks; and determining the default MV based on the motion vector of the selected at least one default MV candidate block.
[0054] The step of selecting at least one default MV candidate block may include: selecting a default MV candidate block with the largest or smallest motion vector from the plurality of default MV candidate blocks.
[0055] The step of determining the default MV may include: determining the default MV based on the average or median of the motion vectors of the plurality of default MV candidate blocks.
[0056] The step of determining the default MV may include: determining the default MV by using the motion vector of a default MV candidate block selected from the plurality of default MV candidate blocks, wherein the default MV candidate block is selected based on the number of times the default MV candidate block is determined as a PMV in a previously decoded frame, a previously decoded strip, or a previously decoded maximum coding unit.
[0057] The step of determining the default MV may include: determining multiple default MVs, each corresponding to a direction, from multiple default MV candidate blocks based on the current block being located in different directions from each other.
[0058] The plurality of default MVs may include a first default MV and a second default MV, and the step of determining the default MV may include: determining the first default MV by using the motion vector of the default MV candidate block based on the current block being located in a first direction, and determining the second default MV by using the motion vector of the default MV candidate block based on the current block being located in a second direction.
[0059] The step of determining the PMV of the current block may include: when the at least one PMV candidate block includes a PMV candidate block based on the current block being located in a first direction and a PMV candidate block based on the current block being located in a second direction, when there is no motion vector in the PMV candidate block located in the first direction, assigning a first default MV as the motion vector of the PMV candidate block located in the first direction; and when there is no motion vector in the PMV candidate block located in the second direction, assigning a second default MV as the motion vector of the PMV candidate block located in the second direction, so as to determine the PMV of the current block.
[0060] The method may further include: determining the motion vector resolution for the current block, and determining the PMV of the current block may include: when, based on the result of determining the availability of motion vectors, there is no motion vector in the at least one PMV candidate block determined to be used for the PMV according to the motion vector resolution, assigning the default MV to the PMV candidate block that does not have a motion vector.
[0061] The steps of determining the PMV of the current block may include: adjusting the default MV based on the motion vector resolution of the current block; and determining the PMV of the current block based on the adjusted default MV.
[0062] The step of determining the PMV of the current block may include: constructing a prediction candidate list from the motion vectors of the at least one PMV candidate block based on the result of determining the availability of motion vectors; adding the default MV to the prediction candidate list when the number of prediction candidates included in the prediction candidate list is less than a predetermined number, such that the number of prediction candidates becomes the predetermined number; and determining the PMV of the current block based on the prediction candidates included in the prediction candidate list.
[0063] The step of determining the PMV of the current block may include: assigning the default MV to at least one PMV candidate block in a predetermined location that does not have a motion vector.
[0064] According to an embodiment, an apparatus for decoding motion vectors includes: a default motion vector determiner configured to determine a default motion vector (MV) for a current block; and a predictive decoder configured to determine the availability of at least one PMV candidate block for determining the predictive motion vector (PMV) for the current block, and when there is a PMV candidate block determined to be unavailable, configured to determine the PMV of the current block by using the determined default MV, and obtain the motion vector of the current block based on the determined PMV.
[0065] According to an embodiment, a method for encoding motion vectors includes: determining the availability of motion vectors for at least one PMV candidate block used to determine the predicted motion vector (PMV) of the current block; and when there are PMV candidate blocks that are determined to be unavailable, determining the PMV of the current block by using a default motion vector (MV).
[0066] Open model
[0067] Because this disclosure allows for various changes and multiple 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 will be understood that all changes, equivalents, and substitutions without departing from the spirit and technical scope of this disclosure are included herein.
[0068] In the description of this disclosure, specific detailed explanations of related fields are omitted where it is believed that such detailed explanations might unnecessarily obscure the essence of this disclosure. Furthermore, the numbers (e.g., first and second) used in the description of embodiments of this disclosure are intended only to distinguish one component from another.
[0069] When a component is referred to as being “connected” or “accessed” to or by any other component, it should be understood that the component may be directly connected to or accessed to said other component or may be connected to or accessed by said other component, but unless otherwise specifically indicated, another new component may also be inserted between them.
[0070] Regarding elements with suffixes such as "unit" or "module," two or more elements may be combined into one element, or one element may be divided into two or more elements according to function. Furthermore, each of the components described below may, in addition to performing the main functions responsible for each component, perform some or all of the functions of other components, and some of the main functions of each component may be performed specifically by other components.
[0071] Furthermore, the term "image" or "picture" as used here can refer to a still image or a moving image of an image, that is, the image itself.
[0072] Furthermore, the term "sample" as used herein 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.
[0073] Furthermore, the term "current block" as used herein 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.
[0074] Furthermore, the term "motion vector resolution (MVR)" as used herein can refer to the precision of the position of a pixel in the reference image (or an interpolated reference image) that can be indicated by a motion vector determined by 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).
[0075] Furthermore, the term “candidate MVR” as used herein 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 a candidate MVR and can be used as the predicted motion vector for blocks to be predicted inter-frame.
[0076] Furthermore, the term "pixel unit" used here is interchangeable with the terms "pixel precision" and "pixel accuracy".
[0077] In the following text, reference will be made to Figures 1 to 24 This describes an image encoding method and apparatus, as well as an image decoding method and apparatus, based on tree-structured encoding units and transformation units, 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 36 The motion vector encoding device 2700 and motion vector decoding device 2500 are described.
[0078] Figure 1 This is a block diagram of an image decoding device 100 according to an embodiment for decoding an image based on at least one of block shape information and segmentation shape information.
[0079] Reference Figure 1According 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 or block shape information from the bitstream, and the decoder 120 is used to decode the image using the acquired information. According to an embodiment, when the bitstream acquirer 110 of the image decoding device 100 acquires at least one of the block shape information and the 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 the at least one of the block shape information and the partition shape information.
[0080] 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.
[0081] According to an embodiment, decoder 120 can determine the shape into which the coding unit will be divided based on division shape information. For example, the division shape information may indicate information about the shape of at least one coding unit included in the coding unit.
[0082] According to an embodiment, decoder 120 can determine whether a coding unit is divided or not based on partition shape information. The partition shape information may include information about at least one coding unit included in the coding unit, and when the partition shape information indicates that only one coding unit is included in the coding unit or is not divided, decoder 120 can determine that the coding unit including the partition shape information is not 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 that coding unit based on the partition shape information.
[0083] 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 whether the coding unit is divided or not in at least one of the vertical and horizontal directions.
[0084] Figure 3 The image decoding device 100 according to an embodiment is shown to determine at least one coding unit by dividing the current coding unit.
[0085] 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: the proportion or size, orientation, width, and height of the coding unit.
[0086] The shape of the encoding unit can be square or non-square. When the width and height of the encoding unit are the same (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.
[0087] When the width and height of the coding unit are different (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 width-to-height 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 its width and height. Additionally, the image decoding device 100 can determine the size of the coding unit based on at least one of its width, height, and area.
[0088] 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 information about the division shape pattern. That is, the coding unit division method indicated by the information about the division shape pattern can be determined based on which block shape is indicated by the block shape information used by the image decoding device 100.
[0089] Image decoding device 100 can obtain information about the partitioning shape pattern from the bitstream. However, this disclosure is not limited to this, and both image decoding device 100 and image encoding device 200 can obtain information about a partitioning shape pattern pre-agreed based on block shape information. Image decoding device 100 can obtain information about a partitioning shape pattern pre-agreed 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 information about the pre-agreed partitioning shape pattern by using quad partitioning. Quad partitioning is a partitioning 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 information about the partitioning shape pattern. Furthermore, image decoding device 100 can determine the size of the smallest coding unit to be 4×4. Image decoding device 100 can obtain information about the partitioning shape pattern indicating that "no partitioning" is performed for the smallest coding unit.
[0090] 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, based on information about the division shape pattern, whether to not divide the coding unit into square units, to divide the square coding unit vertically, to divide the square coding unit horizontally, or to divide the square coding unit into four coding units. (Refer to...) Figure 3 When the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may determine, based on the information about the partitioning shape pattern indicating that partitioning is not to be performed, not to partition the coding unit 310a with the same size as the current coding unit 300, or may determine the coding units 310b, 310c or 310d to be partitioned based on the information about the partitioning shape pattern indicating a predetermined partitioning method.
[0091] 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 information about the division shape pattern 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 information about the division shape pattern 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 information about the division shape pattern indicating that the division is performed both vertically and horizontally. However, the method for dividing square coding units is not limited to the methods described above, and the information about the division shape pattern can indicate various methods. The predetermined division methods for dividing square coding units will be described in detail below with respect to various embodiments.
[0092] 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.
[0093] According to an embodiment, the image decoding device 100 can use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 100 can determine, based on information about the division shape pattern, whether the current coding unit is not divided into non-square shapes or is divided into non-square shapes using a predetermined division method. (See also...) Figure 4When the block shape information of the current encoding unit 400 or 450 indicates a non-square shape, the image decoding device 100 may determine, based on information about the division shape pattern indicating that division is not to be performed, that encoding units 410 or 460 with the same size as the current encoding unit 400 or 450 will not be divided, or determine encoding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c divided based on information about the division shape pattern indicating a predetermined division method. The predetermined division method for dividing non-square encoding units will be described in detail below with respect to various embodiments.
[0094] According to an embodiment, the image decoding device 100 can determine the method for dividing coding units by using information about the division shape pattern, and in this case, the division shape information can indicate the number of one or more coding units generated by dividing the coding units. (See also...) Figure 4 When information about the division shape pattern indicates that the current coding unit 400 or 450 is divided into two coding units, the image decoding device 100 can determine the two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the information about the division shape pattern.
[0095] According to an embodiment, when the image decoding device 100 divides a non-square current coding unit 400 or 450 based on information about the division shape pattern, 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.
[0096] According to an embodiment, when information regarding the division shape pattern indicates that the coding unit is divided into an odd number of blocks, the image decoding device 100 can determine an odd number of coding units included in the current coding unit 400 or 450. For example, when information regarding the division shape pattern indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding device 100 can divide the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.
[0097] According to an embodiment, the width-to-height ratio of the current encoding unit 400 or 450 can be 4:1 or 1:4. When the width-to-height ratio is 4:1, the width length is greater than the height length, and therefore the block shape information can be horizontal. When the width-to-height ratio is 1:4, the width length is less than the height length, and therefore 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 information about the division shape pattern. 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 a vertical direction, the image decoding device 100 can divide the current encoding unit 400 horizontally and can determine encoding units 430a, 430b, and 430c. Similarly, when the current encoding unit 450 is in a horizontal direction, the image decoding device 100 can divide the current encoding unit 450 vertically and can determine encoding units 480a, 480b, and 480c.
[0098] 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 among the determined odd number of coding units 430a, 430b, and 430c, or 480a, 480b, and 480c, may have a size different from the sizes of the other coding units 430a and 430c or 480a and 480c. That is, the coding units determined by dividing the current coding unit 400 or 450 may have multiple sizes, and in some cases, all of the odd number of coding units 430a, 430b, and 430c, or 480a, 480b, and 480c, may have different sizes.
[0099] According to an embodiment, when information regarding the shape pattern indicates that the coding unit should be divided into an odd number of blocks, the image decoding device 100 can determine the odd number of coding units included in the current coding unit 400 or 450, and can impose a predetermined restriction on at least one of the odd number of coding units generated by dividing the current coding unit 400 or 450. (Refer to...) Figure 4The image decoding device 100 may allow the decoding method of the encoding unit 430b or 480b to differ from the decoding methods of other encoding units 430a and 430c or 480a and 480c, wherein the encoding unit 430b or 480b is located at the center position of the three encoding units 430a, 430b and 430c or 480a, 480b and 480c generated by dividing the current encoding unit 400 or 450. For example, unlike other encoding units 430a and 430c or 480a and 480c, the image decoding device 100 may restrict the encoding unit 430b or 480b at the center position from being divided again or only divided a predetermined number of times.
[0100] Figure 5 The illustration shows 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 information about partitioning shape patterns.
[0101] According to an embodiment, the image decoding device 100 can 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 information about the division shape pattern. According to an embodiment, when the information about the division shape pattern indicates that the first coding unit 500 is divided in the horizontal direction, the image decoding device 100 can determine the second coding unit 510 by dividing the first coding unit 500 in the horizontal direction. The terms first coding unit, second coding unit, and third coding unit used in the embodiment are terms used to understand the relationship before and after the division of coding units. For example, the second coding unit can be determined by dividing the first coding unit, and the third coding unit can be determined by dividing the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit follows the above description.
[0102] According to an embodiment, the image decoding device 100 may determine, based on at least one of block shape information and information about the division shape pattern, whether to divide the determined second coding unit 510 into coding units or not to divide the determined second coding unit 510. (See also...) Figure 5The image decoding device 100 may, based on at least one of block shape information and information about the division shape pattern, 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 520b, 520c and 520d. The image decoding device 100 may obtain at least one of block shape information and information about the division shape pattern, and divide the first coding unit 500 into a plurality of second coding units (e.g., 510) of various shapes by dividing the first coding unit 500 based on the at least one of the obtained block shape information and information about the division shape pattern, and may divide the second coding unit 510 based on at least one of the block shape information and information about the division shape pattern 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 of the first coding unit 500 and the information about the division shape pattern, the second coding unit 510 can also be divided into a third coding unit 520a or 520b, 520c, and 520d based on at least one of the block shape information of the second coding unit 510 and the information about the division shape pattern. That is, coding units can be recursively divided based on at least one of the block shape information of each coding unit and the information about the division shape pattern. Therefore, square coding units can be determined by dividing non-square coding units, and non-square coding units can be determined by recursively dividing square coding units.
[0103] Reference Figure 5 The 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 square third coding unit 520b in the odd number of third coding units 520b, 520c, and 520d can be divided into multiple fourth coding units in the horizontal direction. The non-square fourth coding units 530b or 530d in the multiple fourth coding units 530a, 530b, 530c, and 530d can be divided into multiple coding units. For example, the non-square fourth coding units 530b or 530d can be further divided into an odd number of coding units. Methods for recursively dividing coding units will be described below with respect to various embodiments.
[0104] According to an embodiment, the image decoding device 100 may divide each of the third coding units 520a or 520b, 520c, and 520d into coding units based on at least one of block shape information and information about the division shape pattern. Furthermore, the image decoding device 100 may determine not to divide the second coding unit 510 based on at least one of the block shape information and information about the division shape pattern. 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 at the center position among the odd number of third coding units 520b, 520c, and 520d to not be divided again or to be divided a set number of times.
[0105] Reference Figure 5 The image decoding device 100 may restrict the third coding unit 520c at the center position among 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 by using a predetermined division method (e.g., divided into only four coding units or divided by using the division method of the second coding unit 510), or to be divided only a predetermined number of times (e.g., divided only n times (where n > 0)). However, the restriction on the third coding unit 520c at the center position is not limited to the above examples and may include various restrictions for decoding the third coding unit 520c at the center position differently from the other third coding units 520b and 520d.
[0106] According to an embodiment, the image decoding device 100 can obtain at least one of block shape information for dividing the current coding unit and information about the division shape pattern from a predetermined position in the current coding unit.
[0107] 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.
[0108] Reference Figure 6 At least one of the block shape information and information about the division shape pattern 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 in the current encoding unit 600 where at least one of the block shape information and information about the division shape pattern can be obtained is not limited to... Figure 6The predetermined position may include the center position of the current encoding unit 600, and may also include various positions (e.g., above, below, left, right, upper left, lower left, upper right, and lower right positions). The image decoding device 100 may obtain at least one of block shape information and information about the division shape pattern from the predetermined position, and determine whether to divide the current encoding unit into encoding units of various shapes and sizes or not to divide the current encoding unit.
[0109] According to an embodiment, when the current coding unit is divided into a predetermined number of coding units, the image decoding device 100 may select one coding unit from the coding units. As will be described below with respect to various embodiments, various methods can be used to select one of a plurality of coding units.
[0110] 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.
[0111] According to an embodiment, the image decoding device 100 can use information indicating the positions of an odd number of coding units to determine the coding unit at the center position among the odd number of coding units. (See also...) Figure 6 The image decoding device 100 can determine an odd number of coding units 620a, 620b, and 620c or an odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding device 100 can determine 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 position of the upper left sample points 630a, 630b and 630c of the encoding units 620a, 620b and 620c, and thus determine the encoding unit 620b at the center position.
[0112] According to an embodiment, the information indicating the positions of the top-left samples 630a, 630b, and 630c included in encoding units 620a, 620b, and 620c respectively may include information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the image. According to an embodiment, the information indicating the positions of the top-left samples 630a, 630b, and 630c included in encoding units 620a, 620b, and 620c respectively may include information indicating the width or height of the encoding units 620a, 620b, and 620c included in the current encoding unit 600, and the width or height may correspond to information indicating the difference between the coordinates of the encoding units 620a, 620b, and 620c in the image. That is, the image decoding device 100 can determine the encoding unit 620b at the center position by directly using information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the image or by using information about the width or height of the encoding unit corresponding to the difference between the coordinates.
[0113] 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 at the center position, including the coordinates (xb, yb) of sample 630b, can be determined as the encoding unit at the center position among the encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600. However, the coordinates indicating the positions of the top-left sample points 630a, 630b, and 630c may include coordinates indicating absolute positions within the frame, or coordinates (dxb, dyb) indicating the relative position of the top-left sample 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.
[0114] 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, whose size is different from that of other encoding units, from the encoding units 620a, 620b, and 620c.
[0115] 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 respective dimensions of encoding units 620a, 620b, and 620c by using coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of 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 or 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 sizes of encoding units determined based on the coordinates of the predetermined sample points can be used.
[0116] 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.
[0117] 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 the dimensions of other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. (Refer to...) Figure 6 The image decoding device 100 can determine an intermediate encoding unit 660b, which has a size different from that of the left encoding unit 660a and the right encoding unit 660c, as an encoding unit at a 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 sizes of encoding units determined based on the coordinates of the predetermined sample points can be used.
[0118] However, the position of the sample points considered in determining the position of the coding unit is not limited to the upper left position mentioned above, and information about any position of the sample points included in the coding unit can be used.
[0119] 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 along the horizontal direction. That is, the image decoding device 100 may determine one coding unit from the coding units at different positions along the horizontal direction and may 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 along the vertical direction. That is, the image decoding device 100 may determine one coding unit from the coding units at different positions along the vertical direction and may impose restrictions on that coding unit.
[0120] According to an embodiment, the image decoding device 100 can use information indicating the positions of each of the even-numbered coding units to determine the coding unit at a predetermined position among the even-numbered coding units. The image decoding device 100 can determine the even-numbered coding units by dividing the current coding units, and can determine the coding unit at the predetermined position by using information about the positions of the even-numbered coding units. The associated operation can be compared with the operation already described above regarding... Figure 6 The operation corresponding to determining a predetermined position (e.g., the center position) among an odd number of coding units is described in detail, and therefore its detailed description is not provided here.
[0121] 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 in the samples included in the coding unit at the center position and information about the division shape pattern stored in the division operation to determine the coding unit at the center position from the multiple coding units determined by dividing the current coding unit.
[0122] 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 information about the division shape pattern, 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 information about the division shape pattern. That is, at least one of the block shape information and information about the division shape pattern 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 information about the division shape pattern, 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 information about the division shape pattern, and various types of information can be used to determine the coding unit at the center location.
[0123] 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, using at least one of block shape information obtained from samples at predetermined positions in the current encoding unit 600 (e.g., samples at the center of the current encoding unit 600) and information about the division shape pattern, an encoding unit at a predetermined position (e.g., the encoding unit at the center of the divided encoding units) among a plurality of encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600. That is, the image decoding device 100 can determine the samples at predetermined positions by considering the block shape of the current encoding unit 600, determine encoding unit 620b from the plurality of encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600, including samples from which predetermined information (e.g., block shape information and information about the division shape pattern) can be obtained, and can impose predetermined limitations on encoding unit 620b. (Refer to...) Figure 6 According to an embodiment, during the decoding operation, the image decoding device 100 can determine a sample 640 at the center position of the current encoding unit 600 as a sample from which predetermined information can be obtained, and can impose a predetermined restriction on the encoding unit 620b including the sample 640. However, the position of the sample from which predetermined information can be obtained is not limited to the above-described position, and can include any position of the sample included in the encoding unit 620b that will be determined for restriction.
[0124] According to an embodiment, the location of a sample 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 a sample from which predetermined information can be obtained can be determined based on this shape. For example, the image decoding device 100 can determine a sample located on a boundary used to halve at least one of the width and height of the current encoding unit as a sample 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 used to halve the long side of the current encoding unit as a sample from which predetermined information can be obtained.
[0125] 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 information about the division shape pattern 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 information about the division shape pattern 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 obtained from samples at predetermined positions in each of the multiple coding units and information about the division shape pattern. That is, the coding units can be recursively divided based on at least one of the block shape information obtained from samples at predetermined positions in each coding unit and information about the division shape pattern. The above already relates to... Figure 5 The operation of recursively dividing the coding unit is described, and therefore its detailed description will not be provided here.
[0126] 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).
[0127] Figure 7 This illustrates the order in which the image decoding device 100 processes the plurality of coding units when it determines the plurality of coding units by dividing the current coding unit, according to an embodiment.
[0128] According to an embodiment, based on block shape information and information about the division shape pattern, the image decoding device 100 can determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, determine the second coding units 730a and 730b by dividing the first coding unit 700 in the horizontal direction, or determine the second coding units 750a to 750d by dividing the first coding unit 700 in both the vertical and horizontal directions.
[0129] 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 order 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 order 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.
[0130] According to an embodiment, the image decoding device 100 can recursively divide encoding units. (See also...) Figure 7 The image decoding device 100 can determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d by dividing a first coding unit 700, and can recursively divide each of the determined plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. The method of dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can correspond to the method of dividing the first coding unit 700. Thus, each of the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d can be independently divided into a plurality of coding units. (Refer to...) Figure 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 each of the second coding units 710a and 710b independently or not to divide each of the second coding units 710a and 710b.
[0131] 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.
[0132] According to an embodiment, the processing order of coding units can be determined based on the operation of dividing coding units. In other words, the processing order of the divided coding units can be determined based on the processing order of the coding units immediately preceding the division. The image decoding device 100 can determine the processing order of the third coding units 720a and 720b determined by dividing the left second coding unit 710a independently of the right second coding unit 710b. Because the third coding units 720a and 720b are determined by dividing the left second coding unit 710a in the horizontal direction, the third coding units 720a and 720b can be processed in the vertical order 720c. Because the left second coding unit 710a and the right second coding unit 710b are processed in the horizontal order 710c, the right second coding unit 710b can be processed after the third coding units 720a and 720b included in the left second coding unit 710a are processed in the vertical order 720c. The operation of determining the processing order of coding units based on the coding units before division is not limited to the above example, and various methods can be used to process the divided coding units and the coding units determined to be of various shapes independently in a predetermined order.
[0133] 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.
[0134] 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 obtained block shape information and information about the partitioning shape pattern. (See also...) Figure 8 The square first coding unit 800 can be divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b can be independently divided into third coding units 820a and 820b, as well as 820c 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.
[0135] 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 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 820c to 820e, by recursively dividing the first coding unit 800. The image decoding device 100 can determine whether any of the following coding units is divided into an odd number of coding units based on at least one of block shape information and information about the division shape pattern: the first coding unit 800, the second coding units 810a and 810b, and the third coding units 820a and 820b, and 820c, 820d, and 820e. 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 multiple coding units included in the first coding unit 800 can be a predetermined order (e.g., zigzag scanning order 830). 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 conditions for processing in a predetermined order.
[0136] According to an embodiment, the image decoding device 100 can determine whether the third encoding units 820a and 820b, as well as 820c, 820d and 820e included in the first encoding unit 800, satisfy a condition for processing in a predetermined order. 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, as well as 820c, 820d and 820e. For example, the third encoding units 820a and 820b, determined by halving the height of the non-square left-side second encoding unit 810a, satisfy the condition. However, since the boundaries of the third encoding units 820c, 820d and 820e, determined by dividing the right-side second encoding unit 810b into three encoding units, do not halve the width or height of the right-side second encoding unit 810b, it can be determined that the third encoding units 820c, 820d and 820e do not satisfy 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 determination result, determine that the right-side second coding unit 810b is divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose a predetermined restriction on the coding units at predetermined positions in the divided coding units. The restriction or the predetermined position has been described above with respect to various embodiments, and therefore its detailed description will not be provided here.
[0137] Figure 9 The illustration shows a process performed by an image decoding device 100 according to an embodiment, which involves determining at least one coding unit by dividing a first coding unit 900.
[0138] According to an embodiment, the image decoding device 100 may divide the first coding unit 900 based on at least one of block shape information obtained by the bitstream acquirer 110 and information about the partitioning shape pattern. The square first coding unit 900 may be divided into four square coding units, or it may be divided into multiple non-square coding units. For example, referring to… Figure 9 When block shape information indicates that the first encoding unit 900 has a square shape and information regarding the division shape pattern 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 information regarding the division shape pattern indicates that an odd number of encoding units are determined by dividing 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 (e.g., second encoding units 910a, 910b, and 910c determined by dividing the square first encoding unit 900 in the vertical direction, or second encoding units 920a, 920b, and 920c determined by dividing the square first encoding unit 900 in the horizontal direction).
[0139] According to an embodiment, the image decoding device 100 can determine whether second encoding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first encoding unit 900 meet a condition for processing in a predetermined order, and this condition is related to whether at least one of the width and height of the first encoding unit 900 is divided in half along the boundaries of the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c. (Refer to...) Figure 9Because the boundaries of the second coding units 910a, 910b, and 910c, 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 conditions for processing 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 conditions for processing 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 can determine, based on the determination result, that the first coding unit 900 is divided into an odd number of coding units. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding device 100 can impose a predetermined restriction on the coding units at predetermined positions within the divided coding units. The restrictions or predetermined positions have already been described above with respect to various embodiments, and therefore their detailed description will not be provided here.
[0140] According to an embodiment, the image decoding device 100 can determine coding units of various shapes by dividing a first coding unit.
[0141] 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.
[0142] Figure 10 The image decoding device 100 can restrict the shape into which the second encoding unit is divided when the second encoding unit, which has a non-square shape and is determined by dividing the first encoding unit 1000, satisfies a predetermined condition, according to an embodiment.
[0143] According to an embodiment, the image decoding device 100 can determine, based on at least one of block shape information obtained by the bitstream acquirer 110 and information about the partitioning shape pattern, that a square first coding unit 1000 is divided into non-square second coding units 1010a, 1010b, 1020a, and 1020b. The second coding units 1010a, 1010b, 1020a, and 1020b can be divided independently. Thus, based on at least one of the block shape information and information about the partitioning shape pattern for each of the second coding units 1010a, 1010b, 1020a, and 1020b, the image decoding device 100 can determine 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 non-square left-hand second coding unit 1010a, determined by partitioning 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 from being divided in the same horizontal direction as the left second coding unit 1010a. 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 coding unit 1010b are divided independently in the horizontal direction. However, this situation works the same way as when the image decoding device 100 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on at least one of block shape information and information about the division shape pattern, and may be inefficient in terms of image decoding.
[0144] 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 may restrict another second coding unit (e.g., the lower second coding unit 1020b) from being divided in the vertical direction in which the upper second coding unit 1020a is divided.
[0145] Figure 11The illustration shows the process performed by the image decoding device 100 according to an embodiment, when information about the division shape pattern indicates that the square coding unit will not be divided into four square coding units, in order to divide the square coding unit.
[0146] 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 information about the division shape pattern. The information about the division shape pattern may include information about various methods of dividing the coding units, but may not include information for dividing the coding unit into four square coding units. Based on such information about the division shape pattern, 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 information about the division shape pattern.
[0147] According to an embodiment, the image decoding device 100 can independently divide non-square second coding units 1110a, 1110b, 1120a, 1120b, etc. Each of the second coding units 1110a, 1110b, 1120a, 1120b, etc. can be recursively divided in a predetermined order, and this division method can correspond to a method of dividing the first coding unit 1100 based on at least one of block shape information and information about the division shape pattern.
[0148] For example, the image decoding device 100 can determine the third coding units 1112a and 1112b of the square by dividing the left second coding unit 1110a in the horizontal direction, and can determine the third coding units 1114a and 1114b of the square by dividing the right second coding unit 1110b in the horizontal direction. Furthermore, the image decoding device 100 can determine the third coding units 1116a, 1116b, 1116c, and 1116d of the square by dividing both the left second coding unit 1110a and the right second coding unit 1110b in the horizontal direction. In this case, coding units with the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 can be determined.
[0149] As another example, the image decoding device 100 can determine the third coding units 1122a and 1122b of the square by dividing the upper second coding unit 1120a in the vertical direction, and can determine the third coding units 1124a and 1124b of the square by dividing the lower second coding unit 1120b in the vertical direction. Furthermore, the image decoding device 100 can determine the third coding units 1126a, 1126b, 1126c, and 1126d of the square by dividing both the upper second coding unit 1120a and the lower second coding unit 1120b in the vertical direction. In this case, coding units with the same shape as the second coding units 1130a, 1130b, 1130c, and 1130d of the four squares divided from the first coding unit 1100 can be determined.
[0150] 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.
[0151] According to an embodiment, the image decoding device 100 can divide the first coding unit 1200 based on block shape information and information about the division shape pattern. When the block shape information indicates a square shape and the information about the division shape pattern indicates that the first coding unit 1200 is divided in at least one of the horizontal and vertical directions, the image decoding device 100 can determine the second coding units 1210a, 1210b, 1220a, and 1220b 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 of each coding unit and information about the division shape pattern. 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 discussed... 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.
[0152] According to an embodiment, the image decoding device 100 can process the encoding units in a predetermined order. The above has already mentioned... 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, as well as 1226a, 1226b, 1226c, and 1226d, of the four squares by dividing the first encoding unit 1200 into squares. According to an embodiment, the image decoding device 100 can determine the processing order of the third encoding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, based on the division method of the first encoding unit 1200.
[0153] According to an embodiment, the image decoding device 100 can determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 in the vertical direction in the horizontal direction, and can process the third coding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: first, the third coding units 1216a and 1216c included in the left second coding unit 1210a are processed in the vertical direction, and then the third coding units 1216b and 1216d included in the right second coding unit 1210b are processed in the vertical direction.
[0154] According to an embodiment, the image decoding device 100 can determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 in the horizontal direction in the vertical direction, and can process the third coding units 1226a, 1226b, 1226c, and 1226d in the following processing order 1227: firstly, the third coding units 1226a and 1226b included in the upper second coding unit 1220a are processed in the horizontal direction, and then the third coding units 1226c and 1226d included in the lower second coding unit 1220b are processed in the horizontal direction.
[0155] Reference Figure 12The square third coding units 1216a, 1216b, 1216c, and 1216d, as well as 1226a, 1226b, 1226c, and 1226d, can be determined by dividing the second coding units 1210a, 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, as well as 1226a, 1226b, 1226c, and 1226d, derived from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b, ultimately show coding units of the same shape derived from the first coding unit 1200. Thus, by recursively dividing the coding units in different ways based on at least one of the block shape information and the information about the division shape pattern, the image decoding device 100 can process multiple coding units in different orders, even if the coding units are ultimately determined to be the same shape.
[0156] 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 multiple coding units are determined by recursively dividing the coding units according to an embodiment.
[0157] According to an embodiment, the image decoding device 100 can determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion can be the length of the long side of the coding unit. When the length of the long side of the coding unit before division is 2n (n>0) times the length of the long side of the current coding unit after division, the image decoding device 100 can determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before division. In the following description, the coding unit with the increased depth is referred to as a deeper coding unit.
[0158] Reference Figure 13According to an embodiment, the image decoding device 100 can determine a deeper second coding unit 1302 and a third coding unit 1304 by dividing a square into a first coding unit 1300 based on block shape information indicating the shape of the 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 of 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 half of 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 one-quarter of the width and height of the first coding unit 1300, can be D+2.
[0159] According to an embodiment, the image decoding device 100 can determine a deeper second encoding unit 1312 or 1322 and a third encoding unit 1314 or 1324 by dividing a non-square first encoding unit 1310 or 1320 based on block shape information indicating a non-square shape (e.g., the block shape information may 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).
[0160] 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.
[0161] According to an embodiment, the image decoding device 100 can determine the second encoding unit 1302, 1312, or 1322 by dividing the width and height of the first encoding unit 1320, which has a size of 2N×N. That is, the image decoding device 100 can determine the second encoding unit 1302 or the second encoding unit 1312 with a size of N×N by dividing the first encoding unit 1320 in the vertical direction, or it can determine the second encoding unit 1322 with a size of N×N / 2 by dividing the first encoding unit 1320 in both the horizontal and vertical directions.
[0162] 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.
[0163] 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.
[0164] 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.
[0165] According to an embodiment, the image decoding device 100 can divide square coding units 1300, 1302, or 1304 in the horizontal or vertical direction. For example, the image decoding device 100 can determine a first coding unit 1310 of size N×2N by dividing a first coding unit 1300 of size 2N×2N in the vertical direction, or it can determine a first coding unit 1320 of size 2N×N by dividing a first coding unit 1300 of size 2N×2N in the horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing a first coding unit 1300 of size 2N×2N in the horizontal or vertical direction can be the same as the depth of the first coding unit 1300.
[0166] According to an embodiment, the width and height of the third encoding unit 1314 or 1324 can be 1 / 4 of 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 of 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 of the width and height of the first encoding unit 1310 or 1320, can be D+2.
[0167] Figure 14 The diagram illustrates a depth that can be determined based on the shape and size of the coding unit, and a partial index (PID) used to distinguish the coding unit, according to an embodiment.
[0168] 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, 1404a and 1404b, and 1406a, 1406b, 1406c and 1406d by dividing the first coding unit 1400 in at least one direction, in the vertical and horizontal directions, based on information about the division shape pattern. That is, the image decoding device 100 can determine the second coding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c and 1406d based on information about the division shape pattern of the first coding unit 1400.
[0169] 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 information about the shape pattern of the square first coding unit 1400, can be determined based on the length of their longer sides. For example, since the length of the side of the square first coding unit 1400 is equal to the length of the longer side of the non-square second coding units 1402a and 1402b and 1404a and 1404b, the first coding unit 1400 and the non-square second coding units 1402a and 1402b and 1404a and 1404b can have the same depth, such as D. However, when the image decoding device 100 divides the first encoding unit 1400 into four square second encoding units 1406a, 1406b, 1406c, and 1406d based on information about the division shape pattern, the depth of the second encoding units 1406a, 1406b, 1406c, and 1406d can be D+1 deeper than the depth D of the first encoding unit 1400 because the length of the side of the square second encoding units 1406a, 1406b, 1406c, and 1406d is 1 / 2 the length of the side of the first encoding unit 1400.
[0170] According to an embodiment, the image decoding device 100 can determine a plurality of second encoding units 1412a and 1412b, as well as 1414a, 1414b, and 1414c, by dividing a first encoding unit 1410 in the horizontal direction with a height greater than its width based on information about the division shape pattern. According to an embodiment, the image decoding device 100 can determine a plurality of second encoding units 1422a and 1422b, as well as 1424a, 1424b, and 1424c, by dividing a first encoding unit 1420 in the vertical direction with a width greater than its height based on information about the division shape pattern.
[0171] According to an embodiment, the depths of the second coding units 1412a and 1412b, second coding units 1414a, 1414b and 1414c, second coding units 1422a and 1422b, and second coding units 1424a, 1424b and 1424c, determined based on information about the division shape pattern 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 longer 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.
[0172] 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 information about the division shape pattern. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are half the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c can be D+1 deeper than the depth D of the non-square first coding unit 1410. The image decoding device 100 can determine the depth of the coding unit divided from the first coding unit 1420, which has a width longer than its height, by using the method described above for determining the depth of the coding unit divided from the first coding unit 1410.
[0173] According to an embodiment, when an odd number of the divided coding units do not have equal sizes, the image decoding device 100 can determine the PID used to identify the divided coding units based on the size ratio between the coding units. (Refer to...) Figure 14 In an odd-numbered set of coding units 1414a, 1414b, and 1414c, the width of the central coding unit 1414b can be equal to the width of the other coding units 1414a and 1414c, and its height can be twice the height of the other coding units 1414a and 1414c. That is, in this case, the central coding unit 1414b may include two other coding units 1414a or 1414c. Therefore, when the PID of the central coding unit 1414b is 1 based on the scan order, the PID of the coding unit 1414c adjacent to coding unit 1414b can be increased by 2 and thus can be 3. That is, there may be discontinuous PID values. According to an embodiment, the image decoding device 100 can determine whether the odd-numbered coding units do not have equal sizes based on whether there is a discontinuity in the PIDs used to identify the divided coding units.
[0174] According to an embodiment, the image decoding device 100 may determine whether to use a specific partitioning method based on PID values used to identify multiple coding units determined by partitioning the current coding unit. (See also...) Figure 14The image decoding device 100 can determine an even number of coding units 1412a and 1412b or an odd number of coding units 1414a, 1414b, and 1414c by dividing a first coding unit 1410 having a rectangular shape with a height longer than its width. The image decoding device 100 can use a PID 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).
[0175] 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 information about the division shape pattern of a first coding unit 1410 having a rectangular shape with a height longer than its width indicates that the coding unit should be divided into three coding units, the image decoding device 100 can divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The image decoding device 100 can assign a PID to each of the three coding units 1414a, 1414b, and 1414c. The image decoding device 100 can compare the PIDs of an odd number of divided coding units to determine the coding unit at the center position among the odd number of divided coding units. The image decoding device 100 can determine the coding unit 1414b, which has a PID corresponding to the median value among the PIDs of the coding unit, as the coding unit at the center position among the coding units determined by dividing the first coding unit 1410. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding device 100 can determine a PID for distinguishing the divided coding units based on the size ratio between the coding units. (Refer to...) Figure 14The width of the coding unit 1414b generated by dividing the first coding unit 1410 can be equal to the width of the other coding units 1414a and 1414c, and its height can be twice the height of the other coding units 1414a and 1414c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c adjacent to the coding unit 1414b can be increased by 2 and therefore can be 3. When the PID does not increase uniformly as described above, the image decoding device 100 can determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units includes coding units with dimensions different from those of the other coding units. According to an embodiment, when information about the division shape pattern indicates that the coding unit is divided into an odd number of coding units, the image decoding device 100 can divide the current coding unit in such a way that the coding unit at a predetermined position in the odd number of coding units (e.g., the coding unit at the center position) has a dimension different from that of 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 of the encoding unit at the predetermined position and its size or position are not limited to the examples above, and various PIDs of the encoding unit as well as various positions and sizes can be used.
[0176] According to an embodiment, the image decoding device 100 may use a predetermined data unit, in which encoding units are recursively divided.
[0177] Figure 15 The illustration shows how multiple encoding units are determined based on multiple predetermined data units included in the screen, according to an embodiment.
[0178] According to an embodiment, a predetermined data unit can be defined as a data unit in which coding units are recursively divided using at least one of block shape information and information about the division shape pattern. That is, the predetermined data unit may 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.
[0179] According to an embodiment, the reference data unit may have a predetermined size and a predetermined shape. According to an embodiment, the reference data unit may include M×N sample points. Here, M and N may be equal to each other and may be integers represented as powers of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of encoding units.
[0180] 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 information about the division shape pattern for each reference data unit. The operation of dividing the reference data units can correspond to a division operation using a quadtree structure.
[0181] According to an embodiment, the image decoding device 100 can predetermine the minimum allowed size of the reference data units included in the current frame. Therefore, the image decoding device 100 can determine various reference data units with sizes equal to or greater than the minimum size, and can determine one or more coding units by referring to the determined reference data units and using block shape information and information about the division shape pattern.
[0182] 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.
[0183] According to an embodiment, the bitstream receiver 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 discussed... Figure 3 The operation of dividing the current coding unit 300 describes the operation of dividing the square reference coding unit 1500 into one or more coding units, and the above has already been discussed... Figure 4 The operation of dividing the current coding unit 400 or 450 describes the operation of dividing the non-square reference coding unit 1502 into one or more coding units, and therefore, its detailed description will not be provided here.
[0184] According to an embodiment, the image decoding device 100 can determine the size and shape of a reference coding unit using a PID for identifying the size and shape of a 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., 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. In other words, the image decoding device 100 can determine at least one of the dimensions and shapes of the reference coding unit included in the data unit used as the unit for obtaining the PID by selecting at least one of the dimensions and shapes of the reference coding unit based on the PID.
[0185] 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 information about the division shape pattern.
[0186] 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 screen 1600.
[0187] 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 divided from the image that includes one or more reference coding units, and the one or more reference coding units included in the processing block can be determined according to a specific order. That is, the order in which 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 order in which the reference coding units determined for each processing block can be one of various orders (e.g., raster scan order, zigzag scan, N-shaped scan, upper right diagonal scan, horizontal scan, and vertical scan), but is not limited to the scan orders mentioned above.
[0188] 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 the frame. 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 the frame. The size of a processing block can be a predetermined size of a data unit indicated by the processing block size information.
[0189] 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, 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 in the 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.
[0190] 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.
[0191] According to an embodiment, the image decoding device 100 can determine the processing blocks 1602 and 1612 included in the image 1600 based on the size of the processing blocks, and can determine the determination order of one or more reference coding units included in the processing blocks 1602 and 1612. According to an embodiment, determining the reference coding unit may include determining the size of the reference coding unit.
[0192] 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 used to determine 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.
[0193] 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 160 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, deterministic order information can be obtained for each specific data unit comprising an integer number of processing blocks.
[0194] According to an embodiment, the image decoding device 100 may determine one or more reference coding units based on a determined order.
[0195] 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 the 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 the determination order information of reference coding units is obtained for each processing block, different types of determination order information 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 reverse raster scan order, the reference coding units included in processing block 1612 can be determined according to the reverse raster scan order.
[0196] 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.
[0197] According to an embodiment, the image decoding device 100 can obtain block shape information indicating the shape of the current coding unit or information about the partitioning shape pattern indicating the partitioning method of the current coding unit from the bitstream, and can use the obtained information. The block shape information or information about the partitioning shape pattern 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 information about the partitioning shape pattern 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 information about the partitioning shape pattern from the bitstream according to each maximum coding unit, each reference coding unit, or each processing block, and can use the obtained syntax elements.
[0198] 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.
[0199] Reference Figure 17The image decoding device 100 can determine the combination of shapes into which the encoding units can be divided for each frame differently. For example, the image decoding device 100 can decode the image using at least one frame included in the image, which can be divided into 4 encoding units (frame 1700), 2 or 4 encoding units (frame 1710), and 2, 3, or 4 encoding units (frame 1720). To divide frame 1700 into multiple encoding units, the image decoding device 100 can use only the division shape information indicating that frame 1700 is divided into 4 square encoding units. To divide frame 1710, the image decoding device 100 can use only the division shape information indicating that frame 1710 is divided into 2 or 4 encoding units. To divide frame 1720, the image decoding device 100 can use only the division shape information indicating that frame 1720 is divided into 2, 3, or 4 encoding units. Since such a combination of partition shapes is only an embodiment used to describe the operation of the image decoding device 100, the combination of partition shapes should not be interpreted as limited to this embodiment, but various combinations of partition shapes can be used according to a predetermined data unit.
[0200] According to an embodiment, the bitstream acquirer 110 of the image decoding device 100 can acquire a bitstream including an index based on a predetermined data unit (e.g., a sequence, a frame, or a stripe), wherein the index indicates a combination of partition shape information. For example, the bitstream acquirer 110 can acquire the index indicating the combination of partition shape information from a sequence parameter set, a frame parameter set, or a stripe header. The image decoding device 100 can determine the combination of partition shapes into which the encoding unit can be divided based on the predetermined data unit by using the acquired index, and therefore can use different combinations of partition shapes based on the predetermined data unit.
[0201] 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.
[0202] 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 in the above embodiments.
[0203] Reference Figure 18 Based on the division shape information, the image decoding device 100 can divide coding units with square shapes in at least one direction in the horizontal and vertical directions, and can divide coding units with non-square shapes in either the horizontal or vertical direction.
[0204] According to an embodiment, when the image decoding device 100 is able to divide the coding units with square shapes in the horizontal and vertical directions to obtain four square coding units, the number of division shapes indicated by the division shape information associated with the coding units with square shapes can be 4. 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 no coding units are divided, the division shape information can be represented as (00)b; when coding units are divided in the horizontal and vertical directions, the division shape information can be represented as (01)b; when coding units are divided in the horizontal direction, the division shape information can be represented as (10)b; and when coding units are divided in the vertical direction, the division shape information can be represented as (11)b.
[0205] According to an embodiment, when the image decoding device 100 divides the image into coding units with non-square shapes 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 an embodiment, the image decoding device 100 may divide a coding unit having a non-square shape into three coding units. The image decoding device 100 may divide a coding unit into two coding units, and in this case, the division shape information may be represented as (10)b. The image decoding device 100 may divide a coding unit into three coding units, and in this case, the division shape information may be represented as (11)b. The image decoding device 100 may determine not to divide the coding unit, and in this case, the division shape information may be represented as (0)b. That is, in order to use the binary code indicating the division shape information, the image decoding device 100 may use variable-length coding (VLC) instead of fixed-length coding (FLC).
[0206] 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 still be used. However, as Figure 18 As shown, when three partition shapes are used for coding units with non-square shapes, the image decoding device 100 can determine that the coding unit is not partitioned, even by using 1 bit binary code (0)b as partition shape information, thus effectively using the bit stream. However, the partition shape indicated by the partition shape information for coding units with non-square shapes should not be interpreted as limited to... Figure 18 The three shapes shown are to be interpreted as including all shapes in the above embodiments.
[0207] 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.
[0208] Reference Figure 19 Based on the partition shape information, the image decoding device 100 can partition coding units with square shapes in the horizontal or vertical direction, and can also partition coding units with non-square shapes in the horizontal or vertical direction. That is, the partition shape information can indicate that coding units with square shapes are partitioned in one direction. In this case, the binary code of the partition shape information indicating that coding units with square shapes are not partitioned can be represented as (0)b. When the binary code of the partition shape information indicating that coding units are not partitioned is set to (00)b, although there is no partition shape information set to (01)b, all 2 bits of the partition shape information must still be used. However, as... Figure 19 As shown, when three partition shapes are used for a coding unit with a square shape, the image decoding device 100 can determine that the coding unit is not partitioned, even if 1 bit binary code (0)b is used as partition shape information, thus effectively using the bit stream. However, the partition shape indicated by the partition shape information for a coding unit with a square shape should not be interpreted as limited to Figure 19 The three shapes shown are intended to be interpreted as including all shapes described in the above embodiments.
[0209] 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 in the bitstream, and the block shape information or partition shape information that can be represented as binary code can be used as binary code input during context-adaptive binary arithmetic coding (CABAC).
[0210] According to an embodiment, the process of obtaining syntax information regarding block shape information or partition shape information via CABAC by an 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 element to be decoded, and can decode each binary bit by using probability information. The image decoding device 100 can repeat this process until the binary bit string including such decoded binary bits is the same as one of the pre-obtained binary bit strings. The image decoding device 100 can determine the syntax element by debinarizing the binary bit strings.
[0211] 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, wherein the binary code indicates partitioning shape information. The image decoding device 100 can determine the syntax regarding the partitioning shape information by using the acquired binary code, which is 1 bit or 2 bits in size. To determine the syntax regarding the partitioning 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 may have a value of 0 or 1 when decoding, based on whether the value of the first binary bit in the 2 bits of the binary code is 0 or 1.
[0212] According to an embodiment, when determining the grammar, the image decoding device 100 may update the probability of the binary bits used in the process of decoding the binary bits of the binary bit string used for the grammar, and the image decoding device 100 may determine that a particular bit in the binary bit string has the same probability without updating that probability.
[0213] Reference Figure 18When determining the syntax using a binary bit string indicating the partition shape information related to coding units with non-square shapes, 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 coding units with non-square shapes 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 for the partition shape information can be 0 when coding units with non-square shapes are not partitioned, and the first binary bit of the binary bit string for the partition shape information can be 1 when coding units with non-square shapes are partitioned into two or three coding units. Therefore, the probability that the first binary bit of the binary bit string for the partition shape information related to coding units with non-square shapes is 0 can be 1 / 3, and the probability that the first binary bit of the binary bit string for the partition shape information related to coding units with non-square shapes is 1 can be 2 / 3. As described above, since the partitioning shape information indicating that coding units with non-square shapes are not partitioned can represent only a 1-bit binary string with a value of 0, the image decoding device 100 can determine the syntax of the partitioning shape information by determining whether the second binary bit is 0 or 1 only when the first binary bit of the partitioning shape information is 1. According to an embodiment, when the first binary bit of the partitioning 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 is the same as the probability of the second binary bit being 1.
[0214] According to an embodiment, the image decoding device 100 may use various probabilities for each binary bit when determining the binary bits of the binary bit string for the segmentation shape information. According to an embodiment, the image decoding device 100 may determine the probability of the binary bits for the segmentation shape information differently based on the orientation of the non-square block. According to an embodiment, the image decoding device 100 may determine the probability of the binary bits for the segmentation 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 may determine the probability of the binary bits for the segmentation shape information differently based on at least one of the shape of the current encoding unit and the length of its long side.
[0215] According to an embodiment, the image decoding device 100 can determine that the probability of binary bits for dividing 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 for dividing shape information is the same for encoding units with a size equal to or greater than 64 samples, based on the length of the long side of each encoding unit.
[0216] 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.).
[0217] Figure 20 This is a block diagram of the image encoding and decoding system 2000 used to perform loop filtering.
[0218] 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, which will be described below, and the decoding end 2050 may have a configuration similar to that of the image decoding device 100.
[0219] At the encoding end 2010, the predictive encoder 2015 outputs a reference image through inter-frame prediction and intra-frame prediction, and the transformer and quantizer 2020 transforms and quantizes the residual data between the reference image and the current input image into quantized transform coefficients and outputs 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 as a reference image for the next input image by the predictive encoder 2015.
[0220] 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, as well as the dequantizer and inverse transformer 2060. As the residual data and the reference image output from the predictive decoder 2075 are combined, image data in the spatial domain is formed, and the deblocking filter 2065 and the loop filter 2070 can filter the image data in the spatial domain to output a reconstructed image for the current original image. The reconstructed image can be used as a reference image for the next original image by the predictive decoder 2075.
[0221] 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.
[0222] Figure 21An example is shown, according to an embodiment, of a filtering unit and filtering execution information of the filtering unit, including the maximum encoding unit.
[0223] When the filtering unit of the loop filter 2040 at the encoding end 2010 and the filtering unit of the loop filter 2070 at the decoding end 2050 include, according to reference Figures 3 to 5 When the data units of the described embodiments are similar to the encoding units, the filter information may include block shape information and partition shape information of the data units for indicating the filtering units, as well as loop filtering execution information indicating whether loop filtering is performed on the filtering units.
[0224] According to an embodiment, the filtering units included in the maximum coding unit 2100 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 an 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.
[0225] As shown in Table 1, the block shape information, partition shape information (depth) and loop filtering execution information of the filtering unit included in the maximum encoding unit 2100 can be encoded.
[0226] [Table 1]
[0227]
[0228]
[0229] 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.
[0230] 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.
[0231] Although the above embodiments describe determining the filtering unit based on the encoding unit according to the embodiments, the filtering unit can be divided based on the encoding unit up to an arbitrary depth, and thus the shape of the filtering unit can be determined only up to that arbitrary depth.
[0232] The operation of 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.
[0233] 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 units of the current coding unit can always have a square shape based on the block shape information, and the current coding unit can be 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, wherein the predetermined encoding method 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 only with a predetermined block shape and partition shape among various shapes indicated by block shape information and partition shape information, the block shape information only indicates a square shape, and therefore the image decoding device 100 may not perform 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 having various shapes, wherein the data units may include various 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.
[0234] Figure 23 The index of the encoding unit according to the zigzag scanning order is shown in the embodiment.
[0235] The image decoding apparatus 100 according to an embodiment can scan lower-level data units included in upper-level data units according to a zigzag scanning order. Furthermore, the image decoding apparatus 100 according to an embodiment can sequentially access data according to the zigzag scanning index in the encoding units included in a processing block or a maximum encoding unit.
[0236] For reference Figures 13 to 14 The image decoding apparatus 100 according to the embodiment can divide a reference coding unit into at least one coding unit. 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 apparatus 100 according to the embodiment can access data based on a zigzag scan index included in each coding unit of the reference coding unit. In this case, the method of applying the zigzag scan index can be changed depending on whether there are coding units with a non-square shape in the reference coding unit.
[0237] 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 for the coding units. In this case, deeper coding units of the same depth may be scanned according to the zigzag scan order.
[0238] According to an embodiment, when at least one coding unit with a non-square shape exists in the reference coding unit, the image decoding device 100 can divide each coding unit in the reference coding unit into sub-blocks and scan the divided sub-blocks according to a zigzag scanning order. 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 may 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.
[0239] Reference Figure 23 For example, according to an embodiment, the image decoding device 100 can scan lower-depth coding units 2302, 2304, 2306, 2308, and 2310 in 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. Coding units 2306 and 2310 with non-square shapes have discontinuous boundaries with adjacent coding units 2302 and 2304 with square shapes. Furthermore, coding unit 2308 has a square shape and is the coding unit at the center when coding units with non-square shapes 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 adjacent square-shaped coding units 2302 and 2304. When coding unit 2300 includes non-square-shaped coding units divided into an odd number of coding units, and coding units 2306 and 2310 or the central coding unit 2308 are non-square-shaped, 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.
[0240] Figure 23 The encoding unit 2320 is obtained by dividing the encoding units 2302, 2304, 2306, 2308, and 2310 in the encoding unit 2300 into sub-blocks. 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 a 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 a zigzag scan order.
[0241] In the above embodiments, data units are scanned according to a zigzag scanning sequence for data storage, data loading, and data access.
[0242] Furthermore, in the above embodiments, although data units can be scanned according to a zigzag scanning order, the scanning order of data units can be one of various orders (such as raster scanning order, N-shaped scanning order, upper right diagonal scanning order, horizontal scanning order, and vertical scanning order), and should not be limited to the zigzag scanning order.
[0243] 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.
[0244] 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, 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 for the simplified embodiment.
[0245] 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 transform 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.
[0246] 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.
[0247] 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 on each coding unit separately. Furthermore, according to an embodiment, a skip mode can be applied to coding units with a 2N×N or N×2N shape.
[0248] The image decoding apparatus 100 according to an embodiment allows double 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. Alternatively, the image decoding apparatus 100 according to an embodiment allows double prediction to be performed on coding units to which the skip mode is applied, thereby improving decoding efficiency. Furthermore, while allowing double prediction to be performed on coding units having an 8×4 or 4×8 shape, the image decoding apparatus 100 according to an embodiment can set the number of interpolation taps to a relatively small value during motion compensation, 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.
[0249] Furthermore, the image decoding device 100 according to the embodiment can transmit intra-frame prediction information or inter-frame prediction information about each region included in the current coding unit by dividing the region into a preset shape (e.g., based on diagonal division).
[0250] The image decoding apparatus 100 according to an embodiment can obtain the predicted sample of the current coding unit using an intra-frame mode by using neighboring samples of the current coding unit. In this case, intra-frame prediction is performed by using pre-reconstructed neighboring samples, and these samples are referred to as reference samples.
[0251] 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, meaning a total of 2(w+h)+1 reference samples are needed. To prepare the reference samples, padding can be performed on areas where no reference samples are available, and reference sample filtering can be performed for each prediction mode to reduce quantization errors included in the reconstructed reference samples.
[0252] 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 same number of reference samples is applied even when the current coding unit is rectangular.
[0253] The various embodiments described above describe operations related to an 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.
[0254] Figure 2 This is a block diagram of an image encoding device 200 according to an embodiment for encoding an image based on at least one of block shape information and segmentation shape information.
[0255] 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 skip flag, prediction mode, motion vector difference, motion vector prediction method (or index), transform quantization coefficient, coding block mode, coding block flag, intra-prediction mode, orientation flag, merging flag, differential QP (deltaQP), reference index, prediction orientation, and transform index. Encoder 220 may determine a context model based on block shape information including at least one of the dimensions or proportions, orientation, width, and height of the coding unit.
[0256] Bitstream generator 210 can generate a bitstream based on an encoded input image. For example, bitstream generator 210 can generate a bitstream by entropy encoding of syntax elements based on a context model. Furthermore, image encoding device 200 can send the bitstream to image decoding device 100.
[0257] 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.
[0258] According to an embodiment, encoder 220 can determine the shape into which the encoding unit will be divided. Encoder 220 can determine the shape of at least one encoding unit included in the encoding unit, and bitstream generator 210 can generate a bitstream including division shape information, wherein the division shape information includes information about the shape of the encoding unit.
[0259] According to an embodiment, encoder 220 can determine whether a coding unit is divided or not. When the encoder determines that only one coding unit is included in the 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.
[0260] 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 that the coding units are divided in at least one of the vertical and horizontal directions, or that the coding units are not divided.
[0261] Image encoding device 200 determines information about the partition shape pattern 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 proportions or dimensions, orientation, width, and height of the shape of the coding unit. Image encoding device 200 generates information as a bitstream about the partition shape pattern used to partition the coding unit based on the context model.
[0262] To determine the context model, the image encoding device 200 may obtain an arrangement for mapping at least one of the proportions or dimensions, orientation, width, and height of the shapes of the encoding units to an index for the context model. The image encoding device 200 may obtain an index for the context model based on at least one of the proportions or dimensions, orientation, width, and height of the shapes of the encoding units in the arrangement. The image encoding device 200 may determine the context model based on the index for the context model.
[0263] To determine the context model, the image coding device 200 may further determine the context model based on block shape information, wherein the block shape information includes at least one of the proportions or dimensions, orientation, width, and height of the shapes 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.
[0264] Furthermore, to determine the context model, the image coding device 200 can compare the width of the upper neighboring coding unit with the width of the coding unit. Additionally, the image coding device 200 can compare the height of the left and right neighboring coding units with the height of the coding unit. Furthermore, the image coding device 200 can determine the context model based on the comparison results.
[0265] Operation and reference of image encoding device 200 Figures 13 to 34 The operation of the image decoding device 100 described is similar, and therefore its detailed explanation is not provided here.
[0266] In the following text, refer to Figures 25 to 36 The invention describes apparatuses and methods for decoding motion vectors according to embodiments, as well as apparatuses and methods for encoding motion vectors.
[0267] Figure 25This is a block diagram illustrating the configuration of a motion vector decoding device 2500 according to an embodiment.
[0268] Reference Figure 25 The motion vector decoding device 2500 according to the embodiment may include a bitstream acquirer 2510, a default motion vector determiner 2530, and a prediction decoder 2550.
[0269] Motion vector decoding device 2500 may be included in the image decoding device 100 described above. For example, bitstream acquirer 2510 may be included. Figure 1 The image decoding device 100 shown is included in the bitstream acquirer 110, and the default motion vector determiner 2530 and the prediction decoder 2550 may be included in the decoder 120 of the image decoding device 100.
[0270] In image encoding and decoding, inter-frame prediction 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 decoded earlier than the current image, and uses motion vectors to represent the distance between the coordinates of the current block and the coordinates of the reference block. Furthermore, the difference in pixel values between the current block and the reference block can be represented as residual data. Therefore, the information output by inter-frame prediction of the current block is not image information of the current block, but can be an index, motion vector, and residual data indicating the reference block, thereby improving encoding and decoding efficiency.
[0271] The motion vector decoding device 2500 can determine the motion vectors used to reconstruct the current block encoded by using inter-frame prediction.
[0272] The block type can be square or rectangular, or any geometric shape. According to the embodiments, the block is not limited to data units of a specific size, and may include the maximum coding unit, coding unit, prediction unit, and transform unit in a tree-structured coding unit.
[0273] Bitstream acquirer 2510 can acquire a bitstream including information for decoding the image. Depending on the prediction mode of the current block, the bitstream may include information about at least one of the following: residual motion vector, predicted motion vector, whether a default motion vector (MV) is determined, prediction direction (unidirectional or bidirectional prediction), reference image index, and motion vector resolution.
[0274] The default motion vector determiner 2530 determines the default motion vector (hereinafter referred to as the default MV) for the current block.
[0275] A default MV can be used to determine the predicted motion vector of the current block. For example, in a method of determining the PMV of the current block by using the MV of at least one candidate block of predicted motion vectors (PMVs), the PMV of the current block can be determined by using the default MV when there are PMV candidate blocks among the at least one candidate block that do not have the availability of MVs.
[0276] In other words, the default MV can be an alternate MV of the MV of the candidate PMV block used to determine the PMV of the current block.
[0277] The default motion vector determiner 2530 can determine one or more default MVs based on the MVs of multiple default MV candidate blocks associated with the current block.
[0278] The positions or number of multiple default MV candidate blocks can be pre-determined in the default motion vector determiner 2530. The multiple default MV candidate blocks may include previously decoded spatial blocks and / or previously decoded temporal blocks associated with the current block. The spatial blocks may include at least one block spatially adjacent to the current block. The temporal blocks may include a block in a reference image located at the same position as the current block, and at least one block spatially adjacent to the block located at the same position, wherein the reference image has a POC different from that of the current block.
[0279] Figure 29 This shows the spatial and temporal blocks associated with the current block 2900. (See reference...) Figure 29 Spatially associated with the current block 2900, the spatial blocks may include the upper left block a, upper right block b, upper left block c, upper right block d, upper left outer block e, upper right outer block f, lower left outer block g, lower right outer block h, lower left block i, lower right block j, lower left block k, lower right block l, left block m, right block n, upper block o, and lower block p. Furthermore, temporally associated with the current block 2900, the temporal blocks may include the block q at the same position included in the reference frame and the neighboring block r adjacent to the block q at the same position, wherein the reference frame has a POC different from that of the current block 2900. Figure 29 The spatial and temporal blocks associated with the current block 2900 shown are examples, and multiple default MV candidate blocks may be included. Figure 29 At least some of the blocks shown.
[0280] The default motion vector determiner 2530 can determine the default MV of the current block by using at least some of the MVs of multiple default MV candidate blocks.
[0281] Figure 30 This shows the default MV candidate block used to determine the default MV.
[0282] Reference Figure 30 The default MV candidate blocks may include left block C0, upper left block C1, upper left block C2, upper right block C3, upper left outer block C4, and lower left outer block C5 relative to the current block 2900. However, the number or position of the default MV candidate blocks shown is an example and may be modified in various ways to the extent that it is obvious to those skilled in the art.
[0283] According to an embodiment, the default motion vector determiner 2530 can set a priority order for default MV candidate blocks, and can determine whether an MV exists for each default MV candidate block according to the priority order. The default motion vector determiner 2530 can determine the MV of the default MV candidate block as the default MV according to the order in which MVs are identified. The priority order can be predetermined in the default motion vector determiner 2530, or the default motion vector determiner 2530 can determine the priority order in a specific manner.
[0284] The default motion vector determiner 2530 can determine whether each default MV candidate block has an MV according to priority order, and can determine the MV of the default MV candidate block whose MV availability is first identified as the default MV.
[0285] Furthermore, the default motion vector determiner 2530 can determine whether an MV exists for each default MV candidate block according to priority order, and can determine the MVs of multiple default MV candidate blocks as multiple default MVs according to the order in which MVs are identified for the default MV candidate blocks.
[0286] For example, it can be assumed that the priority order is set according to the order of blocks C0 to C5, and that MVs exist in blocks C1, C2, and C4. When the default motion vector determiner 2530 determines a default MV, it can determine the MV of block C1, which has the highest priority order, as the default MV. Furthermore, when the default motion vector determiner 2530 determines two default MVs, it can determine the MV of block C1, which has the highest priority order, and the MV of block C2, which has the second highest priority order, as the two default MVs.
[0287] The default motion vector determiner 2530 can change the priority order set for multiple default MV candidate blocks by comparing the reference image index of the current block with the reference image indices of multiple default MV candidate blocks. For example, the default motion vector determiner 2530 can increase the priority order of default MV candidate blocks that have the same reference image index as the current block. When multiple default MV candidate blocks with the same reference image index as the current block exist, the order among these multiple default MV candidate blocks can follow a predetermined priority order.
[0288] For example, when the priority order is set according to blocks C0 to C5, and only the reference image index of block C5 is the same as the reference image index of the current block, the priority order of block C5 can be changed to first. Therefore, the priority order can be changed to the order of blocks C5, C0, C1, C2, C3, and C4. Furthermore, for example, when the priority order is set according to blocks C0 to C5, and the reference image indexes of block C4 and C5 are the same as the reference image index of the current block, the priority order of blocks C4 and C5 can be increased. Additionally, the priority order can be changed according to the order of blocks C4, C5, C0, C1, C2, and C3, such that the priority order of block C4 is higher than the priority order of block C5 according to the original priority order.
[0289] According to an embodiment, the default motion vector determiner 2530 can determine whether the reference image index of each default MV candidate block is the same as the reference image index of the current block according to a priority order, and can determine the MV of at least one default MV candidate block as at least one default MV according to the order in which the reference image index is determined to be the same as the reference image index of the current block. When there is no default MV candidate block with the same reference image index as the current block, the default motion vector determiner 2530 can determine whether each default MV candidate block has an MV according to a priority order, and can determine the MV of at least one default MV candidate block as at least one default MV according to the order in which the MV is identified.
[0290] According to an embodiment, the default motion vector determiner 2530 can determine the MV of one or more default MV candidate blocks that have the same reference image index as the current block as one or more default MVs, regardless of whether a priority order is set.
[0291] Furthermore, according to an embodiment, the default motion vector determiner 2530 can select a predetermined number of default MV candidate blocks based on the size of the MV of the default MV candidate blocks, and can determine each MV of the selected default MV candidate blocks as the default MV. For example, the default motion vector determiner 2530 can select a predetermined number of default MV candidate blocks based on the order of default MV candidate blocks having larger MVs, and can determine each MV of the selected default MV candidate blocks as the default MV. Additionally, for example, the default motion vector determiner 2530 can select a predetermined number of default MV candidate blocks based on the order of default MV candidate blocks having smaller MVs, and can determine each MV of the selected default MV candidate blocks as the default MV.
[0292] According to an embodiment, the default motion vector determiner 2530 can determine the default MV as a value obtained by combining the MVs of multiple default MV candidate blocks (e.g., the average or median of the MVs). See also... Figure 30 When MV exists in all blocks C0 to C5, the average or median of the MV can be determined as the default MV. When MV exists only in blocks C0, C1, and C2, the average or median of the MV in blocks C0, C1, and C2 can be determined as the default MV.
[0293] Furthermore, according to an embodiment, the default motion vector determiner 2530 can determine the default MV corresponding to the specific direction from default MV candidate blocks based on the current block's location in a specific direction. For example, when the default motion vector determiner 2530 is determining the default MV corresponding to the left direction, the default motion vector determiner 2530 can determine the default MV based on the MV of the default MV candidate blocks based on the current block's location in the left direction. Furthermore, for example, when the default motion vector determiner 2530 is determining the default MV corresponding to the upward direction, the default motion vector determiner 2530 can determine the default MV based on the MV of the default MV candidate blocks based on the current block's location in the upward direction.
[0294] Reference Figure 30 The default MV candidate blocks corresponding to the left direction may include blocks C0, C1, C4, and C5, and the default motion vector determiner 2530 can determine the default MV corresponding to the left direction by using the MV of at least one of blocks C0, C1, C4, and C5. The default motion vector determiner 2530 can determine whether there is an MV in blocks C0, C1, C4, and C5 according to priority order, and can determine the MV of the block where the MV is first identified as having an MV as the default MV corresponding to the left direction.
[0295] Furthermore, the default MV candidate blocks corresponding to the upward direction may include blocks C2, C3, and C4, and the default motion vector determiner 2530 can determine the default MV corresponding to the upward direction by using the MV of at least one of blocks C2, C3, and C4. The default motion vector determiner 2530 can determine whether there is an MV in blocks C2, C3, and C4 according to priority order, and can determine the MV of the block where the MV is first identified as having an MV as the default MV corresponding to the upward direction.
[0296] As described below, a default MV corresponding to a specific direction can be assigned to a PMV block that is not available. Here, the type of the assigned default MV can vary depending on the direction in which the PMV candidate block is located.
[0297] According to an embodiment, the default motion vector determiner 2530 can determine the MV of a default MV candidate block from at least one default MV candidate block as the default MV of the current block, wherein the default MV candidate block is located in the position where it is most frequently selected for PMV in a previously decoded frame, a previously decoded strip, or a previously decoded maximum coding unit. For example, when in a previously decoded frame from Figure 30 When the left block C0 is the most frequently selected block for PMV among the left block C0, upper left block C1, upper left block C2, upper right block C3, upper left outer block C4, and lower left outer block C5 shown, the default motion vector determiner 2530 can determine the default MV by using the MV of block C0. When multiple default MVs are to be determined, the default motion vector determiner 2530 can select multiple default MV candidate blocks according to the order in which the default MV candidate blocks were selected for PMV in previously decoded frames, stripes, or maximum coding units, and can determine multiple default MVs by using the MV of the selected default MV candidate blocks.
[0298] According to an embodiment, the default motion vector determiner 2530 may determine the default motion vector (MV) before determining the PMV for the current block using inter-frame predictive coding. Optionally, the default MV may be determined if necessary based on the determination of the availability of PMV candidate blocks as described below. Optionally, the default motion vector determiner 2530 may determine the default MV for the current block when the bitstream obtained by the bitstream obtainr 2510 includes information that the default MV for the current block has been determined.
[0299] According to an embodiment, when the default motion vector determiner 2530 determines the default MV by using the MV of at least one default MV candidate block selected from a plurality of default MV candidate blocks based on a specific criterion, the default motion vector determiner 2530 may determine the MV of the at least one default MV candidate block as the default MV unchanged, or may change the MV of the at least one default MV candidate block and determine the changed MV as the default MV.
[0300] According to an embodiment, when the default motion vector determiner 2530 determines the default MV by using the MV of at least one default MV candidate block selected from a plurality of default MV candidate blocks based on a specific criterion, the default motion vector determiner 2530 can scale the MV of the at least one default MV candidate block by taking into account the reference image index of the current block, and determine the scaled MV as the default MV.
[0301] According to an embodiment, the default motion vector determiner 2530 can determine the default MV of the current block by using the MV derived via decoder-side MV derivation (DMVD). DMVD may include, for example, a template matching method or a bilateral matching method.
[0302] The predictive decoder 2550 can determine the PMV of the current block by using the MV of at least one PMV candidate block.
[0303] According to an embodiment, the PMV of the current block may include previously decoded spatial blocks and / or previously decoded temporal blocks associated with the current block. (This can be found from...) Figure 29 At least one PMV candidate block is selected from the blocks spatially associated with the current block and the blocks temporally associated with the current block, as shown.
[0304] The position and number of at least one PMV candidate block used to determine the PMV of the current block may be the same as the position and number of the default MV candidate block used to determine the default MV as described above. According to an embodiment, the at least one PMV candidate block and the at least one default MV candidate block may differ from each other in at least one aspect of their position and number.
[0305] The number and location of PMV candidate blocks can be predetermined in the prediction decoder 2550, or can be determined by the prediction decoder 2550 for picture units, strip units, or block units based on predetermined criteria. According to an embodiment, the number and location of PMV candidate blocks can be determined based on information included in the bitstream (e.g., information about the MV resolution of the current block as described below).
[0306] The predictive decoder 2550 can determine the availability of the MV of at least one PMV candidate block, and when there is a PMV candidate block that is determined to be unavailable, the predictive decoder 2550 can determine the PMV of the current block by using the default MV.
[0307] According to an embodiment, the availability of a MV in a PMV candidate block can be determined based on at least one of the following: whether an MV exists in the PMV candidate block and whether the MV is the same as the MV of another PMV candidate block that was previously determined to be available.
[0308] When any block is intra-predicted, it can be determined that there is no MV in that block. Furthermore, when determining availability, the case where any MV is the same as another MV can include cases where both the MV and the reference image index are the same.
[0309] For example, a PMV candidate block can be determined to be unavailable if no MV exists in any of its candidate blocks. Furthermore, for example, a PMV candidate block can be determined to be unavailable if the MV of any given PMV candidate block is the same as the MV of another PMV candidate block previously determined to be available. Determining availability based on whether MVs are identical can indicate the type of pruning applied.
[0310] According to an embodiment, the prediction decoder 2550 can construct a prediction candidate list comprising a predetermined number of prediction candidates from the MV of each of at least one PMV candidate block based on the determination of availability. Furthermore, the prediction decoder 2550 can determine the PMV of the current block by using one or more prediction candidates included in the prediction candidate list. The prediction decoder 2550 can also determine the PMV of the current block by using one or more prediction candidates identified from information included in the bitstream from the prediction candidates included in the prediction candidate list.
[0311] For example, the prediction decoder 2550 can determine any prediction candidate as the PMV of the current block without modification, or it can modify the prediction candidate and determine the modified prediction candidate as the PMV of the current block. Furthermore, the prediction decoder 2550 can determine the PMV of the current block as the value obtained by combining multiple prediction candidates (e.g., the average or median of multiple prediction candidates).
[0312] The prediction decoder 2550 can construct a list of prediction candidates by determining the availability of the MV for each PMV candidate block.
[0313] For example, the predictive decoder 2550 can determine the availability of each PMV candidate block based on priority order. (See reference...) Figure 31When the priority order is set according to blocks A0, A1, B0, B1, B2, C3, and H, and when block A0, which has the highest priority order, contains an MV, the MV of block A0 can be included as a prediction candidate in the prediction candidate list. Next, when there is no MV in block A1, which has the second highest priority order, or even if there is an MV in block A1, but that MV is the same as the MV of block A0 already included in the prediction candidate list, block A1 can be determined as unavailable, and the availability of block B0, which has the next highest priority order, can be determined. The prediction decoder 2550 can determine the availability of each block from A0 to H according to the priority order until the prediction candidate list is constructed. After the prediction decoder 2550 constructs the prediction candidate list by determining the availability of each block from A0 to H, if the number of prediction candidates included in the prediction candidate list is less than a predetermined number, the prediction decoder 2550 can add a default MV to the prediction candidate list.
[0314] For example, when the number of prediction candidates to be included in the prediction candidate list is 3, and when a single prediction candidate is included in the prediction candidate list constructed based on availability determination, the prediction decoder 2550 may add two default MVs to the prediction candidate list. Furthermore, when two prediction candidates are included in the prediction candidate list constructed based on availability determination, the prediction decoder 2550 may add one default MV to the prediction candidate list.
[0315] The number of prediction candidates to be included in the prediction candidate list can be predetermined. According to an embodiment, the default motion vector determiner 2530 can determine a default MV corresponding to the predetermined number of prediction candidates to be included in the prediction candidate list.
[0316] According to an embodiment, the prediction decoder 2550 can determine the availability of each PMV candidate block and assign a default MV to the PMV candidate blocks determined to be unavailable. Then, the prediction decoder 2550 can construct a prediction candidate list according to the priority order of the PMV candidate blocks. For example, the prediction decoder 2550 can determine... Figure 31 The predictive decoder 2550 determines the availability of blocks A0 through H, and when block A1 is determined to be unavailable, the predictive decoder 2550 may assign a default MV to block A1. Then, the predictive decoder 2550 may include the MV of each block from A0 to H in the prediction candidate list according to priority order.
[0317] The prediction decoder 2550 can determine the PMV of the current block by using at least one prediction candidate, which includes a prediction candidate list that includes the default MV or a prediction candidate list that does not include the default MV.
[0318] In an embodiment for determining the PMV of the current block, the prediction decoder 2550 may determine the PMV of the current block based on the MV of at least one PMV candidate block in a predetermined location. The prediction decoder 2550 may determine the availability of the at least one PMV candidate block in the predetermined location and may assign a default MV to a PMV candidate block that is determined to be unavailable. Here, assigning a default MV to a PMV candidate block may mean using the default MV as the MV of the PMV candidate block.
[0319] like Figure 32 As shown, when the PMV of the current block is determined to be a value obtained by combining the MV of block D1, the MV of block D2, and the MV of block D3, and when there is no MV in block D2, the default MV can be assigned as the MV of block D2. According to an embodiment, the default motion vector determiner 2530 can determine the same number of default MVs as the number of PMV candidate blocks in the predetermined position.
[0320] Furthermore, according to an embodiment, the prediction decoder 2550 can determine the PMV of the current block by using the MV of the PMV candidate blocks in a predetermined position. In this case, when a PMV candidate block is determined to be unavailable, the prediction decoder 2550 can assign a default MV to the PMV candidate block. The prediction decoder 2550 can determine the default MV assigned to the PMV candidate block as the PMV of the current block unchanged, or it can change the default MV and determine the changed default MV as the PMV of the current block.
[0321] According to an embodiment, the prediction decoder 2550 may assign a default MV to an unavailable PMV candidate block in a predetermined position. When multiple unavailable PMV candidate blocks exist, the prediction decoder 2550 may assign multiple default MVs to the multiple unavailable PMV candidate blocks respectively.
[0322] For example, in Figure 32 In the method of determining the PMV of the current block using the MV of block D1, when there is no MV in block D1, the predictive decoder 2550 may assign a default MV to block D1. Furthermore, in the method of determining the PMV of the current block using the MVs of blocks D1, D2, and D3, when there are no MVs in blocks D1 and D2, the predictive decoder 2550 may assign default MVs to blocks D1 and D2 respectively.
[0323] When a default motion vector (MV) is assigned to a PMV candidate block that is not available, the location of the PMV candidate block can be considered. As described above, the default motion vector determiner 2530 can determine the default MV corresponding to the specific direction from the default MV candidate blocks based on the current block's location in a specific direction. The prediction decoder 2550 can assign the corresponding default MV to a PMV candidate block by considering the unavailable PMV candidate blocks based on the direction in which the current block is located.
[0324] For example, when in Figure 32 When there is no MV in block D1, which is located to the left of the current block, the prediction decoder 2550 may assign a default MV corresponding to the left direction to block D1. Similarly, when there is no MV in block D2, which is located to the top of the current block, the prediction decoder 2550 may assign a default MV corresponding to the top direction to block D2. When there is no MV in block D3, the prediction decoder 2550 may assign a default MV corresponding to the top direction to block D3, or assign a value determined by combining at least some of the multiple default MVs to block D3.
[0325] According to an embodiment, the number and type of at least one PMV candidate block can be determined based on the motion vector resolution (hereinafter referred to as MVR) of the current block. The predictive decoder 2550 can determine the MVR of the current block directly based on predetermined conditions, or it can determine the MVR of the current block by referring to information included in the bitstream obtained by the bitstream acquirer 2510.
[0326] According to an embodiment, bitstream acquirer 2510 can obtain information about MVR for each coding unit that has undergone inter-frame prediction. Figure 36 This demonstrates the syntax for obtaining information about the MVR from the bitstream.
[0327] Reference Figure 36 When the slice including the current coding unit in phrase a is not slice I, cu_skip_flag is extracted in phrase b. cu_skip_flag indicates whether a skip mode is applied to the current coding unit. When skip mode is detected as applied in phrase c, the current coding unit is processed in skip mode. When skip mode is detected as not applied in phrase d, pred_mode_flag is extracted in 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, that is, the current coding unit is inter-predicted, pred_mvr_idx is extracted in phrase g. pred_mvr_idx is an index indicating the MVR of the current coding unit, and the MVR corresponding to each index is shown in Table 2.
[0328] [Table 2]
[0329]
[0330]
[0331] The MVR of the current block can represent the precision of the position of pixels included in the reference image (or an interpolated reference image) that can be indicated by the MV of the current block. The MVR of the current block can be selected from at least one candidate MVR. The at least one candidate MVR can include, but is not limited to, at least one of the following MVRs: 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.
[0332] The number and type of PMV candidate blocks used to determine the PMV of the current block can be predetermined based on the type of MVR of the current block. For example, when the MVR of the current block is a 1 / 4 pixel unit MVR, the PMV candidate blocks may include a left block and a top block, and when the MVR of the current block is a 1 pixel unit MVR, the PMV candidate blocks may include a bottom left block. Furthermore, when the MVR of the current block is a 2 pixel unit MVR, the PMV candidate blocks may include a right block. In this way, when the MVR of the current block is determined, the type and number of PMV candidate blocks used to determine the PMV can be automatically determined. According to an embodiment, the number of PMV candidate blocks used to determine the PMV for each MVR can be 1. However, the positions of the PMV candidate blocks may differ for each MVR.
[0333] When the MVR of the current block is determined and the PMV candidate blocks are determined according to the determined MVR, as described above, the prediction decoder 2550 can determine the availability of the MV for each of the PMV candidate blocks. Furthermore, the prediction decoder 2550 can assign the default MV to the MV of a PMV candidate block that is determined to have no availability, and can determine the PMV of the current block.
[0334] When assigning a default MV to a PMV candidate block, the predictive decoder 2550 compares the minimum MVR among the candidate MVRs available for the current block with the MVR of the current block to adjust the default MV. The default MV is determined from the MVs of the default MV candidate blocks. The MVs of the default MV candidate blocks are predicted to indicate the pixel coordinates in the image interpolated according to the minimum MVR, and therefore, the default MV can be adjusted to correspond to the MVR of the current block.
[0335] When the number of PMV candidate blocks used to determine the PMV based on the current block's MVR is 1, and the default MV is assigned to a PMV candidate block because the PMV candidate block is determined to be unavailable, the default MV may need to be adjusted. When the number of PMV candidate blocks used to determine the PMV is 1 and the PMV candidate block is available, and when the number of PMV candidate blocks used to determine the PMV is greater than 1, and one or more of the multiple PMV candidate blocks are available, the MV of the available PMV candidate block can be used to determine the PMV. Therefore, the MV of a PMV candidate block determined to be available may also need to be adjusted, just like the default MV.
[0336] Reference Figures 33 to 35 Describe in detail the process of adjusting the default MV.
[0337] When the PMV of the current block is determined, the prediction decoder 2550 can obtain the MV of the current block from the PMV. When the prediction mode of the current block is skip mode or merge mode, the prediction decoder 2550 can determine the PMV as the MV of the current block, and when the prediction mode of the current block is Advanced Motion Vector Prediction (AMVP) mode, the prediction decoder 2550 can obtain the MV of the current block by combining the residual MV and PMF.
[0338] Furthermore, the predictive decoder 2550 can amplify the residual MV obtained from the bitstream by comparing the MVR of the current block with the minimum MVR, and can obtain the MV of the current block by combining the amplified residual MV with the PMV. The amplification of the residual MV will be described below.
[0339] Figure 26 This is a flowchart illustrating a method for decoding an MV according to an embodiment.
[0340] In operation S2610, motion vector decoding device 2500 can determine the PMV of the current block.
[0341] The motion vector decoding device 2500 can determine the PMV of the current block by using at least one PMV candidate block associated with the current block.
[0342] As described above, the motion vector decoding device 2500 can determine the availability of the MV for at least one PMV candidate block. When there are PMV candidate blocks that are determined to be unavailable, the motion vector decoding device 2500 can determine the PMV of the current block by using a default MV determined from a plurality of default MV candidate blocks.
[0343] When the MVR of the current block is determined, the motion vector decoding device 2500 can determine the PMV of the current block by using the default MV adjusted according to the MVR of the current block.
[0344] In operation of S2620, motion vector decoding device 2500 can obtain MV of the current block based on PMV of the current block.
[0345] The motion vector decoding device 2500 can obtain the PMV of the current block as the MV of the current block, or it can obtain the result of combining the PMV with the residual MV as the MV of the current block. According to an embodiment, when the MVR of the current block is determined, the motion vector decoding device 2500 can selectively amplify the residual MV, and then obtain the MV of the current block by combining the selectively amplified residual MV with the PMV.
[0346] Figure 27 This is a block diagram illustrating the configuration of a motion vector encoding device 2700 according to an embodiment.
[0347] Reference Figure 27 The motion vector encoding device 2700 according to the embodiment may include a default motion vector determiner 2710, a predictive encoder 2730, and a bitstream generator 2750. The motion vector encoding device 2700 may be included in the image encoding device 200 described above. For example, the default motion vector determiner 2710 and predictive encoder 2730 of the motion vector encoding device 2700 may be included in the encoder 220 of the image encoding device 200, and the bitstream generator 2750 of the motion vector encoding device 2700 may be included in the bitstream generator 210 of the image encoding device 200.
[0348] The default motion vector determiner 2710 determines the default MV of the current block.
[0349] A default MV can be used to determine the predicted motion vector of the current block. For example, in a method of determining the PMV of the current block by using the MV of at least one PMV candidate block, when there are PMV candidate blocks among the at least one PMV candidate blocks that do not have the availability of an MV, the PMV of the current block can be determined by using the default MV.
[0350] The default motion vector determiner 2710 can determine one or more default MVs based on the MVs of multiple default MV candidate blocks associated with the current block.
[0351] The positions or number of multiple default MV candidate blocks can be pre-determined in the default motion vector determiner 2710. The multiple default MV candidate blocks may include previously encoded spatial blocks and / or previously encoded temporal blocks associated with the current block. The spatial blocks may include at least one block spatially adjacent to the current block. The temporal blocks may include a block in a reference image located at the same position as the current block, and at least one block spatially adjacent to the block located at the same position, wherein the reference image has a POC different from that of the current block.
[0352] According to an embodiment, the default motion vector determiner 2710 can set a priority order for default MV candidate blocks, and can determine whether an MV exists for each default MV candidate block according to the priority order. The default motion vector determiner 2710 can determine at least one default MV based on the MVs of at least one default MV candidate block according to the order in which MVs are identified.
[0353] The default motion vector determiner 2710 can determine whether each default MV candidate block has an MV according to priority order, and can determine the MV of the default MV candidate block whose MV availability is first identified as the default MV.
[0354] Furthermore, the default motion vector determiner 2710 can determine whether an MV exists for each default MV candidate block according to priority order, and can determine the MVs of multiple default MV candidate blocks as multiple default MVs according to the order in which MVs are identified for the default MV candidate blocks.
[0355] The default motion vector determiner 2710 can change the priority order set for the multiple default MV candidate blocks by comparing the reference image index of the current block with the reference image indices of multiple default MV candidate blocks. For example, the default motion vector determiner 2710 can increase the priority order of default MV candidate blocks that have the same reference image index as the current block. When multiple default MV candidate blocks with the same reference image index as the current block exist, the order among the multiple default MV candidate blocks can follow a predetermined priority order.
[0356] According to an embodiment, the default motion vector determiner 2710 can determine whether the reference image index of each default MV candidate block is the same as the reference image index of the current block according to a priority order, and can determine the MV of at least one default MV candidate block as at least one default MV according to the order in which the reference image indexes of the current block are determined to be the same. When there is no default MV candidate block with the same reference image index as the current block, the default motion vector determiner 2710 can determine whether each default MV candidate block has an MV according to a priority order, and can determine the MV of at least one default MV candidate block as at least one default MV according to the order in which the MVs are identified. According to an embodiment, the default motion vector determiner 2710 can determine the MVs of one or more default MV candidate blocks with the same reference image index as the current block as the default MV, regardless of whether a priority order is set.
[0357] Furthermore, according to an embodiment, the default motion vector determiner 2710 can select a predetermined number of default MV candidate blocks based on the size of the MV of the default MV candidate blocks, and can determine the MV of the selected predetermined number of default MV candidate blocks as the default MV. For example, the default motion vector determiner 2710 can select a predetermined number of default MV candidate blocks based on the order of default MV candidate blocks having larger MVs, and can determine the MV of the selected predetermined number of default MV candidate blocks as the default MV. Additionally, for example, the default motion vector determiner 2710 can select a predetermined number of default MV candidate blocks based on the order of default MV candidate blocks having smaller MVs, and can determine the MV of the selected predetermined number of default MV candidate blocks as the default MV.
[0358] According to an embodiment, the default motion vector determiner 2710 can determine the default MV as a value obtained by combining the MVs of multiple default MV candidate blocks (e.g., the average or median of the MVs).
[0359] Furthermore, according to an embodiment, the default motion vector determiner 2710 can determine the default MV corresponding to the specific direction from default MV candidate blocks based on the current block's location in that specific direction. For example, when the default motion vector determiner 2710 is determining the default MV corresponding to the left direction, the default motion vector determiner 2710 can determine the default MV based on the MV of the default MV candidate blocks based on the current block's location in the left direction. Furthermore, for example, when the default motion vector determiner 2710 is determining the default MV corresponding to the upward direction, the default motion vector determiner 2710 can determine the default MV based on the MV of the default MV candidate blocks based on the current block's location in the upward direction.
[0360] According to an embodiment, the default motion vector determiner 2710 can determine the MV of one of at least one default MV candidate blocks as the default MV, wherein the default MV candidate block is located at the position in a previously encoded frame, a previously encoded strip, or a previously encoded maximum coding unit where it is most frequently selected for the PMV. When multiple default MVs are to be determined, the default motion vector determiner 2710 can select multiple default MV candidate blocks according to the order in which the default MV candidate blocks are selected for the PMV in a previously encoded frame, strip, or maximum coding unit, and can determine multiple default MVs by using the MV of the selected default MV candidate blocks.
[0361] According to an embodiment, the default motion vector determiner 2710 may determine a default motion vector (MV) before determining the PMV for the current block. Optionally, the default MV may be determined as needed based on the determination of the availability of PMV candidate blocks as described below.
[0362] According to an embodiment, when the default motion vector determiner 2710 determines the default MV by using the MV of at least one default MV candidate block selected from a plurality of default MV candidate blocks based on a specific criterion, the default motion vector determiner 2710 may determine the MV of the at least one default MV candidate block as the default MV unchanged, or may change the MV of the at least one default MV candidate block and determine the changed MV as the default MV.
[0363] According to an embodiment, when the default motion vector determiner 2710 determines the default MV by using the MV of at least one default MV candidate block selected from a plurality of default MV candidate blocks based on a specific criterion, the default motion vector determiner 2710 can scale the MV of the at least one default MV candidate block by taking into account the reference image index of the current block, and determine the scaled MV as the default MV.
[0364] According to an embodiment, the default motion vector determiner 2710 can determine the default MV of the current block by using the MV derived via DMVD. DMVD may include, for example, a template matching method or a bilateral matching method. Typically, the encoding device includes a decoding device, and therefore, the default motion vector determiner 2710 of the motion vector encoding device 2700 can also determine the MV via DMVD.
[0365] The predictive encoder 2730 can determine the MV of the current block. According to an embodiment, the predictive encoder 2730 can interpolate a reference image used for inter-frame prediction of the current block, detect the block most similar to the current block from the reference image, and determine the distance between the coordinates of the current block and the coordinates of the reference block as the MV of the current block.
[0366] According to an embodiment, the predictive encoder 2730 can determine the MVR of the current block and determine the MV based on the determined MVR.
[0367] The predictive encoder 2730 can determine any one of at least one candidate MVRs selectable for the current block as the MVR of the current block. The predictive encoder 2730 can interpolate the reference image based on the smallest MVR among the at least one candidate MVRs selectable for the current block, and can determine the MV of the current block using that MVR. For example, when the candidate MVRs selectable for the current block include a 1 / 4 pixel unit MVR, a 1 / 2 pixel unit MVR, a 1 pixel unit MVR, and a 2 pixel unit MVR, and the 1 pixel unit MVR is selected as the MVR of the current block, the predictive encoder 2730 can interpolate the reference image using the 1 / 4 pixel unit with the smallest MVR, and can determine the MV in the interpolated reference image using the 1 pixel unit.
[0368] The predictive encoder 2730 can determine the PMV of the current block in order to encode the MV of the current block. According to an embodiment, the PMV of the current block can be determined from at least one PMV candidate block including spatial blocks and / or temporal blocks associated with the current block.
[0369] The number and position of PMV candidate blocks can be predetermined in the predictive encoder 2730, or can be determined by the predictive encoder 2730 for frame units, strip units, or block units. According to an embodiment, the number and position of PMV candidate blocks can be determined based on the MVR of the current block.
[0370] The predictive encoder 2730 can determine the availability of the MV of at least one PMV candidate block, and when there is a PMV candidate block that is determined to be unavailable, the predictive encoder 2730 can determine the PMV of the current block by using the default MV.
[0371] According to an embodiment, the availability of a MV for a PMV candidate block can be determined based on at least one of the following: whether an MV exists in the PMV candidate block and whether the MV is the same as the MV of another PMV candidate block that was previously determined to be available.
[0372] According to an embodiment, the prediction encoder 2730 can construct a prediction candidate list comprising a predetermined number of prediction candidates from the MV of each of at least one PMV candidate block based on the determination of availability. Furthermore, the prediction encoder 2730 can determine the PMV of the current block by using one or more prediction candidates included in the prediction candidate list.
[0373] For example, the predictive encoder 2730 can determine any one of the prediction candidates as the PMV of the current block without modification, or it can modify the prediction candidate and determine the modified prediction candidate as the PMV of the current block. Furthermore, the predictive encoder 2730 can determine the PMV of the current block as the value obtained by combining multiple prediction candidates (e.g., the average or median of multiple prediction candidates).
[0374] The predictive encoder 2730 can construct a list of prediction candidates by determining the availability of the MV for each PMV candidate block. For example, the predictive encoder 2730 can determine the availability of each PMV candidate block according to priority order. (See reference...) Figure 31When the priority order is set according to blocks A0, A1, B0, B1, B2, C3, and H, and when block A0, which has the highest priority order, contains an MV, the MV of block A0 can be included as a prediction candidate in the prediction candidate list. Next, when there is no MV in block A1, which has the second highest priority order, or even if there is an MV in block A1, but that MV is the same as the MV of block A0, which is already included in the prediction candidate list, block A1 can be determined as unavailable, and the availability of block B0, which has the next highest priority order, can be determined. The prediction encoder 2730 can determine the availability of each block from A0 to H according to the priority order until the prediction candidate list is constructed. After the prediction encoder 2730 constructs the prediction candidate list by determining the availability of each block from A0 to H, when the number of prediction candidates included in the prediction candidate list is less than a predetermined number, the prediction decoder 2550 can include a default MV in the prediction candidate list.
[0375] According to an embodiment, the predictive encoder 2730 can determine the availability of each of the PMV candidate blocks and assign a default MV to the PMV candidate blocks determined to be unavailable. The predictive encoder 2730 then constructs a predictive candidate list according to the priority order of the PMV candidate blocks. The number of predictive candidates to be included in the predictive candidate list can be predetermined. According to an embodiment, the default motion vector determiner 2710 can determine the number of default MVs corresponding to the predetermined number of predictive candidates to be included in the predictive candidate list.
[0376] The prediction encoder 2730 can determine the PMV of the current block by using at least one prediction candidate, which includes a prediction candidate list that includes the default MV or a prediction candidate list that does not include the default MV.
[0377] According to an embodiment, the predictive encoder 2730 can determine the PMV of the current block based on the MV of at least one PMV candidate block in a predetermined location. The predictive encoder 2730 can determine the availability of the at least one PMV candidate block in the predetermined location and can assign a default MV to the MV of a PMV candidate block determined to be unavailable. Figure 32 As shown, when the PMV of the current block is determined to be the value obtained by combining the MV of block D1, the MV of block D2 and the MV of block D3, and when there is no MV in block D2, the default MV can be assigned to the MV of block D2.
[0378] Furthermore, according to an embodiment, the predictive encoder 2730 can determine the PMV of the current block by using the MV of the PMV candidate blocks in a predetermined position. In this case, when a PMV candidate block is determined to be unavailable, the predictive encoder 2730 can assign a default MV to that PMV candidate block. The predictive encoder 2730 can determine the default MV assigned to the PMV candidate block as the PMV of the current block unchanged, or it can change the default MV and determine the changed default MV as the PMV of the current block.
[0379] According to an embodiment, the predictive encoder 2730 may assign default MVs to unavailable PMV candidate blocks in a predetermined position, and when multiple unavailable PMV candidate blocks exist, the predictive decoder 2550 may assign multiple default MVs to the multiple unavailable PMV candidate blocks respectively. According to an embodiment, the default motion vector determiner 2530 may determine the same number of default MVs as the PMV candidate blocks in the predetermined position.
[0380] When a default MV is assigned to a PMV candidate block that is not available, the location of the PMV candidate block can be considered. As described above, the default motion vector determiner 2710 can determine the default MV corresponding to the specific direction from the default MV candidate blocks based on the current block's location in a specific direction. The predictive encoder 2730 can assign the corresponding default MV to a PMV candidate block by considering PMV candidate blocks that do not have MVs based on the direction in which the current block is located.
[0381] When the MV and PMV of the current block are determined, the predictive encoder 2730 can obtain the residual MV as the difference between the MV and PMV of the current block based on the prediction mode of the current block.
[0382] When the prediction mode of the current block is skip mode or merge mode, the prediction encoder 2730 can omit the operation of obtaining the residual MV, and when the prediction mode of the current block is AMVP mode, the prediction encoder 2730 can obtain the residual MV.
[0383] According to an embodiment, the predictive encoder 2730 can generate information about the PMV of the current block. For example, when determining the PMV of the current block from a predetermined number of predictive candidates, the predictive encoder 2730 can generate information indicating which of the predetermined number of predictive candidates is used as the PMV of the current block.
[0384] When the PMV of the current block is determined from the MV of the PMV candidate blocks at a predetermined position, the predictive encoder 2730 can omit the operation of generating information about the PMV. This is because the motion vector decoding device 2500 can also determine the PMV by using the same PMV candidate blocks at the predetermined position in order to determine the MV of the current block.
[0385] According to an embodiment, the predictive encoder 2730 can generate information indicating that a default motion vector (MV) has been determined in order to determine the PMV of the current block. For example, a flag 1 can be generated when the default motion vector determiner 2710 determines the default MV, and a flag 0 can be generated when the operation of determining the default MV is omitted.
[0386] According to an embodiment, the predictive encoder 2730 can generate information indicating the MVR of the current block.
[0387] Bitstream generator 2750 can generate a bitstream that includes at least one of the following information generated by predictive encoder 2730: information corresponding to the residual MV, information about the PMV, information about whether the default MV is determined, information about the MVR of the current block, information about the prediction direction (one-way or two-way), and information about the reference image index.
[0388] Figure 28 This is a flowchart illustrating a method for encoding MV according to an embodiment.
[0389] During operation S2810, the motion vector encoding device 2700 can determine the MV of the current block. The motion vector encoding device 2700 can find the reference block in the reference image that is most similar to the current block, and can determine the MV indicating the distance between the coordinates of the reference block and the coordinates of the current block.
[0390] According to an embodiment, when the MVR of the current block is determined, the motion vector encoding device 2700 can determine the MV based on the MVR of the current block in the image based on the minimum MVR interpolation.
[0391] In operation S2820, motion vector encoding device 2700 can determine the PMV of the current block.
[0392] The motion vector encoding device 2700 can determine the PMV of the current block by using the MV of at least one PMV candidate block.
[0393] As described above, the motion vector encoding device 2700 can determine the availability of the MV for at least one PMV candidate block. When there are PMV candidate blocks that are determined to be unavailable, the motion vector encoding device 2700 can determine the PMV of the current block by using a default MV determined from a plurality of default MV candidate blocks.
[0394] When the MVR of the current block is determined, the motion vector encoding device 2700 can determine the PMV of the current block by using the default MV adjusted according to the MVR of the current block.
[0395] In the following text, reference will be made to Figures 33 to 35 Describes the process of adjusting the default MV when the MVR of the current block is determined.
[0396] As described above, when any one of the at least one candidate MVRs available for the current block is selected as the MVR for the current block, the default MV may need to be adjusted according to the resolution of the current block when the default MV is used to determine the PMV of the current block.
[0397] Figure 33 This shows the position of the pixel indicated by the MV based on the MVR of 1 / 4 pixel unit, 1 / 2 pixel unit, 1 pixel unit, and 2 pixel unit when the smallest MVR selectable for the current block is an MVR of 1 / 4 pixel unit, an MVR of 1 / 2 pixel unit, an MVR of 1 pixel unit, and an MVR of 2 pixel unit.
[0398] Figure 33 (a), (b), (c) and (d) show the coordinates of the pixel indicated by the MV of the coordinate (0,0) based on the MVR of 1 / 4 pixel unit, 1 / 2 pixel unit, 1 pixel unit and 2 pixel unit, respectively (marked by black squares).
[0399] When the smallest MVR is a 1 / 4 pixel unit MVR, the coordinates of the pixel indicated by the MV of the 1 / 4 pixel unit MVR become (a / 4, b / 4) (a and b are integers), the coordinates of the pixel indicated by the MV of the 1 / 2 pixel unit MVR become (2c / 4, 2d / 4) (c and d are integers), the coordinates of the pixel indicated by the MV of the 1 pixel unit MVR become (4e / 4, 4f / 4) (e and f are integers), and the coordinates of the pixel indicated by the MV of the 2 pixel unit MVR become (8g / 4, 8h / 4) (g and h are integers). That is, when the smallest 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 coordinates of the pixel indicated by the MV of the MVR in pixel units become (2 n-m *i / 2 -m ,2 n-m *j / 2 -m (i and j are integers). Although MV is determined based on a specific MVR, MV is represented by coordinates in the image interpolated according to 1 / 4 pixel units corresponding to the minimum MVR.
[0400] In an embodiment, because the motion vector encoding device 2700 determines the MV in the image based on the minimum MVR interpolation, in order to represent the MV using an integer, it can be done by multiplying the MV by the reciprocal of the pixel unit value of the minimum MVR (e.g., in an image where the minimum MVR has 2). m (m is an integer) 2 in pixel units -mThe integer unit MV is represented by ). Multiplication by 2 can be used in the motion vector encoding device 2700 and the motion vector decoding device 2500. -m MV in integer units.
[0401] When the MV of the MVR starting from coordinates (0,0) is at coordinates (2 / 4,6 / 4) and the minimum MVR has 1 / 4 pixel units, the motion vector encoding device 2700 can determine (2,6) as the MV by multiplying the MV by the integer 4.
[0402] Figure 34 This is a diagram used to describe the method of adjusting the default MV.
[0403] When the MVR of the current block is greater than the minimum MVR among the selectable candidate MVRs, the motion vector encoding device 2700 and the motion vector decoding device 2500 can be adjusted to be used as the default MV for the PMV of the current block. The MVR of the current block being greater than the minimum MVR can mean that the pixel unit of the MVR of the current block 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 can be greater than an MVR of 1 / 4 pixel unit.
[0404] In order to adjust the default MV, which is represented by coordinates in the image interpolated according to the minimum MVR, to the MVR of the current block, the motion vector encoding device 2700 and the motion vector decoding device 2500 may adjust the default MV to indicate the neighboring pixels, rather than the pixels indicated by the default MV.
[0405] For example, in Figure 34 In order to adjust the default MV A of pixel 3410, which indicates coordinates (19,27) based on coordinates (0,0), to an MVR of 1 pixel unit as the MVR of the current block, the coordinates (19,27) of pixel 3410 indicated by the default MV A can be divided by an integer 4 (i.e., it can be reduced), and the coordinates (19 / 4,27 / 4) obtained as the result of the division can not indicate an integer pixel unit.
[0406] The motion vector encoding device 2700 and the motion vector decoding device 2500 can adjust the scaled-down default MV 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, after the motion vector encoding device 2700 and the motion vector decoding device 2500 adjust the scaled-down default MV A to indicate the coordinates (20 / 4, 28 / 4) located in the upper right corner instead of the coordinates (19 / 4, 27 / 4), and multiply by an integer of 4 (i.e., magnify), the final adjusted default MV D indicates pixel 3440 corresponding to coordinates (20, 28).
[0407] According to an embodiment, the motion vector encoding device 2700 and the motion vector decoding device 2500 can adjust the scaled-down default MV to indicate coordinates located in the lower left, upper left, or lower right.
[0408] According to an embodiment, when either the x-coordinate value or the y-coordinate value indicated by the reduced default MV indicates an integer pixel, the motion vector encoding device 2700 and the motion vector decoding device 2500 may only increase or only decrease the coordinate values that do not indicate integer pixels to indicate integer pixels. That is, when the x-coordinate value indicated by the reduced default MV indicates an integer pixel, the motion vector encoding device 2700 and the motion vector decoding device 2500 may position the adjusted default MV indication above or below the pixel indicated by the original default MV by an integer pixel. Optionally, when the y-coordinate value indicated by the reduced default MV indicates an integer pixel, the motion vector encoding device 2700 and the motion vector decoding device 2500 may position the adjusted default MV indication to the left or right of the pixel indicated by the original default MV by an integer pixel.
[0409] When the default MV is adjusted, the motion vector encoding device 2700 and the motion vector decoding device 2500 can select the point indicated by the adjusted default MV according to the MVR of the current block.
[0410] For example, refer to Figure 35When the MVR of the current block is a 1 / 2 pixel unit MVR, the motion vector encoding device 2700 and the motion vector decoding device 2500 can place the adjusted default MV indicator at the pixel 3530, which is above and to the left of the pixel indicated by the previous default MV; when the MVR of the current block is a 1 pixel unit MVR, the motion vector encoding device 2700 and the motion vector decoding device 2500 can place the adjusted default MV indicator at the pixel 3520, which is above and to the right of the pixel indicated by the previous default MV; and when the MVR of the current block is a 2 pixel unit MVR, the motion vector encoding device 2700 and the motion vector decoding device 2500 can place the adjusted default MV indicator at the pixel 3540, which is below and to the right of the pixel indicated by the previous default MV.
[0411] When adjusting the default MV by taking into account the MVR and minimum MVR of the current block, the motion vector encoding device 2700 and the motion vector decoding device 2500 can adjust the default MV according to Equation 1 below.
[0412] [Equation 1]
[0413] Default MV' = ((default MV >> k) + offset) <k
[0414] In Equation 1, default MV' represents the adjusted default MV, and k is a value determined based on the difference between the current block's MVR and the minimum MVR, where the MVR of the current block is 2. m The minimum MVR is 2 pixels (m is an integer). n The pixel unit (n is an integer), and when m>n, k can be mn.
[0415] According to an embodiment, k can be an index of the MVR, and when the candidate MVRs include MVRs of 1 / 4 pixel units, 1 / 2 pixel units, 1 pixel unit, 2 pixel unit, and 4 pixel unit, the MVRs corresponding to the index are shown in Table 2. When the MVR index is received from the bitstream, the motion vector decoding device 2500 can adjust the default MV according to Equation 1 by using the MVR index as k.
[0416] Furthermore, in Equation 1, the >> or << operations, used as bit shifting operations, refer to decreasing or increasing the size of the default MV. Additionally, the offset represents the value added or subtracted to indicate integer pixels when the default MV, scaled down according to the k value, does not indicate integer pixels. The offset can be determined differently based on each of the x-coordinate and y-coordinate values of the default MV.
[0417] According to an embodiment, when the reduced default MV is changed to indicate integer pixels, the motion vector encoding device 2700 and the motion vector decoding device 2500 can change the reduced default MV according to the same standard.
[0418] According to an embodiment, when the x-coordinate and y-coordinate values of the scaled-down default MV do not indicate integer pixels, the motion vector encoding device 2700 and the motion vector decoding device 2500 may always increase or decrease the x-coordinate and y-coordinate values of the scaled-down default MV to indicate integer pixels. Optionally, the motion vector encoding device 2700 and the motion vector decoding device 2500 may round the x-coordinate and y-coordinate values of the scaled-down default MV to indicate integer pixels.
[0419] According to an embodiment, when the default MV is adjusted, the motion vector encoding device 2700 and the motion vector decoding device 2500 may omit the scaling down and scaling up of the default MV, and the default MV may be adjusted in the coordinate plane of the reference image based on the minimum MVR interpolation to indicate the pixel unit corresponding to the MVR of the current block.
[0420] Furthermore, according to the embodiment, when adjusting the default MV by taking into account the MVR and minimum MVR of the current block, the motion vector encoding device 2700 and the motion vector decoding device 2500 may adjust the default MV according to Equation 2 below instead of Equation 1.
[0421] [Equation 2]
[0422] Default MV' = ((default MV + offset) >> k) <k
[0423] Although Equation 2 is similar to Equation 1, unlike the equation where the offset is applied to the reduced default MV, the offset is applied to the original default MV and then reduced according to k.
[0424] The motion vector encoding device 2700 uses the MVR of the current block to find the MV of the current block and obtains the difference between the MV and PMV of the current block as the residual MV.
[0425] As shown in Equation 3 below, the motion vector encoding device 2700 can determine and encode the residual MV. In Equation 3, MV represents the motion vector of the current block, PMV represents the predicted motion vector of the current block, and MVD represents the residual MV. PMV can represent the PMV determined based on the adjusted default MV and / or the adjusted MV of the PMV candidate blocks.
[0426] [Equation 3]
[0427] MVD = MV – PMV
[0428] When the MVR of the current block is higher than the minimum MVR, as shown in Equation 4, the motion vector coding device 2700 can reduce the residual MV and generate a bitstream that includes information indicating the reduced residual MV.
[0429] [Equation 4]
[0430] MVD' = (MVD >> k)
[0431] In Equation 4, MVD' represents the reduced residual MV, and k, which is determined by the difference between the minimum MVR and the current block's MVR, is the same as k in Equation 1.
[0432] According to an embodiment, the motion vector encoding device 2700 can reduce the MV and PMV of the current block according to the k value, and then encode the difference between the two values that are the residual MV.
[0433] According to an embodiment, the motion vector encoding device 2700 can calculate the reduced residual MV according to Equation 5 below instead of Equations 3 and 4.
[0434] [Equation 5]
[0435] MVD' = (MV - PMV) / (R * S)
[0436] In Equation 5, MVD' represents the reduced residual MV, MV represents the MV of the current block, and PMV represents the predicted motion vector of the current block. Furthermore, R represents the pixel unit value of the MVR of the current block (e.g., 1 / 4 when the MVR of the current block is 1 / 4 pixel unit). Additionally, S represents the reciprocal of the pixel unit value of the minimum MVR (e.g., 4 when the minimum MVR is 1 / 4 pixel unit).
[0437] The motion vector decoding device 2500 can reconstruct the MV of the current block using the PMV and residual MV of the current block.
[0438] When the MVR of the current block is higher than the minimum MVR, as shown in Equation 6 below, the motion vector decoding device 2500 can amplify the residual motion data.
[0439] [Equation 6]
[0440] MVD”=(MVD'< <k)
[0441] In Equation 6, MVD' represents the residual MV reduced by the encoding device, and MVD" represents the amplified residual MV. 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.
[0442] The motion vector decoding device 2500 can decode the MV of the current block by adding the residual MV, which is selectively amplified based on the difference between the minimum MVR and the MVR of the current block, to the PMV.
[0443] According to an embodiment, the motion vector decoding device 2500 can determine the amplified residual MV according to Equation 7 below instead of Equation 6 above.
[0444] [Equation 7]
[0445] MVD” = MVD' * (R * S)
[0446] In Equation 7, MVD' represents the reduced residual MV, and R represents the pixel unit value of the MVR of the current block (e.g., 1 / 4 when the MVR of the current block is 1 / 4 pixel unit). Furthermore, S represents the reciprocal of the pixel unit value of the minimum MVR (e.g., 4 when the minimum MVR is 1 / 4 pixel unit).
[0447] According to an embodiment, when the MVR of the current block is less than the MVR of 1 pixel, the motion vector decoding device 2500 can interpolate the reference image based on the minimum MVR, and then search for a prediction block of the current block based on the MV of the current block. Furthermore, when the MVR of the current block is equal to or greater than the MVR of 1 pixel, the motion vector decoding device 2500 can search for a prediction block of the current block based on the MV of the current block without interpolating the reference image. The motion vector decoding device 2500 can reconstruct the current block by adding the prediction block to the residual data after inverse transformation and inverse quantization.
[0448] The embodiment may be implemented as a computer executable program, and the program may be stored in a medium.
[0449] The medium may sustainably 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 means, including 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), and magneto-optical media (such as floppy disks, ROMs, 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 websites or servers that provide or distribute various other software.
[0450] 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 in this disclosure without departing from the spirit and scope of this disclosure as defined by the appended claims.
Claims
1. A method for decoding motion vectors, the method comprising: Obtain information from the bitstream indicating the specific motion vector resolution of the current block among multiple motion vector resolutions including the first motion vector resolution; When the motion vector of the first candidate block corresponding to the first motion vector resolution indicated by the information is available, the motion vector of the first candidate block is determined as the predicted motion vector of the current block, wherein the position of the first candidate block is determined based on the information; When the motion vector of the first candidate block is unavailable, a default motion vector is determined from the default motion vector candidates according to priority, and the default motion vector is determined as the predicted motion vector of the current block; The predicted motion vector is adjusted by applying a shift operation based on the information to the predicted motion vector; and The motion vector of the current block is obtained by using the residual motion vector of the current block and the adjusted predicted motion vector. The default motion vector is determined by identifying whether one of the default motion vector candidates is available based on the priority.
2. A method for encoding motion vectors, the method comprising: Select a specific motion vector resolution for the current block from among multiple motion vector resolutions, including the first motion vector resolution; When the motion vector of the first candidate block corresponding to the first motion vector resolution selected as the specific motion vector resolution of the current block is available, the motion vector of the first candidate block is determined as the predicted motion vector of the current block; When the motion vector of the first candidate block is unavailable, a default motion vector is determined from the default motion vector candidates according to priority, and the default motion vector is determined as the predicted motion vector of the current block; The predicted motion vector is adjusted by applying a shift operation based on information indicating the resolution of a specific motion vector of the current block to the predicted motion vector; as well as The residual motion vector is obtained using the motion vector of the current block and the adjusted predicted motion vector of the current block. The location of the first candidate block is determined based on the information, and The default motion vector is determined by identifying whether one of the default motion vector candidates is available based on the priority.
3. An apparatus for decoding motion vectors, the apparatus comprising: The acquirer is configured to acquire information from the bitstream indicating a specific motion vector resolution of the current block among a plurality of motion vector resolutions including a first motion vector resolution; as well as The decoder is configured as follows: When the motion vector of the first candidate block corresponding to the first motion vector resolution indicated by the information is available, the motion vector of the first candidate block is determined as the predicted motion vector of the current block, wherein the position of the first candidate block is determined based on the information; When the motion vector of the first candidate block is unavailable, a default motion vector is determined from the default motion vector candidates according to priority, and the default motion vector is determined as the predicted motion vector of the current block; The predicted motion vector is adjusted by applying a shift operation based on the information to the predicted motion vector; and The motion vector of the current block is obtained by using the residual motion vector of the current block and the adjusted predicted motion vector. The default motion vector is determined by identifying whether one of the default motion vector candidates is available based on the priority.
4. An apparatus for encoding motion vectors, the apparatus comprising: The encoder is configured as follows: Select a specific motion vector resolution for the current block from among multiple motion vector resolutions, including the first motion vector resolution; When the motion vector of the first candidate block corresponding to the first motion vector resolution selected as the specific motion vector resolution of the current block is available, the motion vector of the first candidate block is determined as the predicted motion vector of the current block; When the motion vector of the first candidate block is unavailable, a default motion vector is determined from the default motion vector candidates according to priority, and the default motion vector is determined as the predicted motion vector of the current block; The predicted motion vector is adjusted by applying a shift operation based on information indicating the resolution of a specific motion vector of the current block to the predicted motion vector; as well as The residual motion vector is obtained using the motion vector of the current block and the adjusted predicted motion vector of the current block; as well as A generator is configured to generate a bitstream that includes the information indicating the specific motion vector resolution of the current block. The location of the first candidate block is determined based on the information, and The default motion vector is determined by identifying whether one of the default motion vector candidates is available based on the priority.
5. A method for storing a bit stream, the method comprising: Perform the method for encoding motion vectors according to claim 2 to generate the bit stream; and Store the bit stream.
Citation Information
Patent Citations
Performing motion vector prediction for video coding
CN103339938A
Method and device for encoding / decoding motion vector
CN107113442A