Coding method and device, and decoding method and device
By dividing video blocks and determining the encoding sequence, the problem of low video encoding efficiency in bandwidth-constrained environments is solved, and efficient image encoding is achieved.
Patent Information
- Application Number
- CN202310354901.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-09-28
- Filing Date
- 2018-03-30
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2038-03-30
AI Technical Summary
When encoding high-quality videos, it is difficult for the prior art to improve encoding efficiency while maintaining image quality, especially in transmission environments with limited bandwidth.
By determining whether to divide the current block and determining the decoding order of the lower block based on the encoding order information of the adjacent blocks, a video decoding method and device are provided, including a block divider, an encoding sequence determiner, a prediction method determiner, and a decoder.
It improves the efficiency of video encoding, reduces the amount of encoding information, and improves the encoding quality of images.
Smart Images

Figure CN116405681B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of March 30, 2018, application number "201880062645.4", and title "Encoding method and device and decoding method and device". Technical Field
[0002] The present disclosure relates to a video encoding method and a decoding method, and more particularly, to a method of determining an encoding / decoding order of blocks included in an image. Background Art
[0003] A large amount of data is required to encode high-quality video. However, the bandwidth allowed for the transmission of video data is limited, and therefore, the data rate that can be applied to the transmission of video data may be limited. Therefore, for efficient transmission of video data, a method is needed to encode and decode video data at a high compression rate while minimizing the degradation of image quality.
[0004] Video data can be compressed by eliminating spatial and temporal redundancy between pixels. Usually, there are common features between adjacent pixels, so the encoded information is transmitted in data units consisting of pixels, thereby eliminating the redundancy between adjacent pixels.
[0005] Rather than directly transmitting the pixel values of the pixels included in a data unit, the method required to obtain the pixel values is transmitted. A prediction method is determined for each data unit to predict a pixel value close to the original value, and encoding information regarding the prediction method is transmitted from the encoder to the decoder. Furthermore, because the predicted value is not exactly the same as the original value, residual data representing the difference between the original value and the predicted value is transmitted from the encoder to the decoder.
[0006] As prediction accuracy increases, the amount of coding information required to specify a prediction method increases, but the size of the residual data decreases. Therefore, the prediction method is determined based on the size of the coding information and the residual data. Specifically, the data units partitioned from a picture have various sizes. As the size of the data unit increases, the prediction accuracy is more likely to decrease, but the amount of coding information decreases. Therefore, the block size is determined based on the characteristics of the picture.
[0007] Prediction methods are divided into intra-frame prediction and inter-frame prediction. Intra-frame prediction is a method of predicting pixels of a block from neighboring pixels of the block. Inter-frame prediction is a method of predicting pixels by referencing pixels of another picture referenced by the picture including the block. Therefore, spatial redundancy is eliminated by intra-frame prediction, and temporal redundancy is eliminated by inter-frame prediction.
[0008] As the number of prediction methods increases, the amount of encoding information indicating the prediction method increases. Therefore, the encoding information applied to a block can also be predicted from another block, thereby reducing the size of the encoding information.
[0009] Because the loss of video data is allowed as long as it is not recognized by human vision, the residual data can be lossily compressed through transformation and quantization, thereby reducing the amount of residual data. Summary of the Invention
[0010] Technical issues
[0011] A video encoding method is provided that determines whether to divide a current block and the coding order of lower-layer blocks, and determines the coding method based on whether neighboring blocks of the current block have been coded. Furthermore, a video decoding method is provided that divides a current block, determines the coding order of the divided lower-layer blocks, and determines the coding method based on whether neighboring blocks of the current block have been coded. Furthermore, a computer-readable recording medium is provided that stores a program for executing the video encoding method and video decoding method according to embodiments of the present disclosure on a computer.
[0012] Solution to the problem
[0013] A video decoding method is provided, comprising: obtaining, from a bitstream, partition information indicating whether a current block is to be partitioned; when the partition information does not indicate that the current block is to be partitioned, decoding the current block according to encoding information of the current block, and when the partition information indicates that the current block is to be partitioned, partitioning the current block into two or more lower-layer blocks; obtaining, from the bitstream, coding order information indicating a coding order of lower-layer blocks of the current block; determining a decoding order of the lower-layer blocks according to the coding order information; and decoding the lower-layer blocks according to the decoding order.
[0014] Provided is a video decoding apparatus, comprising: a block divider configured to, when division information indicating whether the current block is to be divided indicates that the current block is to be divided, divide the current block into two or more lower-layer blocks; a coding order determiner configured to, when the current block is divided into the lower-layer blocks, determine a decoding order of the lower-layer blocks according to coding order information indicating the coding order of the lower-layer blocks; a prediction method determiner configured to, when the division information indicates that the current block is not to be divided, determine a prediction method for the current block; and a decoder configured to reconstruct the current block based on a prediction result according to the prediction method.
[0015] A video encoding method is provided, comprising: dividing a current block into two or more lower-layer blocks; determining whether to divide the current block based on a result of dividing the current block to generate division information indicating whether the current block is divided; determining a coding order of lower-layer blocks of the current block based on a coding efficiency of the current block to obtain coding order information indicating the coding order of the lower-layer blocks; and outputting a bitstream including the division information and the coding order information.
[0016] Provided is a video encoding device, comprising: an encoding information generator configured to divide a current block into two or more lower-layer blocks, determine whether to divide the current block based on a result of dividing the current block, generate division information indicating whether to divide the current block, determine a coding order of lower-layer blocks of the current block based on a coding efficiency of the current block, and generate coding order information indicating the coding order of the lower-layer blocks; and an output unit configured to output a bit stream including the division information and the coding order information.
[0017] A non-transitory computer-readable recording medium having recorded thereon a program for executing a video encoding method and a video decoding method.
[0018] The technical problems to be achieved by the present disclosure are not limited to the above-mentioned technical features, and other technical problems can be inferred from the following embodiments.
[0019] Advantageous Effects of the Present Disclosure
[0020] The encoding efficiency of the image can be improved by determining whether to split the current block and the encoding order of the lower layer blocks and determining the encoding method of the lower layer blocks according to the encoding order of the lower layer blocks. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1a A block diagram illustrating a video encoding apparatus based on coding units having a tree structure according to an embodiment of the present disclosure is shown.
[0022] Figure 1b A block diagram illustrating a video decoding apparatus based on coding units having a tree structure according to an embodiment is shown.
[0023] Figure 2 A process of determining at least one coding unit by splitting a current coding unit according to an embodiment is illustrated.
[0024] Figure 3 A process of determining at least one coding unit by dividing non-square coding units according to an embodiment is illustrated.
[0025] Figure 4 A process of splitting a coding unit based on at least one of block shape information and partition shape information according to an embodiment is illustrated.
[0026] Figure 5 A method of determining a predetermined coding unit among odd-numbered coding units according to an embodiment is illustrated.
[0027] Figure 6 Illustrated is an order in which a plurality of coding units are processed when a plurality of coding units are determined by splitting a current coding unit, according to an embodiment.
[0028] Figure 7 A process of determining that a current coding unit is to be split into an odd number of coding units when coding units cannot be processed in a predetermined order according to an embodiment is illustrated.
[0029] Figure 8 A process of determining at least one coding unit by splitting a first coding unit according to an embodiment is illustrated.
[0030] Figure 9 It is shown that shapes into which the second coding unit may be split are limited when a second coding unit having a non-square shape determined by splitting the first coding unit satisfies a predetermined condition according to an embodiment.
[0031] Figure 10 A process of splitting a square coding unit when division shape information indicates that the square coding unit is not to be split into four square coding units according to an embodiment is illustrated.
[0032] Figure 11 It is shown that a processing order among a plurality of coding units may be changed depending on a process of dividing the coding units according to an embodiment.
[0033] Figure 12 Illustrated is a process of determining a depth of a coding unit as a shape and size of a coding unit changes when a coding unit is recursively split such that a plurality of coding units are determined, according to an embodiment.
[0034] Figure 13 Depths that may be determined based on shapes and sizes of coding units and partial indices (PIDs) for distinguishing coding units, according to an embodiment, are illustrated.
[0035] Figure 14 It is shown that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.
[0036] Figure 15 A processing block serving as a unit for determining an order of reference coding units included in a picture according to an embodiment is illustrated.
[0037] Figure 16 A video decoding apparatus for dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment is illustrated.
[0038] Figures 17a to 17c A basic encoding sequence according to an embodiment is shown.
[0039] Figure 18a and Figure 18b The case where the coding unit is encoded in the forward direction and the case where the coding unit is encoded in the reverse direction are respectively shown.
[0040] Figure 19 A tree structure of a maximum coding unit for describing a maximum coding unit and an encoding order of coding units included in the maximum coding unit is illustrated.
[0041] Figure 20 A method of determining the coding order of two or more divided blocks according to a coding order flag is shown.
[0042] Figure 21 An embodiment is shown in which the coding order of lower-layer blocks is determined according to the coding order of upper-layer blocks.
[0043] Figure 22 A method of generating a motion vector predictor candidate list in inter prediction and a method of generating a most probable mode (MPM) list in intra prediction are shown.
[0044] Figure 23 Shows the range of intra prediction directions according to whether neighboring blocks are reconstructed.
[0045] Figure 24 A method of determining a reference sample to be referred to by a current sample according to whether a neighboring block is reconstructed and an intra prediction direction is shown.
[0046] Figures 25a to 25c A padding method for reference samples to be used for intra prediction is shown.
[0047] Figure 26 An intra prediction method depending on whether a neighboring block is reconstructed is shown.
[0048] Figure 27 A deblocking filtering method according to whether a neighboring block is reconstructed is shown.
[0049] Figure 28a and Figure 28b A method of determining context information for entropy decoding prediction mode information according to whether a neighboring block is reconstructed is described.
[0050] Figure 29a and Figure 29b A method of applying an in-loop filter according to decoding order is shown.
[0051] Figure 30A video decoding method for dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment is illustrated.
[0052] Figure 31 A video encoding apparatus for dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment is illustrated.
[0053] Figure 32 A video encoding method for dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment is illustrated.
[0054] Figure 33 is a diagram for explaining a method of indicating splitting of a current coding unit. DETAILED DESCRIPTION
[0055] Best Mode
[0056] A video decoding method is provided, comprising: obtaining, from a bitstream, partition information indicating whether a current block is to be partitioned; when the partition information does not indicate that the current block is to be partitioned, decoding the current block according to encoding information of the current block, and when the partition information indicates that the current block is to be partitioned, partitioning the current block into two or more lower-layer blocks; obtaining, from the bitstream, coding order information indicating a coding order of lower-layer blocks of the current block; determining a decoding order of the lower-layer blocks according to the coding order information; and decoding the lower-layer blocks according to the decoding order.
[0057] Public Mode
[0058] By referring to the embodiments described below in conjunction with the accompanying drawings, the advantages and features of the disclosed embodiments and the methods for achieving the advantages and features will be apparent. However, the present disclosure is not limited to these embodiments, but can be implemented in many different forms, and the present embodiment is provided to complete the present disclosure and enable those skilled in the art to understand the scope of the present disclosure.
[0059] Terms used in this specification will be briefly described, and the disclosed embodiments will be described in detail.
[0060] Although the general terms widely used in this specification are selected as terms used in this specification in consideration of the functions of the present disclosure, they may vary according to the intentions of those skilled in the art, judicial precedents, the emergence of new technologies, etc. Terms arbitrarily selected by the applicant of the present disclosure may also be used in specific circumstances. In such cases, their meanings will be described in detail in the detailed description of the present disclosure. Therefore, it is necessary to define the terms based on their meanings and the content of the entire disclosure, rather than just reciting the terms themselves.
[0061] It will be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise.
[0062] It will be understood that when a particular component "includes" a particular component, unless the context clearly indicates otherwise, the component does not exclude another component, but may also include another component. In addition, terms such as "unit" used in the specification indicate software or hardware components, such as field programmable gate arrays (FPGAs) or application specific integrated circuits (ASICs), and the "unit" performs a specific function. However, a "unit" is not limited to software or hardware. A "unit" may be formed in an addressable storage medium, or may be formed to operate one or more processors. Therefore, for example, the term "unit" may refer to a component (such as a software component, an object-oriented software component, a class component, and a task component), and may include a process, function, attribute, procedure, subroutine, a fragment of program code, a driver, firmware, microcode, circuit, data, a database, a data structure, a table, an array, or a variable. The functions provided by components and "units" may be associated with a smaller number of components and "units", or may be divided into additional components and "units".
[0063] The "current block" refers to one of the coding unit, prediction unit, and transform unit currently being encoded or decoded. For ease of description, when it is necessary to distinguish other types of blocks (such as prediction units and transform units), the terms "current coding block," "current prediction block," and "current transform block" may be used. Furthermore, a "lower layer block" refers to a data unit partitioned from a "current block." An "upper layer block" refers to a data unit that includes a "current block."
[0064] Hereinafter, "samples," which are data assigned to sampling locations of an image, refer to data to be processed. For example, pixel values in an image in the spatial domain and transform coefficients in the transform domain may be samples. A unit including at least one of these samples may be defined as a block.
[0065] Hereinafter, the embodiments will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement the embodiments. In the accompanying drawings, parts not related to the description are omitted to clearly describe the embodiments.
[0066] Figure 1a A block diagram of an image encoding apparatus 100 based on coding units having a tree structure according to an embodiment of the present disclosure is shown.
[0067] The image encoding device 150 includes an encoder 110 and a bitstream generator 120 .
[0068] The encoder 110 divides a picture or a slice included in the picture into a plurality of maximum coding units according to the size of the maximum coding unit. The maximum coding unit, which is a data unit of a size of 32×32, 64×64, 128×128, 256×256, etc., may be a square data unit whose horizontal and vertical sizes are powers of 2. The encoder 110 may provide maximum coding unit size information indicating the size of the maximum coding unit to the bitstream generator 120. In addition, the bitstream generator 120 may include the maximum coding unit size information in the bitstream.
[0069] The encoder 110 divides the maximum coding unit into coding units. Whether to divide the coding unit is determined based on whether the division is efficient through rate-distortion optimization. Furthermore, division information indicating whether the coding unit is divided may be generated. The division information may be represented in the form of a flag.
[0070] The coding unit can be divided in various ways. For example, a square coding unit can be divided into four square coding units whose width and height are half the width and height of the square coding unit. A square coding unit can be divided into two rectangular coding units whose width is half the width of the square coding unit. A square coding unit can be divided into two rectangular coding units whose height is half the height of the square coding unit. A square coding unit can be divided into three coding units by dividing its width and height in a ratio of 1:2:1.
[0071] A rectangular coding unit whose width is twice its height can be divided into two square coding units. A rectangular coding unit whose width is twice its height can be divided into two rectangular coding units whose widths are both four times its height. A rectangular coding unit whose width is twice its height can be divided into two rectangular coding units and one square coding unit by dividing its width in a ratio of 1:2:1.
[0072] Similarly, a rectangular coding unit whose height is twice its width can be divided into two square coding units. In addition, a rectangular coding unit whose height is twice its width can be divided into two rectangular coding units whose heights are both four times their width. Similarly, a rectangular coding unit whose height is twice its width can be divided into two rectangular coding units and one square coding unit by dividing its height in a ratio of 1:2:1.
[0073] When two or more division methods are available for use by the image encoding device 100, information about a division method applicable to a coding unit among the division methods available for use by the image encoding device 100 may be determined for each picture. Therefore, it may be determined that only a specific division method is used for each picture. When the image encoding device 100 uses only one division method, information about a division method applicable to a coding unit is not separately determined.
[0074] A coding unit of a specific size may be split using a specific splitting method. For example, when the size of the coding unit is 256×256, the coding unit may be set to be split into only four square coding units with half its width and half its height.
[0075] When the division information of the coding unit indicates that the coding unit is to be divided, division shape information indicating the division method of the coding unit may be generated. When there is only one division method applicable to the picture to which the coding unit belongs, the division shape information may not be generated. When the division method is adaptively determined based on encoding information around the coding unit, the division shape information may not be generated.
[0076] As described above, the image data of the current picture is divided into maximum coding units according to the maximum size of the coding unit. In addition, each maximum coding unit may include coding units hierarchically divided from the maximum coding unit. The shape and position of the lower layer coding unit may be determined based on the division shape of the upper layer coding unit. In addition, a minimum size of the coding unit that limits the division of the coding unit may be preset.
[0077] The encoder 110 compares the encoding efficiency when the coding unit is hierarchically split with the encoding efficiency when the coding unit is not split. The encoder 110 determines whether to split the coding unit based on the comparison result. If it is determined that splitting the coding unit is more efficient, the encoder 110 splits the coding unit hierarchically. If it is determined that not splitting the coding unit is more efficient based on the comparison result, the encoder 110 does not split the coding unit. Whether to split the coding unit can be determined independently of whether to split other adjacent coding units.
[0078] The resulting coding units can be predicted using intra-frame prediction or inter-frame prediction. Intra-frame prediction is a method for predicting the samples of a prediction unit by using reference samples around the prediction unit. Inter-frame prediction is a method for predicting the samples of a prediction unit by obtaining reference samples from a reference picture referenced by the current picture.
[0079] For intra prediction, the encoder 110 can select the most efficient intra prediction method by applying multiple intra prediction methods to a prediction unit. Intra prediction methods include discrete cosine (DC) mode, planar mode, and directional modes such as vertical mode and horizontal mode.
[0080] When reconstructed samples around a coding unit are used as reference samples, intra prediction can be performed for each prediction unit. However, when reconstructed samples in a coding unit are used as reference samples, the reference samples in the coding unit must be reconstructed before prediction, and therefore, the prediction order of the prediction units may depend on the transformation order of the transformation units. Therefore, when reconstructed samples in a coding unit are used as reference samples, only the intra prediction method for the transformation unit corresponding to the prediction unit is determined for the prediction unit, and substantial intra prediction can be performed for each transformation unit.
[0081] The encoder 110 may select the most efficient inter-frame prediction method by determining the optimal motion vector and reference picture. For inter-frame prediction, the encoder 110 may determine multiple motion vector candidates from coding units that are spatially and temporally adjacent to the current coding unit, and may determine the most efficient motion vector among the multiple motion vector candidates as the motion vector. Similarly, the encoder 110 may determine multiple reference picture candidates from coding units that are spatially and temporally adjacent to the current coding unit, and may determine the most efficient reference picture from the multiple reference picture candidates. Depending on an embodiment, the reference picture may be determined from a reference picture list predetermined for the current picture. Depending on an embodiment, for prediction accuracy, the encoder 110 may determine the most efficient motion vector among the multiple motion vector candidates as the predicted motion vector, and may correct the predicted motion vector to determine the motion vector. Inter-frame prediction may be performed in parallel for each prediction unit in the coding unit.
[0082] Encoder 110 can reconstruct a coding unit by obtaining only information indicating a motion vector and a reference picture according to skip mode. In skip mode, all encoding information including the residual signal is omitted except for the information indicating the motion vector and the reference picture. Because the residual signal is omitted, skip mode can be used when the prediction accuracy is very high.
[0083] The partition mode used according to the prediction method of the prediction unit can be limited. For example, the partition mode for a prediction unit of size 2N×2N or N×N can be applied only to intra-frame prediction, while the partition mode for a prediction unit of size 2N×2N, 2N×N, N×2N, or N×N can be applied to inter-frame prediction. In addition, the partition mode for a prediction unit of size 2N×2N can be applied only to skip mode in inter-frame prediction. The partition mode allowed for each prediction method in the image encoding device 100 can be changed according to encoding efficiency.
[0084] The image encoding device 100 may perform a transform based on a coding unit. The image encoding device 100 may transform residual data, which is the difference between the original value and the predicted value of the pixel included in the coding unit, through a predetermined process. For example, the image encoding device 100 may perform lossy compression on the residual data through quantization and discrete cosine transform (DCT) / discrete sine transform (DST). Alternatively, the image encoding device 100 may perform lossy compression on the residual data without quantization.
[0085] As a result, the encoder 110 determines the most efficient prediction method for the current coding unit from among the multiple intra-frame prediction methods and the multiple inter-frame prediction methods. Furthermore, based on the prediction results, the encoder 110 determines the prediction method for the current coding unit according to coding efficiency. Similarly, based on the transformation results, the encoder 110 can determine the transformation method according to coding efficiency. The method of determining the most efficient prediction method and transformation method for a coding unit ultimately determines the coding efficiency of the coding unit. The encoder 110 determines the hierarchical structure of the maximum coding unit based on the coding efficiencies of the finally divided coding units.
[0086] The encoder 110 may measure encoding efficiency of a coding unit, prediction efficiency of a prediction method, etc. by using rate-distortion optimization based on Lagrange multipliers.
[0087] The encoder 110 may generate split information indicating whether the coding unit is split based on the determined hierarchical structure of the maximum coding unit. In addition, the encoder 110 may generate partition mode information for determining a prediction unit and transform unit split information for determining a transform unit for the split coding unit. When there are two or more splitting methods for the coding unit, the encoder 110 may generate split shape information indicating the splitting method together with the split information. The encoder 110 may generate information related to the prediction method and the transform method used in the prediction unit and the transform unit.
[0088] The bitstream generator 120 may output the various pieces of information generated by the encoder 110 in the form of a bitstream according to the hierarchical structure of the maximum coding unit.
[0089] According to the embodiment, reference will be made to Figures 3 to 12 A method of determining a coding unit, a prediction unit, and a transformation unit according to a tree structure of a maximum coding unit is described in detail.
[0090] Figure 1b A block diagram of an image decoding apparatus 150 based on coding units having a tree structure according to an embodiment is shown.
[0091] The image decoding apparatus 150 includes a receiver 160 and a decoder 170 .
[0092] According to an embodiment, definitions of various terms used for the decoding operation of the image decoding device 150, such as a coding unit, a prediction unit, a transform unit, and various pieces of split information, are the same as those described above with reference to FIG. 1 and the image encoding device 100. In addition, since the purpose of the image decoding device 150 is to reconstruct image data, various encoding methods used in the image encoding device 100 can be applied to the image decoding device 150.
[0093] The receiver 160 receives and parses the bitstream of the encoded video. The decoder 170 extracts information required for decoding each maximum coding unit from the parsed bitstream. The decoder 170 may extract information about the maximum size of the coding unit for the current picture from a header, a sequence parameter set, or a picture parameter set for the current picture.
[0094] In addition, the decoder 170 extracts split information about the coding unit having a tree structure from the parsed bitstream for each maximum coding unit. The extracted split information is output to the decoder 170. The decoder 170 can determine the tree structure of the maximum coding unit by splitting the maximum coding unit based on the extracted split information.
[0095] The split information extracted by the decoder 170 is split information about the tree structure determined by the image encoding device 100 to have the minimum encoding error. Therefore, the image decoding device 150 can decode data according to the encoding method that generates the minimum encoding error to reconstruct the image.
[0096] The decoder 170 may extract partition information about data units included in the coding unit, such as prediction units and transformation units. For example, the decoder 170 may extract information about the most efficient partition mode for the prediction unit. The decoder 170 may also extract transform partition information about the most efficient tree structure for the transformation unit.
[0097] Also, the decoder 170 may obtain information about the most efficient prediction method for the prediction unit split from the coding unit.The decoder 170 may obtain information about the most efficient transformation method for the transformation unit split from the coding unit.
[0098] The decoder 170 extracts information from a bitstream according to a method of constructing a bitstream performed by the bitstream generator 120 of the image encoding device 100 .
[0099] The decoder 170 may split the maximum coding unit into coding units with the most efficient tree structure based on the split information. In addition, the decoder 170 may split the coding unit into prediction units according to information about the partition mode. The decoder 170 may split the coding unit into transformation units according to the transformation split information.
[0100] The decoder 170 may predict the prediction unit based on the information about the prediction method. The decoder 170 may dequantize and inversely transform the residual data corresponding to the difference between the original value and the predicted value of the pixel based on the information about the transformation method of the transformation unit. In addition, the decoder 170 may reconstruct the pixels of the coding unit based on the result of predicting the prediction unit and the result of transforming the transformation unit.
[0101] Figure 2 A process of determining at least one coding unit by splitting a current coding unit, performed by the image decoding device 150 , according to an embodiment is illustrated.
[0102] According to an embodiment, the image decoding apparatus 150 may determine the shape of the coding unit by using block shape information, and may determine the division method of the coding unit by using division shape information. That is, the coding unit division method indicated by the division shape information may be determined based on the block shape indicated by the block shape information used by the image decoding apparatus 150.
[0103] According to an embodiment, the image decoding device 150 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding device 150 may determine whether to not split the square coding unit, whether to split the square coding unit vertically, whether to split the square coding unit horizontally, or whether to split the square coding unit into four coding units based on the division shape mode information. Figure 2 , when the block shape information of the current coding unit 200 indicates a square shape, the decoder 170 may determine not to divide the coding unit 210a having the same size as the current coding unit 200 based on the division shape information indicating that division is not performed, or may determine the coding unit 210b, 210c or 210d divided based on the division shape information indicating a predetermined division method.
[0104] Reference Figure 2 According to an embodiment, the image decoding device 150 may determine two coding units 210b obtained by dividing the current coding unit 200 in the vertical direction based on the division shape information indicating that the division is performed in the vertical direction. The image decoding device 150 may determine two coding units 210c obtained by dividing the current coding unit 200 in the horizontal direction based on the division shape information indicating that the division is performed in the horizontal direction. The image decoding device 150 may determine four coding units 210d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the division shape information indicating that the division is performed in the vertical and horizontal directions. However, the division method of the square coding unit is not limited to the above method, and the division shape information may indicate various methods. The predetermined division method of dividing the square coding unit will be described in detail below with respect to various embodiments.
[0105] Figure 3 A process of determining at least one coding unit by splitting non-square coding units, performed by the image decoding device 150 according to an embodiment, is illustrated.
[0106] According to an embodiment, the image decoding device 150 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding device 150 may determine whether to not split the non-square current coding unit or whether to split the non-square current coding unit by using a predetermined splitting method based on the split shape information. Figure 3 When the block shape information of the current coding unit 300 or 350 indicates a non-square shape, the image decoding device 150 may determine that the coding unit 310 or 360 having the same size as the current coding unit 300 or 350 is not to be split based on the division shape information indicating that division is not performed, or determine the coding units 320a and 320b, 330a to 330c, 370a and 370b, or 380a to 380c divided based on the division shape information indicating a predetermined division method. The predetermined division method for dividing the non-square coding unit will be described in detail below with respect to various embodiments.
[0107] According to an embodiment, the image decoding device 150 may determine a division method of a coding unit by using division shape information, and in this case, the division shape information may indicate the number of one or more coding units generated by dividing the coding unit. Figure 3 When the division shape information indicates that the current coding unit 300 or 350 is divided into two coding units, the image decoding device 150 can determine the two coding units 320a and 320b or 370a and 370b included in the current coding unit 300 or 350 by dividing the current coding unit 300 or 350 based on the division shape information.
[0108] According to an embodiment, when the image decoding device 150 divides the non-square current coding unit 300 or 350 based on the division shape information, the position of the long side of the non-square current coding unit 300 or 350 may be considered. For example, the image decoding device 150 may determine a plurality of coding units by dividing the long side of the current coding unit 300 or 350, considering the shape of the current coding unit 300 or 350.
[0109] According to an embodiment, when the division shape information indicates that the coding unit is divided into an odd number of blocks, the image decoding device 150 may determine an odd number of coding units included in the current coding unit 300 or 350. For example, when the division shape information indicates that the current coding unit 300 or 350 is divided into three coding units, the image decoding device 150 may divide the current coding unit 300 or 350 into three coding units 330a, 330b, and 330c, or 380a, 380b, and 380c. According to an embodiment, the image decoding device 150 may determine an odd number of coding units included in the current coding unit 300 or 350, and not all of the determined coding units may have the same size. For example, the size of a predetermined coding unit 330b or 380b among the determined odd number of coding units 330a, 330b, and 330c, or 380a, 380b, and 380c, may differ from the sizes of the other coding units 330a and 330c, or 380a and 380c. That is, coding units determined by splitting the current coding unit 300 or 350 may have various sizes.
[0110] According to an embodiment, when the division shape information indicates that the coding unit is divided into an odd number of blocks, the image decoding device 150 may determine an odd number of coding units included in the current coding unit 300 or 350, and may apply a predetermined restriction to at least one of the odd number of coding units generated by dividing the current coding unit 300 or 350. Figure 3 , the image decoding device 150 may allow a decoding method of a coding unit 330b or 380b to be different from a decoding method of other coding units 330a and 330c or 380a and 380c, wherein the coding unit 330b or 380b is at a center position among the three coding units 330a, 330b, and 330c or 380a, 380b, and 380c generated by dividing the current coding unit 300 or 350. For example, the image decoding device 150 may limit the coding unit 330b or 380b at the center position to not be divided again or to be divided only a predetermined number of times, unlike the other coding units 330a and 330c or 380a and 380c.
[0111] Figure 4 A process of splitting coding units based on at least one of block shape information and division shape information, performed by the image decoding device 150 according to an embodiment, is illustrated.
[0112] According to an embodiment, the image decoding device 150 may determine whether to split the square first coding unit 400 into coding units or not based on at least one of the block shape information and the division shape information. According to an embodiment, when the division shape information indicates that the first coding unit 400 is to be divided horizontally, the image decoding device 150 may determine the second coding unit 410 by dividing the first coding unit 400 horizontally. The first coding unit, second coding unit, and third coding unit used in the embodiment are terms used to understand the relationship between before and after the division of the coding unit. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the structures of the first coding unit, the second coding unit, and the third coding unit follow the above description.
[0113] According to an embodiment, the image decoding device 150 may determine whether to split the determined second coding unit 410 into coding units or not to split the determined second coding unit 410 based on at least one of the block shape information and the division shape information. Figure 4 The image decoding device 150 may determine or not determine the non-square second coding unit 410 determined by dividing the first coding unit 400 into one or more third coding units 420a, or 420b, 420c, and 420d based on at least one of the block shape information and the division shape information. The image decoding device 150 may obtain at least one of the block shape information and the division shape information, and determine a plurality of second coding units (e.g., 410) of various shapes by dividing the first coding unit 400 based on at least one of the obtained block shape information and the division shape information. Furthermore, the second coding unit 410 may be divided using the division method of the first coding unit 400 based on at least one of the block shape information and the division shape information. According to an embodiment, when the first coding unit 400 is divided into the second coding unit 410 based on at least one of the block shape information and the division shape information of the first coding unit 400, the second coding unit 410 may also be divided into the third coding unit 420a, or 420b, 420c, and 420d based on at least one of the block shape information and the division shape information of the second coding unit 410. That is, the coding unit may be recursively split based on at least one of block shape information and partition shape information of each coding unit. Methods that may be used to recursively split the coding unit will be described below with respect to various embodiments.
[0114] According to an embodiment, the image decoding device 150 may determine whether to divide the third coding unit 420a, or each of 420b, 420c, and 420d into coding units or not to divide the second coding unit 410 based on at least one of the block shape information and the division shape information. According to an embodiment, the image decoding device 150 may divide the non-square second coding unit 410 into an odd number of third coding units 420b, 420c, and 420d. The image decoding device 150 may impose a predetermined restriction on a predetermined third coding unit among the odd number of third coding units 420b, 420c, and 420d. For example, the image decoding device 150 may limit the third coding unit 420c at the center position among the odd number of third coding units 420b, 420c, and 420d to no longer be divided or to be divided a set number of times. Figure 4 , the image decoding device 150 may limit the third coding unit 420c at the center position among the odd-numbered third coding units 420b, 420c, and 420d included in the non-square second coding unit 410 to no longer be divided, limited to being divided by using a predetermined division method (for example, only divided into four coding units or divided by using the division method of the second coding unit 410), or limited to being divided only a predetermined number of times (for example, only divided n times (where n>0)). However, the limitation on the third coding unit 420c at the center position is not limited to the above example, and may include various limitations for decoding the third coding unit 420c at the center position differently from the other third coding units 420b and 420d.
[0115] According to an embodiment, the image decoding device 150 may obtain at least one of block shape information and division shape information used for dividing the current coding unit from a predetermined position in the current coding unit.
[0116] According to an embodiment, when the current coding unit is split into a predetermined number of coding units, the image decoding device 150 may select one of the coding units. As will be described below with respect to various embodiments, various methods may be used to select one of the plurality of coding units.
[0117] According to an embodiment, the image decoding device 150 may split a current coding unit into a plurality of coding units, and may determine a coding unit at a predetermined position.
[0118] Figure 5 A method of determining a coding unit at a predetermined position among odd-numbered coding units, performed by the image decoding apparatus 150 , according to an embodiment is illustrated.
[0119] According to an embodiment, the image decoding device 150 may use information indicating the positions of odd-numbered coding units to determine a coding unit at a center position among the odd-numbered coding units. Figure 5 , the image decoding device 150 can determine odd-numbered coding units 520a, 520b, and 520c by dividing the current coding unit 500. The image decoding device 150 can determine the centrally located coding unit 520b by using information regarding the positions of the odd-numbered coding units 520a, 520b, and 520c. For example, the image decoding device 150 can determine the centrally located coding unit 520b by determining the positions of the coding units 520a, 520b, and 520c based on information indicating the positions of predetermined samples included in the coding units 520a, 520b, and 520c. In detail, the image decoding device 150 can determine the centrally located coding unit 520b by determining the positions of the coding units 520a, 520b, and 520c based on information indicating the positions of the upper-left samples 530a, 530b, and 530c of the coding units 520a, 520b, and 520c.
[0120] According to an embodiment, the information indicating the positions of the upper left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively, may include information about the positions or coordinates of the coding units 520a, 520b, and 520c in the picture. According to an embodiment, the information indicating the positions of the upper left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively, may include information indicating the width or height of the coding units 520a, 520b, and 520c included in the current coding unit 500, and the width or height may correspond to information indicating the difference between the coordinates of the coding units 520a, 520b, and 520c in the picture. That is, the image decoding device 150 can determine the central position of the coding unit 520b by directly using the information about the positions or coordinates of the coding units 520a, 520b, and 520c in the picture, or by using information about the width or height of the coding units corresponding to the difference between the coordinates.
[0121] According to an embodiment, the information indicating the position of the upper left sample point 530a of the upper coding unit 520a may include coordinates (xa, ya), the information indicating the position of the upper left sample point 530b of the middle coding unit 520b may include coordinates (xb, yb), and the information indicating the position of the upper left sample point 530c of the lower coding unit 520c may include coordinates (xc, yc). The image decoding device 150 can determine the middle coding unit 520b by using the coordinates of the upper left samples 530a, 530b, and 530c included in the coding units 520a, 520b, and 520c, respectively. For example, when the coordinates of the upper left samples 530a, 530b, and 530c are sorted in ascending or descending order, the coding unit 520b including the coordinates (xb, yb) of the sample point 530b at the center position can be determined as the coding unit at the center position among the coding units 520a, 520b, and 520c determined by splitting the current coding unit 500. However, the coordinates indicating the positions of the upper left sample points 530a, 530b, and 530c may include coordinates indicating absolute positions in the picture, or coordinates (dxb, dyb) indicating the relative position of the upper left sample point 530b of the intermediate coding unit 520b relative to the position of the upper left sample point 530a of the upper coding unit 520a and coordinates (dxc, dyc) indicating the relative position of the upper left sample point 530c of the lower coding unit 520c relative to the position of the upper left sample point 530a of the upper coding unit 520a may be used. The method of determining the coding unit at a predetermined position by using the coordinates of the sample points included in the coding unit as information indicating the positions of the sample points is not limited to the above method, and may include various arithmetic methods capable of using the coordinates of the sample points.
[0122] According to an embodiment, the image decoding device 150 may divide the current coding unit 500 into a plurality of coding units 520a, 520b, and 520c, and may select one of the coding units 520a, 520b, and 520c based on a predetermined criterion. For example, the image decoding device 150 may select the coding unit 520b having a size different from that of the other coding units from among the coding units 520a, 520b, and 520c.
[0123] According to an embodiment, the image decoding device 150 may determine the width or height of the coding units 520a, 520b, and 520c by using the coordinates (xa, ya) indicating the position of the upper left sample point 530a of the upper coding unit 520a, the coordinates (xb, yb) indicating the position of the upper left sample point 530b of the middle coding unit 520b, and the coordinates (xc, yc) indicating the position of the upper left sample point 530c of the lower coding unit 520c. The image decoding device 150 may determine the size of each of the coding units 520a, 520b, and 520c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the coding units 520a, 520b, and 520c.
[0124] According to an embodiment, the image decoding device 150 may determine the width of the upper coding unit 520a as xb-xa and the height thereof as yb-ya. According to an embodiment, the image decoding device 150 may determine the width of the intermediate coding unit 520b as xc-xb and the height thereof as yc-yb. According to an embodiment, the image decoding device 150 may determine the width or height of the lower coding unit 520c by using the width or height of the current coding unit 500 or the width or height of the upper coding unit 520a and the intermediate coding unit 520b. The image decoding device 150 may determine a coding unit having a size different from that of other coding units based on the determined width and height of the coding units 520a to 520c. With reference to Figure 5 , the image decoding device 150 may determine the intermediate coding unit 520b having a size different from the sizes of the upper coding unit 520a and the lower coding unit 520c as the coding unit at the predetermined position. However, the above-described method of determining a coding unit having a size different from the sizes of other coding units, performed by the image decoding device 150, corresponds only to an example of determining a coding unit at a predetermined position by using the size of the coding unit determined based on the coordinates of the sample points, and therefore, various methods of determining a coding unit at a predetermined position by comparing the sizes of the coding units determined based on the coordinates of the predetermined sample points may be used.
[0125] However, the positions of samples considered for determining the position of a coding unit are not limited to the above-described upper left position, and information on arbitrary positions of samples included in the coding unit may be used.
[0126] According to an embodiment, the image decoding device 150 may select a coding unit at a predetermined position from an odd number of coding units determined by dividing the current coding unit, taking into account the shape of the current coding unit. For example, when the current coding unit has a non-square shape with a width greater than a height, the image decoding device 150 may determine a coding unit at a predetermined position along the horizontal direction. That is, the image decoding device 150 may determine one of the coding units at different positions along the horizontal direction and impose restrictions on the coding unit. When the current coding unit has a non-square shape with a height greater than a width, the image decoding device 150 may determine a coding unit at a predetermined position along the vertical direction. That is, the image decoding device 150 may determine one of the coding units at different positions along the vertical direction and may impose restrictions on the coding unit.
[0127] According to an embodiment, the image decoding device 150 may use information indicating respective positions of even-numbered coding units to determine a coding unit at a predetermined position among the even-numbered coding units. The image decoding device 150 may determine the even-numbered coding units by dividing the current coding unit, and may determine the coding unit at the predetermined position by using information about the positions of the even-numbered coding units. Operations related thereto may be similar to those already described above with respect to Figure 5 The operation of determining a coding unit at a predetermined position (eg, a center position) among odd-numbered coding units corresponds to the operation described in detail, and thus a detailed description thereof is not provided here.
[0128] According to an embodiment, when a non-square current coding unit is split into a plurality of coding units, predetermined information about a coding unit at a predetermined position may be used in the splitting operation to determine the coding unit at a predetermined position among the plurality of coding units. For example, the image decoding device 150 may use at least one of block shape information and split shape information stored in samples included in the coding unit at the center position to determine the coding unit at the center position among the plurality of coding units determined by splitting the current coding unit in the splitting operation.
[0129] Reference Figure 5, the image decoding device 150 may split the current coding unit 500 into multiple coding units 520a, 520b, and 520c based on at least one of the block shape information and the partition shape information, and may determine the coding unit 520b at the center position among the multiple coding units 520a, 520b, and 520c. Furthermore, the image decoding device 150 may determine the coding unit 520b at the center position by considering the location at which at least one of the block shape information and the partition shape information is obtained. That is, at least one of the block shape information and the partition shape information of the current coding unit 500 may be obtained from a sample 540 at the center position of the current coding unit 500. When the current coding unit 500 is split into the multiple coding units 520a, 520b, and 520c based on at least one of the block shape information and the partition shape information, the coding unit 520b including the sample 540 may be determined as the coding unit at the center position. However, the information used to determine the coding unit at the center position is not limited to at least one of the block shape information and the partition shape information, and various types of information may be used to determine the coding unit at the center position.
[0130] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from predetermined samples included in a coding unit to be determined. Figure 5 , the image decoding device 150 may determine a coding unit at a predetermined position (for example, a coding unit at a center position among the divided coding units) among the multiple coding units 520a, 520b, and 520c determined by dividing the current coding unit 500, using at least one of the block shape information and the division shape information obtained from the sample at the predetermined position in the current coding unit 500 (for example, the sample at the center position of the divided coding unit 500). That is, the image decoding device 150 may determine the sample at the predetermined position by considering the block shape of the current coding unit 500, determine the coding unit 520b including the sample for which the predetermined information (for example, at least one of the block shape information and the division shape information) from the multiple coding units 520a, 520b, and 520c determined by dividing the current coding unit 500, and may impose a predetermined restriction on the coding unit 520b. Figure 5 According to an embodiment, in a decoding operation, the image decoding device 150 may determine a sample 540 at the center position of the current coding unit 500 as a sample from which predetermined information may be obtained, and may impose a predetermined restriction on the coding unit 520b including the sample 540. However, the position of the sample from which the predetermined information may be obtained is not limited to the above-mentioned position, and may include any position included in the coding unit 520b to be determined as a sample to be restricted.
[0131] According to an embodiment, the position of the sample from which the predetermined information can be obtained can be determined based on the shape of the current coding unit 500. According to an embodiment, the block shape information may indicate whether the current coding unit has a square shape or a non-square shape, and the position of the sample from which the predetermined information can be obtained can be determined based on the shape. For example, the image decoding device 150 may determine, by using at least one of the information about the width of the current coding unit and the information about the height of the current coding unit, a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which the predetermined information can be obtained. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding device 150 may determine, as a sample from which the predetermined information can be obtained, one of the samples adjacent to the boundary that divides the long side of the current coding unit in half.
[0132] According to an embodiment, when the current coding unit is divided into a plurality of coding units, the image decoding device 150 may use at least one of the block shape information and the division shape information to determine a coding unit at a predetermined position in the plurality of coding units. According to an embodiment, the image decoding device 150 may obtain at least one of the block shape information and the division shape information from a sample at a predetermined position in the coding unit, and divide the plurality of coding units generated by dividing the current coding unit by using at least one of the division shape information and the block shape information, wherein the at least one of the division shape information and the block shape information is obtained from a sample at a predetermined position in each of the plurality of coding units. That is, the coding unit may be recursively divided based on at least one of the block shape information and the division shape information, wherein the at least one of the division shape information and the block shape information is obtained from a sample at a predetermined position in each coding unit. As has been described above, Figure 4 An operation of recursively splitting the coding unit is described, and thus a detailed description thereof will not be provided here.
[0133] According to an embodiment, the image decoding device 150 may determine one or more coding units by splitting the current coding unit, and may determine an order in which to decode the one or more coding units based on a predetermined block (for example, the current coding unit).
[0134] Figure 6 Illustrated is an order in which a plurality of coding units are processed when the image decoding device 150 determines a plurality of coding units by splitting a current coding unit, according to an embodiment.
[0135] According to an embodiment, the image decoding device 150 may determine the second coding units 610a and 610b by dividing the first coding unit 600 in the vertical direction, determine the second coding units 630a and 630b by dividing the first coding unit 600 in the horizontal direction, or determine the second coding units 650a to 650d by dividing the first coding unit 600 in the vertical and horizontal directions, based on the block shape information and the division shape information.
[0136] Reference Figure 6 , the image decoding device 150 may determine to process the second coding units 610a and 610b determined by dividing the first coding unit 600 in the vertical direction in a horizontal order 610c. The image decoding device 150 may determine to process the second coding units 630a and 630b determined by dividing the first coding unit 600 in the horizontal direction in a vertical order 630c. The image decoding device 150 may determine to process the second coding units 650a to 650d determined by dividing the first coding unit 600 in the vertical and horizontal directions in a predetermined order (for example, in a raster scan order or a zigzag scan order 650e), wherein the predetermined order is used to process coding units in one row and then process coding units in the next row.
[0137] According to an embodiment, the image decoding device 150 may recursively divide the coding unit. Figure 6 , the image decoding device 150 may determine a plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d by dividing the first coding unit 600, and may recursively divide each of the determined plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d. The division method of the plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d may correspond to the division method of the first coding unit 600. In this way, each of the plurality of coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d may be independently divided into a plurality of coding units. Referring to Figure 6 , the image decoding device 150 may determine the second coding units 610a and 610b by splitting the first coding unit 600 in a vertical direction, and may determine whether to independently split or not split each of the second coding units 610a and 610b.
[0138] According to an embodiment, the image decoding device 150 may determine the third coding units 620a and 620b by splitting the left second coding unit 610a in a horizontal direction, and may not split the right second coding unit 610b.
[0139] According to an embodiment, the processing order of coding units can be determined based on the operation of splitting the coding units. In other words, the processing order of the split coding units can be determined based on the processing order of the coding units immediately before the split. The image decoding device 150 can determine the processing order of the third coding units 620a and 620b determined by splitting the left second coding unit 610a independently of the right second coding unit 610b. Because the third coding units 620a and 620b are determined by splitting the left second coding unit 610a horizontally, the third coding units 620a and 620b can be processed in a vertical order 620c. Because the left second coding unit 610a and the right second coding unit 610b are processed in a horizontal order 610c, the right second coding unit 610b can be processed after the third coding units 620a and 620b included in the left second coding unit 610a are processed in a vertical order 620c. Determining the processing order of coding units based on coding units before splitting is not limited to the above example, and coding units split and determined into various shapes may be independently processed in a predetermined order using various methods.
[0140] Figure 7 A process of determining that a current coding unit is to be split into an odd number of coding units when coding units cannot be processed in a predetermined order, performed by the image decoding device 150 according to an embodiment, is illustrated.
[0141] According to an embodiment, the image decoding device 150 may determine whether the current coding unit is split into an odd number of coding units based on the obtained block shape information and the division shape mode information. Figure 7 , the square first coding unit 700 may be divided into non-square second coding units 710a and 710b, and the second coding units 710a and 710b may be independently divided into third coding units 720a and 720b and 720c to 720e. According to an embodiment, the image decoding device 150 may determine a plurality of third coding units 720a and 720b by horizontally dividing the left second coding unit 710a, and may divide the right second coding unit 710b into an odd number of third coding units 720c to 720e.
[0142] According to an embodiment, the image decoding device 150 may determine whether to split any coding unit into an odd number of coding units by determining whether the third coding units 720a and 720b and 720c to 720e can be processed in a predetermined order. Figure 7 , the image decoding device 150 may determine the third coding units 720a and 720b, and 720c to 720e by recursively dividing the first coding unit 700. The image decoding device 150 may determine whether any of the following coding units is divided into an odd number of coding units based on at least one of the block shape information and the division shape information: the first coding unit 700, the second coding units 710a and 710b, and the third coding units 720a and 720b, and 720c to 720e. For example, the right second coding unit 710b may be divided into an odd number of third coding units 720c, 720d, and 720e. The processing order of the plurality of coding units included in the first coding unit 700 may be a predetermined order (e.g., a zigzag scan order 730). The image decoding device 150 may determine whether the third coding units 720c, 720d, and 720e determined by dividing the right second coding unit 710b into an odd number of coding units meet a condition for processing in the predetermined order.
[0143] According to an embodiment, the image decoding device 150 may determine whether the third coding units 720a and 720b, as well as 720c, 720d, and 720e included in the first coding unit 700 satisfy a condition for processing in a predetermined order, wherein the condition relates to whether at least one of the width and height of the second coding units 710a and 710b is divided in half along the boundary of the third coding units 720a and 720b, as well as 720c, 720d, and 720e. For example, the third coding units 720a and 720b determined by dividing the height of the non-square left second coding unit 710a in half satisfy the condition. However, because the boundary of the third coding units 720c, 720d, and 720e determined by dividing the right second coding unit 710b into three coding units does not divide the width or height of the right second coding unit 710b in half, it may be determined that the third coding units 720c, 720d, and 720e do not satisfy the condition. When the condition is not satisfied as described above, the image decoding device 150 may determine that the scanning order is discontinuous, and based on the determination result, determine that the second right coding unit 710b 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 150 may impose a predetermined restriction on the coding units at predetermined positions in the divided coding units. The restrictions or the predetermined positions have been described above with respect to various embodiments, and therefore a detailed description thereof will not be provided here.
[0144] Figure 8FIG2 shows a process of determining at least one coding unit by dividing the first coding unit 800, which is performed by the image decoding device 150 according to an embodiment. According to an embodiment, the image decoding device 150 may divide the first coding unit 800 based on at least one of the block shape information and the division shape information obtained by the receiver 160. The square first coding unit 800 may be divided into four square coding units, or may be divided into a plurality of non-square coding units. For example, referring to FIG2 Figure 8 When the block shape information indicates that the first coding unit 800 has a square shape and the division shape information indicates that the first coding unit 800 is divided into non-square coding units, the image decoding device 150 may divide the first coding unit 800 into a plurality of non-square coding units. Specifically, when the division shape information indicates that an odd number of coding units is determined by dividing the first coding unit 800 in a horizontal direction or a vertical direction, the image decoding device 150 may divide the square first coding unit 800 into an odd number of coding units (for example, second coding units 810a, 810b, and 810c determined by dividing the square first coding unit 800 in a vertical direction, or second coding units 820a, 820b, and 820c determined by dividing the square first coding unit 800 in a horizontal direction).
[0145] According to an embodiment, the image decoding device 150 may determine whether the second coding units 810a, 810b, 810c, 820a, 820b, and 820c included in the first coding unit 800 satisfy a condition for processing in a predetermined order, and the condition is related to whether at least one of the width and height of the first coding unit 800 is divided in half along the boundary of the second coding units 810a, 810b, 810c, 820a, 820b, and 820c. Figure 8Because the boundaries of second coding units 810a, 810b, and 810c determined by vertically dividing the first coding unit 800 into a square do not divide the width of the first coding unit 800 in half, it can be determined that the first coding unit 800 does not meet the conditions for processing in a predetermined order. Furthermore, because the boundaries of second coding units 820a, 820b, and 820c determined by horizontally dividing the first coding unit 800 into a square do not divide the height of the first coding unit 800 in half, it can be determined that the first coding unit 800 does not meet the conditions for processing in a predetermined order. When the conditions are not met as described above, the image decoding device 150 may determine that the scanning order is discontinuous and, based on the determination result, determine that the first coding unit 800 is divided into an odd number of coding units. According to an embodiment, when a coding unit is divided into an odd number of coding units, the image decoding device 150 may impose predetermined restrictions on coding units at predetermined positions within the divided coding units. These restrictions or predetermined positions have been described above with respect to various embodiments, and therefore a detailed description thereof will not be provided here.
[0146] According to an embodiment, the image decoding device 150 may determine coding units of various shapes by splitting the first coding unit.
[0147] Reference Figure 8 , the image decoding device 150 may divide the square first coding unit 800 or the non-square first coding unit 830 or 850 into coding units of various shapes.
[0148] Figure 9 It is shown that shapes into which the image decoding device 150 may split the second coding unit are limited when a second coding unit having a non-square shape determined by splitting the first coding unit 900 satisfies a predetermined condition according to an embodiment.
[0149] According to an embodiment, the image decoding device 150 may determine whether to split a square first coding unit 900 into non-square second coding units 910a, 910b, 920a, and 920b based on at least one of the block shape information and the division shape information obtained by the receiver 160. The second coding units 910a, 910b, 920a, and 920b may be independently divided. In this manner, the image decoding device 150 may determine whether to split the first coding unit 900 into multiple coding units or not to split the first coding unit 900 based on at least one of the block shape information and the division shape information of each of the second coding units 910a, 910b, 920a, and 920b. According to an embodiment, the image decoding device 150 may determine third coding units 912a and 912b by horizontally splitting the non-square left second coding unit 910a determined by vertically splitting the first coding unit 900. However, when the left second coding unit 910a is split horizontally, the image decoding device 150 may restrict the right second coding unit 910b from being split in the same horizontal direction as the left second coding unit 910a. When the third coding units 914a and 914b are determined by splitting the right second coding unit 910b in the same direction, third coding units 912a, 912b, 914a, and 914b may be determined because the left second coding unit 910a and the right second coding unit 910b are independently split horizontally. However, this situation has the same effect as the situation where the image decoding device 150 divides the first coding unit 900 into four square second coding units 930a, 930b, 930c, and 930d based on at least one of block shape information and division shape information, and may be inefficient in terms of image decoding.
[0150] According to an embodiment, the image decoding device 150 may determine the third coding units 922a, 922b, 924a, and 924b by vertically splitting the non-square second coding unit 920a or 920b determined by horizontally splitting the first coding unit 900. However, when the second coding unit (e.g., the upper second coding unit 920a) is split in the vertical direction, for the above-mentioned reason, the image decoding device 150 may limit the other second coding unit (e.g., the lower second coding unit 920b) to not be split in the vertical direction in which the upper second coding unit 920a is split.
[0151] Figure 10 A process of splitting a square coding unit when division shape information indicates that the square coding unit is not to be split into four square coding units, performed by the image decoding device 150 according to an embodiment, is illustrated.
[0152] According to an embodiment, the image decoding device 150 may determine second coding units 1010a, 1010b, 1020a, 1020b, etc. by dividing the first coding unit 1000 based on at least one of block shape information and division shape information. The division shape information may include information regarding various methods of dividing the coding unit, but the information regarding the various division methods may not include information for dividing the coding unit into four square coding units. Based on such division shape information, the image decoding device 150 may not divide the square first coding unit 1000 into the four square second coding units 1030a, 1030b, 1030c, and 1030d. The image decoding device 150 may determine non-square second coding units 1010a, 1010b, 1020a, 1020b, etc. based on the division shape information.
[0153] According to an embodiment, the image decoding device 150 may independently divide the non-square second coding units 1010a, 1010b, 1020a, 1020b, etc. Each of the second coding units 1010a, 1010b, 1020a, 1020b, etc. may be recursively divided in a predetermined order, and the division method may correspond to the method of dividing the first coding unit 1000 based on at least one of block shape information and division shape information.
[0154] For example, the image decoding device 150 can determine square third coding units 1012a and 1012b by horizontally dividing the left second coding unit 1010a, and can determine square third coding units 1014a and 1014b by horizontally dividing the right second coding unit 1010b. Furthermore, the image decoding device 150 can determine square third coding units 1016a, 1016b, 1016c, and 1016d by horizontally dividing both the left second coding unit 1010a and the right second coding unit 1010b. In this case, coding units having the same shape as the four square second coding units 1030a, 1030b, 1030c, and 1030d divided from the first coding unit 1000 can be determined.
[0155] As another example, the image decoding device 150 may determine square third coding units 1022a and 1022b by vertically dividing the upper second coding unit 1020a, and may determine square third coding units 1024a and 1024b by vertically dividing the lower second coding unit 1020b. Furthermore, the image decoding device 150 may determine square third coding units 1026a, 1026b, 1026c, and 1026d by vertically dividing both the upper second coding unit 1020a and the lower second coding unit 1020b. In this case, coding units having the same shape as the four square second coding units 1030a, 1030b, 1030c, and 1030d divided from the first coding unit 1000 may be determined.
[0156] Figure 11 It is shown that a processing order among a plurality of coding units may be changed according to a process of splitting the coding units according to an embodiment.
[0157] According to an embodiment, the image decoding device 150 may divide the first coding unit 1100 based on the block shape information and the division shape information. When the block shape information indicates a square shape and the division shape information indicates that the first coding unit 1100 is divided in at least one of the horizontal direction and the vertical direction, the image decoding device 150 may determine the second coding units 1110a, 1110b, 1120a, and 1120b by dividing the first coding unit 1100. Figure 11 , the non-square second coding units 1110a, 1110b, 1120a, and 1120b determined by dividing the first coding unit 1100 only in the horizontal direction or the vertical direction can be independently divided based on the block shape information and the division shape information of each coding unit. For example, the image decoding device 150 can determine the third coding units 1116a, 1116b, 1116c, and 1116d by dividing the second coding units 1110a and 1110b generated by dividing the first coding unit 1100 in the vertical direction in the horizontal direction, and can determine the third coding units 1126a, 1126b, 1126c, and 1126d by dividing the second coding units 1120a and 1120b generated by dividing the first coding unit 1100 in the horizontal direction in the vertical direction. As has been described above, Figure 9 An operation of dividing the second coding units 1110a, 1110b, 1120a, and 1120b is described, and thus a detailed description thereof will not be provided here.
[0158] According to an embodiment, the image decoding device 150 may process the coding units in a predetermined order. Figure 6The operation of processing the coding units in a predetermined order is described, and thus a detailed description thereof will not be provided here. Figure 11 , the image decoding device 150 may determine four square third coding units 1116a, 1116b, 1116c, and 1116d, and 1126a, 1126b, 1126c, and 1126d by dividing the first coding unit 1100 into a square. According to an embodiment, the image decoding device 150 may determine the processing order of the third coding units 1116a, 1116b, 1116c, and 1116d, and 1126a, 1126b, 1126c, and 1126d based on the division method of the first coding unit 1100.
[0159] According to an embodiment, the image decoding device 150 may determine third coding units 1116a, 1116b, 1116c, and 1116d by dividing the second coding units 1110a and 1110b generated by dividing the first coding unit 1100 in the vertical direction in the horizontal direction, and may process the third coding units 1116a, 1116b, 1116c, and 1116d in the following processing order 1117: first, the third coding units 1116a and 1116c included in the left second coding unit 1110a are processed in the vertical direction, and then the third coding units 1116b and 1116d included in the right second coding unit 1110b are processed in the vertical direction.
[0160] According to an embodiment, the image decoding device 150 may determine the third coding units 1126a, 1126b, 1126c and 1126d by dividing the second coding units 1120a and 1120b generated by dividing the first coding unit 1100 in the horizontal direction in the vertical direction, and may process the third coding units 1126a, 1126b, 1126c and 1126d in the following processing order 1127: first, the third coding units 1126a and 1126b included in the upper second coding unit 1120a are processed in the horizontal direction, and then the third coding units 1126c and 1126d included in the lower second coding unit 1120b are processed in the horizontal direction.
[0161] Reference Figure 11, square third coding units 1116a, 1116b, 1116c and 1116d and 1126a, 1126b, 1126c and 1126d can be determined by dividing the second coding units 1110a, 1110b, 1120a and 1120b respectively. Although the second coding units 1110a and 1110b determined by splitting the first coding unit 1100 in the vertical direction are different from the second coding units 1120a and 1120b determined by splitting the first coding unit 1100 in the horizontal direction, the third coding units 1116a, 1116b, 1116c, and 1116d and the third coding units 1126a, 1126b, 1126c, and 1126d split from the second coding units 1110a and 1110b and the second coding units 1120a and 1120b ultimately show the same shape of coding units split from the first coding unit 1100. In this way, by recursively splitting the coding units in different ways based on at least one of the block shape information and the division shape information, the image decoding device 150 can process a plurality of coding units in different orders even if the coding units are ultimately determined to have the same shape.
[0162] Figure 12 A process of determining a depth of a coding unit as a shape and size of a coding unit change when a coding unit is recursively split such that a plurality of coding units are determined is illustrated according to an embodiment.
[0163] According to an embodiment, the image decoding device 150 may determine the depth of the coding unit based on a predetermined criterion. For example, the predetermined criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being split is 2n (n>0) times the length of the long side of the current coding unit after being split, the image decoding device 150 may determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before being split. In the following description, the coding unit with increased depth is denoted as a coding unit of deeper depth.
[0164] Reference Figure 12According to an embodiment, the image decoding device 150 may determine the second coding unit 1202 and the third coding unit 1204 of a deeper depth by dividing the square first coding unit 1200 based on block shape information indicating a square shape (for example, the block shape information may be represented as "0: SQUARE"). Assuming that the size of the square first coding unit 1200 is 2N×2N, the second coding unit 1202 determined by dividing the width and height of the first coding unit 1200 into 1 / 2 may have a size of N×N. In addition, the third coding unit 1204 determined by dividing the width and height of the second coding unit 1202 into 1 / 2 may have a size of N / 2×N / 2. In this case, the width and height of the third coding unit 1204 are 1 / 4 of the width and height of the first coding unit 1200. When the depth of the first coding unit 1200 is D, the depth of the second coding unit 1202 whose width and height are 1 / 2 of the width and height of the first coding unit 1200 may be D+1, and the depth of the third coding unit 1204 whose width and height are 1 / 4 of the width and height of the first coding unit 1200 may be D+2.
[0165] According to an embodiment, the image decoding device 150 can determine the second coding unit 1212 or 1222 and the third coding unit 1214 or 1224 of a deeper depth by dividing the non-square first coding unit 1210 or 1220 based on block shape information indicating a non-square shape (for example, the block shape information can be represented as "1: NS_VER" indicating a non-square shape in which the height is longer than the width, or can be represented as "2: NS_HOR" indicating a non-square shape in which the width is longer than the height).
[0166] The image decoding device 150 may determine the second coding unit 1202, 1212, or 1222 by dividing at least one of the width and the height of the first coding unit 1210 having a size of N×2N. That is, the image decoding device 150 may determine the second coding unit 1202 having a size of N×N or the second coding unit 1222 having a size of N×N / 2 by dividing the first coding unit 1210 in a horizontal direction, or may determine the second coding unit 1212 having a size of N / 2×N by dividing the first coding unit 1210 in horizontal and vertical directions.
[0167] According to an embodiment, the image decoding device 150 may determine the second coding unit 1202, 1212, or 1222 by dividing at least one of the width and the height of the first coding unit 1220 having a size of 2N×N. That is, the image decoding device 150 may determine the second coding unit 1202 having a size of N×N or the second coding unit 1212 having a size of N / 2×N by dividing the first coding unit 1220 in a vertical direction, or may determine the second coding unit 1222 having a size of N×N / 2 by dividing the first coding unit 1220 in horizontal and vertical directions.
[0168] According to an embodiment, the image decoding device 150 may determine the third coding unit 1204, 1214, or 1224 by dividing at least one of the width and the height of the second coding unit 1202 having a size of N×N. That is, the image decoding device 150 may determine the third coding unit 1204 having a size of N / 2×N / 2, the third coding unit 1214 having a size of N / 4×N / 2, or the third coding unit 1224 having a size of N / 2×N / 4 by dividing the second coding unit 1202 in the vertical and horizontal directions.
[0169] According to an embodiment, the image decoding device 150 may determine the third coding unit 1204, 1214, or 1224 by dividing at least one of the width and the height of the second coding unit 1212 having a size of N / 2×N. That is, the image decoding device 150 may determine the third coding unit 1204 having a size of N / 2×N / 2 or the third coding unit 1224 having a size of N / 2×N / 4 by dividing the second coding unit 1212 in a horizontal direction, or may determine the third coding unit 1214 having a size of N / 4×N / 2 by dividing the second coding unit 1212 in vertical and horizontal directions.
[0170] According to an embodiment, the image decoding device 150 may determine the third coding unit 1204, 1214, or 1224 by dividing at least one of the width and height of the second coding unit 1212 having a size of N×N / 2. That is, the image decoding device 150 may determine the third coding unit 1204 having a size of N / 2×N / 2 or the third coding unit 1214 having a size of N / 4×N / 2 by dividing the second coding unit 1222 in a vertical direction, or may determine the third coding unit 1224 having a size of N / 2×N / 4 by dividing the second coding unit 1222 in vertical and horizontal directions.
[0171] According to an embodiment, the image decoding device 150 may split the square coding unit 1200, 1202, or 1204 in the horizontal direction or the vertical direction. For example, the image decoding device 150 may determine the first coding unit 1210 of size N×2N by splitting the first coding unit 1200 of size 2N×2N in the vertical direction, or may determine the first coding unit 1220 of size 2N×N by splitting the first coding unit 1200 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 splitting the first coding unit 1200 of size 2N×2N in the horizontal direction or the vertical direction may be the same as the depth of the first coding unit 1200.
[0172] According to an embodiment, the width and height of the third coding unit 1214 or 1224 may be 1 / 4 of the width and height of the first coding unit 1210 or 1220. When the depth of the first coding unit 1210 or 1220 is D, the depth of the second coding unit 1212 or 1222 whose width and height are 1 / 2 of the width and height of the first coding unit 1210 or 1220 may be D+1, and the depth of the third coding unit 1214 or 1224 whose width and height are 1 / 4 of the width and height of the first coding unit 1210 or 1220 may be D+2.
[0173] Figure 13 Depths that may be determined based on shapes and sizes of coding units and partial indices (PIDs) for distinguishing coding units, according to an embodiment, are illustrated.
[0174] According to an embodiment, the image decoding device 150 may determine second coding units of various shapes by dividing the first coding unit 1300 of a square. Figure 13 , the image decoding device 150 may determine the second coding units 1302a and 1302b, the second coding units 1304a and 1304b, and the second coding units 1306a, 1306b, 1306c, and 1306d by dividing the first coding unit 1300 in at least one of the vertical and horizontal directions based on the division shape information. That is, the image decoding device 150 may determine the second coding units 1302a and 1302b, the second coding units 1304a and 1304b, and the second coding units 1306a, 1306b, 1306c, and 1306d based on the division shape information of the first coding unit 1300.
[0175] According to an embodiment, the depths of the second coding units 1302a and 1302b, the second coding units 1304a and 1304b, and the second coding units 1306a, 1306b, 1306c, and 1306d determined based on the division shape information of the square first coding unit 1300 may be determined based on the length of their long sides. For example, since the length of the side of the square first coding unit 1300 is equal to the length of the long side of the non-square second coding units 1302a and 1302b and 1304a and 1304b, the first coding unit 1300 and the non-square second coding units 1302a and 1302b and 1304a and 1304b may have the same depth, for example, D. However, when the image decoding device 150 divides the first coding unit 1300 into four square second coding units 1306a, 1306b, 1306c and 1306d based on the division shape information, because the length of the side of the square second coding units 1306a, 1306b, 1306c and 1306d is 1 / 2 of the length of the side of the first coding unit 1300, the depth of the second coding units 1306a, 1306b, 1306c and 1306d can be D+1, which is 1 deeper than the depth D of the first coding unit 1300.
[0176] According to an embodiment, the image decoding device 150 may determine a plurality of second coding units 1312a and 1312b, and 1314a, 1314b, and 1314c by horizontally dividing the first coding unit 1310 in which the height is longer than the width based on the division shape information. According to an embodiment, the image decoding device 150 may determine a plurality of second coding units 1322a and 1322b, and 1324a, 1324b, and 1324c by vertically dividing the first coding unit 1320 in which the width is longer than the height based on the division shape information.
[0177] According to an embodiment, the depths of the second coding units 1312a and 1312b, the second coding units 1314a, 1314b, and 1314c, the second coding units 1322a and 1322b, and the second coding units 1324a, 1324b, and 1324c, which are determined based on the division shape information of the non-square first coding unit 1310 or 1320, may be determined based on the lengths of their long sides. For example, since the lengths of the sides of the square second coding units 1312a and 1312b are 1 / 2 of the lengths of the long sides of the non-square first coding unit 1310 having a height longer than a width, the depths of the square second coding units 1312a and 1312b are D+1, which is 1 deeper than the depth D of the non-square first coding unit 1310.
[0178] In addition, the image decoding device 150 may divide the non-square first coding unit 1310 into an odd number of second coding units 1314a, 1314b, and 1314c based on the division shape information. The odd number of second coding units 1314a, 1314b, and 1314c may include the non-square second coding units 1314a and 1314c and the square second coding unit 1314b. In this case, because the length of the long side of the non-square second coding units 1314a and 1314c and the length of the side of the square second coding unit 1314b are 1 / 2 of the length of the long side of the first coding unit 1310, the depth of the second coding units 1314a, 1314b, and 1314c may be D+1, which is 1 deeper than the depth D of the non-square first coding unit 1310. The image decoding device 150 may determine the depths of the coding units split from the first coding unit 1320 having a non-square shape having a width longer than a height by using the above-described method of determining the depths of the coding units split from the first coding unit 1310 .
[0179] According to an embodiment, when the odd-numbered split coding units do not have equal sizes, the image decoding device 150 may determine a PID for identifying the split coding units based on a size ratio between the coding units. Figure 13 , the width of the center coding unit 1314b among the odd-numbered divided coding units 1314a, 1314b, and 1314c may be equal to the widths of the other coding units 1314a and 1314c, and its height may be twice the heights of the other coding units 1314a and 1314c. That is, in this case, the center coding unit 1314b may include two other coding units 1314a or 1314c. Therefore, when the PID of the center coding unit 1314b is 1 based on the scanning order, the PID of the coding unit 1314c located adjacent to the coding unit 1314b may increase by 2 and thus may be 3. That is, there may be discontinuity in the PID values. According to an embodiment, the image decoding device 150 may determine whether the odd-numbered divided coding units are not of equal size based on whether there is discontinuity in the PIDs used to identify the divided coding units.
[0180] According to an embodiment, the image decoding device 150 may determine whether to use a specific splitting method based on a PID value for identifying a plurality of coding units determined by splitting the current coding unit. Figure 13, the image decoding device 150 may determine an even number of coding units 1312a and 1312b or an odd number of coding units 1314a, 1314b, and 1314c by dividing the first coding unit 1310 into a rectangular shape whose height is longer than its width. The image decoding device 150 may use a PID to identify each coding unit. According to an embodiment, the PID may be obtained from a sample at a predetermined position (e.g., an upper left sample) of each coding unit.
[0181] According to an embodiment, the image decoding device 150 may determine a coding unit at a predetermined position among the divided coding units by using a PID used to distinguish between coding units. According to an embodiment, when the division shape information of the first coding unit 1310 having a rectangular shape with a height longer than a width indicates that the coding unit is divided into three coding units, the image decoding device 150 may divide the first coding unit 1310 into three coding units 1314a, 1314b, and 1314c. The image decoding device 150 may assign a PID to each of the three coding units 1314a, 1314b, and 1314c. The image decoding device 150 may compare the PIDs of the odd-numbered divided coding units to determine the coding unit at the center position among the odd-numbered divided coding units. The image decoding device 150 may determine the coding unit 1314b having a PID corresponding to an intermediate value among the PIDs of the coding units as the coding unit at the center position among the coding units determined by dividing the first coding unit 1310. According to an embodiment, when the divided coding units do not have equal sizes, the image decoding device 150 may determine a PID for distinguishing the divided coding units based on a size ratio between the coding units. Figure 13, the width of coding unit 1314b generated by dividing the first coding unit 1310 may be equal to the widths of the other coding units 1314a and 1314c, and its height may be twice the height of the other coding units 1314a and 1314c. In this case, when the PID of coding unit 1314b at the center is 1, the PID of coding unit 1314c located adjacent to coding unit 1314b may increase by 2 and thus may be 3. When the PIDs do not increase uniformly as described above, the image decoding device 150 may determine that the coding unit is divided into multiple coding units, where the multiple coding units include coding units with sizes different from the sizes of other coding units. According to an embodiment, when the division shape information indicates that the coding unit is divided into an odd number of coding units, the image decoding device 150 may divide the current coding unit such that a coding unit at a predetermined position (e.g., the coding unit at the center) among the odd number of coding units has a size different from the sizes of the other coding units. In this case, the image decoding device 150 can determine the coding units at the center with different sizes by using the PIDs of the coding units. However, the PID and the size or position of the coding unit at the predetermined position are not limited to the above examples, and various PIDs and various positions and sizes of the coding unit may be used.
[0182] According to an embodiment, the image decoding device 150 may use a predetermined data unit in which to start recursively splitting the coding unit.
[0183] Figure 14 It is shown that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.
[0184] According to an embodiment, a predetermined data unit may be defined as a data unit for recursively splitting a coding unit by starting with at least one of block shape information and division shape information. That is, the predetermined data unit may correspond to a coding unit for determining the highest depth of a plurality of coding units split from the current picture. In the following description, for ease of explanation, the predetermined data unit is referred to as a reference data unit.
[0185] Depending on the embodiment, the reference data unit may have a predetermined size and a predetermined size shape. Depending on the embodiment, the reference data unit may include M×N samples. Here, M and N may be equal to each other and may be integers expressed as powers of 2. That is, the reference data unit may have a square shape or a non-square shape and may be divided into an integer number of coding units.
[0186] According to an embodiment, the image decoding device 150 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding device 150 may divide the plurality of reference data units divided from the current picture by using division information about each reference data unit. The operation of dividing the reference data units may correspond to a division operation using a quadtree structure.
[0187] According to an embodiment, the image decoding device 150 may predetermine the minimum size allowed for the reference data unit included in the current picture. Therefore, the image decoding device 150 may determine various reference data units having a size equal to or larger than the minimum size, and may determine one or more coding units by using block shape information and partition shape information with reference to the determined reference data units.
[0188] Reference Figure 14 , the image decoding apparatus 150 may use a square reference coding unit 1400 or a non-square reference coding unit 1402. Depending on an embodiment, the shape and size of a reference coding unit may be determined based on various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.) that can include one or more reference coding units.
[0189] According to an embodiment, the receiver 160 of the image decoding device 150 may obtain at least one of reference coding unit shape information and reference coding unit size information for each of various data units from a bitstream. Figure 10 The operation of dividing the current coding unit 1000 into one or more coding units is described above. Figure 11 The operation of splitting the current coding unit 1100 describes an operation of splitting the non-square reference coding unit 1402 into one or more coding units. Therefore, a detailed description thereof will not be provided here.
[0190] According to an embodiment, the image decoding device 150 may 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 certain data units predetermined based on predetermined conditions. That is, the receiver 160 may 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 (a slice, slice segment, or maximum coding unit, for example, a data unit that satisfies the predetermined conditions (e.g., a data unit with a size equal to or smaller than a slice) among various data units (e.g., a sequence, a picture, a slice, a slice segment, a maximum coding unit, etc.). The image decoding device 150 may 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 relatively small data unit, the use of the bitstream may be inefficient. Therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and reference coding unit size information. In this case, at least one of the size and shape of the reference coding unit corresponding to the PID for identifying the size and shape of the reference coding unit may be predetermined. That is, the image decoding device 150 may determine at least one of the sizes and shapes of the reference coding units included in the data unit serving as the unit for obtaining the PID by selecting at least one of the sizes and shapes of the reference coding units predetermined based on the PID.
[0191] According to an embodiment, the image decoding device 150 may use one or more reference coding units included in the maximum coding unit. That is, the maximum coding unit divided from the picture may include one or more reference coding units, and the coding unit may be determined by recursively dividing each reference coding unit. According to an embodiment, 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 an embodiment, the size of the reference coding unit may 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 150 may determine the reference coding unit by dividing the maximum coding unit n times based on a quadtree structure, and may divide the reference coding unit based on at least one of block shape information and division shape information.
[0192] Figure 15 Processing blocks serving as units for determining an order of reference coding units included in the picture 1500 according to an embodiment are illustrated.
[0193] According to an embodiment, the image decoding device 150 may determine one or more processing blocks divided from a picture. A processing block is a data unit divided from a picture including one or more reference coding units, and the one or more reference coding units included in the processing block may be determined according to a specific order. That is, the determination order of the one or more reference coding units determined in each processing block may correspond to one of various types of orders for determining reference coding units and may vary according to the processing block. The determination order of the reference coding units determined for each processing block may be one of various orders (e.g., raster scan, zigzag scan, N-shaped scan, upper right diagonal scan, horizontal scan, and vertical scan), but is not limited to the scanning order mentioned above.
[0194] According to an embodiment, the image decoding device 150 may obtain processing block size information and determine the size of one or more processing blocks included in a picture. The image decoding device 150 may obtain processing block size information from a bitstream and determine the size of one or more processing blocks included in a picture. The size of the processing block may be a predetermined size of a data unit indicated by the processing block size information.
[0195] According to an embodiment, the receiver 160 of the image decoding device 150 may obtain processing block size information from the bitstream based on each specific data unit. For example, the processing block size information may be obtained from the bitstream based on a data unit such as an image, sequence, picture, slice, or slice segment. That is, the receiver 160 may obtain processing block size information from the bitstream based on each of the various data units, and the image decoding device 150 may determine the size of one or more processing blocks divided from the picture by using the obtained processing block size information. The size of the processing block may be an integer multiple of the size of the reference coding unit.
[0196] According to an embodiment, the image decoding device 150 may determine the sizes of the processing blocks 1502 and 1512 included in the picture 1500. For example, the image decoding device 150 may determine the sizes of the processing blocks based on processing block size information obtained from the bitstream. Figure 15 According to an embodiment, the image decoding device 150 may determine the width of the processing blocks 1502 and 1512 to be four times the width of the reference coding unit, and may determine the height of the processing blocks 1502 and 1512 to be four times the height of the reference coding unit. The image decoding device 150 may determine the order in which one or more reference coding units are determined in one or more processing blocks.
[0197] According to an embodiment, the image decoding device 150 may determine the processing blocks 1502 and 1512 included in the picture 1500 based on the size of the processing blocks, and may determine the order of determining one or more reference coding units in the processing blocks 1502 and 1512. According to an embodiment, determining the reference coding unit may include determining the size of the reference coding unit.
[0198] According to an embodiment, the image decoding device 150 may obtain determination order information of one or more reference coding units included in one or more processing blocks from a bitstream, and may determine a determination order for the one or more reference coding units based on the obtained determination order information. The determination order information may be defined as the order or direction of determining the reference coding units in the processing block. In other words, the determination order of the reference coding units may be determined independently for each processing block.
[0199] According to an embodiment, the image decoding device 150 may obtain the determination order information of the reference coding units from the bitstream for each specific data unit. For example, the receiver 160 may obtain the determination order information of the reference coding units from the bitstream for each data unit (such as an image, sequence, picture, slice, slice segment, or processing block). Because the determination order information of the reference coding units indicates the order of determining the reference coding units in the processing block, the determination order information can be obtained for each specific data unit including an integer number of processing blocks.
[0200] According to an embodiment, the image decoding device 150 may determine one or more reference coding units based on the determined order.
[0201] According to an embodiment, the receiver 160 may obtain the determination order information of the reference coding units from the bitstream as information related to the processing blocks 1502 and 1512, and the image decoding device 150 may determine the determination order of one or more reference coding units included in the processing blocks 1502 and 1512, and determine one or more reference coding units included in the picture 1500 based on the determination order. Figure 15 , the image decoding device 150 may determine determination orders 1504 and 1514 of one or more reference coding units in the processing blocks 1502 and 1512, respectively. For example, when determination order information of the reference coding units is obtained for each processing block, different types of determination order information of the reference coding units may be obtained for the processing blocks 1502 and 1512. When the determination order 1504 of the reference coding units in the processing block 1502 is a raster scan order, the reference coding units included in the processing block 1502 may be determined according to the raster scan order. Conversely, when the determination order 1514 of the reference coding units in another processing block 1512 is a reverse raster scan order, the reference coding units included in the processing block 1512 may be determined according to the reverse raster scan order. In FIG. 1 to FIG. Figure 15 In , a method of dividing an image into maximum coding units and dividing the maximum coding unit into coding units having a hierarchical tree structure is described. Figure 16 to Figure 2 5, it will be described in which coding order the plurality of coding units determined by dividing the coding units are to be encoded or decoded.
[0202] Figure 16 A video decoding apparatus 1600 is shown for dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment.
[0203] The video decoding apparatus 1600 includes a block divider 1610, a decoding order determiner 1620, and a decoder 1630. Figure 16 , although the block divider 1610, the decoding order determiner 1620, and the decoder 1630 are illustrated as separate constituent units, according to an embodiment, the block divider 1610, the decoding order determiner 1620, and the decoder 1630 may be combined to be implemented as one constituent unit.
[0204] exist Figure 16 , although the block divider 1610, the decoding order determiner 1620, and the decoder 1630 are shown as being included in one device, the devices that perform the respective functions of the block divider 1610, the decoding order determiner 1620, and the decoder 1630 may not necessarily be physically adjacent to each other. Therefore, according to an embodiment, the block divider 1610, the decoding order determiner 1620, and the decoder 1630 may be distributed.
[0205] According to an embodiment, the block divider 1610, the decoding order determiner 1620, and the decoder 1630 may be implemented by one processor. Also, according to an embodiment, the block divider 1610, the decoding order determiner 1620, and the decoder 1630 may be implemented by a plurality of processors.
[0206] can be Figure 2 The decoder 170 performs Figure 16 The functions performed by the block divider 1610, the decoding order determiner 1620 and the decoder 1630.
[0207] The block divider 1610 may obtain division information indicating whether to divide the current block. The division information indicates whether to divide the current block into two or more smaller blocks. When the division information indicates to divide the current block, the block divider 1610 divides the current block into two or more lower-layer blocks.
[0208] The current block may be divided into various shapes according to its shape. For example, when the current block is a square, the current block may be divided into four lower layer blocks having a square shape according to the division information.
[0209] When two or more partitioning methods are permitted for the shape of the current block, the block divider 1610 may select a partitioning method based on the partitioning shape information. Therefore, when the partitioning information indicates that the current block is to be partitioned, the block divider 1610 may obtain partitioning shape information indicating the partitioning method for the current block. Furthermore, the block divider 1610 may partition the current block based on the partitioning method indicated by the partitioning shape information. For example, when the current block has a square shape of 2N×2N, the partitioning shape information may indicate the partitioning method to be applied to the current block, among four-partition, vertical-two-partition, horizontal-two-partition, vertical-three-partition, and horizontal-three-partition. Four-partition is a method of dividing the current block into four N×N blocks. Vertical-two-partition is a method of dividing the current block into 2N×N blocks. Horizontal-two-partition is a method of dividing the current block into N×2N blocks. Horizontal-three-partition is a method of dividing a 2N×2N block into three blocks of equal width and a height ratio of 1:2:1. Vertical three-partitioning refers to a method of dividing a block of size 2N×2N into three blocks having the same height and a width ratio of 1:2:1. In addition, the current block may be divided by one of various horizontal or vertical partitioning methods.
[0210] When the current block is a vertically elongated rectangle of size 2N×N, the partition shape information may indicate a partitioning method to be applied to the current block, either horizontal two-partitioning or horizontal three-partitioning. Horizontal two-partitioning is a method of dividing the current block into two blocks of size N×N. Horizontal three-partitioning is a method of dividing a 2N×N block into three blocks of equal width and height in a 1:2:1 ratio. Furthermore, the current block may be partitioned using one of various horizontal or vertical partitioning methods.
[0211] When the current block is a horizontally elongated rectangle of size N×2N, the partition shape information may indicate a partitioning method to be applied to the current block, either vertical 2-partitioning or vertical 3-partitioning. Vertical 2-partitioning divides the current block into two N×N blocks. Vertical 3-partitioning divides the current block into three blocks of the same height and width in a 1:2:1 ratio. Furthermore, the current block may be partitioned using one of various horizontal or vertical partitioning methods.
[0212] In addition to the above division methods, a method of dividing the current block in an asymmetric ratio, a method of dividing the current block into a triangular shape, and a method of dividing the current block into other geometric shapes may also be used to divide the current block into square and rectangular sizes.
[0213] According to an embodiment, the partition information may indicate a partition shape of the current block. For example, the partition information may indicate one of vertical two-partition, horizontal two-partition, vertical three-partition, horizontal three-partition, and no partition. When the partition information indicates no partition, the current block is not partitioned. Therefore, the block partitioner 1610 may parse the partition information to determine whether the current block is partitioned and determine the partition shape of the current block. Figure 33 , various embodiments in which the split information indicates whether the current block is split and the split shape of the current block will be described.
[0214] The decoding order determiner 1620 may obtain coding order information indicating the coding order of the lower layer blocks. The coding order information indicates the coding order of two or more lower layer blocks included in the current block. The amount of data of the coding order information is determined according to the number of lower layer blocks and the coding order determination method.
[0215] For example, when there are two lower layer blocks, the encoding order information may be determined to indicate which of the two lower layer blocks is encoded first. Therefore, the encoding order information may have a flag shape having a data amount of 1 bit.
[0216] The decoding order determiner 1620 may determine whether to obtain coding order information based on the type of the slice including the current block. When the slice is a P slice or a B slice, the decoding order determiner 1620 may obtain coding order information about the current block from the bitstream. When the slice is an I slice, the decoding order determiner 1620 may obtain coding order information about the current block from the bitstream only when the current block is a luma block.
[0217] The decoding order determiner 1620 may determine whether to obtain coding order information based on the size of the current block. The coding order information is predetermined based on the minimum and maximum values of the block size being obtained. When the smaller value between the height and width of the current block is greater than or equal to the minimum value of the block size and the larger value between the height and width of the current block is less than or equal to the maximum value of the block size, the decoding order determiner 1620 may obtain the coding order information of the current block from the bitstream.
[0218] The decoding order determiner 1620 may determine whether to obtain coding order information based on the partition shape of the current block. When the current block is divided into four, two vertically, or three vertically, the decoding order determiner 1620 may obtain the coding order information of the current block from the bitstream. However, when the current block is divided into two horizontally or three vertically, the coding order information is not obtained.
[0219] The decoding order determiner 1620 may determine whether to obtain the coding order information based on the shape of the current block. For example, when the width of the current block is greater than the height of the current block, the decoding order determiner 1620 may obtain the coding order information of the current block from the bitstream. According to an embodiment, the coding order information may be obtained even when the width of the current block is the same as the height of the current block.
[0220] In terms of encoding, the coding order information indicates the order in which the lower layer blocks are encoded. In terms of decoding, the decoding order and the encoding order are determined to be the same, and therefore, the encoding order and the decoding order can be used interchangeably. Therefore, in this specification, the coding order and the decoding order are understood to be substantially the same.
[0221] However, when there are four lower-layer blocks, the number of cases of the coding order of the lower-layer blocks is 4! = 24. Therefore, in order to indicate 24 coding orders, 5 bits of data are required. That is, as the number of lower-layer blocks increases, the number of cases of the coding order increases. Therefore, in order to reduce the data amount of the coding order information, a coding order determination method can be used that determines the coding order by determining whether the coding order of some lower-layer block pairs is replaced according to a predetermined basic coding order. The coding order information indicating whether the coding order of the lower-layer block pair is replaced indicates whether the coding order is forward or reverse relative to the basic coding order.
[0222] The current picture including the current block is encoded and decoded according to the basic coding order. All the blocks and pixels in the current picture that have been encoded and decoded are encoded and decoded at the same level according to the basic coding order. Therefore, the lower layer blocks at the same level divided from the current block are also encoded and decoded according to the basic coding order. Figures 18a to 18b An embodiment of the basic encoding sequence is shown in FIG, which will be described later.
[0223] Therefore, when the lower layer block pair is encoded according to the basic coding order, the lower layer block pair is encoded in the forward direction. Conversely, when the lower layer block pair is encoded in the reverse order of the basic coding order, the lower layer block pair is encoded in the reverse direction.
[0224] For example, when two lower layer blocks are horizontally adjacent to each other and are encoded in the forward direction, the encoding order information may be determined so that the lower layer left block is decoded first. Conversely, when two lower layer blocks are horizontally adjacent to each other and are encoded in the reverse direction, the encoding order information may be determined so that the lower layer right block is decoded first.
[0225] Similarly, when two lower layer blocks are vertically adjacent to each other and are encoded in the forward direction, the coding order information may be determined so that the upper lower layer block is decoded first. Conversely, when two lower layer blocks are vertically adjacent to each other and are encoded in the reverse direction, the coding order information may be determined so that the lower lower layer block is decoded first.
[0226] When the coding order information indicates only the coding order of the lower layer block pair, the coding order information has a data amount of 1 bit. The coding order information having a data amount of 1 bit may be defined as a coding order flag.
[0227] The decoding order determiner 1620 may obtain encoding order information from the bitstream. The encoding order information may be located after the partition information in the bitstream.
[0228] The decoding order determiner 1620 may implicitly determine the coding order information based on the surrounding environment of the current block. The coding order information may be determined based on whether neighboring blocks adjacent to the current block are encoded. For example, the decoding order determiner 1620 may determine to first decode a lower layer block having a large number of neighboring blocks that are first decoded among the lower layer blocks.
[0229] Regarding the decoding order determiner 1620, refer to Figures 17a to 17c A basic encoding sequence according to an embodiment is described. Figures 17a to 17c The basic encoding order is a zigzag encoding order. According to the zigzag encoding order, when data units are encoded from left to right and all data units of the current row are encoded, data units in the rows below the current row are encoded from left to right. The above zigzag encoding order is called a raster scan order.
[0230] Figure 17a The coding order of the maximum coding units included in the current picture 1700 according to the zigzag coding order is shown. Indexes 0 to 15 are set in the maximum coding units according to the zigzag coding order. The maximum coding units of the first row with indexes 0 to 3 set according to the zigzag coding order are first encoded, and then the maximum coding units of the second row with indexes 4 to 7 set are encoded from left to right. The maximum coding units are also intra-encoded according to the zigzag coding order.
[0231] Figure 17b The coding order of the maximum coding unit 1710 with an index of 6 among the maximum coding units included in the current picture 1700 is shown. Indices 0 to 15 are set in the coding unit with the final depth after division according to the zigzag coding order. The zigzag coding order is applied to data units with the same depth. In addition, the subsequent coding unit with a depth of n is not encoded until all lower-layer coding units of the coding unit with a depth of n are encoded. For example, the coding unit with an index of 15 is not encoded until all coding units with indices of 5 to 14 are encoded. The coding units are also intra-encoded according to the zigzag coding order.
[0232] Figure 17cThe reference samples referenced by the coding unit 1724 with an index of 6 among the coding units included in the maximum coding unit 1710 are shown. Only the coding unit 1712 with an index of 0 and the coding unit 1722 with an index of 5 are reconstructed around the currently encoded coding unit 1724 with an index of 6. Therefore, for the coding unit 1724, only the pixel 1750 of the coding unit 1712 and the pixel 1760 of the coding unit 1722 can be used as reference samples.
[0233] Can be applied in different directions based on data units Figures 17a to 17c For example, the zigzag encoding order can be changed so that data units in the same row are encoded from right to left. In addition, the zigzag encoding order can be changed so that all data units in the current row are encoded, and then the data units included in the row above the current row are encoded. The zigzag encoding order can be changed so that data units in the same column are encoded from top to bottom, all data units in the current column are encoded, and then the data units in the column to the right of the current column are encoded.
[0234] Regarding the decoding order determiner 1620, Figure 18a and Figure 18b The case where the coding unit 1810 is coded in the forward direction 1800 and the case where the coding unit 1820 is coded in the reverse direction 1802 are shown respectively. Figure 18a and Figure 18b Advantages gained by changing the encoding order.
[0235] Figure 18a and Figure 18b Coding units 1810 and 1820 are predicted according to intra prediction using neighboring samples in an upper-right direction. Figure 18a and Figure 18b The continuous line 1830 is a line of pixels having predetermined values arranged in a straight line in the original image. Therefore, when the current coding unit is predicted in the direction of the continuous line 1830, the prediction accuracy of the coding units 1810 and 1820 can be improved.
[0236] In the case 1800 where coding unit 1810 is encoded in the forward direction, the left coding unit, the upper coding unit, and the upper right coding unit of the current coding unit 1810 are reconstructed before the current coding unit 1810. Therefore, the current coding unit 1810 refers to the pixels or encoding information of the left coding unit, the upper coding unit, and the upper right coding unit. For example, pixel 1816 located at the lower corner of the upper right coding unit is used for prediction of the current coding unit 1810. Because pixel 1816 is spatially separable from the current coding unit 1810, the prediction accuracy of portion 1814 of the current coding unit 1810 may be low.
[0237] However, since the right coding unit, the upper coding unit, and the upper left coding unit of the current coding unit 1810 are reconstructed before the current coding unit 1820 in the case 1802 in which the current coding unit 1820 is encoded in the reverse direction, a pixel 1826 located at the left corner of the right coding unit can be used for intra prediction of the current coding unit 1820. Since the pixel 1826 is adjacent to the current coding unit 1820, the prediction accuracy of the portion 1824 of the current coding unit 1820 can be improved compared to the prediction accuracy of the portion 1814 of the current coding unit 1810.
[0238] As reference Figure 18a and Figure 18b In the described embodiments of intra-frame prediction, there are many cases where prediction accuracy can be improved by obtaining coding information from blocks located in the opposite direction compared to inter-frame prediction. When the current coding unit and the coding unit to the right of the current coding unit are coding units for the same object, the motion information of the current coding unit may be similar to that of the coding unit to the right. Therefore, by deriving the motion information of the current coding unit from the motion information of the coding unit to the right, coding efficiency can be improved.
[0239] The coding order information may be set to be the same as the coding order information applied to the block above the current block. For example, when the current block is a block for prediction or a block for transformation, the decoding order determiner 1620 may apply the coding order information applied to the coding unit including the current block to the current block. As another example, when the current block is a coding unit, the decoding order determiner 1620 may apply the coding order information applied to a coding unit having a depth deeper than the depth of the current block to the current block.
[0240] When the current block requires two or more coding order flags, the decoding order determiner 1620 may obtain only one coding order flag from the bitstream and may determine the remaining coding order flags as predetermined values based on the coding order flag obtained from the bitstream.
[0241] Regarding the decoding order determiner 1620 determining the encoding order, Figure 19 A tree structure of a maximum coding unit for describing a maximum coding unit and an encoding order of coding units included in the maximum coding unit is illustrated.
[0242] The maximum coding unit 1950 is divided into a plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986. The maximum coding unit 1950 corresponds to the topmost node 1900 having a tree structure. The plurality of coding units 1956, 1958, 1960, 1962, 1968, 1970, 1972, 1974, 1980, 1982, 1984, and 1986 correspond to a plurality of nodes 1906, 1908, 1910, 1912, 1918, 1920, 1922, 1924, 1930, 1932, 1934, and 1936, respectively. In the tree structure, upper coding order flags 1902 , 1914 , and 1926 indicating the coding order correspond to arrows 1952 , 1964 , and 1976 , and lower coding order flags 1904 , 1916 , and 1928 correspond to arrows 1954 , 1966 , and 1978 .
[0243] The upper coding order flag indicates the coding order of the two upper coding units among the four coding units divided from one coding unit. When the upper coding order flag is 0, the coding is performed in the forward direction. Conversely, when the upper coding order flag is 1, the coding is performed in the reverse direction.
[0244] Similarly, the lower coding order flag indicates the coding order of the two lower coding units among the four coding units divided from the one coding unit. When the lower coding order flag is 0, the coding is performed in the forward direction. Conversely, when the lower coding order flag is 1, the coding is performed in the reverse direction.
[0245] For example, since the upper coding order flag 1914 is 0, the coding order between coding units 1968 and 1970 is determined from left to right, which is the forward direction. Since the lower coding order flag 1916 is 1, the coding order between coding units 1972 and 1974 is determined from right to left, which is the reverse direction.
[0246] According to an embodiment, the upper coding order flag and the lower coding order flag may be set to have the same value. For example, when the upper coding order flag 1902 is determined to be 1, the lower coding order flag 1904 corresponding to the upper coding order flag 1902 may also be determined to be 1. Because the values of the upper coding order flag and the lower coding order flag are determined to be 1 bit, the amount of information in the coding order information is reduced.
[0247] According to an embodiment, the upper coding order flag and the lower coding order flag of the current coding unit may be determined with reference to at least one of the upper coding order flag and the lower coding order flag applied to a coding unit larger than the current coding unit. For example, the upper coding order flag 1926 and the lower coding order flag 1928 applied to coding units 1980, 1982, 1984, and 1986 may be determined based on the lower coding order flag 1916 applied to coding units 1972 and 1974. Therefore, the upper coding order flag 1926 and the lower coding order flag 1928 may be determined to have the same value as the lower coding order flag 1916. Because the values of the upper coding order flag and the lower coding order flag are determined from the coding unit above the current coding unit, the coding order information is not obtained from the bitstream. Therefore, the amount of coding order information is reduced.
[0248] According to an embodiment, whether to obtain the coding order flag of a block may be determined based on the depth or size of the block. For example, the coding order flag may be obtained only for blocks of a predetermined size, and not for blocks of other sizes. When the current block is larger than a block of a predetermined size, the coding order may be determined in a forward direction without obtaining the coding order flag. When the current block is smaller than a block of a predetermined size, the coding order may be determined based on the upper layer block of the current block without obtaining the coding order flag. The size of the block from which the coding order flag is obtained may be determined arbitrarily. For example, the size of the block from which the coding order flag is obtained may be determined as 16×16 and 32×32.
[0249] Regarding the decoding order determiner 1620 determining the encoding order, Figure 20 It shows how to determine the coding order of two or more divided blocks according to the coding order flag. Figure 20 The top upper block 2000 in the image is rectangular. It can be determined whether to obtain the encoding order flag of the upper block 2000 based on the height and width of the upper block 2000.
[0250] For example, when the larger of the height and width of the upper block 2000 is smaller than the maximum split unit coding order (SUCO) size, the coding order flag of the upper block 2000 may be obtained. Furthermore, when the smaller of the height and width of the upper block 2000 is larger than the minimum SUCO size, the coding order flag of the upper block 2000 may be obtained. When both of the above conditions are met, the coding order flag of the upper block 2000 may be obtained.
[0251] Figure 20The first embodiment 2010 shows a method for determining the coding order of two blocks generated by vertical division. When the coding order of the left block 2011 and the right block 2012 is determined to be forward, the left block 2011 is coded before the right block 2012. On the other hand, when the coding order of the left block 2011 and the right block 2012 is determined to be reverse, the right block 2012 is coded before the left block 2011.
[0252] Figure 20 The second embodiment 2020 shows a method for determining the coding order of three blocks generated by vertical division. When the coding order of the left block 2021, the center block 2022, and the right block 2023 is determined to be forward, the left block 2021, the center block 2022, and the right block 2023 are encoded in sequence. Conversely, when the coding order of the left block 2021, the center block 2022, and the right block 2023 is determined to be reverse, the right block 2023, the center block 2022, and the left block 2021 are encoded in sequence.
[0253] exist Figure 20 In the third embodiment 2030 and the fourth embodiment 2040, two blocks and three blocks are generated by horizontal division, respectively. In the third embodiment 2030 and the fourth embodiment 2040 in which the blocks are divided horizontally, the encoding order is always determined to be forward.
[0254] Figure 20 A fifth embodiment 2050 illustrates a method for determining the coding order of four blocks generated by vertical and horizontal partitioning. According to the fifth embodiment 2050, when the coding order of the upper left block 2051, the upper right block 2052, the lower left block 2053, and the lower right block 2054 is determined to be forward, the upper left block 2051, the upper right block 2052, the lower left block 2053, and the lower right block 2054 are encoded in sequence. Conversely, when the coding order of the upper left block 2051, the upper right block 2052, the lower left block 2053, and the lower right block 2054 is determined to be reverse, the upper right block 2052, the upper left block 2051, the lower right block 2054, and the lower left block 2053 are encoded in sequence. In the fifth embodiment 2050, the coding order of the upper blocks 2051 and 2052, and the coding order of the lower blocks 2053 and 2054 are shown to be the same, but they can be set to different.
[0255] Figure 21 A method for determining the coding order of lower layer blocks according to the coding order of upper layer blocks is shown. Figure 21 In an embodiment, the coding order flag may be obtained only for blocks having a predetermined size. The coding order of blocks having a size smaller than the predetermined size is determined to be the same as the coding order of the upper layer blocks.
[0256] exist Figure 21In the embodiment of , the coding order flag is set to be obtained for a block having a size equal to or greater than 32×32 and a size equal to or less than 128×128. Therefore, the coding order flag of the block 2100 having a size of 128×128 divided vertically and horizontally is obtained. Figure 21 In FIG, the coding order flag of block 2100 indicates that the coding order is in the forward direction. Therefore, the left block is decoded before the right block. Therefore, blocks 2101, 2102, 2103, and 2104 are decoded in sequence.
[0257] The block 2101 of size 64×64 is divided vertically to generate two blocks 2111 and 2112 of size 64×32. The coding order flags of the blocks 2111 and 2112 are obtained. Figure 21 , block 2112 is decoded before block 2111 because the coding order flag of block 2101 indicates reverse.
[0258] The block 2111 having a size of 64×32 is divided into three horizontally, and thus, a block 2121 having a size of 16×32 at the top, a block 2122 having a size of 32×32 at the center, and a block 2123 having a size of 16×32 at the bottom are generated. Figure 21 In FIG, since no vertical decoding order transition occurs, the coding order flag of block 2111 is not obtained. Therefore, blocks 2121, 2122, and 2123 are decoded in order from top to bottom.
[0259] Block 2123, which is 16×32 in size, is vertically divided to generate two blocks 2131 and 2132, each 16×16 in size. Because the size of block 2123 is smaller than the minimum size of 32×32 for obtaining a coding order flag, the coding order flag of block 2123 is not obtained. Therefore, the coding order of block 2123 is determined to be reversed in the same manner as block 2101, which is the upper layer block of block 2123, is decoded. Therefore, block 2132 is decoded before block 2131.
[0260] Block 2132, which has a size of 16×16, is vertically divided to generate two blocks 2141 and 2142, each having a size of 16×8. Because the size of block 2132 is smaller than the minimum size of 32×32 for obtaining a coding order flag, the coding order flag for block 2132 is not obtained, as with block 2123. Therefore, the coding order of block 2132 is determined to be reversed in the same manner as block 2123, which is the upper layer block of block 2132. Therefore, block 2142 is decoded before block 2141.
[0261] Figure 21The block size for obtaining the coding order flag described in [ 15 ] can be changed. For example, the maximum size of the block for obtaining the coding order flag can be changed to 256×256 or 64×64, and the minimum size of the block for obtaining the coding order flag can be changed to 64×64 or 16×16.
[0262] In addition, Figure 21 In the embodiment, the coding order may be switched only in the horizontal direction, but in some embodiments, the coding order may be switched in the vertical direction. When the coding order is switched in the vertical direction, in the case of block 2111, whether to switch the decoding order may also be determined based on the coding order flag.
[0263] The decoding order determiner 1620 may determine coding order change permission information for the upper layer data unit of the current block. The coding order change permission information indicates whether the coding order of the blocks included in the upper layer data unit of the current block is allowed to be changed. When the coding order change permission information does not allow the coding order to be changed, all blocks of the upper layer data unit are decoded according to the basic coding order. When the coding order change permission information indicates that the coding order information of the current block is encoded, the decoding order determiner 1620 may obtain the coding order information.
[0264] The coding order change enable information may be included in a sequence header, a slice header, etc. When there are two or more types of coding order information, the coding order change enable information for each coding order information may be divided and stored in different headers.
[0265] The coding order change permission information may indicate a depth or block size for providing the coding order information. For example, the decoding order determiner 1620 may obtain the coding order information only when the depth of the current block is included in the depth indicated by the coding order change permission information. As another example, the decoding order determiner 1620 may obtain the coding order information only when the block size of the current block is the block size indicated by the coding order change permission information.
[0266] When the split information does not indicate that the current block is split, the decoder 1630 may determine a prediction method for the current block based on encoding information of the current block and whether neighboring blocks of the current block are decoded.
[0267] The encoding information of the current block may indicate how to predict the current block. Specifically, the encoding information may indicate one of a plurality of intra prediction modes and a plurality of inter prediction modes. The intra prediction modes that can be applied to the current block may include a directional mode, a DC mode, a planar mode, a multi-parameter intra prediction (MPI) mode, a linear model (LM) chroma mode, a most probable chroma (MPC) mode, and the like. The inter prediction modes that can be applied to the current block may include a merge mode, an advanced motion vector prediction (AMVP) mode, an inter skip mode, an overlapped block motion compensation (OBMC) mode, a sub-block motion vector prediction (MVP) mode, an affine motion compensation (MC) mode, a frame rate increase (FRUC) mode, and the like. Therefore, the decoder 1630 may determine the prediction mode to be applied to the current block based on the encoding information of the current block.
[0268] The reference block and reference sample used for prediction of the current block may be determined according to whether the neighboring blocks of the current block are decoded. Figures 17a to 17c In the raster scan described above, only the left block, upper block, upper left block, upper right block, and lower left block of the current block can be decoded before the current block. However, when the decoding order determiner 1620 encodes the coding tree blocks to which the current block belongs based on a coding order different from the coding order of the raster scan, the right block and lower right block of the current block can be decoded before the current block. Therefore, the decoder 1630 can determine the reference blocks and reference samples used for prediction of the current block based on whether the left block, upper block, upper left block, upper right block, lower left block, right block, and lower right block of the current block have been decoded.
[0269] When the current block is intra-predicted, the decoder 1630 can determine the reference samples to be referenced by the current block based on whether the neighboring blocks of the current block have been decoded. In intra-prediction mode, the prediction values of the samples of the current block are determined with reference to the sample values of the samples adjacent to the current block. Therefore, only the neighboring blocks of the current block that have been decoded before the current block and can be referenced by the current block can be used for prediction of the current block.
[0270] For example, when referring to Figures 17a to 17c When encoding a block in the forward direction of the raster scan described above, the reference samples of the block above, block to the left, block above left, block below left, and block above right of the current block may be used to predict the current sample. Conversely, when encoding a block in the reverse direction of the raster scan, the reference samples of the block above, block to the right, block above right, block below right, and block above left of the current block may be used to predict the current sample.
[0271] The decoder 1630 may predict the current block based on the prediction mode, and may decode the current block based on a result of the prediction of the current block.
[0272] When the split information does not indicate that the current block is split, the decoder 1630 may obtain a final block flag indicating whether the current block is a final block of a coding tree block including the current block from the bitstream.
[0273] Decoder 1630 may entropy decode syntax elements obtained from the bitstream based on the context of neighboring blocks. For example, a skip flag indicating whether the current block is encoded in skip mode may be entropy encoded based on the context of neighboring blocks of the current block. Thus, the skip flag may be entropy encoded based on the context of whether the block to the right of the current block has been decoded. Thus, syntax elements such as the skip flag, which are entropy encoded based on the context of neighboring blocks of the current block, may be entropy decoded based on the context of neighboring blocks of the current block, based on whether the block to the right of the current block has been decoded.
[0274] Therefore, the decoder 1630 can entropy decode the syntax elements entropy-encoded according to the context of the neighboring blocks of the current block, taking into account whether the right block of the current block is decoded. Other syntax elements not described here can also be entropy decoded based on the right block of the current block.
[0275] The decoder 1630 may dequantize and inversely transform the residual data obtained from the bitstream, and may reconstruct the current block using the dequantized and inversely transformed residual data and a result of the prediction of the current block.
[0276] exist Figures 22 to 29b , various embodiments of a prediction method, an entropy decoding method, and an in-loop filtering method according to a coding order of a current block and whether neighboring blocks of the current block are reconstructed, which are performed by the decoder 1630, will be described.
[0277] Figure 22 A method of generating a motion vector predictor candidate list in inter prediction and a method of generating a most probable mode (MPM) list in intra prediction are shown.
[0278] In inter-frame prediction, a motion vector indicating the spatial displacement between the current block and the reference block is required. Therefore, the decoder 1630 can obtain the motion vector applied to the adjacent block by scanning the adjacent block. The decoder 1630 obtains a motion vector predictor candidate list including motion vector predictor candidates, where the motion vector predictor candidates are determined based on the motion vector applied to the adjacent block. When switching the decoding order is allowed, the right block of the current block can be reconstructed first, and therefore, the decoder 1630 can construct the motion vector predictor candidate list by scanning the right block of the current block. The following embodiments will be described considering whether the right block of the current block is reconstructed.
[0279] According to an embodiment, the motion vector predictor candidate list may be constructed by scanning neighboring blocks of the current block according to the distance of the reference position from the center of the current block. For example, the neighboring blocks corresponding to reference position 10 2211, which is closest to the center of the current block 2200, and the neighboring blocks corresponding to reference position 11 2212 may be scanned first. Furthermore, the neighboring blocks corresponding to reference position 12 2213, which is the second closest to the center of the current block 2200, may be scanned. Neighboring blocks may be scanned in the order in which the reference position is closest to the center of the current block 2200 until the motion vector predictor candidate list is complete.
[0280] According to an embodiment, all neighboring blocks of the current block are scanned, and a motion vector predictor candidate list may be constructed according to the results of the scanning.
[0281] According to an embodiment, the motion vector predictor candidate list may be constructed by scanning neighboring blocks of the current block 2200 in the order of the sequence numbers assigned to the reference positions until the motion vector predictor candidate list is complete. For example, the motion vector predictor candidate list may be constructed by scanning neighboring blocks in order from reference position 0 2201 to reference position 12 2213.
[0282] According to an embodiment, the order in which neighboring blocks are scanned may be determined based on whether the neighboring blocks are reconstructed in decoding order. For example, when neither the right block nor the left block of the current block 2200 is reconstructed, the neighboring blocks may be scanned in the order of reference position 2 2203, reference position 3 2204, reference position 4 2205, reference position 5 2206, and reference position 12 2213. Furthermore, when only the left block of the current block 2200 is reconstructed in decoding order, the neighboring blocks may be scanned in the order of reference position 0 2201, reference position 2 2203, reference position 5 2206, reference position 6 2207, reference position 8 2209, reference position 4 2205, and reference position 10 2211. When only the right block of the current block 2200 is reconstructed according to the decoding order, the neighboring blocks may be scanned in the order of reference position 11 220, reference position 3 2204, reference position 4 2205, reference position 7 2208, reference position 9 2210, reference position 5 2206, and reference position 12 2213. When both the left and right blocks of the current block 2200 are reconstructed according to the decoding order, the neighboring blocks may be scanned in the order of reference position 0 2201, reference position 1 2202, reference position 2 2203, reference position 3 2204, reference position 4 2205, reference position 5 2206, reference position 6 2207 or reference position 8 2209, and reference position 7 2208 or reference position 9 2210. By scanning the neighboring blocks according to the scanning order, motion vectors of the neighboring blocks may be obtained, and a motion vector predictor candidate list may be constructed based on the motion vectors of the neighboring blocks.
[0283] Depending on the embodiment, neighboring blocks corresponding to specific reference positions based on the shape of the current block may not be scanned. When the width of the current block is greater than its height, reference positions 12 to 2213 are scanned, while reference positions 10 to 2211 and reference positions 11 to 2212 are not scanned. Conversely, when the height of the current block is greater than its width, reference positions 10 to 2211 and reference positions 11 to 2212 are scanned, while reference positions 12 to 2213 are not scanned. For example, because the height of the current block 2200 is greater than its width, reference positions 10 to 2211 and reference positions 11 to 2212 may be scanned, while reference positions 12 to 2213 may not be scanned.
[0284] The size of the motion vector predictor candidate list can be determined based on whether the neighboring blocks are reconstructed. For example, the number of neighboring blocks reconstructed by inter-frame prediction for all reference positions around the current block 2200 can be determined, and the size of the motion vector predictor candidate list can be determined based on the number of neighboring blocks predicted by inter-frame. In intra-frame prediction, in order to reduce the size of intra-frame prediction mode information indicating the intra-frame prediction mode of the current block, the decoder 1630 can determine the candidate intra-frame prediction mode that is likely to be selected as the intra-frame prediction mode of the current block as the MPM list. The decoder 1630 can obtain the intra-frame mode of the neighboring blocks by scanning the neighboring blocks. The decoder 1630 can determine the candidate intra-frame prediction mode included in the MPM list from the intra-frame prediction modes of the neighboring blocks of the current block. Therefore, the decoder 1630 can determine the MPM list by scanning the neighboring blocks of the current block according to a predetermined scanning order.
[0285] According to an embodiment, the MPM list may be constructed by scanning neighboring blocks of the current block according to the distance of the reference position from the center of the current block. For example, the neighboring blocks corresponding to reference position 10 2211, which is closest to the center of the current block 2200, and the neighboring blocks corresponding to reference position 11 2212 may be scanned first. Furthermore, the neighboring blocks corresponding to reference position 12 2213, which is the second closest to the center of the current block 2200, may be scanned. Neighboring blocks may be scanned in the order in which the reference position is closest to the center of the current block 2200 until the motion vector predictor candidate list is complete.
[0286] According to an embodiment, all neighboring blocks of the current block are scanned, and an MPM list may be constructed according to the scanned results.
[0287] According to an embodiment, the MPM list may be constructed by scanning neighboring blocks of the current block 2200 in the order of the sequence numbers assigned to the reference positions until the MPM list is complete. For example, when there are two candidate intra prediction modes included in the MPM list, the neighboring blocks may be scanned in the order of reference position 0 2201, reference position 1 2202, reference position 2 2203, and reference position 3 2204. When there are three or more candidate intra prediction modes included in the MPM list, the MPM list may be constructed by scanning neighboring blocks in the order from reference position 0 2201 to reference position 12 2213.
[0288] According to an embodiment, when the left neighboring block or the above neighboring block is not reconstructed or is reconstructed through inter prediction, the intra prediction mode obtained from the right neighboring block may be assumed to be the intra prediction mode of the left neighboring block or the above neighboring block.
[0289] According to an embodiment, the order in which neighboring blocks are scanned may be determined based on whether the neighboring blocks have been reconstructed in decoding order. For example, when neither the right block nor the left block of the current block 2200 has been reconstructed in decoding order, the neighboring blocks may be scanned in the order of reference position 22203, reference position 3 2204, reference position 4 2205, reference position 5 2206, and reference position 12 2213. Furthermore, when only the left block of the current block 2200 has been reconstructed in decoding order, the neighboring blocks may be scanned in the order of reference position 0 2201, reference position 2 2203, reference position 5 2206, reference position 6 2207, reference position 8 2209, reference position 4 2205, and reference position 10 2211. When only the right block of the current block 2200 is reconstructed according to the decoding order, the neighboring blocks may be scanned in the order of reference position 1 2202, reference position 3 2204, reference position 4 2205, reference position 7 2208, reference position 9 2210, reference position 5 2206, and reference position 12 2213. When both the left and right blocks of the current block 2200 are reconstructed according to the decoding order, the neighboring blocks may be scanned in the order of reference position 0 2201, reference position 1 2202, reference position 2 2203, reference position 3 2204, reference position 4 2205, reference position 5 2206, reference position 6 2207 or reference position 8 2209, and reference position 7 2208 or reference position 9 2210. By scanning the neighboring blocks according to the scanning order, the intra prediction mode of the neighboring blocks may be obtained, and the MPM list may be constructed according to the intra prediction mode of the neighboring blocks.
[0290] Depending on the embodiment, neighboring blocks corresponding to specific reference positions based on the shape of the current block may not be scanned. When the width of the current block is greater than its height, reference positions 12 to 2213 are scanned, while reference positions 10 to 2211 and reference positions 11 to 2212 are not scanned. Conversely, when the height of the current block is greater than its width, reference positions 10 to 2211 and reference positions 11 to 2212 are scanned, while reference positions 12 to 2213 are not scanned. For example, because the height of the current block 2200 is greater than its width, reference positions 10 to 2211 and reference positions 11 to 2212 may be scanned, while reference positions 12 to 2213 may not be scanned.
[0291] The size of the MPM list may be determined based on whether neighboring blocks are reconstructed. For example, the number of neighboring blocks reconstructed by intra prediction for all reference positions around the current block 2200 may be determined, and the size of the MPM list may be determined based on the number of neighboring blocks reconstructed by intra prediction.
[0292] Figure 23Shows the range of intra prediction directions according to whether neighboring blocks are reconstructed.
[0293] The first embodiment 2310 shows the range of the intra prediction direction when the left block and the upper block of the current block 2312 are reconstructed. In the first embodiment 2310, the left neighboring sample, the upper neighboring sample, the lower left neighboring sample, and the upper right neighboring sample of the current block 2312 are used as reference samples of the current block 2312. Therefore, the first intra prediction direction range 2350 is determined so that the angle difference between the intra prediction direction and the upper left direction is 90 degrees or less.
[0294] The second embodiment 2320 shows the range of the intra prediction direction when the right block and the upper block of the current block 2322 are reconstructed. In the second embodiment 2320, the right neighboring sample, the upper neighboring sample, the lower right neighboring sample, and the upper left neighboring sample of the current block 2322 are used as reference samples of the current block 2322. Therefore, the second intra prediction direction range 2360 is determined so that the angle difference between the intra prediction direction and the upper right direction is 90 degrees or less.
[0295] A third embodiment 2330 illustrates the range of intra-prediction directions when reconstructing blocks to the left, right, and above of a current block 2332. In the third embodiment 2330, the left, right, and above neighboring samples of the current block 2332 can be used as reference samples for the current block 2332. Therefore, a third intra-prediction direction range 2370 can be determined such that the angular difference between the intra-prediction direction and the above direction is 90 degrees or less. Furthermore, because the lower-left and lower-right neighboring samples of the current block 2332 can be used as reference samples for the current block 2332, an extended intra-prediction direction range 2380 in which the angular difference between the intra-prediction direction and the above direction is 135 degrees or less can be applied to the prediction of the current block 2332.
[0296] The fourth embodiment 2340 illustrates the range of intra-prediction directions when only the block above the current block 2342 is reconstructed. In the fourth embodiment 2340, the upper, upper-left, and upper-right neighboring samples of the current block 2342 can be used as reference samples for the current block 2342. Therefore, a reduced intra-prediction direction range 2390, in which the angular difference between the intra-prediction direction and the upper direction is 45 degrees or less, can be applied to the prediction of the current block 2342. However, when the left and right neighboring samples of the current block 2342 are padded, a third intra-prediction direction range 2370, in which the angular difference between the intra-prediction direction and the upper direction is 90 degrees or less, can be applied to the prediction of the current block 2342.
[0297] According to an embodiment, an intra prediction mode approximately 1.5 times larger than the first intra prediction direction range 2350, the second intra prediction direction range 2360, and the third intra prediction direction range 2370 may be allocated to the extended intra prediction direction range 2380. When additional intra prediction modes are defined, there is a disadvantage in that the size of intra prediction mode information indicating the intra prediction mode increases.
[0298] According to an embodiment, the same number of intra-frame prediction modes as the first intra-frame prediction direction range 2350, the second intra-frame prediction direction range 2360, and the third intra-frame prediction direction range 2370 can be allocated to the extended intra-frame prediction direction range 2380. The intra-frame prediction mode that differs from the horizontal mode by 45 degrees or less can be set to refer to one of the left reference sample and the right reference sample, or to refer to both the left reference sample and the right reference sample. Therefore, without increasing the number of intra-frame prediction modes, the current block can be predicted based on the existing intra-frame prediction mode with reference to the right reference sample.
[0299] According to an embodiment, the range of intra prediction directions that can be used for the current block may be limited in consideration of the decoding order. For example, when the decoding order of the current block is the right direction, the third intra prediction direction range 2370 may be limited to include the left intra prediction direction. Conversely, when the decoding order of the current block is the left direction, the third intra prediction direction range 2370 may be limited to include the right intra prediction direction.
[0300] Figure 24 A method for determining a reference sample to be referenced by a current sample based on whether a neighboring block is reconstructed and the intra prediction direction is described. Specifically, an intra prediction method for referencing a right reference sample according to an existing intra prediction mode without increasing the number of intra prediction modes will be described.
[0301] In the first embodiment 2400, a method for determining a reference sample when the left and upper blocks of the current block are reconstructed will be described. The decoder 1630 may determine the reference sample p 2402 as the reference sample for the current sample 2401 based on the intra prediction direction of the current block.
[0302] However, in the second embodiment 2410, the right block of the current block is reconstructed instead of the left block, and therefore, the decoder 1630 may not determine the reference sample p 2412 as the reference sample for the current sample 2411. Therefore, the decoder 1630 may determine the reference sample q 2413 as the reference sample for the current sample 2411 based on the direction opposite to the intra prediction direction.
[0303] In the third embodiment 2420, both the left block and the right block of the current block are reconstructed, and therefore, the decoder 1630 can predict the current sample 2421 by using both the reference sample p 2422 in the intra prediction direction and the reference sample q 2423 in the direction opposite to the intra prediction direction. Alternatively, the decoder 1630 can predict the current sample 2421 by using one of the reference sample p 2422 and the reference sample q 2423.
[0304] Figures 25a to 25c The method for filling reference samples to be used for intra-frame prediction is shown. For intra-frame prediction, the neighboring samples of the current block that are most similar to the samples of the current block and have a high probability are used as reference samples. The decoder 1630 determines the range of reference samples based on the coding order of the current block. For example, based on the forward coding order, the left neighboring samples, the upper neighboring samples, the lower left neighboring samples, and the upper right neighboring samples of the current block are determined as reference samples. In this case, the range of the lower left neighboring samples is determined to be the same as the width of the current block. In addition, the range of the upper right neighboring samples is determined to be the same as the height of the current block.
[0305] According to the reverse coding order, the right neighboring sample, the upper neighboring sample, the lower right neighboring sample, and the upper left neighboring sample of the current block are determined as reference samples. In this case, the range of the lower right neighboring sample is determined to be the same as the width of the current block. In addition, the range of the upper left neighboring sample is determined to be the same as the height of the current block.
[0306] Some neighboring blocks of the current block may be decoded after the current block. Therefore, when the reference samples have not been reconstructed, the decoder 1630 may need to fill the unreconstructed samples by using the already reconstructed reference samples.
[0307] For example, in Figure 25a , when the current block 2500 is decoded in the forward decoding order, the decoder 1630 obtains reference samples from the adjacent reconstructed area 2502 located to the left and below the current block 2500 and decoded before the current block 2500. In addition, because reference samples may not be obtained from the adjacent non-reconstructed area 2504 located to the below the current block 2500 and decoded after the current block 2500, the decoder 1630 fills the reference samples of the adjacent non-reconstructed area 2504 with the reference samples of the adjacent reconstructed area 2502. For example, the reference samples of the adjacent non-reconstructed area 2504 may be filled with the reference sample A 2506 located at a position closest to the adjacent non-reconstructed area 2504 in the adjacent reconstructed area 2502.
[0308] exist Figure 25b, when the current block 2510 is decoded in the reverse decoding order, the decoder 1630 obtains reference samples from the adjacent reconstructed area 2512 located above and to the upper left of the current block 2500 and decoded before the current block 2510. In addition, because reference samples may not be obtained from the adjacent non-reconstructed area 2514 located to the upper left of the current block 2500 and decoded after the current block 2510, the decoder 1630 fills the reference samples of the adjacent non-reconstructed area 2514 with the reference samples of the adjacent reconstructed area 2512. For example, the decoder 1630 may fill the reference samples of the adjacent non-reconstructed area 2514 with the reference samples B 2516 located at a position closest to the adjacent non-reconstructed area 2514 in the adjacent reconstructed area 2512.
[0309] exist Figure 25c 25C , when the current block 2520 is decoded in the forward decoding order, the decoder 1630 obtains reference samples from a first neighboring reconstructed region 2522 located above the current block 2520 and decoded before the current block 2520. The decoder 1630 obtains reference samples from a second neighboring reconstructed region 2524 located above and to the left of the current block 2520 and decoded before the current block 2520. In FIG. 25C , a neighboring non-reconstructed region 2526 is located between the first neighboring reconstructed region 2522 and the second neighboring reconstructed region 2524.
[0310] Therefore, the decoder 1630 can fill the reference samples of the adjacent non-reconstruction area 2526 by linearly interpolating the reference sample C 2528 at the position closest to the adjacent non-reconstruction area 2526 in the first adjacent reconstruction area 2522 and the reference sample D 2530 at the position closest to the adjacent non-reconstruction area 2526 in the second adjacent reconstruction area 2524.
[0311] Alternatively, the decoder 1630 may fill the reference samples of the adjacent non-reconstructed area 2526 using an average value of the reference sample C 2528 and the reference sample D 2530. According to another embodiment, the decoder 1630 may fill the reference samples of the adjacent non-reconstructed area 2526 using a value from among the reference sample C 2528 and the reference sample D 2530.
[0312] Figure 26 An intra prediction method depending on whether a neighboring block is reconstructed is shown.
[0313] First embodiment 2600 illustrates an intra-frame prediction method when the blocks above and to the left of current block 2601 are reconstructed before current block 2601 according to the decoding order. In first embodiment 2600, upper reference sample 2602, upper right reference sample 2603, left reference sample 2604, and lower left reference sample 2605 can be used for intra-frame prediction. First embodiment 2600 occurs in a conventional video decoding method in which the decoding order is not switched, and current block 2601 is predicted according to the conventional intra-frame prediction method.
[0314] The second embodiment 2610 illustrates an intra-frame prediction method when the blocks above and to the right of a current block 2611 are reconstructed before the current block 2611 according to decoding order. In the second embodiment 2610, upper reference sample 2612, upper left reference sample 2613, right reference sample 2614, and lower right reference sample 2615 can be used for intra-frame prediction. Because the second embodiment 2610 is horizontally symmetrical with the first embodiment 2600, the intra-frame prediction method according to the second embodiment 2610 is horizontally symmetrical with the intra-frame prediction method according to the first embodiment 2600. For example, when horizontal mode is applied to the current block, the left reference sample 2604 is referenced in the first embodiment 2600, while the right reference sample 2614 is referenced in the second embodiment 2610. Similarly, the intra-frame prediction method according to the second embodiment 2610 for the other-directional intra-frame mode and the planar mode can also be horizontally symmetrical with the intra-frame prediction method according to the first embodiment 2600 for the other-directional intra-frame mode and the planar mode.
[0315] A third embodiment 2620 illustrates an intra-frame prediction method when the blocks above, to the left, and to the right of a current block 2621 are reconstructed before the current block 2621 according to decoding order. In the third embodiment 2620, upper reference sample 2622, left reference sample 2623, right reference sample 2624, lower-left reference sample 2625, and lower-right reference sample 2626 may be used for intra-frame prediction. In the third embodiment 2620, left reference sample 2623 and right reference sample 2624 may be used together in the prediction of the current block 2621. For example, when horizontal mode is applied to the current block 2621, the decoder 1630 may predict the current block 2621 using the average or weighted average of a first reference value obtained from the left reference sample 2623 and a second reference value obtained from the right reference sample 2624.
[0316] According to another embodiment, the decoder 1630 may predict the current block 2621 of the third embodiment 2620 by using an average of the first intermediate prediction value according to the intra prediction method of the first embodiment 2600 and the second intermediate prediction value according to the intra prediction method of the second embodiment 2610. For example, when the horizontal mode is applied to the current block 2621, the decoder 1630 may obtain a final prediction value of the current block 2621 according to the third embodiment 2620 based on the first intermediate prediction value obtained from the left reference sample 2604 according to the intra prediction method of the first embodiment 2600 and the second intermediate prediction value obtained from the right reference sample 2614 according to the intra prediction method of the second embodiment 2610.
[0317] According to another embodiment, the decoder 1630 may predict the current block 2621 of the third embodiment 2620 by using one of the first prediction value of the intra prediction method according to the first embodiment 2600 and the second prediction value of the intra prediction method according to the second embodiment 2610. For example, when the horizontal mode is applied to the current block 2621, the decoder 1630 may obtain a final prediction value of the current block 2621 according to the third embodiment 2620 by using one of the first prediction value obtained from the left reference sample 2604 by the intra prediction method according to the first embodiment 2600 and the second prediction value obtained from the right reference sample 2614 by the intra prediction method according to the second embodiment 2610.
[0318] Fourth embodiment 2630 illustrates an intra-frame prediction method when only the upper, upper-left, and upper-right blocks are reconstructed before current block 2631. In fourth embodiment 2630, upper reference sample 2632, upper-left reference sample 2633, and upper-right reference sample 2634 can be used for intra-frame prediction. Therefore, the intra-frame prediction method that requires the use of left reference sample 2635, lower-left reference sample 2636, right reference sample 2637, and lower-right reference sample 2638 in fourth embodiment 2630 need not be used. For example, horizontal mode uses left or right reference samples, and therefore horizontal mode need not be used in fourth embodiment 2630.
[0319] In the fourth embodiment 2630, the upper reference sample 2632 is the only reference sample adjacent to the current block 2631 in decoding order. In addition, the upper left reference sample 2633 and the upper right reference sample 2634 are spatially separated from the current block 2631, and therefore, the prediction accuracy of the fourth embodiment 2630 may be lower than that of the other embodiments 2600, 2610, and 2620. Therefore, the intra prediction method used in the fourth embodiment 2630 is preferably a vertical mode using the upper reference sample 2632 adjacent to the current block 2631 or a directional prediction mode adjacent to the vertical mode.
[0320] However, when the left reference sample 2635, the lower left reference sample 2636, the right reference sample 2637 and the lower right reference sample 2638 are filled based on the upper reference sample 2632, the upper left reference sample 2633 and the upper right reference sample 2634, the decoder 1630 can predict the current block 2631 of the fourth embodiment 2630 according to the intra-frame prediction method of the third embodiment 2620.
[0321] Figure 27 This section describes a deblocking filtering method based on whether neighboring blocks are reconstructed. When an image is encoded block by block using transformation and quantization, discontinuities appear between samples at block boundaries in the decoded image. The degradation caused by discontinuities between samples at block boundaries is known as blocking artifacts. As the quantization strength increases, the loss of image data increases, and therefore, blocking artifacts also increase. Therefore, a deblocking filter is used to reduce discontinuities in samples at block boundaries.
[0322] When the left block 2710 and the upper block 2720 of the current block 2700 are decoded before the current block 2700 according to the decoding order, deblocking filtering is performed on the neighboring samples 2712 located at the boundary between the current block 2700 and the left block 2710 and the neighboring samples 2722 located at the boundary between the current block 2700 and the upper block 2720. However, when the right block 2730 of the current block 2700 is decoded before the current block 2700 due to switching of the coding order, deblocking filtering may also be performed on the neighboring samples 2732 located at the boundary between the current block 2700 and the right block 2730.
[0323] Figure 28a and Figure 28b This section describes a method for determining context information used for entropy decoding prediction mode information based on whether neighboring blocks are reconstructed. Only intra prediction is applied to blocks in I slices. However, either intra prediction or inter prediction can be applied to blocks in P and B slices. Therefore, when a coding unit is included in a P or B slice, prediction mode information indicating either an intra prediction mode or an inter prediction mode applied to the coding unit is decoded.
[0324] The prediction mode information of the current block 2800 can be entropy decoded based on the context of the neighboring blocks. FIG28A shows the positions of the neighboring blocks of the current block 2800 used to determine the context of the prediction mode information. When the coding order is not switched, the context of the prediction mode information is determined based on the prediction mode of the block at position A 2802 and the prediction mode of the block at position B 2804. For example, when intra mode is applied to both the block at position A 2802 and the block at position B 2804, a first context may be used. Alternatively, when intra mode is applied to only one of the block at position A and the block at position B 2804, a second context may be used. Furthermore, when inter mode is applied to both the block at position A 2802 and the block at position B 2804, a second context may be used.
[0325] When the coding order is switchable, the context of the prediction mode information is determined according to the prediction mode of the block at position A 2802, the prediction mode of the block at position B 2804, and the prediction mode of the block at position C 2806. The method for determining the context of the prediction mode information from three neighboring blocks is described in Equation 1.
[0326] [Equation 1]
[0327] num_intra=isIntra(L)+isIntra(A)+isIntra(R)
[0328] Ctx_idx=min(num_intra,T)
[0329] In Equation 1, isIntra(L) indicates whether the prediction mode of the block at position A 2802 is intra mode. Furthermore, isIntra(A) indicates whether the prediction mode of the block at position B 2804 is intra mode. Furthermore, isIntra(R) indicates whether the prediction mode of the block at position C 2806 is intra mode. Therefore, num_intra indicates the number of intra modes applied to the blocks at positions A 2802, B 2804, and C 2806. Therefore, num_intra can have a value of 0 to 3.
[0330] Ctx_idx is an index indicating the context of the prediction mode information for the current block. Furthermore, T represents the maximum value of Ctx_idx. Ctx_idx is determined as the smaller of num_intra and T. Therefore, the number of contexts is determined based on the value of T. For example, when T is 2, the value of Ctx_idx ranges from 0 to 2. Therefore, the context of the prediction mode information for the current block is determined based on which prediction mode is used to predict the block to the right of the current block.
[0331] Figure 28bAn embodiment is shown in which the context of the prediction mode information of the current block is determined based on the dominant prediction mode applied to the neighboring blocks of the current block. In FIG28A, the context of the prediction mode information of the current block is determined based on the prediction mode of the blocks at predetermined position A2802, predetermined position B2804, and predetermined position C2806. However, according to FIG28B, the decoder 1630 scans which prediction mode is used for each 4×4 size basic unit around the current block and compares the number of basic units using intra mode with the number of basic units using inter mode to determine the context of the prediction mode information of the current block.
[0332] A method of determining the context of prediction mode information from dominant prediction modes of neighboring blocks applied to a current block is described in Equation 2.
[0333] [Equation 2]
[0334] Ctx_idx=if(num_intra <num_inter)?0:1;
[0335] In Equation 2, num_intra represents the number of basic units to which the intra mode is applied in the reconstructed basic unit. Furthermore, num_inter represents the number of basic units to which the inter mode is applied in the reconstructed basic unit. Ctx_idx is an index of the context indicating the prediction mode information of the current block. When num_intra is greater than num_inter, Ctx_idx is determined to be 0, and when num_intra is less than num_inter, Ctx_idx is determined to be 1.
[0336] For example, the prediction modes of 14 basic units having a size of 4×4 above, on the left, and on the right of the current block 2850 having a size of 16×16 are scanned. Figure 28b In [ 0 ], since the intra mode is applied to 4 basic units and the inter mode is applied to 10 basic units, the dominant prediction mode is determined to be the inter mode. In addition, Ctx_idx, which is the context of the prediction mode information, is determined to be 1.
[0337] When the encoding order is not switched, the basic unit on the right may not be considered when determining the context of the prediction mode information. Figure 28b As shown in , when the encoding order is switched, the basic unit on the right may be considered when determining the context of the prediction mode information.
[0338] Figure 29a and 29b A method of applying an in-loop filter according to decoding order is shown.
[0339] Figure 29aThis section shows the sample adaptive offset (SAO) types of SAO filters according to the decoding order. The SAO filter is used to minimize the error between the reconstructed image and the original image by adaptively adding an offset to the samples. The SAO filter is applied to the current picture that has undergone deblocking filtering. SAO filters are categorized into band-type and edge-type. Band-type SAO filters effectively correct errors in reconstructed samples by applying an offset to samples in a specific band. Edge-type SAO filters effectively correct errors in reconstructed samples based on the edge direction of the current block.
[0340] The edge directions of the SAO filter applied to the edge type include horizontal edge direction 2922, vertical edge direction 2924, 135-degree edge direction 2926, and 45-degree edge direction 2928. The edge direction of the SAO filter applied to the current block is determined based on the edge direction information. By assigning short codewords to edge directions with a high probability of application and long codewords to edge directions with a low probability of application, the encoding rate of the edge direction information can be improved. Therefore, the encoding rate of the edge direction information can be improved by determining the codeword assigned to each edge direction according to the encoding order.
[0341] The horizontal edge direction 2922 and the vertical edge direction 2924 may be applied to the current block regardless of the decoding order. However, in the case of the 135-degree edge direction 2926 and the 45-degree edge direction 2928, the probability of being applied to the current block may differ according to the decoding order.
[0342] For example, as in the first embodiment 2900, when the decoding order applied to the current block is forward, the probability of applying the 135-degree edge direction 2926 is higher than the probability of applying the 45-degree edge direction 2928. Therefore, by assigning a short codeword to the 135-degree edge direction 2926 and a long codeword to the 45-degree edge direction 2928, the encoding rate of the edge direction information can be improved.
[0343] In contrast, as shown in the second embodiment 2910, when the decoding order applied to the current block is reversed, the probability of applying the 45-degree edge direction 2928 is higher than the probability of applying the 135-degree edge direction 2926. Therefore, by assigning a short codeword to the 45-degree edge direction 2928 and a long codeword to the 135-degree edge direction 2926, the encoding rate of the edge direction information can be improved.
[0344] Figure 29b The filter shape of the adaptive loop filter according to the decoding order is shown.
[0345] An adaptive loop filter (ALF) is used to minimize the error between the original image and the reconstructed image based on a Wiener filter. The filter value of the current sample is determined by taking a weighted average of the sample value of the reference sample, determined based on the ALF's filter shape, and the sample value of the current sample. The ALF's filter shape can be determined differently depending on the decoding order.
[0346] The basic filter shape of the adaptive loop filter may be a diamond shape 2950. However, adaptive loop filtering based on the diamond shape 2950 requires storing five sample lines in the memory of the video decoding device, and therefore may have the disadvantage of excessively burdening the memory of the video decoding device. Therefore, compared with the diamond shape 2950, the cut diamond shape 2960 requiring three sample lines places less burden on the memory of the video decoding device.
[0347] However, for the efficiency of the adaptive loop filter, a left-cut diamond shape 2970 or a right-cut diamond shape 2980 having the same filter shape area as the diamond shape 2950 may be used according to the decoding order of the current block. For example, when the current block is encoded in the forward direction, the left-cut diamond shape 2970 may be used. Conversely, when the current block is encoded in the reverse direction, the right-cut diamond shape 2980 may be used.
[0348] Figure 30 A video decoding method 3000 is shown for dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment.
[0349] In operation 3010, split information indicating whether a current block is split is obtained from a bitstream.
[0350] In operation 3020, when the split information indicates that the current block is to be split, the current block is split into two or more lower layer blocks.
[0351] When the partition information indicates the partition of the current block, the partition shape information of the current block can be obtained. The current block can be divided into two or more lower-layer blocks according to the partition shape information. The partition shape information indicates one of vertical two-partition, vertical three-partition, horizontal two-partition, horizontal three-partition, and four-partition.
[0352] When the split information does not indicate that the current block is split, the current block may be reconstructed by the prediction value and the residual value of the current block.
[0353] In operation 3030, coding order information indicating the coding order of lower layer blocks of the current block is obtained from the bitstream. Whether to obtain the coding order information may be determined based on at least one of the size and partition shape of the current block. In addition, when it is determined that the coding order information is to be obtained for the current block, the coding order information may be obtained.
[0354] In operation 3040, a decoding order of the lower layer blocks is determined according to the encoding order information.
[0355] In operation 3050, the lower layer blocks are decoded according to a decoding order.
[0356] The lower layer block may be divided according to the division information of the lower layer block. When the lower layer block is no longer divided according to the division information of the lower layer block, the lower layer block may be reconstructed using the prediction value and the residual value of the lower layer block.
[0357] When inter-frame prediction is performed on the lower layer block, a motion vector list used for inter-frame prediction may be determined according to a distance from the center of the lower layer block and whether neighboring blocks of the lower layer block are decoded.
[0358] When intra-frame prediction is performed on a lower layer block, the MPM list used for intra-frame prediction can be determined based on the distance from the center of the lower layer block and whether the neighboring blocks of the lower layer block have been decoded. The range of intra-frame prediction directions used for intra-frame prediction can be determined based on whether the neighboring blocks of the lower layer block have been decoded.
[0359] The reconstruction region reference sample of the lower layer block may be obtained from an adjacent reconstruction region of the lower layer block. In addition, one or more reconstruction region reference samples adjacent to an adjacent non-reconstruction region of the lower layer block may be determined. The non-reconstruction region reference sample may be generated by using the one or more reconstruction region reference samples.
[0360] When two reconstruction area reference samples are adjacent to the left and right sides of the adjacent non-reconstruction area, the non-reconstruction area reference samples may be generated by performing linear interpolation on the two reconstruction area reference samples.
[0361] The intra prediction direction of the lower layer block can be determined based on the intra prediction mode information. A forward reference sample in the intra prediction direction and a backward reference sample in the direction opposite to the intra prediction direction can be obtained. Intra prediction can be performed on the lower layer block using the forward reference sample and the backward reference sample.
[0362] Also, when both the left block and the right block of the lower layer block are decoded, the lower layer block may be predicted based on the left reference sample and the right reference sample obtained through the left block and the right block.
[0363] The samples located at the boundary of the decoded lower layer block may be deblocked according to whether the neighboring samples of the decoded lower layer block are decoded. Therefore, according to an embodiment, the samples located at the right boundary of the current block may be deblocked.
[0364] The encoding information of the lower layer block can be entropy decoded according to the context determined based on whether the neighboring blocks of the lower layer block are decoded. Therefore, the context can be determined according to the right block of the current block.
[0365] The decoded lower layer block may be filtered by using an SAO filter determined according to a decoding order.
[0366] Reference Figure 16 The functions of the described video decoding device 1600 may be included in the video decoding method 3000 .
[0367] Figure 31 A video encoding apparatus 3100 is shown for dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment.
[0368] The video encoding apparatus 3100 includes an encoder 3110 and a bitstream generator 3120. Figure 31 , the encoder 3110 and the bitstream generator 3120 are illustrated as separate constituent units, but according to an embodiment, the encoder 3110 and the bitstream generator 3120 may be combined and implemented as one constituent unit.
[0369] exist Figure 31 , the encoder 3110 and the bitstream generator 3120 are shown as being included in a single device, but the devices that perform the respective functions of the encoder 3110 and the bitstream generator 3120 may not necessarily be physically adjacent to each other. Therefore, according to an embodiment, the encoder 3110 and the bitstream generator 3120 may be distributed.
[0370] According to an embodiment, the encoder 3110 and the bitstream generator 3120 may be implemented by one processor. In addition, according to an embodiment, the encoder 3110 and the bitstream generator 3120 may be implemented by a plurality of processors.
[0371] Depend on Figure 31 The functions performed by the encoder 3110 and the bitstream generator 3120 may be Figure 1a The bitstream generator 120 performs
[0372] The encoder 3110 may divide the current block into at least two lower layer blocks and may determine whether to divide the current block based on the result of dividing the current block. For example, the encoder 3110 may determine to divide the current block if encoding efficiency is better when dividing the current block, and determine not to divide the current block if encoding efficiency is better when not dividing the current block.
[0373] The encoder 3110 may generate split information indicating whether to split the current block. The encoder 3110 may determine a split method of the current block based on encoding efficiency, and may generate split shape information indicating the split method of the current block.
[0374] The encoder 3110 may determine a coding order of lower layer blocks included in the current block, and generate coding order information indicating the coding order of the lower layer blocks according to coding efficiency based on the coding order. The encoder 3110 may determine the coding order by comparing the coding efficiency when the current coding unit is encoded in a forward direction with the coding efficiency when the current coding unit is encoded in a reverse direction, thereby improving the coding efficiency of the image.
[0375] When the division of the lower layer block is completed, the encoder 3110 may determine a prediction mode for the lower layer block. The encoder 3110 may determine the prediction mode for the lower layer block based on the coding efficiency of the prediction mode that can be applied to the lower layer block. The prediction modes that can be applied to the lower layer block include directional mode, DC mode, planar mode, MPI mode, LM chroma mode, MPC mode, merge mode, AMVP mode, OBMC mode, sub-block MVP mode, affine merge mode, affine AMVP mode, bidirectional matching FRUC mode, template matching FRUC mode, PDPC mode, etc.
[0376] The encoder 3110 may determine an intra prediction method and an inter prediction method by considering whether the right block of the lower layer block is reconstructed. In addition, the encoder 3110 may apply a deblocking filter and an SAO filter to the lower layer block by considering whether the right block of the lower layer block is reconstructed. In addition, the encoder 3110 may perform entropy decoding on the encoding information of the lower layer block based on a context determined based on whether the neighboring blocks of the lower layer block are decoded.
[0377] The bitstream generator 3120 outputs a bitstream including the encoded information about the current block generated by the encoder 3110. The encoded information about the current block may include partition information, partition shape information, partition order information, prediction mode information, and the like.
[0378] Figure 31 The video encoding device 3100 may perform the same Figure 16 The video decoding method performed by the video decoding device corresponds to the video encoding method.
[0379] Figure 32 A video encoding method 3200 is shown regarding dividing a current block and determining an encoding order of the divided lower layer blocks according to an embodiment.
[0380] In operation 3210, split information indicating whether to split the current block is determined.
[0381] In operation 3220, when the split information indicates to split the current block, the current block is split into two or more lower layer blocks.
[0382] In operation 3230, a coding order of the lower layer blocks is determined, and coding order information indicating the coding order of the lower layer blocks is determined.
[0383] In operation 3240, the lower layer block is encoded according to the encoding order information.
[0384] Reference Figure 31 The functions of the described video encoding device 3100 may be included in the video encoding method 3200 .
[0385] Figure 33 is a diagram for explaining a method of indicating splitting of a current coding unit.
[0386] split_unit() may indicate syntax for splitting the current coding unit. Split information (split_mode) may include at least one of information indicating whether to perform splitting, split direction information, and split type information. The information indicating whether to perform splitting indicates whether the current coding unit is split. The split direction information indicates whether the current coding unit is split in one of a horizontal direction and a vertical direction.
[0387] The partition type information indicates whether the coding unit is partitioned into two, three, or four partitions. Two-partitioning means dividing one of the height and width of the coding unit into 1 / 2. Three-partitioning means dividing one of the height and width of the coding unit into 1:2:1. Similarly, four-partitioning means dividing the height and width of the coding unit into 1 / 2.
[0388] For ease of description, the present disclosure describes the split information (split_mode) as being divided into information indicating whether splitting is performed, split direction information, and split type information, but the present disclosure is not limited thereto. Information about the split shape pattern can be expressed by combining the information indicating whether splitting is performed, the split direction information, or the split type information. For example, the split information (split_mode) may indicate that the current coding unit is not split (NO_SPLIT). In addition, the split information (split_mode) may indicate four splits (QUAD_SPLIT). In addition, the split information (split_mode) may indicate two vertical splits (BI_VER_SPLIT). In addition, the split information (split_mode) may indicate two horizontal splits (BI_HOR_SPLIT). In addition, the split information (split_mode) may indicate three vertical splits (TRI_VER_SPLIT). The split information (split_mode) may indicate three horizontal splits TRI_HOR_SPLIT.
[0389] The image decoding device 150 may obtain split information based on the binary bit string. The image decoding device 150 may determine whether to split the coding unit, the split direction, and the split type based on the binary bit string.
[0390] The binary bit string is represented only by binary bits consisting of syntax elements '0' or '1'. The binary bit string may be composed of at least one bit. The image decoding device 150 may determine the number of bits of the binary bit string based on the number of division shape modes allowed for the current coding unit. For example, the image decoding device 150 may determine that there is a mode of dividing the current coding unit according to a specific division direction and a specific division type and a mode of not dividing the current coding unit. That is, there may be two division shape modes allowed for the current coding unit. The image decoding device 150 may determine the division information of the coding unit based on the binary bit string for the division mode including one binary bit. One binary bit may indicate whether to perform division. The binary bit may indicate no division (NO_SPLIT). When the binary bit indicates division, the image decoding device 150 may determine the division direction or division type based on the allowable division shape mode of the current coding unit.
[0391] In addition, when there are three allowable division shape modes for the current coding unit, the image decoding device 150 may obtain the division shape mode of the coding unit based on a binary bit string including two binary bits. The first binary bit of the binary bit string may indicate whether to perform division. The second binary bit of the binary bit string may indicate the division type or division direction. The image decoding device 150 may determine the division direction or division type based on the allowable division shape modes for the current coding unit.
[0392] In addition, when there are four or five allowable division shape patterns for the current coding unit, the image decoding device 150 may divide the coding unit based on a binary bit string including three binary bits. The first binary bit of the binary bit string may indicate whether to divide. The second binary bit of the binary bit string may indicate the division type or division direction. The third binary bit of the binary bit string may indicate the division direction or division type. The image decoding device 150 may determine the division direction or division type based on the allowable division shape patterns of the current coding unit.
[0393] The image decoding device 150 may obtain information about the splitting mode from the bitstream, but is not limited thereto. The image decoding device 150 may determine information about the splitting shape mode based on a splitting rule pre-arranged with the image encoding device 100. The image decoding device 150 may determine information about the pre-arranged splitting mode based on the size of the current coding unit. For example, the image decoding device 150 may determine information about the splitting mode for the coding unit with the largest size as QUAD_SPLIT. Furthermore, the image decoding device 150 may determine information about the splitting mode for the coding unit with the smallest size as NO_SPLIT.
[0394] According to the adaptive binarization method of the division shape pattern or the debinarization method of the binary bit string of the division shape pattern, when the types of allowable division shape patterns of the current block are different, the division pattern corresponding to the binary bit string may also change even if the number of allowable division shape patterns is the same.
[0395] According to the above reference 1 to Figure 3 The video encoding technology using tree-structured coding units described herein encodes image data in the spatial domain for each coding unit having a tree structure, and when decoding each maximum coding unit using a video decoding technology based on tree-structured coding units, the image data in the spatial domain is reconstructed. Thus, a picture and a video as a series of pictures can be reconstructed. The reconstructed video can be reproduced by a reproduction device, stored in a storage medium, or transmitted over a network.
[0396] The above-described embodiments of the present disclosure can be written as a program executable on a computer and can be implemented on a general-purpose digital computer operating the program by using a computer-readable recording medium.
[0397] Although the present disclosure has been described with respect to specific preferred embodiments, other alternatives, modifications, and amendments of the present disclosure will be apparent to those skilled in the art in light of the foregoing description. In other words, the claims are to be interpreted as encompassing all such alternatives, modifications, and amendments. Therefore, all descriptions in this specification and the accompanying drawings are to be interpreted in an illustrative rather than a restrictive sense.
Claims
1. A video decoding method, comprising: Obtaining, from a bitstream, partition information indicating whether to partition a current block into at least two lower-layer blocks; When the division information indicates that the current block is to be divided into the at least two lower layer blocks, the current block is divided into the at least two lower layer blocks, Obtaining coding order information from a bitstream, the coding order information indicating a coding order between a left lower layer block and a right lower layer block in horizontally adjacent lower layer blocks in the at least two lower layer blocks; determining a decoding order between the left lower layer block and the right lower layer block divided from the current block according to the coding order information; When the right lower layer block is decoded before the left lower layer block according to the determined decoding order, determining context information of a syntax element of prediction mode information for the left lower layer block based on prediction mode information of the right lower layer block, wherein the prediction mode information of the left lower layer block indicates whether the left lower layer block is predicted in an intra prediction mode, and the prediction mode information of the right lower layer block indicates whether the right lower layer block is predicted in an intra prediction mode; Obtaining a context index of a syntax element of prediction mode information for the left lower layer block using the context information; Performing context adaptive arithmetic entropy decoding using the context index to obtain prediction mode information of the left lower layer block; and Prediction of the left lower layer block is determined using the prediction mode information of the left lower layer block.
2. A video decoding device, comprising: a coding order determiner configured to obtain, from a bitstream, division information indicating whether a current block is divided into at least two lower layer blocks, and to obtain coding order information from the bitstream, and to determine, based on the coding order information, a decoding order between a left lower layer block and a right lower layer block, wherein the coding order information indicates a coding order between a left lower layer block and a right lower layer block among horizontally adjacent lower layer blocks among the at least two lower layer blocks; and a decoder configured to: when the partition information indicates that the current block is to be partitioned into the at least two lower layer blocks, partition the current block into the at least two lower layer blocks; when the right lower layer block is decoded before the left lower layer block according to the determined decoding order, determine context information of a syntax element of prediction mode information for the left lower layer block based on the prediction mode information of the right lower layer block; obtain a context index of the syntax element of the prediction mode information for the left lower layer block using the context information; perform context adaptive arithmetic entropy decoding using the context index to obtain prediction mode information for the left lower layer block; and perform prediction on the left lower layer block using the prediction mode information of the left lower layer block. The prediction mode information of the left lower layer block indicates whether the left lower layer block is predicted in an intra-frame prediction mode, and the prediction mode information of the right lower layer block indicates whether the right lower layer block is predicted in an intra-frame prediction mode.
3. A video encoding method, comprising: Divide the current block into at least two lower-level blocks; generating division information indicating whether to divide the current block into the at least two lower-layer blocks; determining a coding order between a left lower-layer block and a right lower-layer block in horizontally adjacent lower-layer blocks among the at least two lower-layer blocks; generating coding order information indicating a coding order between the left lower layer block and the right lower layer block; when the right lower layer block is decoded before the left lower layer block according to the determined coding order, determining context information of a syntax element of prediction mode information for the left lower layer block based on prediction mode information of the right lower layer block, wherein the prediction mode information of the left lower layer block indicates whether the left lower layer block is predicted in an intra prediction mode, and the prediction mode information of the right lower layer block indicates whether the right lower layer block is predicted in an intra prediction mode; Obtaining a context index of a syntax element of prediction mode information for the left lower layer block using the context information; and Context-adaptive arithmetic entropy coding is performed on a syntax element of the prediction mode information of the left lower layer block using the context information to output a bit string of the prediction mode information of the left lower layer block.
4. A method for transmitting a bit stream, wherein the bit stream is generated by the video encoding method according to claim 3.
Citation Information
Patent Citations
Method and apparatus for encoding video by using block merging, and method and apparatus for decoding video by using block merging
CN103155563A
Apparatus and method for video encoding / decoding using adaptive coding order
KR1020130031078A