Encoding method and apparatus therefor, and decoding method and apparatus therefor
The CCLM mode in video encoding methods predicts chrominance blocks using luminance correlations, enhancing coding efficiency and compression ratios by improving prediction accuracy.
Patent Information
- Application Number
- CN202411255914.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-12-21
- Filing Date
- 2019-12-23
- Publication Date
- 2024-12-20
AI Technical Summary
Existing video encoding methods face challenges in achieving high coding efficiency with minimal image quality degradation and improved compression ratios due to limitations in bandwidth for video data transmission.
The implementation of a Cross Component Linear Model (CCLM) mode that predicts chrominance blocks based on the correlation between adjacent luminance and chrominance pixels, using a fixed number of reference positions for prediction regardless of block size, and includes a video encoding and decoding method to improve prediction accuracy.
This approach enhances video coding efficiency by improving prediction accuracy for chroma blocks, leading to better compression ratios and reduced data loss.
Smart Images

Figure CN119172535A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed with the State Intellectual Property Office of China on December 23, 2019, with application number 201980091444.1 and invention name “Encoding method and device thereof and decoding method and device thereof”. Technical Field
[0002] The present disclosure relates to video encoding and decoding methods, and more particularly, to video encoding and decoding methods that provide a Cross Component Linear Model (CCLM) mode with improved coding efficiency. Background Art
[0003] High quality video requires a large amount of data for encoding. However, there are limitations on the bandwidth available for sending video data, and therefore, the data rate applied to the transmission of video data may be limited. Therefore, in order to efficiently send video data, video data encoding and decoding methods with minimal image quality degradation and improved compression ratios are required.
[0004] Video data can be compressed by removing spatial and temporal redundancy between pixels. Pixels adjacent to each other generally have common characteristics, and therefore, in order to remove redundancy between adjacent pixels, encoding information is transmitted in data units consisting of pixels.
[0005] Instead of directly transmitting the pixel values of the pixels included in the data unit, the method required to obtain the pixel values is transmitted. A prediction method for predicting a pixel value similar to the original value is determined for each data unit, and encoding information about the prediction method is transmitted from the encoder to the decoder. In addition, since the predicted value is not completely equal to the original value, residual data of the difference between the original value and the predicted value is transmitted from the encoder to the decoder.
[0006] As the accuracy of prediction increases, the coding information required to specify the prediction method increases, but the size of the residual data decreases. Therefore, the prediction method is determined based on the coding information and the size of the residual data. Specifically, the data units divided from the picture have various sizes, and as the size of the data unit increases, the possibility of reduced accuracy of prediction increases, while the coding information decreases. Therefore, the size of the block is determined according to the characteristics of the picture.
[0007] In addition, the prediction method includes intra prediction and inter prediction. Intra prediction refers to a method of predicting pixels of a block from adjacent pixels of the block. Inter prediction refers to a method of predicting pixels by referring to pixels of another picture referenced by a picture including the block. Therefore, spatial redundancy is removed according to intra prediction, and temporal redundancy is removed according to inter prediction.
[0008] As the number of prediction methods increases, the size of encoding information indicating the prediction method increases. Therefore, the size of encoding information to be applied to a block can be reduced by predicting the encoding information from another block.
[0009] The loss of video data is allowed to the extent that the loss cannot be recognized by the human eye, and therefore, the amount of residual data can be reduced by performing lossy compression on the residual data in the transform and quantization processes. Summary of the invention
[0010] Technical issues
[0011] A video encoding method using a cross-component linear model (CCLM) mode as an encoding tool is provided, wherein the encoding tool is used to predict a chrominance block based on the correlation between adjacent luminance pixels and chrominance pixels and the luminance block corresponding to the chrominance block. In addition, a video decoding method is provided, including: dividing a current block, determining the encoding order of the divided lower-layer blocks, and determining the encoding method based on whether the adjacent blocks of the current block have been encoded. A computer-readable recording medium having a program recorded thereon for executing the video encoding method and the video decoding method according to the embodiments of the present disclosure on a computer is also provided.
[0012] Solution to the problem
[0013] The present disclosure provides a video decoding method, comprising: determining an intra-frame prediction mode of a current chroma block from chroma intra-frame prediction information obtained from a bitstream; when the intra-frame prediction mode of the current chroma block is a cross-component linear model (CCLM) mode according to the chroma intra-frame prediction information, obtaining reference chroma samples adjacent to the current chroma block and reference luminance samples corresponding to the reference chroma samples; and predicting the current chroma block based on a correlation between the reference chroma samples and the reference luminance samples and a reference luminance block corresponding to the current chroma block, wherein the number of predetermined CCLM mode reference positions at which the reference chroma samples can be obtained is a constant regardless of the size of the current chroma block.
[0014] The present disclosure provides a video decoding device, comprising: a memory storing one or more instructions for implementing the video decoding method; and a processor configured to execute the one or more instructions. In addition, a computer readable recording medium having a program including one or more instructions for implementing the video decoding method is provided.
[0015] The present disclosure provides a video encoding method, comprising: obtaining reference chroma samples corresponding to a current chroma block and reference luminance samples corresponding to the reference chroma samples, and predicting the current chroma block based on the correlation between the reference chroma samples and the reference luminance samples and the reference luminance block corresponding to the current chroma block; determining whether a cross-component linear model (CCLM) mode will be applied to the current chroma block according to a result of the prediction of the current chroma block; and generating a bit stream including chroma intra-frame prediction information indicating whether the CCLM mode will be applied to the current chroma block, wherein the number of predetermined CCLM mode reference positions at which the reference chroma samples can be obtained is a constant regardless of the size of the current chroma block.
[0016] The present disclosure provides a video encoding device, comprising: a memory storing one or more instructions for implementing the video encoding method; and a processor configured to execute the one or more instructions. In addition, a computer-readable recording medium having a program including one or more instructions for implementing the video encoding method is provided.
[0017] The technical problems of the present embodiment are not limited to the above-mentioned technical problems, and other unstated technical problems can be inferred from the following embodiments.
[0018] Disclosure of beneficial effects
[0019] According to various embodiments of the cross-component linear model (CCLM) mode described in the present disclosure, the prediction accuracy for chroma blocks is improved. Due to the improvement in the prediction of chroma blocks, the video coding efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1a is a block diagram of an image encoding apparatus based on coding units having a tree structure according to an embodiment of the present disclosure.
[0021] Figure 1b is a block diagram of a video decoding apparatus based on coding units having a tree structure according to an embodiment.
[0022] Figure 2 A process of determining at least one coding unit by splitting a current coding unit according to an embodiment is illustrated.
[0023] Figure 3 A process of determining at least one coding unit by splitting a non-square coding unit according to an embodiment is illustrated.
[0024] 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.
[0025] Figure 5 A method of determining a predetermined coding unit from among an odd number of coding units according to an embodiment is illustrated.
[0026] Figure 6 Illustration of 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.
[0027] 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.
[0028] Figure 8 A process of determining at least one coding unit by splitting a first coding unit according to an embodiment is illustrated.
[0029] Fig. 9 It is shown that shapes into which the second coding unit may be divided are restricted when a non-square second coding unit determined by dividing the first coding unit satisfies a predetermined condition according to an embodiment.
[0030] Fig.10 A process of splitting a square coding unit when the division shape information cannot indicate that the square coding unit is to be split into four square coding units according to an embodiment is illustrated.
[0031] Fig.11 It is shown that a processing order among a plurality of coding units may be changed according to a process of dividing the coding units according to an embodiment.
[0032] Fig.12 A process of determining a depth of a coding unit as a shape and a size of a coding unit change when a coding unit is recursively split so that a plurality of coding units are determined according to an embodiment is illustrated.
[0033] Fig.13 Depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for identifying a coding unit according to an embodiment are illustrated.
[0034] Fig.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.
[0035] Fig.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.
[0036] Fig.16 A video decoding apparatus using chroma block prediction according to a cross-component linear model (CCLM) mode is provided.
[0037] Fig.17 A video encoding apparatus using chroma block prediction according to a CCLM mode is provided.
[0038] Fig.18 A prediction method according to the CCLM mode according to an embodiment is shown.
[0039] Fig.19 The CCLM mode reference positions referenced by chroma blocks of size 4×4 are shown.
[0040] Fig. 20 The CCLM mode reference positions referenced by the chroma blocks of size 8×8 are shown.
[0041] Fig.21 The CCLM mode reference positions referenced by the chroma blocks of size 4×8 are shown.
[0042] Fig. 22 The CCLM mode reference positions referenced by the chroma blocks of size 8×4 are shown.
[0043] Fig.23 An embodiment of a CCLM mode reference position referenced by a chroma block of size M×N in the top-left CCLM mode is shown.
[0044] Fig.24 An embodiment of a CCLM mode reference position referenced by a chroma block of size M×N in the top-left CCLM mode is shown.
[0045] Fig.25 An embodiment of a CCLM mode reference position referenced by a chroma block of size M×N in the top-left CCLM mode is shown.
[0046] Fig.26 An embodiment of a CCLM mode reference position referenced by a chroma block of size M×N in the upper CCLM mode is shown.
[0047] Fig. 27 An embodiment of a CCLM mode reference position referenced by a chroma block of size M×N in the upper CCLM mode is shown.
[0048] Fig.28 An embodiment of a CCLM mode reference position referenced by a chroma block of size M×N in the left CCLM mode is shown.
[0049] Fig.29 An embodiment of a CCLM mode reference position referenced by a chroma block of size M×N in the left CCLM mode is shown.
[0050] Fig.30An embodiment of determining a reference luma sample corresponding to a reference chroma sample from a plurality of luma samples of a region corresponding to the reference chroma sample is described.
[0051] Fig.31 is a flow chart of a video decoding method according to the CCLM mode.
[0052] Fig.32 is a flowchart of a video encoding method according to the CCLM mode.
[0053] Best Mode
[0054] The present disclosure provides a video decoding method, comprising: determining an intra-frame prediction mode of a current chroma block from chroma intra-frame prediction information obtained from a bitstream; when the intra-frame prediction mode of the current chroma block is a cross-component linear model (CCLM) mode according to the chroma intra-frame prediction information, obtaining reference chroma samples adjacent to the current chroma block and reference luminance samples corresponding to the reference chroma samples; and predicting the current chroma block based on a correlation between the reference chroma samples and the reference luminance samples and a reference luminance block corresponding to the current chroma block. DETAILED DESCRIPTION
[0055] By referring to the embodiments and the accompanying drawings, the advantages and features of the embodiments and the methods for achieving them can be more easily understood. In this regard, the present disclosure may have different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be thorough and complete and will fully convey the concept of the present disclosure to those of ordinary skill in the art.
[0056] Terms used in the specification will be briefly defined, and embodiments will be described in detail.
[0057] All terms including descriptive terms or technical terms used in this specification should be interpreted as having meanings that are obvious to those of ordinary skill in the art. However, these terms may have different meanings according to the intentions of those of ordinary skill in the art, precedents, or the emergence of new technologies. In addition, some terms may be arbitrarily selected by the applicant, and in this case, the meaning of the selected terms will be described in detail in the detailed description of the present disclosure. Therefore, the terms used in the present disclosure should not be interpreted based only on their names, but must be defined together with the description in the entire specification based on the meaning of the terms.
[0058] In the following description, a singular form includes a plural form unless the context clearly indicates otherwise.
[0059] When a component "includes" or "contains" an element, unless there is a specific description to the contrary, the component may also include other elements without excluding other elements. In the following description, terms such as "unit" indicate software components or hardware components such as field programmable gate arrays (FPGAs) or application specific integrated circuits (ASICs), and "units" perform specific functions. However, "units" are not limited to software or hardware. "Units" may be formed in addressable storage media, or may be formed to operate one or more processors. Therefore, for example, the term "unit" may refer to components such as software components, object-oriented software components, class components, and task components, and may include processes, functions, attributes, procedures, subroutines, program code fragments, drivers, firmware, microcodes, circuits, data, databases, data structures, tables, arrays, or variables. 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".
[0060] The "current block" indicates one of the coding unit, prediction unit, and transformation unit to be currently encoded or decoded. In addition, the "lower layer block" indicates a data unit divided from the "current block". The "upper layer block" indicates a data unit including the "current block".
[0061] Hereinafter, "sample" means data assigned to a sampling position of an image, that is, data to be processed. For example, a pixel value of an image in a spatial domain and a transform coefficient on a transform domain may be a sample. A unit including at least one such sample may be defined as a block.
[0062] Hereinafter, the present disclosure will now be described more fully with reference to the accompanying drawings so that those skilled in the art can perform the embodiments without difficulty. In addition, in order to clearly describe the present disclosure, parts irrelevant to the description will be omitted in the accompanying drawings.
[0063] Figure 1a is 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.
[0064] The image encoding apparatus 100 includes a maximum coding unit determiner 110 , a coding unit determiner 120 , and an output unit 130 .
[0065] The maximum coding unit determiner 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 may be a data unit having a size of 32×32, 64×64, 128×128, 256×256, etc., wherein the shape of the data unit is a square shape whose width and length are powers of 2. The maximum coding unit determiner 110 may provide maximum coding unit size information indicating the size of the maximum coding unit to the output unit 130. The output unit 130 may add the maximum coding unit size information to the bitstream.
[0066] The coding unit determiner 120 determines the coding unit by dividing the maximum coding unit. The coding unit can be determined according to the maximum coding unit and the depth. The depth can be defined as the number of times the coding unit is spatially divided from the maximum coding unit. Whenever the depth increases by 1, the coding unit is divided into two or more coding units. Therefore, as the depth increases, the size of the coding unit for each depth decreases. Whether to divide the coding unit is determined based on whether the rate-distortion optimization is efficient according to the division of the coding unit. Then, division information indicating whether the coding unit is divided can be generated. The division information can be represented in the form of a flag.
[0067] The coding unit may be divided by using various methods. For example, a square coding unit may be divided into four square coding units whose width and height are half of the width and height of the square coding unit. A square coding unit may be divided into two rectangular coding units whose width is half of the width of the square coding unit. A square coding unit may be divided into two rectangular coding units whose height is half of the height of the square coding unit. A square coding unit may be divided into three coding units by dividing its width or height in 1:2:1.
[0068] A rectangular coding unit whose width is twice the height may be divided into two square coding units. A rectangular coding unit whose width is twice the height may be divided into two rectangular coding units whose width is four times the height. A rectangular coding unit whose width is twice the height may be divided into two rectangular coding units and one square coding unit by dividing the width in 1:2:1.
[0069] Likewise, a rectangular coding unit whose height is twice as high as its width may be divided into two square coding units. In addition, a rectangular coding unit whose height is twice as high as its width may be divided into two rectangular coding units whose height is four times as high as its width. Likewise, a rectangular coding unit whose height is twice as high as its width may be divided into two rectangular coding units and one square coding unit by dividing its height in 1:2:1.
[0070] When the image encoding apparatus 100 can use two or more division methods, information about a division method that can be used for a coding unit among the division methods that can be used by the image encoding apparatus 100 may be determined for each picture. Therefore, only a specific division method may be determined for each picture. When the image encoding apparatus 100 uses only one division method, information about a division method that can be used for a coding unit is not separately determined.
[0071] When the split information of the coding unit indicates that the coding unit is split, split shape information indicating a split method of the coding unit may be generated. When there is only one split method that can be used in the picture to which the coding unit belongs, the split shape information may not be generated. When the split method is adaptively determined to encode information around the coding unit, the split shape information may not be generated.
[0072] The maximum coding unit may be divided into minimum coding units according to the minimum coding unit size information. The depth of the maximum coding unit may be defined as the highest depth, and the depth of the minimum coding unit may be defined as the lowest depth. Therefore, a coding unit of a higher depth may include multiple coding units of a lower depth.
[0073] 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. Each of the maximum coding units may include coding units divided according to depths. Since the maximum coding unit is divided according to depths, the image data of the spatial domain included in the maximum coding unit may be hierarchically divided according to depths.
[0074] A maximum depth or a minimum size of a coding unit that limits a maximum number of times a maximum coding unit may be hierarchically split may be set in advance.
[0075] The coding unit determiner 120 compares the coding efficiency when the coding unit is hierarchically divided with the coding efficiency when the coding unit is not divided. Then, the coding unit determiner 120 determines whether to divide the coding unit according to the result of the comparison. When it is determined that dividing the coding unit is more efficient, the coding unit determiner 120 hierarchically divides the coding unit. When it is determined that not dividing the coding unit is efficient according to the result of the comparison, the coding unit determiner 120 does not divide the coding unit. Whether to divide the coding unit can be determined regardless of whether the adjacent coding unit is divided.
[0076] According to an embodiment, first, it may be determined whether to split a coding unit for a coding unit of a large depth during encoding. For example, the encoding efficiency may be compared between a coding unit of a maximum depth and a coding unit that is 1 less than the maximum depth, and it may be determined for each region of the maximum coding unit which of the coding unit of the maximum depth and the coding unit that is 1 less than the maximum depth will be further effectively encoded. Then, according to the result of the determination, it may be determined for each region of the maximum coding unit whether to split the coding unit that is 1 less than the maximum depth. Thereafter, it may be determined for each region of the maximum coding unit which of a combination of a coding unit that is 2 less than the maximum depth and a coding unit that is 1 less than the maximum depth selected based on the result of the determination, and a coding unit of a minimum depth will be further effectively encoded. The same determination process is sequentially performed on the coding units of the small depth, and finally, it is determined whether to split the maximum coding unit according to which of the maximum coding unit and the hierarchical structure generated by hierarchically splitting the maximum coding unit will be further effectively encoded.
[0077] First, during the encoding process, it can be determined whether to split the coding unit for the coding unit of the small depth. For example, the coding efficiency can be compared between the maximum coding unit and the coding unit whose depth is 1 greater than the maximum coding unit, and it can be determined which of the maximum coding unit and the coding unit whose depth is 1 greater than the maximum coding unit will be further effectively encoded. In the case where the coding efficiency of the maximum coding unit is better, the maximum coding unit is not split. In the case where the coding efficiency of the coding unit whose depth is 1 greater than the maximum coding unit is better, the maximum coding unit is split, and the same comparison process is repeated on the split coding units.
[0078] When the coding efficiency is first checked from a coding unit of a large depth, a high amount of calculation is required, but a tree structure with high coding efficiency can be obtained. Conversely, when the coding efficiency is first checked from a coding unit of a small depth, a small amount of calculation is required, but a tree structure with low coding efficiency can be obtained. Therefore, the algorithm for obtaining the hierarchical tree structure of the maximum coding unit can be designed in various ways in consideration of coding efficiency and calculation amount.
[0079] The coding unit determiner 120 determines the most efficient prediction and transformation method for the coding unit in order to determine the efficiency of the coding unit for each depth. The coding unit may be divided into predetermined data units to determine the most efficient prediction and transformation method. According to the coding unit division method, the data unit may have various shapes. The coding unit division method for determining the data unit may be defined as a partition mode. For example, when a coding unit of size 2N×2N (where N is a positive integer) is not divided, the size of the prediction unit included in the coding unit is 2N×2N. When a coding unit of size 2N×2N is divided, according to the partition mode, the size of the prediction unit included in the coding unit may be 2N×N, N×2N, N×N, etc. The partition mode according to the embodiment can generate not only a symmetric data unit obtained by dividing the height or width of the coding unit by a symmetric ratio, but also a data unit divided by an asymmetric ratio such as 1:n or n:1, a data unit divided in a diagonal direction, a data unit divided into a geometric shape, and a data unit of an arbitrary shape.
[0080] Prediction and transformation may be performed on the coding unit based on the data unit included in the coding unit. However, according to an embodiment, the data unit for prediction and the data unit for transformation may be determined separately. The data unit for prediction may be defined as a prediction unit, and the data unit for transformation may be defined as a transformation unit. The partition mode to be applied to the prediction unit and the partition mode to be applied to the transformation unit may be different from each other, and the prediction using the prediction unit and the transformation using the transformation unit in the coding unit may be performed in parallel and independently.
[0081] A coding unit may be divided into one or more prediction units to determine an efficient prediction method. Similarly, a coding unit may be divided into one or more transformation units to determine an efficient transformation method. The division using the prediction unit and the division using the transformation unit may be performed independently. However, when the reconstructed samples in the coding unit are used in intra prediction, a dependency is formed between the prediction units or transformation units included in the coding unit, and therefore, the division using the prediction unit and the division using the transformation unit may affect each other.
[0082] The prediction unit included in the coding unit may be predicted due to intra prediction or inter prediction. Intra prediction refers to a method of predicting samples of a prediction unit by using reference samples adjacent to the prediction unit. Inter prediction refers to a method of predicting samples of a prediction unit by obtaining reference samples from a reference picture referenced by a current picture.
[0083] For intra prediction, the coding unit determiner 120 can select the most efficient intra prediction method by applying multiple intra prediction methods to the prediction unit. The intra prediction methods include a direct current (DC) mode, a planar mode, a directional mode such as a vertical mode and a horizontal mode, and the like.
[0084] When reconstructed samples adjacent to a coding unit are used as reference samples, intra prediction may be performed for each prediction unit. However, when reconstructed samples in a coding unit are used as reference samples, reconstruction of the reference samples in the coding unit must precede prediction, and thus the prediction order of the prediction unit may depend on the transformation order of the transformation unit. 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 may be determined, and actual intra prediction may be performed for each transformation unit.
[0085] The encoder 110 may select the most efficient inter-frame prediction method by determining the best motion vector and the best reference picture. For inter-frame prediction, the coding unit determiner 120 may determine a plurality of motion vector candidates from coding units adjacent to the current coding unit in space and time, and may determine the most efficient motion vector from the motion vector candidates as the motion vector. Similarly, the coding unit determiner 120 may determine a plurality of reference picture candidates from coding units adjacent to the current coding unit in space and time, and may determine the most efficient reference picture from the reference picture candidates. According to an embodiment, the reference picture may be determined from a reference picture list predetermined for the current picture. According to an embodiment, for the accuracy of prediction, the most efficient motion vector among the plurality of motion vector candidates may be determined as a motion vector predictor, and the motion vector may be determined by correcting the motion vector predictor. Inter-frame prediction may be performed in parallel for each prediction unit in the coding unit.
[0086] The coding unit determiner 120 may reconstruct the coding unit by obtaining only information indicating a motion vector and a reference picture according to a skip mode. According to the skip mode, all encoding information including a residual signal is skipped except for the information indicating a motion vector and a reference picture. Since the residual signal is skipped, the skip mode may be used when the accuracy of prediction is very high.
[0087] The partition mode to be used may be limited according to the prediction method used for the prediction unit. For example, only the partition mode for the prediction unit of size 2N×2N or N×N may be applied to intra prediction, and the partition mode for the prediction unit of size 2N×2N, 2N×N, N×2N or N×N may be applied to inter prediction. In addition, only the partition mode for the prediction unit of size 2N×2N may be applied to the skip mode of inter prediction. The partition mode allowed by each prediction method in the image encoding device 100 may vary according to encoding efficiency.
[0088] The image encoding apparatus 100 may perform transformation based on a coding unit or a transformation unit included in a coding unit. The image encoding apparatus 100 may transform residual data, which is a difference between an original value and a predicted value for a pixel included in the coding unit, through a predetermined process. For example, the image encoding apparatus 100 may perform lossy compression on the residual data through quantization and discrete cosine transform (DCT) / discrete sine transform (DST). Alternatively, the image encoding apparatus 100 may perform lossless compression on the residual data without quantization.
[0089] The image encoding apparatus 100 may determine the most efficient transformation unit in quantization and transformation. In a manner similar to the coding unit according to the tree structure, the transformation unit in the coding unit is recursively divided into smaller transformation units, so that the residual data in the coding unit may be partitioned according to the depth according to the tree-structured transformation unit. Then, the image encoding apparatus 100 may generate transformation partitioning information about the division of the coding unit and the transformation unit according to the determined tree structure of the transformation unit.
[0090] In the image encoding apparatus 100, a transformation depth may be set to indicate the number of splitting times the height and width of the coding unit are split into transformation units. For example, when the size of the transformation unit of the current coding unit having a size of 2N×2N is 2N×2N, the transformation depth may be set to 0, when the size of the transformation unit is N×N, the transformation depth may be set to 1, and when the size of the transformation unit is N / 2×N / 2, the transformation depth may be set to 2. That is, the transformation units according to the tree structure may be set according to the transformation depth.
[0091] In summary, the coding unit determiner 120 determines the most efficient prediction method for the current prediction unit from a plurality of intra prediction methods and inter prediction methods. Then, the coding unit determiner 120 determines a prediction unit determination scheme according to encoding efficiency based on the prediction result. Similarly, the coding unit determiner 120 determines a transform unit determination scheme according to encoding efficiency based on the transform result. According to the most efficient prediction unit determination scheme and the transform unit determination scheme, the encoding efficiency of the coding unit is finally determined. The coding unit determiner 120 finally determines the hierarchical structure of the maximum coding unit based on the encoding efficiency of the coding unit according to each depth.
[0092] The coding unit determiner 120 may measure encoding efficiency of coding units according to depths, prediction efficiency of a prediction method, etc. by using rate-distortion optimization based on a Lagrangian multiplier.
[0093] The coding unit determiner 120 may generate split information indicating whether the coding unit according to each depth is split according to the determined hierarchical structure of the maximum coding unit. Then, the coding unit determiner 120 may generate partition mode information for determining a prediction unit and transformation unit split information for determining a transformation unit for the split coding unit. In addition, when the coding unit can be split by using at least two split methods, the coding unit determiner 120 may generate both the split information and the split shape information indicating the split method. The coding unit determiner 120 may generate information about the prediction method and the transformation method used for the prediction unit and the transformation unit.
[0094] The output unit 130 may output a plurality of pieces of information generated by the maximum coding unit determiner 110 and the coding unit determiner 120 according to the hierarchical structure of the maximum coding unit in a bitstream.
[0095] The following will refer 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 according to an embodiment is described in detail.
[0096] Figure 1b is a block diagram of an image decoding apparatus 150 based on coding units having a tree structure according to an embodiment.
[0097] The image decoding apparatus 150 includes a receiver 160 , a coding information extractor 170 , and a decoder 180 .
[0098] Definitions of terms including coding units, depths, prediction units, transform units, various split information, etc. for the decoding operation performed by the image decoding apparatus 150 are the same as those described above with reference to Figure 1a The same as those described for the image encoding apparatus 100 . In addition, since the image decoding apparatus 150 is designed to reconstruct image data, various encoding methods used by the image encoding apparatus 100 may be applied to the image decoding apparatus 150 .
[0099] The receiver 160 receives and parses a bitstream about the encoded video. The encoding information extractor 170 extracts a plurality of pieces of information for decoding the maximum coding unit from the parsed bitstream and provides the information to the decoder 180. The encoding information extractor 170 may extract information about the maximum size of the coding unit of the current picture from a header of the current picture, a sequence parameter set, or a picture parameter set.
[0100] In addition, the encoding information extractor 170 extracts the final depth and split information of the coding unit having a tree structure from the parsed bitstream according to each maximum coding unit. The extracted final depth and the extracted split information are output to the decoder 180. The decoder 180 may determine the tree structure of the maximum coding unit by splitting the maximum coding unit according to the extracted final depth and the extracted split information.
[0101] The split information extracted by the encoding information extractor 170 is split information of a tree structure causing a minimum encoding error determined by the image encoding apparatus 100. Therefore, the image decoding apparatus 150 can reconstruct an image by decoding data according to a decoding method causing a minimum encoding error.
[0102] The encoding information extractor 170 may extract split information of a data unit such as a prediction unit and a transformation unit included in the coding unit. For example, the encoding information extractor 170 may extract information about the most efficient partition mode for the prediction unit. The encoding information extractor 170 may extract the most efficient tree-structured transformation split information for the transformation unit.
[0103] Also, the encoding information extractor 170 may obtain information about the most efficient prediction method for the prediction unit split from the coding unit. Then, the encoding information extractor 170 may obtain information about the most efficient transformation method for the transformation unit split from the coding unit.
[0104] The encoding information extractor 170 extracts information from a bitstream according to a method in which the output unit 130 of the image encoding apparatus 100 constructs a bitstream.
[0105] The decoder 180 may split the maximum coding unit into coding units having the most efficient tree structure based on the split information. Then, the decoder 180 may split the coding unit into prediction units according to the information about the partition mode. The decoder 180 may split the coding unit into transformation units according to the transformation split information.
[0106] The decoder 180 may predict the prediction unit according to the information about the prediction method. The decoder 180 may perform inverse quantization and inverse transformation on the residual data which is the difference between the original value and the prediction value of the pixel according to the information about the method of transforming the transform unit. The decoder 180 may reconstruct the pixels of the coding unit according to the prediction result of the prediction unit and the transformation result of the transform unit.
[0107] Figure 2 A process of determining at least one coding unit by splitting a current coding unit, performed by the image decoding apparatus 150 according to an embodiment, is illustrated.
[0108] According to an embodiment, the image decoding apparatus 150 may determine the shape of the coding unit by using the block shape information, and may determine the shape according to which the coding unit is to be divided by using the division shape information. That is, the coding unit division method indicated by the division shape information may be determined according to which block shape is indicated by the block shape information used by the image decoding apparatus 150.
[0109] According to an embodiment, the image decoding apparatus 150 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding apparatus 150 may determine whether to not split the square coding unit, whether to vertically split the square coding unit, whether to horizontally split the square coding unit, or whether to split the square coding unit into four coding units according to the split shape information. Figure 2 , when the block shape information of the current coding unit 200 indicates a square shape, the decoder 180 may not divide the coding unit 210a having the same size as the current coding unit 200 according to 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.
[0110] Reference Figure 2 According to an embodiment, the image decoding device 150 may determine two coding units 210b obtained by vertically dividing the current coding unit 200 based on the division shape information indicating that the division is performed vertically. The image decoding device 150 may determine two coding units 210c obtained by horizontally dividing the current coding unit 200 based on the division shape information indicating that the division is performed horizontally. The image decoding device 150 may determine four coding units 210d obtained by vertically and horizontally dividing the current coding unit 200 based on the division shape information indicating that the division is performed vertically and horizontally. However, it should be interpreted that the division shape for dividing the square coding unit is not limited to the above shape, and the division shape may include various shapes that may be indicated by the division shape information. The division shape for dividing the square coding unit will be described in detail below through various embodiments.
[0111] Figure 3 A process of determining at least one coding unit by splitting a non-square coding unit, performed by the image decoding apparatus 150 according to an embodiment, is illustrated.
[0112] According to an embodiment, the image decoding apparatus 150 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding apparatus 150 may determine whether to not split the current non-square coding unit or whether to split the non-square current coding unit by using a predetermined method according to 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 apparatus 150 may not split the coding unit 310 or 360 having the same size as the current coding unit 300 or 350 according to the split shape information indicating that splitting is not performed, or may determine the coding units 320a and 320b, 330a, 330b and 330c, 370a and 370b, 380a, 380b and 380c split according to the split shape information indicating a predetermined split method. The predetermined split method for splitting the non-square coding unit will be described in detail below through various embodiments.
[0113] According to an embodiment, the image decoding apparatus 150 may determine a shape according to which the coding unit is to be divided by using the division shape information, and in this case, the division shape information may indicate the number of at least one coding unit generated when the coding unit is divided. 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 respectively included in the current coding unit 300 or 350 by dividing the current coding unit 300 or 350 based on the division shape information.
[0114] According to an embodiment, when the image decoding apparatus 150 splits the current coding unit 300 or 350 having a non-square shape based on the split shape information, the image decoding apparatus 150 may split the current coding unit 300 or 350 having a non-square shape in consideration of the position of the long side of the current coding unit 300 or 350. For example, the image decoding apparatus 150 may determine a plurality of coding units by splitting the current coding unit 300 or 350 in a direction in which the long side of the current coding unit 300 or 350 is split in consideration of the shape of the current coding unit 300 or 350.
[0115] According to an embodiment, when the division shape information indicates that the coding unit is to be divided into an odd number of blocks, the image decoding apparatus 150 may determine the 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 to be divided into three coding units, the image decoding apparatus 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 apparatus 150 may determine the odd number of coding units included in the current coding unit 300 or 350, and the sizes of the determined coding units may not be consistent. For example, the size of the coding unit 330b or 380b in the odd number of coding units 330a, 330b, and 330c, or 380a, 380b, and 380c may be different from the size of the coding units 330a and 330c or 380a and 380c. That is, coding units that may be determined when the current coding unit 300 or 350 is split may have various types with respect to sizes.
[0116] According to an embodiment, when the division shape information indicates that the coding unit is to be divided into an odd number of blocks, the image decoding apparatus 150 may determine an odd number of coding units included in the current coding unit 300 or 350, and may impose a restriction on 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 apparatus 150 may decode the coding unit 330b or 380b at the center among the three coding units 330a, 330b, and 330c or 380a, 380b, and 380c generated when the current coding unit 300 or 350 is divided in a different manner from the coding units 330a and 330c or 380a and 380c. For example, unlike the coding units 330a and 330c or 380a and 380c, the image decoding apparatus 150 may restrict the coding unit 330b or 380b at the center from being further divided or being divided only a predetermined number of times.
[0117] Figure 4 A process of splitting a coding unit based on at least one of block shape information and division shape information, performed by the image decoding apparatus 150 according to an embodiment, is illustrated.
[0118] According to an embodiment, the image decoding device 150 may determine whether to divide the square first coding unit 400 into coding units or not to divide the square 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 division shape information indicates that the first coding unit 400 is divided in the horizontal direction, the image decoding device 150 may determine the second coding unit 410 by dividing the first coding unit 400 in the horizontal direction. The first coding unit, the second coding unit, and the third coding unit used according to the embodiment are terms for understanding the relationship between the coding unit before and after the coding unit is divided. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the relationship between the first coding unit, the second coding unit, and the third coding unit is applied to the following description.
[0119] According to an embodiment, the image decoding apparatus 150 may determine to split the second coding unit 410 into a plurality of coding units based on at least one of the block shape information and the division shape information, or may determine not to split the second coding unit 410. Figure 4 , the image decoding apparatus 150 may divide 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, or may not divide the non-square second coding unit 410. The image decoding apparatus 150 may obtain at least one of the block shape information and the division shape information, and may obtain a plurality of second coding units (for example, 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, and may divide the second coding unit 410 by 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 divided based on at least one of the block shape information and the division shape information of each coding unit. A method that may be used to recursively divide the coding unit will be described below through various embodiments.
[0120] According to an embodiment, the image decoding device 150 may determine to divide the third coding unit 420a, or each of 420b, 420c and 420d into coding units based on at least one of the block shape information and the division shape information, or may determine 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 the 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. Refer to Figure 4 , the image decoding device 150 may limit the third coding unit 420c at the center position among the odd third coding units 420b, 420c, and 420d included in the non-square second coding unit 410 to no longer be divided, to be divided by using a predetermined division method (for example, divided only into four coding units or divided into a shape corresponding to the shape into which the second coding unit 410 is divided), or to be divided only a predetermined number of times (for example, divided only 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.
[0121] According to an embodiment, the image decoding apparatus 150 may obtain at least one of block shape information and partition shape information for partitioning the current coding unit from a predetermined position in the current coding unit.
[0122] According to an embodiment, when the current coding unit is split into a predetermined number of coding units, the image decoding apparatus 150 may select one of the coding units. Various methods that may be used to select one of a plurality of coding units will be described below through various embodiments.
[0123] According to an embodiment, the image decoding apparatus 150 may split a current coding unit into a plurality of coding units, and may determine a coding unit at a predetermined position.
[0124] Figure 5 A method of determining a predetermined position of a coding unit from among odd-numbered coding units, performed by the image decoding apparatus 150 according to an embodiment, is illustrated.
[0125] According to an embodiment, the image decoding apparatus 150 may determine a coding unit at a center position among the odd-numbered coding units using information indicating each position of the odd-numbered coding units. Figure 5 , the image decoding apparatus 150 may determine the odd-numbered coding units 520a, 520b, and 520c by dividing the current coding unit 500. The image decoding apparatus 150 may determine the coding unit 520b at the center position by using information about the positions of the odd-numbered coding units 520a, 520b, and 520c. For example, the image decoding apparatus 150 may determine the coding unit 520b at the center position 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 apparatus 150 may determine the coding unit 520b at the center position 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.
[0126] According to an embodiment, the information indicating the positions of the upper left sample points 530a, 530b, and 530c respectively included in the coding units 520a, 520b, and 520c 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 sample points 530a, 530b, and 530c respectively included in the coding units 520a, 520b, and 520c 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 the information indicating the difference between the coordinates of the coding units 520a, 520b, and 520c in the picture. That is, the image decoding apparatus 150 may determine the coding unit 520b at the center position by directly using the information about the positions or coordinates of the coding units 520a, 520b, and 520c in the picture or by using the information about the width or height of the coding unit corresponding to the difference between the coordinates.
[0127] According to an embodiment, information indicating the position of the upper left sample point 530a of the upper coding unit 520a may include coordinates (xa, ya), information indicating the position of the upper left sample point 530b of the middle coding unit 520b may include coordinates (xb, yb), and 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 apparatus 150 may determine the middle coding unit 520b by using the coordinates of the upper left sample points 530a, 530b, and 530c respectively included in the coding units 520a, 520b, and 520c. For example, when the coordinates of the upper left sample points 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 may be determined as the coding unit at the center position among the coding units 520a, 520b, and 520c determined by dividing 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 middle 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. In addition, a method of determining a 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.
[0128] According to an embodiment, the image decoding apparatus 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 apparatus 150 may select a coding unit 520b having a size different from that of other coding units from among the coding units 520a, 520b, and 520c.
[0129] According to an embodiment, the image decoding apparatus 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 apparatus 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.
[0130] According to an embodiment, the image decoding device 150 may determine the width of the upper coding unit 520a as xb-xa, and determine the height of the upper coding unit 520a 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 determine the height of the intermediate coding unit 520b 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 and 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 sizes of other coding units based on the determined width and height of the coding units 520a, 520b, and 520c. Referring to Figure 5 , the image decoding apparatus 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 the coding unit having a size different from the sizes of other coding units, performed by the image decoding apparatus 150, corresponds only to an example of determining the coding unit at the 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 the coding unit at the predetermined position by comparing the size of the coding unit determined based on the coordinates of the predetermined sample points may be used.
[0131] However, the position of the sample considered in determining the position of the coding unit is not limited to the above-mentioned upper left position, and information on arbitrary positions of the samples included in the coding unit may be used.
[0132] 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 whose width is longer than its height, the image decoding device 150 may determine a coding unit at a preset 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 may impose restrictions on the coding unit. When the current coding unit has a non-square shape whose height is longer than its 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.
[0133] According to an embodiment, the image decoding apparatus 150 may use information indicating respective positions of even-numbered coding units in order to determine a coding unit at a predetermined position among the even-numbered coding units. The image decoding apparatus 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 reference 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.
[0134] According to an embodiment, when a non-square current coding unit is split into a plurality of coding units, a coding unit at a predetermined position among the plurality of coding units may be determined using predetermined information about the coding unit at a predetermined position in a split operation. For example, the image decoding apparatus 150 may determine a coding unit at a center position among the plurality of coding units determined by splitting the current coding unit using at least one of block shape information and split shape information stored in samples included in the coding unit at the center position in the split operation.
[0135] Reference Figure 5, the image decoding apparatus 150 may divide the current coding unit 500 into a plurality of coding units 520a, 520b, and 520c based on at least one of the block shape information and the division shape information, and may determine the coding unit 520b at the center position among the plurality of coding units 520a, 520b, and 520c. In addition, the image decoding apparatus 150 may determine the coding unit 520b at the center position in consideration of the position at which at least one of the block shape information and the division shape information is obtained. That is, at least one of the block shape information and the division shape information of the current coding unit 500 may be obtained from a sample point 540 at the center position of the current coding unit 500, and when the current coding unit 500 is divided into a plurality of coding units 520a, 520b, and 520c based on at least one of the block shape information and the division shape information, the coding unit 520b including the sample point 540 may be determined as the coding unit at the center position. However, information for determining the coding unit at the center position is not limited to at least one of the block shape information and the division shape information, and the coding unit at the center position may be determined using various types of information.
[0136] According to an embodiment, predetermined information for identifying a coding unit at a predetermined position may be obtained from a predetermined sample point included in a coding unit to be determined. Figure 5 , the image decoding device 150 may use 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 current coding unit 500) to determine the coding unit at the predetermined position (for example, the coding unit at the center position of the divided multiple coding units) among the multiple coding units 520a, 520b, and 520c determined by dividing the current coding unit 500. That is, the image decoding device 150 may determine the sample at the predetermined position by referring to the block shape of the current coding unit 500, may 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. Referring to Figure 5 According to an embodiment, in a decoding operation, the image decoding apparatus 150 may determine a sample 540 at a center position of a current coding unit 500 as a sample from which predetermined information may be obtained, and may impose a predetermined restriction on a 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 of the sample included in the coding unit 520b to be determined as subject to restriction.
[0137] According to an embodiment, the position of the sample at which the predetermined information can be obtained may 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 at which the predetermined information can be obtained may be determined based on the shape. For example, the image decoding device 150 may determine a sample located on a boundary for dividing at least one of the width and the height of the current coding unit in half as a sample at which the predetermined information can be obtained 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. 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 one of the samples adjacent to the boundary for dividing the long side of the current coding unit in half as a sample at which the predetermined information can be obtained.
[0138] According to an embodiment, when a current coding unit is divided into a plurality of coding units, the image decoding device 150 may use at least one of block shape information and 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 block shape information and division shape information from a sample at a predetermined position in the coding unit, and may divide a 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 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 at least one of the block shape information and the division shape information is obtained from a sample at a predetermined position in each coding unit. Reference has been made to the above. Figure 4 An operation of recursively splitting the coding unit is described, and thus a detailed description thereof will not be provided here.
[0139] According to an embodiment, the image decoding apparatus 150 may determine one or more coding units by splitting a 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).
[0140] Figure 6 An order in which a plurality of coding units are processed when the image decoding apparatus 150 determines a plurality of coding units by splitting a current coding unit according to an embodiment is illustrated.
[0141] According to an embodiment, based on the block shape information and the division shape information, the image decoding device 100 may determine the second coding units 610a and 610b by dividing the first coding unit 600 in a vertical direction, may determine the second coding units 630a and 630b by dividing the first coding unit 600 in a horizontal direction, or may determine the second coding units 650a, 650b, 650c and 650d by dividing the first coding unit 600 in vertical and horizontal directions.
[0142] Reference Figure 6 , the image decoding apparatus 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 direction order 610c. The image decoding apparatus 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 direction order 630c. The image decoding apparatus 150 may determine to process the second coding units 650a, 650b, 650c, and 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 coding units in one row are processed and then the coding units in the next row are processed according to the predetermined order.
[0143] According to an embodiment, the image decoding apparatus 150 may recursively divide the coding unit. Figure 6 , the image decoding device 150 may determine multiple second coding units 610a and 610b, 630a and 630b, and 650a, 650b, 650c, and 650d by dividing the first coding unit 600, and may recursively divide each of the determined multiple second coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d. A method of dividing the multiple second coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d may correspond to a method of dividing the first coding unit 600. Therefore, each of the multiple second coding units 610a, 610b, 630a, 630b, 650a, 650b, 650c, and 650d may be independently divided into multiple coding units. Referring to Figure 6 , the image decoding apparatus 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 split or not split each of the second coding units 610a and 610b independently.
[0144] According to an embodiment, the image decoding apparatus 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.
[0145] According to an embodiment, the processing order of the coding units may be determined based on the operation of dividing the coding units. In other words, the processing order of the coding units after the division may be determined based on the processing order of the coding units immediately before the division. The image decoding device 150 may determine the processing order of the third coding units 620a and 620b determined by dividing the left second coding unit 610a independently of the right second coding unit 610b. Since the third coding units 620a and 620b are determined by dividing the left second coding unit 610a in the horizontal direction, the third coding units 620a and 620b may be processed in a vertical direction order 620c. Since the left second coding unit 610a and the right second coding unit 610b are processed in a horizontal direction order 610c, the right second coding unit 610b may be processed after the third coding units 620a and 620b included in the left second coding unit 610a are processed in a vertical direction order 620c. The operation of determining the processing order of coding units based on the coding units before splitting is not limited to the above example, and coding units split and determined to be various shapes may be independently processed in a predetermined order using various methods.
[0146] Figure 7 1 and 2. A process of determining that a current coding unit is to be split into an odd number of coding units, performed by the image decoding apparatus 150, is illustrated when coding units cannot be processed in a predetermined order according to an embodiment.
[0147] According to an embodiment, the image decoding apparatus 150 may determine that the current coding unit is to be split into an odd number of coding units based on the obtained block shape information and the split shape 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, 720d, and 720e. According to an embodiment, the image decoding device 150 may determine a plurality of third coding units 720a and 720b by dividing the left second coding unit 710a in the horizontal direction, and may divide the right second coding unit 710b into an odd number of third coding units 720c, 720d, and 720e.
[0148] According to an embodiment, the image decoding apparatus 150 may determine whether any coding unit is split into an odd number of coding units by determining whether the third coding units 720a and 720b and 720c, 720d, and 720e can be processed in a predetermined order. Figure 7 , the image decoding apparatus 150 may determine the third coding units 720a and 720b and 720c, 720d, and 720e by recursively dividing the first coding unit 700. The image decoding apparatus 150 may determine whether any one of the following coding units will be divided into an odd number of coding units: the first coding unit 700, the second coding units 710a and 710b, and the third coding units 720a and 720b and 720c, 720d, and 720e based on at least one of the block shape information and the division shape information. For example, the second coding unit 710b located on the right side of the second coding units 710a and 710b may be divided into an odd number of third coding units 720c, 720d, and 720e. The processing order of the multiple coding units included in the first coding unit 700 can be a predetermined order (for example, a zigzag scanning order 730), and the image decoding device 150 can 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 the conditions for processing in the predetermined order.
[0149] According to an embodiment, the image decoding apparatus 150 may determine whether the third coding units 720a and 720b and 720c, 720d, and 720e included in the first coding unit 700 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 second coding units 710a and 710b will be divided in half along the boundary of the third coding units 720a and 720b and 720c, 720d, and 720e. For example, although the third coding units 720a and 720b determined by dividing the height of the non-square left second coding unit 710a in half may satisfy the condition, since 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 apparatus 150 may determine that the scanning order is discontinuous, and may determine that the right second coding unit 710b is to be divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 150 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding units, and the restriction or the predetermined position has been described above through various embodiments, so a detailed description thereof will not be provided here.
[0150] Figure 8 1 shows a process of determining at least one coding unit by dividing the first coding unit 800, which is performed by the image decoding apparatus 150 according to an embodiment. According to an embodiment, the image decoding apparatus 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 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 apparatus 150 may divide the first coding unit 800 into a plurality of non-square coding units. In detail, 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 apparatus 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).
[0151] According to an embodiment, the image decoding apparatus 150 may determine whether the second coding units 810a, 810b, and 810c and 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 the height of the first coding unit 800 is divided in half along the boundary of the second coding units 810a, 810b, and 810c and 820a, 820b, and 820c. Figure 8 , because the boundaries of the second coding units 810a, 810b, and 810c determined by dividing the first coding unit 800 in the vertical direction 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 satisfy the condition for processing in a predetermined order. In addition, because the boundaries of the second coding units 820a, 820b, and 820c determined by dividing the first coding unit 800 in the horizontal direction 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 satisfy the condition for processing in a predetermined order. When the condition is not satisfied as described above, the image decoding apparatus 150 may determine that the scanning order is not continuous, and may determine that the first coding unit 800 will be divided into an odd number of coding units based on the determination result. According to an embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 150 may impose a predetermined restriction on the coding unit at a predetermined position in the divided coding unit, and the restriction or the predetermined position has been described above through various embodiments, so a detailed description thereof will not be provided here.
[0152] According to an embodiment, the image decoding apparatus 150 may determine coding units of various shapes by splitting the first coding unit.
[0153] Reference Figure 8, the image decoding apparatus 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.
[0154] Fig. 9 It is shown that shapes into which the second coding unit may be split by the image decoding apparatus 150 are limited when a non-square second coding unit determined by splitting the first coding unit 900 satisfies a predetermined condition according to an embodiment.
[0155] According to an embodiment, the image decoding apparatus 150 may determine to divide the 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 way, the image decoding apparatus 150 may determine to divide each of the second coding units 910a, 910b, 920a, and 920b into a plurality of coding units or may determine not to divide each of the second coding units 910a, 910b, 920a, and 920b 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 apparatus 150 may determine the third coding units 912a and 912b by splitting the non-square left second coding unit 910a determined by splitting the first coding unit 900 in the vertical direction in the horizontal direction. However, when the left second coding unit 910a is split in the horizontal direction, the image decoding apparatus 150 may limit the right second coding unit 910b to not be split in the horizontal direction in which the left second coding unit 910a is split. When the third coding units 914a and 914b are determined by splitting the right second coding unit 910b in the same direction, since the left second coding unit 910a and the right second coding unit 910b are independently split in the horizontal direction, the third coding units 912a and 912b, and 914a and 914b may be determined. However, this situation has the same effect as the situation in which 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 the block shape information and the division shape information, and may be inefficient in terms of image decoding.
[0156] According to an embodiment, the image decoding apparatus 150 may determine the third coding units 922a and 922b, or the third coding units 924a and 924b by vertically splitting the non-square second coding unit 920a or 920b determined by splitting the first coding unit 900 in the horizontal direction. However, when the second coding unit (e.g., the upper second coding unit 920a) is split in the vertical direction, the image decoding apparatus 150 may limit another 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 for the above-mentioned reason.
[0157] Fig.10 A process of splitting a square coding unit performed by the image decoding apparatus 150 when the division shape information may not indicate that the square coding unit is to be split into four square coding units according to an embodiment is illustrated.
[0158] According to an embodiment, the image decoding apparatus 150 may determine the second coding units 1010a, 1010b, 1020a, 1020b, etc. by dividing the first coding unit 1000 based on at least one of the block shape information and the division shape information. The division shape information may include information about various shapes of the divisible coding units, but the information about the various shapes may not include information for dividing the coding unit into four square coding units. According to such division shape information, the image decoding apparatus 150 may not divide the square first coding unit 1000 into four square coding units 1030a, 1030b, 1030c, and 1030d. The image decoding apparatus 150 may determine the non-square second coding units 1010a, 1010b, 1020a, 1020b, etc. based on the division shape information.
[0159] According to an embodiment, the image decoding apparatus 150 may independently divide each of 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 a method of dividing the first coding unit 1000 based on at least one of block shape information and division shape information.
[0160] For example, the image decoding apparatus 150 may determine the square third coding units 1012a and 1012b by dividing the left second coding unit 1010a in the horizontal direction, and may determine the square third coding units 1014a and 1014b by dividing the right second coding unit 1010b in the horizontal direction. In addition, the image decoding apparatus 150 may determine the square third coding units 1016a, 1016b, 1016c, and 1016d by dividing both the left second coding unit 1010a and the right second coding unit 1010b in the horizontal direction. In this case, a coding unit 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.
[0161] As another example, the image decoding apparatus 150 may determine the third coding units 1022a and 1022b of the square shape by dividing the upper second coding unit 1020a in the vertical direction, and may determine the third coding units 1024a and 1024b of the square shape by dividing the lower second coding unit 1020b in the vertical direction. In addition, the image decoding apparatus 150 may determine the third coding units 1026a, 1026b, 1026c, and 1026d of the square shape by dividing both the upper second coding unit 1020a and the lower second coding unit 1020b in the vertical direction. In this case, a coding unit 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.
[0162] Fig.11 It is shown that a processing order among a plurality of coding units according to an embodiment may be changed according to a process of dividing a coding unit.
[0163] According to an embodiment, the image decoding apparatus 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 apparatus 150 may determine the second coding unit (e.g., second coding units 1110a, 1110b, 1120a, 1120b, etc.) by dividing the first coding unit 1100. Fig.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 may 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 may 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 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. Referring to the above Fig. 9 The 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.
[0164] According to an embodiment, the image decoding apparatus 150 may process the coding units in a predetermined order. Figure 6 The operation of processing the encoding units in a predetermined order is described, and thus a detailed description thereof will not be provided here. Fig.11 , the image decoding apparatus 150 may determine four square third coding units 1116a, 1116b, 1116c, and 1116d and 1126a, 1126b, 1126c, and 1126d by dividing the square first coding unit 1100. According to an embodiment, the image decoding apparatus 150 may determine a processing order of the third coding units 1116a, 1116b, 1116c, and 1116d and 1126a, 1126b, 1126c, and 1126d based on the shape in which the first coding unit 1100 is divided.
[0165] 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.
[0166] 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.
[0167] Reference Fig.11 , square third coding units 1116a, 1116b, 1116c and 1116d and 1126a, 1126b, 1126c and 1126d may 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 split shape information, even if the coding units are ultimately determined to have the same shape, the image decoding apparatus 150 may process the plurality of coding units in different orders.
[0168] Fig.12 A process of determining a depth of a coding unit as a shape and a size of a coding unit change when a coding unit is recursively split to determine a plurality of coding units according to an embodiment is illustrated.
[0169] 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 divided is 2n (n>0) times the length of the long side of the current coding unit after being divided, 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 divided. In the following description, a coding unit with an increased depth is represented as a coding unit of a lower depth.
[0170] Reference Fig.12 According to an embodiment, the image decoding apparatus 150 may determine a second coding unit 1202, a third coding unit 1204, and the like of a deeper depth by dividing a square first coding unit 1200 based on block shape information indicating a square shape (for example, the block shape information may indicate "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 correspond to 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.
[0171] According to an embodiment, the image decoding device 150 can determine a second coding unit 1212 or 1222, a third coding unit 1214 or 1224, and the like 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 may represent "1: NS_VER" indicating a non-square shape whose height is longer than its width, or "2: NS_HOR" indicating a non-square shape whose width is longer than its height).
[0172] The image decoding apparatus 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 apparatus 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.
[0173] According to an embodiment, the image decoding apparatus 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 apparatus 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.
[0174] According to an embodiment, the image decoding apparatus 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 apparatus 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 direction and the horizontal direction.
[0175] According to an embodiment, the image decoding apparatus 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 apparatus 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.
[0176] According to an embodiment, the image decoding apparatus 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 1222 having a size of N×N / 2. That is, the image decoding apparatus 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.
[0177] According to an embodiment, the image decoding apparatus 150 may divide a square coding unit (e.g., 1200, 1202, or 1204) in a horizontal direction or a vertical direction. For example, the image decoding apparatus 150 may determine a first coding unit 1210 having a size of N×2N by dividing a first coding unit 1200 having a size of 2N×2N in a vertical direction, or may determine a first coding unit 1220 having a size of 2N×N by dividing the first coding unit 1200 in a horizontal direction. According to an embodiment, when the depth is determined based on the length of the longest side of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1200 having a size of 2N×2N in a horizontal direction or a vertical direction may be the same as the depth of the first coding unit 1200.
[0178] 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.
[0179] Fig.13 Depth that may be determined based on a shape and a size of a coding unit and a partial index (PID) for identifying a coding unit according to an embodiment are illustrated.
[0180] According to an embodiment, the image decoding apparatus 150 may determine second coding units of various shapes by dividing the square first coding unit 1300. Fig.13 , the image decoding apparatus 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 direction and the horizontal direction based on the division shape information. That is, the image decoding apparatus 150 may determine the second coding units 1302a and 1302b, 1304a and 1304b, and 1306a, 1306b, 1306c, and 1306d based on the division shape information of the first coding unit 1300.
[0181] 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 lengths 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.
[0182] According to an embodiment, the image decoding apparatus 150 may determine a plurality of second coding units 1312a and 1312b and 1314a, 1314b, and 1314c by dividing the first coding unit 1310 whose height is longer than its width in a horizontal direction based on the division shape information. According to an embodiment, the image decoding apparatus 150 may determine a plurality of second coding units 1322a and 1322b and 1324a, 1324b, and 1324c by dividing the first coding unit 1320 whose width is longer than its height in a vertical direction based on the division shape information.
[0183] According to an embodiment, the depths of the second coding units 1312a, 1312b, 1314a, 1314b, and 1314c, or 1322a, 1322b, 1324a, 1324b, and 1324c 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 sides of the first coding unit 1310 having a non-square shape whose height is longer than its 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.
[0184] In addition, the image decoding apparatus 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, since 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 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 first coding unit 1310. The image decoding apparatus 150 may determine the depth of the coding unit divided from the non-square first coding unit 1320 whose width is longer than its height by using the above-mentioned method of determining the depth of the coding unit divided from the first coding unit 1310.
[0185] According to an embodiment, when the odd-numbered split coding units do not have equal sizes, the image decoding apparatus 150 may determine a PID for identifying the split coding units based on a size ratio between the coding units. Fig.13 , the width of the coding unit 1314b at the center position among the odd-numbered divided coding units 1314a, 1314b, and 1314c may be equal to the width of the other coding units 1314a and 1314c and its height may be twice the height of the other coding units 1314a and 1314c. That is, in this case, the coding unit 1314b at the center position may include two other coding units 1314a and 1314c. Therefore, when the PID of the coding unit 1314b at the center position is 1 based on the scanning order, the PID of the coding unit 1314c located at a position adjacent to the coding unit 1314b may increase by 2 and may thus be 3. That is, there may be discontinuity in the PID value. According to an embodiment, the image decoding apparatus 150 may determine whether the odd-numbered divided coding units do not have equal sizes based on whether there is discontinuity in the PID for identifying the divided coding units.
[0186] According to an embodiment, the image decoding apparatus 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 a current coding unit. Fig.13, the image decoding apparatus 150 may determine even-numbered coding units 1312a and 1312b or odd-numbered coding units 1314a, 1314b, and 1314c by dividing the first coding unit 1310 having a rectangular shape having a height longer than its width. The image decoding apparatus 150 may use a PID indicating each coding unit in order to identify each coding unit. According to an embodiment, the PID may be obtained from a sample point at a predetermined position of each coding unit (e.g., an upper left sample point).
[0187] According to an embodiment, the image decoding apparatus 150 may determine a coding unit at a predetermined position among the divided coding units by using a PID for identifying a coding unit. According to an embodiment, when the division shape information of the first coding unit 1310 having a rectangular shape having a height longer than its width indicates that the coding unit is divided into three coding units, the image decoding apparatus 150 may divide the first coding unit 1310 into three coding units 1314a, 1314b, and 1314c. The image decoding apparatus 150 may assign a PID to each of the three coding units 1314a, 1314b, and 1314c. The image decoding apparatus 150 may compare the PIDs of the odd-numbered divided coding units to determine a coding unit at a center position among the coding units. The image decoding apparatus 150 may determine the coding unit 1314b corresponding to the PID and the 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 apparatus 150 may determine a PID for identifying the divided coding units based on a size ratio between the coding units. Fig.13, the width of the coding unit 1314b generated by dividing the first coding unit 1310 may be equal to the width of the other coding units 1314a and 1314c, and the height thereof may be twice the height of the other coding units 1314a and 1314c. In this case, when the PID of the coding unit 1314b at the center position is 1, the PID of the coding unit 1314c located at the adjacent position to the coding unit 1314b may be increased by 2 and thus may be 3. When the PID is not uniformly increased as described above, the image decoding apparatus 150 may determine that the coding unit is divided into a plurality of coding units, wherein the plurality of coding units include coding units having sizes different from those of the 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 apparatus 150 may divide the current coding unit in such a manner that a coding unit at a predetermined position (e.g., a coding unit at a center position) among the odd number of coding units has a size different from that of the other coding units. In this case, the image decoding apparatus 150 may determine the coding units at the center position having different sizes by using the PIDs of the coding units. However, the PID and the size or position of the coding unit of the predetermined position to be determined are not limited to the above-mentioned examples, and various PIDs and various positions and sizes of the coding unit may be used.
[0188] According to an embodiment, the image decoding apparatus 150 may use a predetermined data unit in which the coding unit is recursively split.
[0189] Fig.14 It is illustrated that a plurality of coding units are determined based on a plurality of predetermined data units included in a picture according to an embodiment.
[0190] According to an embodiment, a predetermined data unit may be defined as a data unit for recursively dividing 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 a highest depth of a plurality of coding units divided from a current picture. In the following description, for ease of explanation, the predetermined data unit is referred to as a reference data unit.
[0191] According to an embodiment, the reference data unit may have a predetermined size and a predetermined shape. According to an embodiment, the reference data unit may include M×N samples. Here, M and N may be equal to each other and may be an integer represented as a power 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.
[0192] According to an embodiment, the image decoding apparatus 150 may divide the current picture into a plurality of reference data units. According to an embodiment, the image decoding apparatus 150 may divide the plurality of reference data units divided from the current picture by using the division shape information for each reference data unit. The operation of dividing the reference data unit may correspond to the division operation using a quadtree structure.
[0193] According to an embodiment, the image decoding apparatus 150 may predetermine a minimum size allowed for a reference data unit included in the current picture. Therefore, the image decoding apparatus 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 the partition shape information and the block shape information with reference to the determined reference data units.
[0194] Reference Fig.14 , the image decoding apparatus 150 may use a square reference coding unit 1400 or a non-square reference coding unit 1402. According to an embodiment, the shape and size of the 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.
[0195] According to an embodiment, the receiver 160 of the image decoding apparatus 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. Fig.10 The operation of dividing the current coding unit 1000 describes the operation of determining one or more coding units included in the square reference coding unit 1400, and the above has been combined with Fig.11 The operation of splitting the current coding unit 1100 or 1150 describes an operation of determining one or more coding units included in the non-square reference coding unit 1402, and thus, a detailed description thereof will not be provided here.
[0196] According to an embodiment, the image decoding apparatus 150 may determine the size and shape of the reference coding unit using a PID for identifying the size and shape of the reference coding unit according to some data units predetermined based on a predetermined condition. That is, the receiver 160 may obtain only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, or maximum coding unit from the bitstream, wherein each slice, slice segment, or maximum coding unit is a data unit (e.g., a data unit having 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.) that satisfies the predetermined condition. The image decoding apparatus 150 may determine the size and shape of the reference coding unit for each data unit that satisfies the predetermined condition by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from the bitstream according to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and therefore, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the 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 apparatus 150 may determine at least one of the size and shape of the reference coding unit included in the data unit serving as the unit for obtaining the PID by selecting at least one of the size and shape of the reference coding unit predetermined based on the PID.
[0197] According to an embodiment, the image decoding device 150 may use one or more reference coding units included in one maximum coding unit. That is, the maximum coding unit divided from the image may include one or more reference coding units, and the coding unit 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 the reference coding unit may be divided based on at least one of the block shape information and the division shape information.
[0198] Fig.15 A processing block serving as a unit for determining an order of reference coding units included in the picture 1500 according to an embodiment is illustrated.
[0199] According to an embodiment, the image decoding device 150 may determine one or more processing blocks divided from the picture. A processing block is a data unit including one or more reference coding units divided from an image, and 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 the determination order of the one or more reference coding units determined in each processing block 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 scanning, zigzag scanning, N-shaped scanning, upper right diagonal scanning, horizontal scanning, and vertical scanning), but is not limited to the above-mentioned scanning order.
[0200] According to an embodiment, the image decoding apparatus 150 may obtain processing block size information and may determine the size of one or more processing blocks included in the image. The image decoding apparatus 150 may obtain processing block size information from a bitstream and may determine the size of one or more processing blocks included in the image. The size of the processing block may be a predetermined size of a data unit indicated by the processing block size information.
[0201] According to an embodiment, the receiver 160 of the image decoding apparatus 150 may obtain processing block size information from a bitstream for each specific data unit. For example, the processing block size information may be obtained from a bitstream according to data units such as an image, a sequence, a picture, a slice, a slice segment, etc. That is, the receiver 160 may obtain processing block size information from a bitstream for each of various data units, and the image decoding apparatus 150 may determine the size of one or more processing blocks divided from a picture by using the obtained processing block size information, and the size of the processing block may be an integer multiple of the size of the reference coding unit.
[0202] According to an embodiment, the image decoding apparatus 150 may determine the size of the processing blocks 1502 and 1512 included in the picture 1500. For example, the image decoding apparatus 150 may determine the size of the processing block based on the processing block size information obtained from the bitstream. Fig.15 According to an embodiment, the image decoding apparatus 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 apparatus 150 may determine the determination order of one or more reference coding units in one or more processing blocks.
[0203] According to an embodiment, the image decoding apparatus 150 may determine processing blocks 1502 and 1512 included in the picture 1500 based on the size of the processing blocks, and may determine a determination order of one or more reference coding units included in the processing blocks 1502 and 1512. According to an embodiment, the determination of the reference coding unit may include determining the size of the reference coding unit.
[0204] According to an embodiment, the image decoding apparatus 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 the determination order of the one or more reference coding units based on the obtained determination order information. The determination order information may be defined as an order or direction for determining the reference coding units in the processing block. That is, the determination order of the reference coding units may be determined independently for each processing block.
[0205] According to an embodiment, the image decoding apparatus 150 may obtain the determination order information of the reference coding unit from the bitstream for each specific data unit. For example, the receiver 160 may obtain the determination order information of the reference coding unit from the bitstream according to each data unit (such as an image, a sequence, a picture, a slice, a slice segment, or a processing block). Since the determination order information of the reference coding unit indicates the order of the reference coding unit in the processing block, the determination order information may be obtained for each specific data unit including an integer number of processing blocks.
[0206] According to an embodiment, the image decoding apparatus 150 may determine one or more reference coding units based on the determined order.
[0207] According to an embodiment, the receiver 160 may obtain the determination order information of the reference coding units from the bitstream as the information related to the processing blocks 1502 and 1512, and the image decoding apparatus 150 may determine the determination order of one or more reference coding units included in the processing blocks 1502 and 1512, and may determine one or more reference coding units included in the picture 1500 based on the determination order of the reference coding units. Fig.15, the image decoding device 150 may determine determination orders 1504 and 1514 of one or more reference coding units in processing blocks 1502 and 1512, respectively. For example, when determination order information of reference coding units is obtained for each processing block, different types of determination order information of reference coding units may be obtained for processing blocks 1502 and 1512. When the determination order 1504 of reference coding units in processing block 1502 is a raster scan order, the reference coding units included in processing block 1502 may be determined according to the raster scan order. Conversely, when the determination order 1514 of reference coding units in another processing block 1512 is a reverse raster scan order, the reference coding units included in processing block 1512 may be determined according to the reverse raster scan order. Figures 1a to 15 , describes a method of dividing an image into maximum coding units and dividing the maximum coding unit into coding units having a hierarchical tree structure. Figures 16 to 32 , an embodiment of a method for predicting a chrominance block according to a CCLM mode will now be described.
[0208] Fig.16 A video decoding apparatus 1600 using chroma block prediction according to a cross-component linear model (CCLM) mode is provided. The CCLM mode provides a method for predicting a current chroma block from a reference luminance block referenced by the current chroma block according to a luminance chroma linear model obtained from samples adjacent to the current chroma block. Fig.18 A method for predicting the current chrominance block according to the CCLM mode is described in detail.
[0209] The video decoding apparatus 1600 includes an intra-prediction mode determiner 1602 and an intra-predictor 1604. The intra-prediction mode determiner 1602 determines an intra-prediction mode to be applied to a plurality of blocks divided from a video image. Then, the intra-predictor 1604 performs intra-prediction on the plurality of blocks according to the intra-prediction mode determined by the intra-prediction mode determiner 1602. Fig.16 It is shown that only the intra prediction mode determiner 1602 and the intra predictor 1604 related to the intra prediction according to the CCLM mode are included in the video decoding apparatus 1600, but according to an embodiment, the video decoding apparatus 1600 may further include other components required to decode a video.
[0210] The intra prediction mode determiner 1602 may determine the intra prediction mode of the current chroma block from the chroma intra prediction information obtained from the bitstream. The chroma intra prediction information may be set to indicate one of a DC mode, a planar mode, a vertical mode, a horizontal mode, a CCLM mode, an intra prediction mode of a reference luminance block corresponding to the current chroma block, and the like.
[0211] According to an embodiment, when the intra prediction mode of the current chroma block is the CCLM mode according to the chroma intra prediction information, the intra prediction mode determiner 1602 may obtain CCLM mode information indicating the position of the reference chroma sample from the bitstream. Then, the intra prediction mode determiner 1602 may obtain the reference chroma sample based on the CCLM mode reference position according to the CCLM mode information. Then, the intra prediction mode determiner 1602 may obtain the reference luma sample corresponding to the reference chroma sample.
[0212] According to an embodiment, the CCLM mode information may indicate one of a left CCLM mode, an upper CCLM mode, and an upper-left CCLM mode, wherein the left CCLM mode indicates that the CCLM mode reference position is at the left side and lower-left side of the current chroma block, the upper CCLM mode indicates that the CCLM mode reference position is at the upper side and upper-right side of the current chroma block, and the upper-left CCLM mode indicates that the CCLM mode reference position is at the left side and upper side of the current chroma block.
[0213] According to an embodiment, CCLM mode information may not be included in the bitstream. When CCLM mode information is not used or not included in the bitstream, the intra prediction mode determiner 1602 may determine the CCLM mode reference position according to the default CCLM mode. The default CCLM mode may be set to one of the left CCLM mode, the upper CCLM mode, and the upper left CCLM mode.
[0214] When the intra prediction mode of the current chroma block is the CCLM mode according to the chroma intra prediction information, the intra predictor 1604 may obtain reference chroma samples adjacent to the current chroma block and reference luminance samples corresponding to the reference chroma samples.
[0215] According to an embodiment, a reference chroma sample is selected from the chroma samples adjacent to the current chroma block. The reference chroma sample is located at a predetermined CCLM mode reference position adjacent to the current chroma block. Therefore, the reference chroma sample is determined to be a chroma sample at a predetermined CCLM mode reference position and adjacent to the current chroma block.
[0216] According to an embodiment, the number of predetermined CCLM mode reference positions may be set to a constant regardless of the size of the current chroma block. According to another embodiment, the number of CCLM mode reference positions may be set according to the size of the current chroma block. For example, the number of CCLM mode reference positions may be set in proportion to the size of the current chroma block.
[0217] According to an embodiment, the predetermined CCLM mode reference positions may include positions of a first upper reference chroma sample located at the rightmost side, a second upper reference chroma sample located in the middle, and a third upper reference chroma sample located at the leftmost side among the chroma samples adjacent to the upper side of the current chroma block, and positions of a first left reference chroma sample located above, a second left reference chroma sample located in the middle, and a third left reference chroma sample located below among the chroma samples adjacent to the left side of the current chroma block.
[0218] According to an embodiment, the predetermined CCLM mode reference positions may include the positions of a fourth upper reference chroma sample located between the leftmost chroma sample and the middle chroma sample among the chroma samples adjacent to the upper side of the current chroma block and a fifth upper reference chroma sample located between the rightmost chroma sample and the middle chroma sample, and the positions of a fourth left reference chroma sample located between the upper chroma sample and the middle chroma sample and a fifth left reference chroma sample located between the lower chroma sample and the middle chroma sample among the chroma samples adjacent to the left side of the current chroma block.
[0219] According to an embodiment, when the chroma samples are not available at the predetermined CCLM mode reference position, the chroma samples may be obtained from the CCLM mode default reference position. Optionally, alternatively, the chroma samples with the default values may be used for the CCLM mode. Optionally, alternatively, the chroma samples closest to the predetermined CCLM mode reference position may be used for the CCLM mode.
[0220] Will refer to Figures 19 to 29 Various embodiments of CCLM mode reference positions are described.
[0221] According to an embodiment, when CCLM mode information is obtained from a bitstream, the intra predictor 1604 may determine a CCLM mode reference position according to the CCLM mode indicated by the CCLM mode information.
[0222] The intra predictor 1604 determines the reference luma sample according to the position of the reference chroma sample. According to an embodiment, the reference luma sample may be obtained by subsampling the luma sample according to the color format, wherein the luma sample corresponds to the position of the reference chroma sample. Optionally, one luma sample among one or more luma samples corresponding to the position of the reference chroma sample may be determined as the reference luma sample. Fig.30 Various embodiments of methods of determining reference luma samples are described.
[0223] According to an embodiment, the correlation between the reference chroma samples and the reference luma samples may be determined by determining a luma-chroma sample pair according to the position of the reference chroma sample and the position of the reference luma sample and determining a linear model of the luma sample and the chroma samples according to the luma-chroma sample pair.
[0224] According to an embodiment, the linear models of the luma samples and the chroma samples may be determined according to a linear regression analysis based on luma-chroma sample pairs.
[0225] According to an embodiment, linear models of luma samples and chroma samples may be determined according to the first representative luma sample value, the first representative chroma sample value, the second representative luma sample value, and the second representative chroma sample value.
[0226] According to an embodiment, a first representative luma sample value and a first representative chroma sample value may be determined from a luma sample pair having a maximum luma sample value among luma sample pairs, and a second representative luma sample value and a second representative chroma sample value may be determined from a luma sample pair having a minimum luma sample value among luma sample pairs.
[0227] According to an embodiment, a first representative luma sample value and a first representative chroma sample value may be determined from a first luma-chroma sample pair group, and a second representative luma sample value and a second representative chroma sample value may be determined from a second luma-chroma sample pair group. The first luma-chroma sample pair group may include a luma-chroma sample pair having a large luma sample value among the luma-chroma sample pairs. In addition, the second luma-chroma sample pair group may include a luma-chroma sample pair having a small luma sample value among the luma-chroma sample pairs.
[0228] For example, when a linear model of luma samples and chroma samples is determined from four luma-chroma sample pairs, a first representative chroma sample value and a first representative luma sample value may be determined from two luma-chroma sample pairs having large chroma sample values, and a second representative chroma sample value and a second representative luma sample value may be determined from two luma-chroma sample pairs having small chroma sample values.
[0229] According to an embodiment, the first representative brightness sample value (X b ), the first representative chromaticity sample value (X a ), the second representative brightness sample value (Y b ) and the second representative chromaticity sample value (Y a ) determines the scaling parameter (Α) and the offset parameter (β) of the linear model. The following equation 1 indicates the calculation formula of the scaling parameter (Α), and the following equation 2 indicates the calculation formula of the offset parameter (β).
[0230] [Equation 1]
[0231]
[0232] [Equation 2]
[0233] β=Y b -α·Xb
[0234] The intra predictor 1604 may predict the current chroma block based on the correlation between the reference chroma samples and the reference luma samples and a reference luma block corresponding to the current chroma block. The reference luma block is decoded before the current chroma block, and the position of the reference luma block corresponds to the position of the current chroma block. The chroma samples of the current chroma block are determined by applying the sample value of the corresponding luma sample to a linear model of the luma sample and the chroma samples.
[0235] For example, the luminance sample (rec L ′(i, j)) to determine the chroma sample of the current chroma block (pred c The following equation 3 indicates the chroma sample of the current chroma block (pred c (i, j)) and the luminance sample of the reference luminance block (rec L The linear relationship between ′(i, j)).
[0236] [Equation 3]
[0237] pred c (i, j) = α·rec L ′(i, j)+β
[0238] The intra-frame prediction mode determiner 1602 and the intra-frame predictor 1604 of the video decoding device 1600 may include one or more instructions for executing the video decoding method of the video decoding device 1600. The intra-frame prediction mode determiner 1602 and the intra-frame predictor 1604 of the video decoding device 1600 may be implemented as a program including the one or more instructions. The video decoding device 1600 may include one or more memory devices storing the program and one or more processors configured to execute the one or more instructions of the program. The program including the one or more instructions may be stored in a computer recordable storage medium.
[0239] Fig.17 A video encoding apparatus 1700 using chroma block prediction according to a CCLM mode is provided.
[0240] The video encoding device 1700 includes an intra-frame predictor 1702, an intra-frame prediction mode determiner 1704, and a bitstream generator 1706. The intra-frame predictor 1702 performs intra-frame prediction on a current chroma block included in a video image according to various intra-frame prediction modes. The intra-frame prediction mode determiner 1704 determines the most efficient intra-frame prediction mode as the intra-frame prediction mode of the current chroma block according to the intra-frame prediction results of the various intra-frame prediction modes. The bitstream generator 1706 generates a bitstream including chroma intra-frame prediction information indicating the intra-frame prediction mode of the current chroma block.
[0241] Fig.17 It is shown that the video encoding apparatus 1700 includes only an intra predictor 1702, an intra prediction mode determiner 1704, and a bitstream generator 1706 related to intra prediction according to the CCLM mode, but according to an embodiment, the video encoding apparatus 1700 may further include other components required to encode a video.
[0242] The intra predictor 1702 predicts the current chroma block according to the CCLM mode. For prediction based on the CCLM mode, the intra predictor 1702 obtains reference chroma samples adjacent to the current chroma block and reference luminance samples corresponding to the reference chroma samples. Then, the intra predictor 1702 predicts the current chroma block based on the correlation between the reference chroma samples and the reference luminance samples and the reference luminance block corresponding to the current chroma block.
[0243] The intra prediction mode determiner 1704 determines whether the CCLM mode is to be applied to the current chroma block according to the prediction result for the current chroma block based on the CCLM mode.
[0244] The bitstream generator 1706 generates a bitstream including chroma intra prediction information indicating whether the CCLM mode is to be applied to the current chroma block.
[0245] According to an embodiment, the CCLM mode may be classified into a left CCLM mode, an upper CCLM mode, and an upper-left CCLM mode according to the position of the reference chroma sample. The intra-frame predictor 1702 may predict the current chroma block according to the left CCLM mode. The intra-frame predictor 1702 may predict the current chroma block according to the upper CCLM mode. In addition, the intra-frame predictor 1702 may predict the current chroma block according to the upper CCLM mode.
[0246] The intra prediction mode determiner 1704 may determine which CCLM mode of the left CCLM mode, the upper CCLM mode, and the upper left CCLM mode will be applied to the current chroma block based on the prediction result for the current chroma block according to the left CCLM mode, the prediction result for the current chroma block according to the upper CCLM mode, and the prediction result for the current chroma block according to the upper left CCLM mode. Then, the bitstream generator 1706 may generate a bitstream including CCLM mode information indicating the position of the reference chroma sample.
[0247] Fig.17 The CCLM mode of the video encoding device 1700 may be set to be equal to Fig.16 The prediction method of the CCLM mode of the video decoding device 1600. Therefore, Fig.17 The CCLM mode has Fig.16 Characteristics of CCLM mode.
[0248] The intra-frame predictor 1702, the intra-frame prediction mode determiner 1704, and the bitstream generator 1706 of the video encoding device 1700 may include one or more instructions for executing the video encoding method of the video encoding device 1700. The intra-frame predictor 1702, the intra-frame prediction mode determiner 1704, and the bitstream generator 1706 of the video encoding device 1700 may be implemented as a program including the one or more instructions. The video encoding device 1700 may include one or more memory devices storing the program and one or more processors configured to execute the one or more instructions of the program. The program including the one or more instructions may be stored in a computer recordable storage medium.
[0249] In the following, reference is made to Figures 18 to 29 , an embodiment of the CCLM mode will now be described in detail. Figures 18 to 29 In the example, the coordinates of the sample point located at the upper left of the chrominance block are set to the reference point (0, 0). The x component of the coordinates of the sample point increases to the right and decreases to the left. The y component of the coordinates of the sample point increases downward and decreases upward.
[0250] Fig.18 A prediction method according to the CCLM mode according to an embodiment is shown.
[0251] There may be a linear correlation between the chroma samples of the current chroma block 1800 and the luma samples of the reference luma block 1820 corresponding to the current chroma block 1800. Therefore, based on the linear correlation between the current chroma block 1800 and the reference luma block 1820, it is likely that the current chroma block 1800 will be accurately predicted from the reference luma block 1820. The CCLM mode provides a method for predicting the current chroma block 1800 based on the above linear correlation.
[0252] Because the current chroma block 1800 has not been decoded, the video decoder cannot accurately derive the linear correlation between the current chroma block 1800 and the reference luma block 1820. The linear correlation between the already decoded adjacent chroma samples 1810 of the current chroma block 1800 and the already decoded adjacent luma samples 1830 of the reference luma block 1820 is similar to the linear correlation between the current chroma block 1800 and the reference luma block 1820. Therefore, the linear correlation between the adjacent chroma samples 1810 of the current chroma block 1800 and the adjacent luma samples 1830 of the reference luma block 1820 is applied to the current chroma block 1800 instead.
[0253] The linear correlation between the adjacent chrominance samples 1810 and the adjacent chrominance samples 1830 is determined based on the luminance-chrominance sample pairs of the spatially co-located luminance samples and chrominance samples. For example, a luminance-chrominance sample pair is determined based on the chrominance sample 1812 and the four luminance samples 1832 corresponding to the chrominance sample 1812.
[0254] The luma-chroma sample pair may be expressed as (L, C). The above L indicates the sample value of the luma sample, and the above C indicates the sample value of the chroma sample. For example, in a luma-chroma sample pair of a chroma sample 1812 and four luma samples 1832, L may be determined as an average sample value of the four luma samples 1832 or one sample value of the four luma samples 1832, and C may be determined as the sample value of the chroma sample 1812.
[0255] Reference Fig.18 , according to the 4:2:0 color format, describes the relationship between the current chrominance block 1800 and the reference luma block 1820. When the color format is 4:2:0, four luma samples correspond to one chrominance sample. Therefore, it is shown that the chrominance sample 1812 corresponds to four luma samples 1832.
[0256] However, when the color format is 4:2:2 (where two luma samples correspond to one chroma sample), each chroma sample may correspond to two luma samples. Also, when the color format is 4:4:4 (where one luma sample corresponds to one chroma sample), each chroma sample may correspond to one luma sample.
[0257] A plurality of luma-chroma sample pairs may be determined based on all luma samples and chroma samples included in the adjacent chroma samples 1810 and the adjacent luma samples 1830. Then, a linear correlation between the adjacent chroma samples 1810 and the adjacent luma samples 1830 may be derived from the plurality of luma-chroma sample pairs. From the linear correlation, a linear model for predicting the current chroma block 1800 from the reference luma block 1820 may be derived.
[0258] According to an embodiment, one or more luma-chroma sample pairs may be determined based on some luma samples and chroma samples included in the adjacent chroma samples 1810 and the adjacent luma samples 1830. When linear correlation is derived from luma-chroma sample pairs of all luma samples and chroma samples included in the adjacent chroma samples 1810 and the adjacent luma samples 1830, the amount of calculation for the CCLM mode may be very large. Specifically, when the current chroma block 1800 is larger than a predetermined size, the encoding and decoding rate may be reduced due to the increase in the amount of calculation according to the CCLM mode. Therefore, by using only some luma samples and chroma samples included in the adjacent chroma samples 1810 and the adjacent luma samples 1830, the increase in the amount of calculation according to the CCLM mode may be constrained.
[0259] Figures 19 to 26 Various embodiments of luma samples and chroma samples used in CCLM mode among the adjacent chroma samples 1810 and the adjacent luma samples 1830 are shown.
[0260] Fig.19 The CCLM mode reference position referenced by the chroma block 1900 of size 4×4 is shown.
[0261] Some of the chroma samples 1910 adjacent to the chroma block 1900 are selected as reference chroma samples according to the CCLM mode reference positions. According to an embodiment, at least two of the positions of the chroma samples 1912, 1914, 1916, 1918, 1920, 1922, 1924, 1926, and 1928 are determined as CCLM mode reference positions.
[0262] According to an embodiment, two positions among the positions of the upper chroma samples 1912 , 1914 , 1916 , 1918 , and 1920 and two positions among the positions of the left chroma samples 1922 , 1924 , 1926 , and 1928 may be determined as CCLM mode reference positions.
[0263] Furthermore, according to an embodiment, one of the positions of the upper chroma samples 1912 , 1914 , 1916 , 1918 , and 1920 and one of the positions of the left chroma samples 1922 , 1924 , 1926 , and 1928 may be determined as the CCLM mode reference position.
[0264] Fig. 20 The CCLM mode reference position referenced by the chroma block 2000 of size 8×8 is shown.
[0265] Some of the chroma samples 2010 adjacent to the chroma block 2000 are selected as reference chroma samples according to the CCLM mode reference positions. According to an embodiment, at least two of the positions of the chroma samples 2012, 2014, 2016, 2018, 2020, 2022, 2024, 2026, 2028, 2030, 2032, 2034, 2036, 2038, 2040, 2042, and 2044 are determined as CCLM mode reference positions.
[0266] According to an embodiment, four positions of the upper chroma samples 2012, 2014, 2016, 2018, 2020, 2022, 2024, 2026, and 2028 and four positions of the left chroma samples 2030, 2032, 2034, 2036, 2038, 2040, 2042, and 2044 may be determined as CCLM mode reference positions.
[0267] According to an embodiment, two positions of the upper chroma samples 2012, 2014, 2016, 2018, 2020, 2022, 2024, 2026, and 2028 and two positions of the left chroma samples 2030, 2032, 2034, 2036, 2038, 2040, 2042, and 2044 may be determined as CCLM mode reference positions.
[0268] According to an embodiment, one of the positions of the upper chroma samples 2012, 2014, 2016, 2018, 2020, 2022, 2024, 2026, and 2028 and one of the positions of the left chroma samples 2030, 2032, 2034, 2036, 2038, 2040, 2042, and 2044 may be determined as the CCLM mode reference position.
[0269] Fig.21 The CCLM mode reference position referenced by the chroma block 2100 of size 4×8 is shown.
[0270] Some of the chroma samples 2110 adjacent to the chroma block 2100 are selected as reference chroma samples according to the CCLM mode reference positions. According to an embodiment, at least two of the positions of the chroma samples 2112, 2114, 2116, 2118, 2120, 2122, 2124, 2126, 2128, 2130, 2132, 2134, and 2136 are determined as CCLM mode reference positions.
[0271] According to an embodiment, two of the positions of the upper chroma samples 2112, 2114, 2116, 2118, and 2120 and four of the positions of the left chroma samples 2122, 2124, 2126, 2128, 2130, 2132, 2134, and 2136 may be determined as CCLM mode reference positions.
[0272] According to an embodiment, two of the positions of the upper chroma samples 2112, 2114, 2116, 2118, and 2120 and two of the positions of the left chroma samples 2122, 2124, 2126, 2128, 2130, 2132, 2134, and 2136 may be determined as CCLM mode reference positions.
[0273] According to an embodiment, one of the positions of the upper chroma samples 2112, 2114, 2116, 2118, and 2120 and one of the positions of the left chroma samples 2122, 2124, 2126, 2128, 2130, 2132, 2134, and 2136 may be determined as the CCLM mode reference position.
[0274] Fig. 22 The CCLM mode reference positions referenced by the chroma block 2200 of size 8×4 are shown.
[0275] Some of the chroma samples 2210 adjacent to the chroma block 2200 are selected as reference chroma samples according to the CCLM mode reference positions. According to an embodiment, at least two of the positions of the chroma samples 2212, 2214, 2216, 2218, 2220, 2222, 2224, 2226, 2228, 2230, 2232, 2234, and 2236 are determined as CCLM mode reference positions.
[0276] According to an embodiment, four positions of the upper chroma samples 2212, 2214, 2216, 2218, 2220, 2222, 2224, 2226, and 2228 and two positions of the left chroma samples 2230, 2232, 2234, and 2236 may be determined as CCLM mode reference positions.
[0277] According to an embodiment, two of the positions of the upper chroma samples 2212, 2214, 2216, 2218, 2220, 2222, 2224, 2226, and 2228 and two of the positions of the left chroma samples 2230, 2232, 2234, and 2236 may be determined as CCLM mode reference positions.
[0278] According to an embodiment, one of the positions of the upper chroma samples 2212, 2214, 2216, 2218, 2220, 2222, 2224, 2226, and 2228 and one of the positions of the left chroma samples 2230, 2232, 2234, and 2236 may be determined as the CCLM mode reference position.
[0279] according to Figures 18 to 21 , one CCLM mode reference position may be set for each of the upper chroma sample and the left chroma sample. Alternatively, two CCLM mode reference positions may be set for each of the upper chroma sample and the left chroma sample. Alternatively, the number of CCLM mode reference positions proportional to the size of the chroma block may be set for the upper chroma sample and the left chroma sample.
[0280] Fig.23 An embodiment of a CCLM mode reference position referenced by a chroma block 2300 of size M×N in the top left CCLM mode is shown, wherein M and N are positive integers, respectively.
[0281] Some of the upper chroma samples 2310 and some of the left chroma samples 2320 adjacent to the chroma block 2300 are selected as reference chroma samples according to the CCLM mode reference positions. The intervals between the CCLM mode reference positions are set to be regular between the CCLM mode reference positions. For example, the CCLM mode reference positions 2312, 2314, 2316, and 2318 may be set so that an interval of k sample units may be used between the CCLM mode reference positions 2312, 2314, 2316, and 2318 for the upper chroma sample 2310. In addition, the CCLM mode reference positions 2322, 2324, 2326, and 2328 may be set so that an interval of k sample units may be used between the CCLM mode reference positions 2322, 2324, 2326, and 2328 for the left chroma sample 2320. Wherein, the above k is an integer equal to or greater than 2.
[0282] exist Fig.23 , the CCLM mode reference positions for the upper chroma samples 2310 may be determined in proportion to the size of the block. For example, when the M value is 32 and k is 4, 8 CCLM mode reference positions may be determined for the upper chroma samples 2310. Therefore, the number of CCLM mode reference positions for the upper chroma samples 2310 may be determined in proportion to the width (M) of the block.
[0283] Likewise, similar to the upper chroma sample 2310, the CCLM mode reference positions for the left chroma sample 2320 may be determined in proportion to the size of the block. Therefore, the number of CCLM mode reference positions for the left chroma sample 2320 may be determined in proportion to the height (N) of the block.
[0284] According to an embodiment, only the number of CCLM mode reference positions may be adaptively determined according to the size of a block, and the intervals between the CCLM mode reference positions may be set to be irregular.
[0285] Fig.24 An embodiment of a CCLM mode reference position referenced by a chroma block 2400 of size M×N in the top left CCLM mode is shown, wherein M and N are positive integers respectively.
[0286] according to Fig.24 , three CCLM mode reference positions 2412, 2414, and 2416 are determined from the upper chroma sample 2410, and three CCLM mode reference positions 2422, 2424, and 2426 are determined from the left chroma sample 2420. Fig.23 Unlike the embodiment of the present invention, the number of CCLM mode reference positions is determined regardless of the size (M×N) of the chroma block 2400. Therefore, when the size of the chroma block 2400 is large, an increase in the amount of calculation required for prediction according to the CCLM mode can be restricted.
[0287] According to an embodiment, the first upper CCLM mode reference position 2412 is adjacent to the upper left vertex of the chroma block 2400. For example, the coordinates of the first upper CCLM mode reference position 2412 may be set to (0, -1). The second upper CCLM mode reference position 2414 is adjacent to the upper center point of the chroma block 2400. For example, the coordinates of the second upper CCLM mode reference position 2414 may be set to (M / 2, -1). The third upper CCLM mode reference position 2416 is adjacent to the upper right vertex of the chroma block 2400. For example, the coordinates of the third upper CCLM mode reference position 2416 may be set to (M-1, -1).
[0288] According to an embodiment, the first left CCLM mode reference position 2422 is adjacent to the upper left vertex of the chroma block 2400. For example, the coordinates of the first left CCLM mode reference position 2422 may be set to (-1, 0). The second left CCLM mode reference position 2424 is adjacent to the left end center point of the chroma block 2400. For example, the coordinates of the second left CCLM mode reference position 2424 may be set to (-1, N / 2). The third left CCLM mode reference position 2426 is adjacent to the lower left vertex of the chroma block 2400. For example, the coordinates of the third left CCLM mode reference position 2426 may be set to (-1, N-1).
[0289] A person skilled in the art may change Fig.24 Therefore, in order to optimize the CCLM mode, the six CCLM mode reference positions can be changed according to the predetermined sample unit.
[0290] Fig.25 An embodiment of a CCLM mode reference position referenced by a chroma block 2500 of size M×N in the top left CCLM mode is shown, wherein the above M and N are positive integers respectively.
[0291] according to Fig.25 , two CCLM mode reference positions 2512 and 2514 are determined from the upper chroma sample 2510, and two CCLM mode reference positions 2522 and 2524 are determined from the left chroma sample 2520. Fig.24 In the embodiment of the present invention, the number of CCLM mode reference positions is determined regardless of the size (M×N) of the chroma block 2500. Therefore, when the size of the chroma block 2500 is large, an increase in the amount of calculation required for prediction according to the CCLM mode can be restricted.
[0292] According to an embodiment, the fourth upper CCLM mode reference position 2512 is located in the middle between the upper left vertex of the chroma block 2500 and the upper center point of the chroma block 2500. For example, the coordinates of the fourth upper CCLM mode reference position 2512 may be set to (M / 4, -1). The fifth upper CCLM mode reference position 2514 is located in the middle between the upper right vertex of the chroma block 2500 and the upper center point of the chroma block 2500. For example, the coordinates of the fifth upper CCLM mode reference position 2514 may be set to (3M / 4, -1).
[0293] According to an embodiment, the fourth left CCLM mode reference position 2522 is located in the middle between the upper left vertex of the chroma block 2500 and the left end center point of the chroma block 2500. For example, the coordinates of the fourth left CCLM mode reference position 2522 may be set to (-1, N / 4). The fifth left CCLM mode reference position 2524 is located in the middle between the lower left vertex of the chroma block 2500 and the left end center point of the chroma block 2500. For example, the coordinates of the fifth left CCLM mode reference position 2524 may be set to (-1, 3N / 4).
[0294] A person skilled in the art may change Fig.25 Therefore, in order to optimize the CCLM mode, the four CCLM mode reference positions can be changed according to the predetermined sample unit.
[0295] Fig.26 An embodiment of a CCLM mode reference position referenced by a chroma block 2600 of size M×N in the upper CCLM mode is shown, wherein the above M and N are positive integers respectively.
[0296] Some of the upper chroma samples 2610 adjacent to the chroma block 2600 are selected as reference chroma samples according to the CCLM mode reference positions. The intervals between the CCLM mode reference positions are set to be regular between the CCLM mode reference positions. For example, the CCLM mode reference positions 2612, 2614, 2616, 2618, 2620, 2622, 2624, 2626, and 2628 may be set so that an interval of k sample units may be used between the CCLM mode reference positions 2612, 2614, 2616, 2618, 2620, 2622, 2624, 2626, and 2628 for the upper chroma sample 2610. Wherein, the above k is an integer equal to or greater than 2. The left chroma sample 2620 is not used in the upper CCLM mode.
[0297] exist Fig.26 , the CCLM mode reference positions may be determined in proportion to the width of the block. For example, when the M value is 32 and k is 4, 16 CCLM mode reference positions may be determined for the upper chroma sample 2610. Therefore, the number of CCLM mode reference positions for the upper chroma sample 2610 may be determined in proportion to 2 times the width (M) of the block.
[0298] The chroma samples located at the upper right of the chroma block 2600 are far away from the chroma block 2600 and thus have relatively little similarity with the chroma block 2600. Therefore, according to an embodiment, the CCLM mode reference position may be set so that the chroma samples located above the chroma block 2600 are more than the chroma samples located at the upper right.
[0299] According to an embodiment, only the number of CCLM mode reference positions may be adaptively determined according to the size of a block, and the intervals between the CCLM mode reference positions may be set to be irregular.
[0300] Fig. 27 An embodiment of a CCLM mode reference position referenced by a chroma block 2700 of size M×N in the upper CCLM mode is shown, wherein the above M and N are positive integers respectively.
[0301] Reference Fig. 27 , four CCLM mode reference positions 2712, 2714, 2716 and 2718 are determined from the upper chroma sample 2710. Fig.26 Unlike the embodiment of the present invention, the number of CCLM mode reference positions is determined regardless of the size (M×N) of the chroma block 2700. Therefore, when the size of the chroma block 2700 is large, an increase in the amount of calculation required for prediction according to the CCLM mode can be restricted.
[0302] According to an embodiment, the fourth upper CCLM mode reference position 2712 may be located in the middle between the upper left vertex of the chroma block 2700 and the upper center point of the chroma block 2700. For example, the coordinates of the fourth upper CCLM mode reference position 2712 may be set to (M / 4, -1). The fifth upper CCLM mode reference position 2714 may be located in the middle between the upper right vertex of the chroma block 2700 and the upper center point of the chroma block 2700. For example, the coordinates of the fifth upper CCLM mode reference position 2714 may be set to (3M / 4, -1).
[0303] The sixth upper CCLM mode reference position 2716 may be located at a point that is 1 / 4 of the width (M) of the chroma block 2700 from the upper right vertex of the chroma block 2700 in the right direction. For example, the coordinates of the sixth upper CCLM mode reference position 2716 may be set to (5M / 4, -1). The seventh upper CCLM mode reference position 2718 may be located at a point that is 3 / 4 of the width (M) of the chroma block 2700 from the upper right vertex of the chroma block 2700 in the right direction. For example, the coordinates of the seventh upper CCLM mode reference position 2718 may be set to (7M / 4, -1).
[0304] According to another embodiment, the fourth upper CCLM mode reference position 2712 may be spaced apart from the upper left vertex of the chroma block 2700 in the left direction by a value corresponding to 1 / 8 of the sum of the width and height of the chroma block 2700. For example, the coordinates of the fourth upper CCLM mode reference position 2712 may be set to ((M+N) / 8, -1). The fifth upper CCLM mode reference position 2714 may be spaced apart from the upper left vertex of the chroma block 2700 in the left direction by a value corresponding to 3 / 8 of the sum of the width and height of the chroma block 2700. For example, the coordinates of the fifth upper CCLM mode reference position 2714 may be set to (3(M+N) / 8, -1).
[0305] The sixth upper CCLM mode reference position 2716 may be spaced apart from the upper left vertex of the chroma block 2700 in the left direction by a value corresponding to 5 / 8 of the sum of the width and height of the chroma block 2700. For example, the coordinates of the sixth upper CCLM mode reference position 2716 may be set to (5(M+N) / 8, -1). The seventh upper CCLM mode reference position 2718 may be spaced apart from the upper left vertex of the chroma block 2700 in the left direction by a value corresponding to 7 / 8 of the sum of the width and height of the chroma block 2700. For example, the coordinates of the seventh upper CCLM mode reference position 2718 may be set to (7(M+N) / 8, -1).
[0306] A person skilled in the art may change Fig. 27 Therefore, in order to optimize the CCLM mode, the four CCLM mode reference positions can be changed according to the predetermined sample unit.
[0307] Fig.28 An embodiment of a CCLM mode reference position referenced by a chroma block 2800 of size M×N in the left CCLM mode is shown, wherein M and N are positive integers respectively.
[0308] Some of the left chroma samples 2820 adjacent to the chroma block 2800 are selected as reference chroma samples according to the CCLM mode reference positions. The intervals between the CCLM mode reference positions are set to be regular between the CCLM mode reference positions. For example, the CCLM mode reference positions 2822, 2824, 2826, 2828, 2830, 2832, 2834, 2836, and 2838 may be set so that an interval of k sample units may be used between the CCLM mode reference positions 2822, 2824, 2826, 2828, 2830, 2832, 2834, 2836, and 2838 for the left chroma sample 2820. Wherein, the above k is an integer equal to or greater than 2. The upper chroma sample 2810 is not used in the left CCLM mode.
[0309] exist Fig.28 , the CCLM mode reference positions may be determined in proportion to the height of the block. For example, when the N value is 32 and k is 4, 16 CCLM mode reference positions may be determined for the left chroma sample 2820. Therefore, the number of CCLM mode reference positions for the left chroma sample 2820 may be determined in proportion to 2 times the height (N) of the block.
[0310] The chroma samples located at the lower left of the chroma block 2800 are far away from the chroma block 2800 and thus have relatively little similarity with the chroma block 2800. Therefore, according to an embodiment, the CCLM mode reference position may be set so that the chroma samples located at the left side of the chroma block 2800 are more than the chroma samples located at the lower left.
[0311] According to an embodiment, only the number of CCLM mode reference positions may be adaptively determined according to the size of a block, and the intervals between the CCLM mode reference positions may be set to be irregular.
[0312] Fig.29 An embodiment of a CCLM mode reference position referenced by a chroma block 2900 of size M×N in the left CCLM mode is shown, wherein M and N are positive integers respectively.
[0313] Reference Fig.29 , four CCLM mode reference positions 2922, 2924, 2926 and 2928 are determined from the left chrominance sample 2920. Fig.28Unlike the embodiment of the present invention, the number of CCLM mode reference positions is determined regardless of the size (M×N) of the chroma block 2900. Therefore, when the size of the chroma block 2900 is large, an increase in the amount of calculation required for prediction according to the CCLM mode can be restricted.
[0314] According to an embodiment, the fourth left CCLM mode reference position 2922 may be located in the middle between the upper left vertex of the chroma block 2900 and the left end center point of the chroma block 2900. For example, the coordinates of the fourth left CCLM mode reference position 2922 may be set to (-1, N / 4). The fifth left CCLM mode reference position 2924 may be located in the middle between the lower left vertex of the chroma block 2900 and the left end center point of the chroma block 2900. For example, the coordinates of the fifth left CCLM mode reference position 2924 may be set to (-1, 3N / 4).
[0315] The sixth left CCLM mode reference position 2926 may be located at a point that is 1 / 4 of the height (N) of the chroma block 2900 from the lower left vertex of the chroma block 2900 in the downward direction. For example, the coordinates of the sixth left CCLM mode reference position 2926 may be set to (-1,5N / 4). The seventh left CCLM mode reference position 2928 may be located at a point that is 3 / 4 of the height (N) of the chroma block 2900 from the lower left vertex of the chroma block 2900 in the downward direction. For example, the coordinates of the seventh left CCLM mode reference position 2928 may be set to (-1,7N / 4).
[0316] According to another embodiment, the fourth left CCLM mode reference position 2922 may be spaced apart from the upper left vertex of the chroma block 2900 in the downward direction by a value corresponding to 1 / 8 of the sum of the width and height of the chroma block 2900. For example, the coordinates of the fourth left CCLM mode reference position 2922 may be set to (-1, (M+N) / 8). The fifth left CCLM mode reference position 2924 may be spaced apart from the upper left vertex of the chroma block 2900 in the downward direction by a value corresponding to 3 / 8 of the sum of the width and height of the chroma block 2900. For example, the coordinates of the fifth left CCLM mode reference position 2924 may be set to (-1, 3(M+N) / 8).
[0317] The sixth left CCLM mode reference position 2926 may be spaced apart from the upper left vertex of the chroma block 2900 in the downward direction by a value corresponding to 5 / 8 of the sum of the width and height of the chroma block 2900. For example, the coordinates of the sixth left CCLM mode reference position 2926 may be set to (-1, 5(M+N) / 8). The seventh left CCLM mode reference position 2928 may be spaced apart from the upper left vertex of the chroma block 2900 in the downward direction by a value corresponding to 7 / 8 of the sum of the width and height of the chroma block 2900. For example, the coordinates of the seventh left CCLM mode reference position 2928 may be set to (-1, 7(M+N) / 8).
[0318] A person skilled in the art may change Fig.29 Therefore, in order to optimize the CCLM mode, the four CCLM mode reference positions can be changed according to the predetermined sample unit.
[0319] Fig.30 An embodiment is described in which a reference luma sample corresponding to the reference chroma sample 3020 is determined from a plurality of luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046 of a region 3010 corresponding to the reference chroma sample 3020. Each square of the image 3000 represents a luma sample, and each circle represents a chroma sample.
[0320] exist Fig.30 , luma samples and chroma samples of the image 3000 are arranged according to the 4:2:0 color format. According to the 4:2:0 color format, one chroma sample corresponds to four luma samples. The region 3010 includes a reference chroma sample 3020 and nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046 adjacent to the position of the reference chroma sample 3020. In order to determine the luma-chroma sample pair of the reference chroma sample 3020, one luma sample corresponding to the reference chroma sample 3020 must be obtained from the nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046.
[0321] According to an embodiment, the reference luma sample may be determined according to an average sample value of the nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046. Alternatively, the reference luma sample may be determined according to a weighted average sample value of the nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046. Furthermore, in addition to the nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046, a plurality of luma samples adjacent to the region 3010 may be additionally referenced when determining the reference luma sample.
[0322] According to an embodiment, the reference luma sample may be determined according to a weighted average of the three luma samples 3036, 3038, and 3040 of the region 3010. The weights to be applied to the three luma samples 3036, 3038, and 3040 may be set to [1, 2, 1].
[0323] According to an embodiment, the reference luma sample may be determined according to a weighted average of the three luma samples 3032, 3038, and 3044 of the region 3010. The weights to be applied to the three luma samples 3032, 3038, and 3044 may be set to [1, 2, 1].
[0324] According to an embodiment, the reference luma sample may be determined according to a weighted average of the five luma samples 3032, 3036, 3038, 3040, and 3044 of the region 3010. The weights to be applied to the five luma samples 3032, 3036, 3038, 3040, and 3044 may be set to [1, 1, 4, 1, 1].
[0325] According to an embodiment, the reference luma sample may be determined according to a weighted average of the six luma samples 3036, 3038, 3040, 3042, 3044, and 3046 of the region 3010. The weights to be applied to the six luma samples 3036, 3038, 3040, 3042, 3044, and 3046 may be set to [1, 2, 1, 1, 2, 1].
[0326] According to an embodiment, the reference luma sample may be determined based on one luma sample among the nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046. Since the difference between the sample values among the nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046 may be small, the amount of calculation required to determine the reference luma sample may be reduced by simply using only one luma sample among the nine luma samples 3030, 3032, 3034, 3036, 3038, 3040, 3042, 3044, and 3046. For example, the reference luma sample may be determined by using only luma samples at a specific position of the region 3010. Therefore, only the luma sample 3030 located at the upper left may be used to determine the reference luma sample.
[0327] and Fig.30 When the color format of 4:2:2 is applied to the image 3000, one chrominance sample corresponds to two luma samples. Therefore, the reference luma sample corresponding to the reference chrominance sample is determined from the two luma samples corresponding to the reference chrominance sample. Therefore, the reference luma sample may be determined from the average sample value of the two luma samples or from one sample value of the two luma samples.
[0328] and Fig.30 When the 4:4:4 color format is applied to the image 3000, one chrominance sample corresponds to one luma sample. Therefore, the reference luma sample may be determined as a luma sample corresponding to the reference chrominance sample.
[0329] Fig.31 is a flow chart of a video decoding method 3100 according to the CCLM mode.
[0330] In operation 3102, an intra prediction mode of a current chroma block is determined according to chroma intra prediction information obtained from a bitstream.
[0331] In operation 3104, when the intra prediction mode of the current chroma block is the CCLM mode according to the chroma intra prediction information, reference chroma samples adjacent to the current chroma block and reference luma samples corresponding to the reference chroma samples are obtained.
[0332] In operation 3106, the current chroma block is predicted based on the correlation between the reference chroma samples and the reference luma samples and a reference luma block corresponding to the current chroma block.
[0333] Reference Fig.16The functions of the described video decoding apparatus 1600 according to the CCLM mode may be applied to the video decoding method 3100 according to the CCLM mode. Each operation of the video decoding method 3100 may be performed by the intra prediction mode determiner 1602 and the intra predictor 1604 of the video decoding apparatus 1600. In addition, each operation of the video decoding method 3100 may be performed by one or more processors that substantially perform the functions of the intra prediction mode determiner 1602 and the intra predictor 1604.
[0334] Fig.32 is a flow chart of a video encoding method 3200 according to the CCLM mode.
[0335] In operation 3202, reference chroma samples adjacent to the current chroma block and reference luma samples corresponding to the reference chroma samples are obtained, and then the current chroma block is predicted based on the correlation between the reference chroma samples and the reference luma samples and the reference luma block corresponding to the current chroma block.
[0336] In operation 3204, according to the result of the prediction for the current chroma block, it is determined whether the CCLM mode is to be applied to the current chroma block.
[0337] In operation 3206, a bitstream including chroma intra prediction information indicating whether the CCLM mode is to be applied to the current chroma block is generated.
[0338] Reference Fig.17 The functions of the video encoding apparatus 1700 according to the CCLM mode described may be applied to the video encoding method 3200 according to the CCLM mode. Each operation of the video encoding method 3200 may be performed by the intra predictor 1702, the intra prediction mode determiner 1704, and the bitstream generator 1706 of the video encoding apparatus 1700. In addition, each operation of the video encoding method 3200 may be performed by one or more processors that substantially perform the functions of the intra predictor 1702, the intra prediction mode determiner 1704, and the bitstream generator 1706.
[0339] According to reference Figure 1a to Figure 32 The video encoding scheme described herein encodes image data in the spatial domain for each coding unit in the coding unit having a tree structure, and according to a video decoding scheme based on the coding unit having a tree structure, performs decoding on each of the maximum coding units and reconstructs the image data in the spatial domain, so that a video such as a picture and a picture sequence can be reconstructed. The reconstructed video can be reproduced by a reproduction device, can be stored in a storage medium, or can be transmitted through a network.
[0340] In addition, the embodiments of the present disclosure can be realized as a computer-executable program and can be implemented in a general-use digital computer that operates the program using a computer-readable recording medium.
[0341] Although the preferred embodiments of the present disclosure have been described, it will be appreciated by those skilled in the art that various substitutions, modifications, and amendments may be made to one or more embodiments. That is, the substitutions, modifications, and amendments do not depart from the scope of the present disclosure and are interpreted as being included in the present disclosure. Therefore, the embodiments should be considered in a descriptive sense only, and not for the purpose of limitation.
Claims
1. A video decoding method, include: Obtaining chroma intra prediction mode information for a current chroma block; When the chroma intra prediction mode information indicates a specific mode associated with a cross-component linear model among a plurality of chroma intra prediction modes, selecting a reference chroma sample in at least one neighboring block; selecting a reference luma sample in the at least one neighboring block, wherein, when the color format of the current chroma block is 4:4:4, one of the reference luma samples corresponds to one of the reference chroma samples; and obtaining predicted chroma samples for the current chroma block based on reconstructed luminance samples in the current luminance block corresponding to the current chroma block, the reference luminance samples and the reference chroma samples, in: The number of the selected reference luminance samples and the number of the selected reference chrominance samples are respectively a fixed number N, When the specific mode is the upper mode, the upper reference sample is selected as the reference brightness sample, When the specific mode is the left mode, the left reference sample is selected as the reference brightness sample, When the specific mode is the upper left mode, the upper reference sample and the left reference sample are selected as the reference brightness sample, The fixed number N is determined without scaling with the size of the current chroma block.
2. A video encoding method, include: generating chroma intra prediction mode information for a current chroma block; When the chroma intra prediction mode information indicates a specific mode associated with a cross-component linear model among a plurality of chroma intra prediction modes, selecting a reference chroma sample in at least one neighboring block; Selecting reference luma samples in the at least one neighboring block, wherein, when the color format of the current chroma block is 4:4:4, one of the reference luma samples corresponds to one of the reference chroma samples; selecting a reference luma sample in the at least one neighboring block by subsampling a luma sample corresponding to one of the reference chroma samples according to a color format; and obtaining predicted chroma samples for the current chroma block based on coded luminance samples in the current luminance block corresponding to the current chroma block, the reference luminance samples and the reference chroma samples, in: The number of the selected reference luminance samples and the number of the selected reference chrominance samples are respectively a fixed number N, When the specific mode is the upper mode, the upper reference sample is selected as the reference brightness sample, When the specific mode is the left mode, the left reference sample is selected as the reference brightness sample, When the specific mode is the upper left mode, the upper reference sample and the left reference sample are selected as the reference brightness sample, The fixed number N is determined without scaling with the size of the current chroma block.
3. An apparatus for transmitting a bit stream, wherein the bit stream is generated by the video encoding method according to claim 2.
