IMAGE ENCODING / DECODING METHOD AND APPARATUS USING A CORRELATION BETWEEN YCbCr

The image encoding/decoding method addresses HEVC's block division challenges by using YCbCr correlation and CCLM to enhance prediction accuracy and reduce data loss in video compression.

KR102991664B1Active Publication Date: 2026-07-15SK TELECOM CO LTD

Patent Information

Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
SK TELECOM CO LTD
Filing Date
2018-08-03
Publication Date
2026-07-15

AI Technical Summary

Technical Problem

Existing video compression methods, such as HEVC, face challenges when dividing pictures into non-square blocks, leading to issues in prediction methods.

Method used

An image encoding/decoding method and apparatus that utilizes the correlation between YCbCr components to predict blocks, employing techniques like Cross Component Linear Model (CCLM) to improve prediction accuracy by using scaling and offset values based on surrounding restored information of luminance and chroma blocks.

Benefits of technology

Enhances prediction accuracy by effectively setting surrounding restored pixel values, improving the encoding/decoding process and reducing data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 112018076812333-PAT00029_ABST
    Figure 112018076812333-PAT00029_ABST
Patent Text Reader

Abstract

A video encoding / decoding method and apparatus utilizing the correlation between YCbCr are disclosed. According to one aspect of the present embodiment, an image decoding method for predicting and decoding a block to be decoded comprises the steps of: receiving a bit stream to generate a residual block of a chroma block; generating restored information of a luminance block corresponding to the chroma block and surrounding restored information of the luminance block; generating surrounding restored information of the chroma block; determining a scaling value and an offset value using the surrounding restored information of the chroma block and the surrounding restored information of the luminance block; applying the determined scaling value and offset value to the restored information of the luminance block to generate a predicted block of the chroma block; and generating a restored block of the chroma block based on the residual block of the chroma block and the predicted block of the chroma block.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to an image encoding / decoding method and apparatus utilizing the correlation between YCbCr. Background Technology

[0002] The content described in this section merely provides background information regarding the present invention and does not constitute prior art.

[0003] With the development of portable multimedia devices such as smartphones and tablet PCs, users can easily acquire and save videos or share them through social network services. Videos used for storage and transmission, as well as for streaming services for real-time viewing or Video on Demand (VoD) services for watching via download, require compression due to their very large data volume.

[0004] Video compression involves encoding by considering the statistical characteristics of the input video, and techniques such as predictive coding to eliminate temporal and spatial redundancy, cognitive vision-based transform coding, quantization, and entropy coding are applied. Among these, predictive coding and transform coding are representative methods for reducing the amount of data by representing the same information without causing data loss.

[0005] Predictive coding is a compression technique that predicts the current image by utilizing the spatial similarity between internal pixels of the image to be compressed and the temporal similarity between the image currently being compressed and the image acquired at the previous time. In video compression, utilizing temporal redundancy between preceding and succeeding images is called temporal prediction (or inter-frame prediction), while encoding an image using spatial redundancy within a single frame is called spatial prediction (or intra-frame prediction).

[0006] The HEVC (High Efficiency Video Coding) standard divides the picture into square blocks for intra-prediction. Consequently, if the picture is divided into blocks of a different shape, the prediction method may become problematic. The problem to be solved

[0007] The main purpose of this embodiment is to provide an image encoding / decoding method and apparatus that predicts blocks using the correlation of YCbCr. means of solving the problem

[0008] According to one aspect of the present embodiment, an image decoding method for predicting and decoding a block to be decoded comprises the steps of: receiving a bit stream to generate a residual block of a chroma block; generating restored information of a luminance block corresponding to the chroma block and surrounding restored information of the luminance block; generating surrounding restored information of the chroma block; determining a scaling value and an offset value using the surrounding restored information of the chroma block and the surrounding restored information of the luminance block; applying the determined scaling value and offset value to the restored information of the luminance block to generate a predicted block of the chroma block; and generating a restored block of the chroma block based on the residual block of the chroma block and the predicted block of the chroma block.

[0009] According to another aspect of the present embodiment, an image decoding device for predicting and decoding a block to be decoded comprises: a prediction unit that receives a bit stream and generates a residual block of a chroma block; generates restored information of a luminance block corresponding to the chroma block and surrounding restored information of the luminance block; generates surrounding restored information of the chroma block; determines a scaling value and an offset value using the surrounding restored information of the chroma block and the surrounding restored information of the luminance block; generates a predicted block of the chroma block by applying the determined scaling value and offset value to the restored information of the luminance block; and generates a restored block of the chroma block based on the residual block of the chroma block and the predicted block of the chroma block.

[0010] According to another aspect of the present embodiment, an image decoding method for predicting and decoding a block to be decoded comprises the steps of: receiving a bit stream to generate a residual block of a Cr block; generating restored information of a Cb block corresponding to the Cr block and surrounding restored information of the Cb block; generating surrounding restored information of the Cr block; determining a scaling value and an offset value using the surrounding restored information of the Cr block and the surrounding restored information of the Cb block; applying the determined scaling value and offset value to the restored information of the Cb block to generate a predicted block of the Cr block; and generating a restored block of the Cr block based on the residual block of the Cr block and the predicted block of the Cr block.

[0011] According to another aspect of the present embodiment, an image decoding device for predicting and decoding a block to be decoded comprises: a prediction unit that receives a bit stream and generates a residual block of a Cr block; generates restored information of a Cb block corresponding to the Cr block and surrounding restored information of the Cb block; generates surrounding restored information of the Cr block; determines a scaling value and an offset value using the surrounding restored information of the Cr block and the surrounding restored information of the Cb block; applies the determined scaling value and offset value to the restored information of the Cb block to generate a predicted block of the Cr block; and generates a restored block of the Cr block based on the residual block of the Cr block and the predicted block of the Cr block. Effects of the invention

[0012] As described above, according to the present embodiment, when predicting a block to be encoded using the CCLM technique, samples of surrounding restored pixel values ​​can be effectively set to improve the accuracy of the prediction within the frame. Brief explanation of the drawing

[0013] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the technologies of the present disclosure, FIG. 2 is an exemplary block diagram of an image decoding device capable of implementing the technologies of the present disclosure, FIG. 3 is a diagram showing surrounding restored pixel values ​​for a square-shaped encoding target block, FIG. 4 is a drawing showing an example of MMLM CCLM, FIG. 5 is a diagram showing a method for displaying the intra mode used for prediction, FIG. 6 is a diagram illustrating a method for displaying different types of CCLMs in an intra mode for use in prediction using the same method as FIG. 5. FIG. 7 is a diagram showing samples used in CCLM to predict blocks according to a first embodiment of the present disclosure, FIG. 8 is a diagram showing samples used in CCLM to predict blocks according to a second embodiment of the present disclosure, FIG. 9 is a diagram showing samples used in CCLM to predict blocks according to a third embodiment of the present disclosure, FIG. 10 is a drawing showing samples used in CCLM to predict blocks according to a fourth embodiment of the present disclosure, FIG. 11 is a drawing showing samples used in CCLM to predict blocks according to a fifth embodiment of the present disclosure, FIG. 12 is a diagram showing samples used in CCLM to predict blocks according to a sixth embodiment of the present disclosure, FIG. 13 is a diagram showing samples used in CCLM to predict blocks according to the seventh embodiment of the present disclosure, FIG. 14 is a diagram showing samples used in CCLM to predict blocks according to the eighth embodiment of the present disclosure, FIG. 15 is a flowchart showing the sequence of an image decoding method according to the present disclosure. Specific details for implementing the invention

[0014] Hereinafter, some embodiments of the present invention will be described in detail with reference to the exemplary drawings. It should be noted that in assigning reference numerals to the components of each drawing, the same components are given the same reference numeral whenever possible, even if they are shown in different drawings. Furthermore, in describing the present invention, if it is determined that a detailed description of related known components or functions could obscure the essence of the invention, such detailed description is omitted.

[0015] In addition, terms such as first, second, A, B, (a), (b), etc., may be used when describing the components of the present invention. These terms are intended merely to distinguish the components from other components, and the essence, order, or sequence of the components is not limited by these terms. Throughout the specification, when a part is described as 'comprising' or 'equipped' with a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components. Furthermore, terms such as '…part' or 'module' described in the specification refer to a unit that processes at least one function or operation, and this may be implemented in hardware, software, or a combination of hardware and software.

[0016] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the technologies of the present disclosure.

[0017] The video encoding device includes a block splitting unit (110), a prediction unit (120), a subtractor (130), a conversion unit (140), a quantization unit (145), an encoding unit (150), an inverse quantization unit (160), an inverse conversion unit (165), an adder (170), a filter unit (180), and a memory (190). Each component of the video encoding device may be implemented as a hardware chip, or may be implemented as software, with one or more microprocessors executing the software functions corresponding to each component.

[0018] A single video consists of multiple pictures. Each picture is divided into multiple regions, and encoding is performed for each region. For example, a single picture is divided into one or more slices or / and tiles, and each slice or tile is divided into one or more Coding Tree Units (CTUs). Each CTU is then divided into one or more Coding Units (CUs) by a tree structure. Information applicable to each CU is encoded as the CU's syntax, and information applicable to all CUs included in a single CTU is encoded as the CTU's syntax. Additionally, information applicable to all blocks within a single slice is encoded as the slice's syntax, and information applicable to all blocks constituting a picture is encoded in the Picture Parameter Set (PPS). Furthermore, information referenced by multiple pictures is encoded in the Sequence Parameter Set (SPS). And information that is commonly referenced by one or more SPSs is encoded in a Video Parameter Set (VPS).

[0019] The block division unit (110) determines the size of the Coding Tree Unit (CTU). Information regarding the size of the CTU (CTU size) is encoded as a syntax of SPS or PPS and transmitted to an image decoding device. After dividing each picture constituting the image into multiple Coding Tree Units (CTUs) of the determined size, the block division unit (110) recursively divides the CTUs using a tree structure. The leaf nodes in the tree structure become the coding unit (CU), which is the basic unit of encoding. The tree structure may be a QuadTree (QT) in which an upper node (or parent node) is divided into four lower nodes (or child nodes) of equal size, a BinaryTree (BT) in which an upper node is divided into two lower nodes, a TernaryTree (TT) in which an upper node is divided into three lower nodes in a 1:2:1 ratio, or a structure that combines one or more of these QT, BT, and TT structures. For example, a QTBT (QuadTree plus BinaryTree) structure may be used, or a QTBTTT (QuadTree plus BinaryTree TernaryTree) structure may be used.

[0020] The prediction unit (120) predicts the current block and generates a prediction block. The prediction unit (120) includes an intra prediction unit (122) and an inter prediction unit (124).

[0021] Generally, current blocks within a picture can each be predictively coded. Prediction of a current block can generally be performed using an intra-prediction technique (using data from the picture containing the current block) or an inter-prediction technique (using data from a picture coded prior to the picture containing the current block). Inter-prediction includes both unidirectional and bidirectional prediction.

[0022] The intra prediction unit (122) predicts pixels within the current block using pixels (reference pixels) located around the current block within the current picture containing the current block. Multiple intra prediction modes exist depending on the prediction direction.

[0023] The intra prediction unit (122) can determine the intra prediction mode to use for encoding the current block. In some examples, the intra prediction unit (122) may encode the current block using several intra prediction modes and select an appropriate intra prediction mode to use from the tested modes. For example, the intra prediction unit (122) may calculate rate-distortion values ​​using rate-distortion analysis of several tested intra prediction modes and select an intra prediction mode that has the best rate-distortion features among the tested modes.

[0024] The intra prediction unit (122) selects one intra prediction mode among a plurality of intra prediction modes and predicts the current block using a calculation formula and surrounding pixels (reference pixels) determined according to the selected intra prediction mode. Information regarding the selected intra prediction mode is encoded by the encoding unit (150) and transmitted to the image decoding device.

[0025] The inter-prediction unit (124) generates a prediction block for the current block through a motion compensation process. It searches for the block most similar to the current block within a reference picture that is encoded and decoded before the current picture, and uses the searched block to generate a prediction block for the current block. Then, it generates a motion vector corresponding to the displacement between the current block in the current picture and the prediction block in the reference picture. Generally, motion estimation is performed on the luminance component, and the motion vector calculated based on the luminance component is used for both the luminance component and the chroma component. Motion information, including information about the reference picture used to predict the current block and information about the motion vector, is encoded by the encoding unit (150) and transmitted to the image decoding device.

[0026] The subtractor (130) generates a residual block by subtracting the prediction block generated by the intra prediction unit (122) or the inter prediction unit (124) from the current block.

[0027] The conversion unit (140) converts residual signals within a residual block having pixel values ​​in a spatial domain into conversion coefficients in the frequency domain. The conversion unit (140) may convert the residual signals within the residual block using the size of the current block as the conversion unit, or it may divide the residual block into a plurality of smaller sub-blocks and convert the residual signals as a conversion unit of the sub-block size. There may be various methods for dividing the residual block into smaller sub-blocks. For example, it may be divided into predefined sub-blocks of the same size, or a QT (quadtree) method of division with the residual block as the root node may be used.

[0028] The quantization unit (145) quantizes the conversion coefficients output from the conversion unit (140) and outputs the quantized conversion coefficients to the encoding unit (150).

[0029] The encoding unit (150) generates a bit stream by encoding quantized conversion coefficients using an encoding method such as CABAC. Additionally, the encoding unit (150) encodes information related to block division, such as CTU size, QT division flag, BT division flag, and division type, so that the video decoder can divide blocks in the same way as the video encoding device.

[0030] The encoding unit (150) encodes information about a prediction type indicating whether the current block is encoded by intra prediction or by inter prediction, and encodes intra prediction information (i.e., information about the intra prediction mode) or inter prediction information (information about the reference picture and motion vector) according to the prediction type.

[0031] The inverse quantization unit (160) inversely quantizes the quantized transformation coefficients output from the quantization unit (145) to generate transformation coefficients. The inverse transformation unit (165) converts the transformation coefficients output from the inverse quantization unit (160) from the frequency domain to the spatial domain to restore the residual block.

[0032] The adder (170) restores the current block by adding the restored residual block and the prediction block generated by the prediction unit (120). The pixels within the restored current block are used as reference pixels when intra-predicting the next block in sequence.

[0033] The filter unit (180) performs filtering on the restored pixels to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc. caused by block-based prediction and transformation / quantization. The filter unit (180) may include a deblocking filter (182) and an SAO filter (184).

[0034] The deblocking filter (180) filters the boundaries between restored blocks to remove blocking artifacts caused by block-unit encoding / decoding, and the SAO filter (184) performs additional filtering on the deblocking filtered image. The SAO filter (184) is a filter used to compensate for the difference between the restored pixel and the original pixel caused by lossy coding. The SAO process will be described later with reference to the drawings from Fig. 5 onwards.

[0035] The restored blocks filtered through the deblocking filter (182) and the SAO filter (184) are stored in memory (190). When all blocks within a picture are restored, the restored picture is used as a reference picture for inter-predicting blocks within a picture to be encoded later.

[0036] FIG. 2 is an exemplary block diagram of an image decoding device capable of implementing the technologies of the present disclosure.

[0037] The image decoding device includes an image restorer (200) comprising a decoding unit (210), an inverse quantization unit (220), an inverse transform unit (230), a prediction unit (240), an adder (250), etc., and a filter unit (260) and a memory (270). Similar to the image encoding device of FIG. 2, the image decoding device may have each component implemented as a hardware chip, or may be implemented as software and have a microprocessor execute the software function corresponding to each component.

[0038] The decoding unit (210) decodes the bit stream received from the video encoding device to extract information related to block division, determines the current block to be decoded, and extracts prediction information and information about residual signals necessary to restore the current block.

[0039] The decoding unit (210) extracts information about the CTU size from the SPS (Sequence Parameter Set) or PPS (Picture Parameter Set) to determine the size of the CTU and divides the picture into CTUs of the determined size. Then, the CTU is determined as the top layer of the tree structure, i.e., the root node, and the CTU is divided using the tree structure by extracting splitting information for the CTU. For example, when dividing the CTU using the QTBT structure, first, a first flag (QT_split_flag) related to the splitting of the QT is extracted and each node is divided into four nodes of the lower layer. Then, for the node corresponding to the leaf node of the QT, a second flag (BT_split_flag) related to the splitting of the BT and splitting type (splitting direction) information are extracted and the corresponding leaf node is divided into the BT structure. As another example, when splitting a CTU using a QTBTTT structure, a first flag (QT_split_flag) related to the splitting of QT is extracted to split each node into four nodes of the lower layer. Then, for the nodes corresponding to the leaf nodes of QT, a split flag (split_flag) indicating whether to further split into BT or TT, split type (or split direction) information, and additional information distinguishing whether it is a BT structure or a TT structure are extracted. Through this, each node below the leaf nodes of QT is recursively split into a BT or TT structure.

[0040] Meanwhile, when the decoding unit (210) determines the current block to be decoded through the division of the tree structure, it extracts information about the prediction type indicating whether the current block is intra-predicted or inter-predicted.

[0041] When the prediction type information indicates an intra prediction, the decoding unit (410) extracts the syntax elements for the intra prediction information (intra prediction mode) of the current block.

[0042] When the prediction type information indicates an inter prediction, the decoding unit (410) extracts information representing the syntax elements for the inter prediction information, namely the motion vector and the reference picture that the motion vector refers to.

[0043] Meanwhile, the decoding unit (210) extracts information about the quantized transformation coefficients of the current block as information about the residual signal.

[0044] The inverse quantization unit (220) inversely quantizes the quantized transformation coefficients, and the inverse transformation unit (230) inversely transforms the inversely quantized transformation coefficients from the frequency domain to the spatial domain to restore the residual signals, thereby generating a residual block for the current block.

[0045] The prediction unit (240) includes an intra prediction unit (242) and an inter prediction unit (244). The intra prediction unit (242) is activated when the prediction type of the current block is an intra prediction, and the inter prediction unit (244) is activated when the prediction type of the current block is an intra prediction.

[0046] The intra prediction unit (242) determines the intra prediction mode of the current block among a plurality of intra prediction modes from the syntax elements for the intra prediction mode extracted from the decoding unit (210), and predicts the current block using reference pixels around the current block according to the intra prediction mode.

[0047] The inter prediction unit (244) determines the motion vector of the current block and the reference picture that the motion vector refers to using the syntax elements for the intra prediction mode extracted from the decoding unit (210), and predicts the current block using the motion vector and the reference picture.

[0048] The adder (250) restores the current block by adding the residual block output from the inverse transformation unit and the prediction block output from the inter prediction unit or the intra prediction unit. The pixels within the restored current block are used as reference pixels when intra-predicting the block to be decoded later.

[0049] By sequentially restoring the current blocks corresponding to the CUs by the image restorer (200), the CTU composed of the CUs and the picture composed of the CTUs are restored.

[0050] The filter unit (260) includes a deblocking filter (262) and an SAO filter (264). The deblocking filter (262) deblocks the boundaries between restored blocks to remove blocking artifacts caused by block-unit decoding. The SAO filter (264) performs additional filtering on the restored blocks after deblocking filtering to compensate for the difference between the restored pixels and the original pixels caused by lossy coding. The restored blocks filtered through the deblocking filter (262) and the SAO filter (264) are stored in memory (270). When all blocks within a picture are restored, the restored picture is used as a reference picture for inter-predicting blocks within a picture to be encoded later.

[0051] The present disclosure relates to a prediction method based on the form of a prediction block generated by a prediction unit within an image encoding / decoding device. While there are various methods for generating a prediction block by predicting a current block, the present disclosure relates to a Cross Component Linear Model (CCLM, hereinafter 'CCLM') that predicts using inter-channel correlations. For example, a prediction for a chroma channel may be performed using a luminance channel value, or vice versa.

[0052] In the case of color images, redundancy remains between the luminance (Y) signal and the chroma (Cb and Cr) signals even after conversion from RGB to YCbCr. This redundancy is called cross-component redundancy, and the linear correlation model developed to model it is CCLM.

[0053] CCLM can be broadly divided into two categories. The first is predicting the chroma signal (or chroma) from the lumina signal (or lumina), and the second is predicting the Cr signal (or Cr) from the Cb signal (or Cb). Alternatively, it is predicting the Cb signal (or Cb) from the Cr signal (or Cr).

[0054] First, we will explain how to predict chroma from luminance using CCLM.

[0055] Chroma can be obtained from the following [Equation 1] using luma.

[0056]

[0057] ,

[0058] Here, pred C (i,j) is the prediction block value for the current chroma block to be encoded, and rec' L (i,j) are the downsampled values ​​of the reconstructed pixel values ​​of the current encoding target luminance block. Additionally, L(n) represents the reconstructed luminance pixel values ​​adjacent to the current block above and to the left, and C(n) represents the reconstructed chroma pixel values ​​adjacent to the current block above and to the left.

[0059] α (scaling value) and β (offset value) in [Equation 1] are values ​​obtained by calculation, not signaling information. That is, to obtain the values ​​of α and β, the values ​​of reconstructed luminance and chroma pixels surrounding (adjacent) the current encoding target block are used.

[0060] Below, we first explain how to predict square-shaped blocks.

[0061] In the present disclosure, 'neighboring restored pixel value' refers to a value of a restored pixel located near a block to be encoded, or a value reprocessed from one or more restored values. For example, it may be a value obtained by downsampling multiple restored pixel values.

[0062] FIG. 3 is a diagram showing the surrounding reconstructed pixel values ​​for a square-shaped encoding target block. In the case of the YCbCr 420 format, the luminance block undergoes a downsampling process due to the size difference between the luminance block and the chroma block. FIG. 3 shows four luminance (Y) pixels corresponding to one chroma (Cb or Cr) pixel based on the 420 format, but the present invention is not limited thereto and contains information (e.g., number and location) regarding luminance pixel(s) corresponding to chroma pixels for the 411, 422, and 444 formats. For convenience, the content of the present invention will be explained based on the 420 format.

[0063] Finally, two parameters, a scaling value (α) and an offset value (β), are obtained by using the correlation between the reconstructed pixel value of the chroma shown in Fig. 3 and the corresponding downsampled reconstructed pixel value of the lumina.

[0064] By substituting the two obtained parameter values ​​into [Equation 1] and downsampling the reconstructed pixel values ​​of the luminance corresponding to the block to be encoded and substituting them into [Equation 1], a prediction block for the chroma block can be generated. At this time, the above operation is performed for the Cb block and the Cr block, respectively.

[0065] Methods for predicting chroma from lumens are further divided into single-model linear model CCLM (LM CCLM) and multi-model linear model CCLM (MMLM CCLM). LM CCLM uses a single linear model for prediction, while MMLM CCLM uses two or more linear models for prediction. For example, in MMLM CCLM, two linear models can be used based on a threshold value as shown in [Equation 2] below.

[0066]

[0067] Here, the threshold can be set as the average of the surrounding reconstructed pixel values ​​of the luminance block to be encoded. Figure 4 is a diagram showing an example of MMLM CCLM. In Figure 4, the horizontal axis represents the surrounding reconstructed pixel values ​​of luminance, and the vertical axis represents the surrounding reconstructed pixel values ​​of chroma. In Figure 4, the threshold is 17, and it can be seen that two different linear models are implemented based on the threshold of 17.

[0068] When predicting chroma from luminance using a sampling format such as YCbCr 420, downsampling of the luminance block is used. The most basic downsampling method is to use a 6-tap filter. The 6-tap filter can be calculated by the following [Equation 3].

[0069]

[0070] In addition to the 6-tap filter, a downsampling method using the 2-tap filter of [Equation 4] to [Equation 6] or the 4-tap filter of [Equation 7] may be used.

[0071]

[0072]

[0073]

[0074]

[0075] LM CCLM and MMLM CCLM use one of the above filters to downsample the surrounding restored pixel values ​​of the luminance. Generally, LM CCLM uses a 6-tap filter, and MMLM CCLM uses a 6-tap filter and one of the four types of filters in Equations 4 to 7.

[0076] Figure 5 is a diagram showing a method for displaying the intra mode used for prediction.

[0077] First, a flag (e.g., CCLM_enabled_SPS_flag) is used to indicate whether CCLM is being used (501). The flag may be defined in one or more locations among the VPS, SPS, PPS, slice header, and / or CTU header.

[0078] If CCLM is not used, the general intra prediction mode is encoded and represented (505). In this case, the general mode can be represented as one of five modes in a truncated unary manner.

[0079] When CCLM is used, it indicates whether it is LM or MMLM (503). Alternatively, whether it is LM or MMLM can be distinguished by the variance value of the surrounding restored pixel values ​​of the luminance block. That is, if the variance value is greater than a certain threshold, it can be set to MMLM mode, and if it is less than the threshold, it can be set to LM mode.

[0080] It can be seen that in the case of LM CCLM, a 6-tap filter is used (507).

[0081] In the case of MMLM CCLM, it indicates whether a 6-tap filter is used or other filters are used (509).

[0082] If we show the 6-tap filter in MMLM CCLM, we can see that MMLM CCLM uses a 6-tap filter (511).

[0083] When other filters are shown in MMLM CCLM, the use of one of the four filters is indicated in a fixed length manner (513).

[0084] You can see which of the four filters is used in MMLM CCLM (515).

[0085] Figure 6 is a diagram showing a method for displaying different types of CCLMs in an intra mode to be used for prediction using the same method as in Figure 5.

[0086] The types of CCLM to be used in Fig. 6 are MMLM CCLM, which uses a 6-tap filter, and LM CCLM, which uses a 6-tap filter and one of four other types of filters (Equations 4 to 7).

[0087] As in FIG. 5, a flag (e.g., CCLM_enabled_SPS_flag) is used to indicate whether CCLM is being used (501), and said flag may be defined at one or more locations among VPS, SPS, PPS, slice header, and / or CTU header. If CCLM is not being used, a normal intra prediction mode is encoded to indicate it (505). In this case, the normal mode may be one of five modes in a truncated unary manner.

[0088] When CCLM is used, it indicates whether it is LM or MMLM (503). Alternatively, whether it is LM or MMLM can be distinguished by the variance value of the surrounding restored pixel values ​​of the luminance block. That is, if the variance value is greater than a certain threshold, it can be set to MMLM mode, and if it is less than the threshold, it can be set to LM mode.

[0089] It can be seen that in the case of MMLM CCLM, a 6-tap filter is used (603).

[0090] In the case of LM CCLM, it indicates whether a 6-tap filter is used or other filters are used (601).

[0091] If we show the 6-tap filter in LM CCLM, we can see that LM CCLM uses a 6-tap filter (605).

[0092] When other filters are shown in LM CCLM, the fixed length method indicates which of the four filters is used (607).

[0093] You can see which of the four filters is used in LM CCLM (609).

[0094] The following describes in detail a method for predicting chroma from luma according to the present disclosure. Specifically, a method for selecting samples of surrounding reconstructed pixels to predict blocks is described in detail.

[0095] FIG. 7 is a diagram showing samples used in CCLM to predict a block according to a first embodiment of the present disclosure. In the first embodiment, the number of samples of the reconstructed pixels is determined based on the smaller value between the width and height of the chroma block.

[0096] In FIG. 7, (a) represents a chroma block and (b) represents a lumina block. According to the first embodiment of the present disclosure, N in [Equation 1] may be set to twice the smaller value between the width and height of the chroma block. If the width and height of the chroma block are equal, either value may be set. In FIG. 7, since the height value is smaller than the width and height of the chroma block, N becomes twice the height of the chroma block. In FIG. 7, samples used in the CCLM according to the first embodiment of the present disclosure are represented by circles (●). Referring to FIG. 7, since the height in the chroma block is smaller than the width, all surrounding reconstructed pixel values ​​on the left are used, but only some of the surrounding reconstructed pixel values ​​on the upper side may be used after undergoing a subsampling process. For example, among the surrounding reconstructed pixel values ​​on the upper side of the chroma block, only the odd-numbered (or even-numbered) reconstructed pixel values ​​may be used. Specifically, when using odd-numbered surrounding reconstructed pixel values ​​among the surrounding reconstructed pixel values ​​of the upper side, surrounding reconstructed pixel values ​​at positions (0,1), (0,3), (0,5), and (0,7) may be used.

[0097] In the case of the Luma Block, only some of the surrounding reconstructed pixels can be used after undergoing a downsampling process corresponding to the Chroma Block. That is, when the odd-numbered (or even-numbered) reconstructed pixel values ​​among the surrounding reconstructed pixel values ​​above the Chroma Block are used, the Luma Block downsamples the corresponding 4 surrounding reconstructed pixel values ​​using the filter of [Equation 7] and then uses the result in the CCLM. Specifically, when using the odd-numbered (1st, 3rd, 5th, 7th) reconstructed pixel values ​​among the surrounding reconstructed pixel values ​​above the chroma block, the lumina block uses the 4 lumina surrounding reconstructed pixel values ​​corresponding to the 1st chroma surrounding reconstructed pixel (neighborhood reconstructed pixel values ​​at positions (0,2), (0,3), (1,2), (1,3)), the 4 lumina surrounding reconstructed pixel values ​​corresponding to the 3rd chroma surrounding reconstructed pixel (neighborhood reconstructed pixel values ​​at positions (0,6), (0,7), (1,6), (1,7)), the 4 lumina surrounding reconstructed pixel values ​​corresponding to the 5th chroma surrounding reconstructed pixel (neighborhood reconstructed pixel values ​​at positions (0,10), (0,11), (1,10), (1,11)), and the 4 lumina surrounding reconstructed pixel values ​​corresponding to the 7th chroma surrounding reconstructed pixel (neighborhood reconstructed pixel values ​​at positions (0,14), (0,15), (1,14), (1,15)) [mathematical formula Downsampling is performed using the 4-tap filter of [7].

[0098] FIG. 8 is a diagram showing samples used in CCLM to predict a block according to a second embodiment of the present disclosure. In the second embodiment, the number of all surrounding reconstructed pixels to the left and above of a chroma block is set as the number of samples.

[0099] In FIG. 8, (a) represents the chroma block and (b) represents the lumina block. According to the second embodiment of the present disclosure, N in [Equation 1] can be set to the sum of the width and height of the chroma block. In FIG. 8, samples used in the CCLM according to the second embodiment of the present disclosure are also indicated by circles (●). Referring to FIG. 8, all surrounding reconstructed pixel values ​​on the upper and left sides of the chroma block are used, whereas in the lumina block, surrounding reconstructed pixel values ​​may be downsampled and used to correspond to the chroma block. That is, four lumina surrounding reconstructed pixel values ​​corresponding to one chroma surrounding reconstructed pixel value are downsampled using the filter of [Equation 7] and used in the CCLM. (Refer to the first embodiment)

[0100] FIG. 9 is a diagram showing samples used in CCLM to predict a block according to a third embodiment of the present disclosure. In the third embodiment, only the surrounding reconstructed pixel values ​​of one side (left or upper) among the surrounding reconstructed pixel values ​​of the chroma block and the luminance block are sampled and used in CCLM. At this time, whether to use the surrounding reconstructed pixel values ​​of the left side or the surrounding reconstructed pixel values ​​of the upper side can be inferred from the divided form of the block. For example, in the case of a block divided lengthwise along the horizontal axis, only the surrounding reconstructed pixel values ​​of the upper side may be used. Or, conversely, only the surrounding reconstructed pixel values ​​of the left side may be used. Furthermore, information regarding whether to use the surrounding reconstructed pixel values ​​of the left side or the surrounding reconstructed pixel values ​​of the upper side may be transmitted information.

[0101] In FIG. 9, (a) represents the chroma block and (b) represents the lumina block. According to the third embodiment of the present disclosure, N in [Equation 1] can be set to either the width or the height of the chroma block, and here, an example where it is set to the larger value is described. In FIG. 9, since the width value is larger than the height of the chroma block, N becomes the width of the chroma block. In FIG. 9 as well, samples used in the CCLM according to the third embodiment of the present disclosure are indicated by circles (●). Referring to FIG. 9, since the width of the chroma block is greater than the height, all surrounding reconstructed pixel values ​​on the upper side are used, while all surrounding reconstructed pixel values ​​on the left side are not used. Furthermore, in the lumina block, all surrounding reconstructed pixel values ​​on the left side are not used, and the surrounding reconstructed pixel values ​​on the upper side are used after undergoing a downsampling process to correspond to the surrounding reconstructed pixel values ​​of the chroma block. That is, four lumina surrounding reconstructed pixel values ​​corresponding to one chroma surrounding reconstructed pixel value are downsampled using the filter of [Equation 7] and used in the CCLM. (Refer to the first embodiment)

[0102] This embodiment may be applied when the side with the larger value between the width (horizontal axis) and the height (vertical axis) in the block to be decoded has a stronger influence. Conversely, if the side with the smaller value between the width (horizontal axis) and the height (vertical axis) in the block to be decoded has a stronger influence, it may be applied based on the smaller value. Additionally, by transmitting directional information indicating the stronger influence between the horizontal and vertical axes, the decoder can determine whether to use the surrounding reconstructed pixel value on the left or the surrounding reconstructed pixel value on the upper side.

[0103] FIG. 10 is a diagram showing samples used in CCLM to predict a block according to a fourth embodiment of the present disclosure. In the fourth embodiment, the number of samples of the reconstructed pixels is determined based on the smaller value between the width and height of the chroma block. If the width and height of the chroma block are the same, either one may be set.

[0104] In FIG. 10, (a) represents a chroma block and (b) represents a luminance block. According to the fourth embodiment of the present disclosure, N in [Equation 1] can be set to twice the smaller value between the width and height of the chroma block. In FIG. 10, since the height value is smaller than the width and height of the chroma block, N becomes twice the height of the chroma block. In FIG. 10 as well, samples used in the CCLM according to the fourth embodiment of the present disclosure are indicated by circles (●). Referring to FIG. 10, since the height in the chroma block is smaller than the width, all surrounding reconstructed pixel values ​​on the left can be used, but surrounding reconstructed pixel values ​​on the upper side can be used after undergoing a downsampling process. At this time, among the upper surrounding reconstructed pixel values, the surrounding reconstructed pixel values ​​at positions (0,1) and (0,2), the surrounding reconstructed pixel values ​​at positions (0,3) and (0,4), the surrounding reconstructed pixel values ​​at positions (0,4) and (0,5), and the surrounding reconstructed pixel values ​​at positions (0,6) and (0,7) are each downsampled.

[0105] The surrounding reconstructed pixel value on the left side of the luma block is used after undergoing a downsampling process using a 4-tap filter to correspond to the surrounding reconstructed pixel value on the left side of the chroma block, and the surrounding reconstructed pixel value on the upper side can be used after undergoing a downsampling process using an 8-tap filter. For example, if a first value is generated by downsampling the surrounding reconstructed pixel values ​​at positions (0,1) and (0,2) among the surrounding reconstructed pixel values ​​at the upper side of the chroma block, and a second value is generated by downsampling the surrounding reconstructed pixel values ​​at positions (0,3) and (0,4), then in the luma block, the surrounding reconstructed pixel values ​​at positions (0,2), (0,3), (0,4), (0,5), (1,2), (1,3), (1,4), and (1,5) corresponding to the generated first value can be downsampled using an 8-tap filter, and the surrounding reconstructed pixel values ​​at positions (0,6), (0,7), (0,8), (0,9), (1,6), (1,7), (1,8), and (1,9) corresponding to the generated second value can be downsampled using an 8-tap filter.

[0106] FIG. 11 is a diagram showing samples used in CCLM to predict a block according to the fifth embodiment of the present disclosure. In the fifth embodiment, the number of samples of the reconstructed pixels is determined based on the smaller value between the width and height of the chroma block. If the width and height of the chroma block are the same, either one may be set.

[0107] In FIG. 11, (a) represents the chroma block and (b) represents the luminance block. According to the fifth embodiment of the present disclosure, N in [Equation 1] can be set to twice the smaller value between the width and height of the chroma block. In FIG. 11, since the height value is smaller than the width and height of the chroma block, N becomes twice the height of the chroma block. In FIG. 11, samples used in the CCLM according to the fifth embodiment of the present disclosure are also indicated by circles (●). Referring to FIG. 11, since the height in the chroma block is smaller than the width, all surrounding reconstructed pixel values ​​on the left are used, but the surrounding reconstructed pixel values ​​on the upper side are values ​​that have undergone a downsampling process, which is the same as the fourth embodiment described above.

[0108] The surrounding reconstructed pixel value on the left side of the luminance block is used after undergoing a downsampling process using a 4-tap filter to correspond to the surrounding reconstructed pixel value on the left side of the chroma block, and the surrounding reconstructed pixel value on the upper side can be used after undergoing a downsampling process twice. For example, to obtain the surrounding reconstructed pixel value on the upper side of the luminance block corresponding to the surrounding reconstructed pixel value at position (0,1) among the surrounding reconstructed pixel values ​​on the upper side of the chroma block, the surrounding reconstructed pixel values ​​at positions (0,2), (0,3), (1,2), and (1,3) among the surrounding reconstructed pixel values ​​on the upper side of the luminance block are downsampled using the 4-tap filter of [Equation 7], and to obtain the surrounding reconstructed pixel value on the upper side of the luminance block corresponding to the surrounding reconstructed pixel value at position (0,2) among the surrounding reconstructed pixel values ​​on the upper side of the chroma block, the surrounding reconstructed pixel values ​​at positions (0,4), (0,5), (1,4), and (1,5) among the surrounding reconstructed pixel values ​​on the upper side of the luminance block are downsampled using the 4-tap filter of [Equation 7]. After obtaining all downsampled surrounding reconstructed pixel values ​​on the upper side of the luminance block corresponding to all surrounding reconstructed pixel values ​​on the upper side of the chroma block in a first downsampling process, two downsampled surrounding reconstructed pixel values ​​on the upper side of the luminance block corresponding to the surrounding reconstructed pixel values ​​at positions (0,1) and (0,2) on the upper side of the chroma block are downsampled again using a 2-tap filter in a second downsampling process.

[0109] Below, a method for predicting Cr from Cb using CCLM is described in detail. Conversely, it is obvious that a method for predicting Cb from Cr using the present invention is also possible. When using CCLM, Cr can be obtained from Cb using the following [Equation 8].

[0110]

[0111]

[0112] Here, is the value of the prediction block for the current encoding target Cr block, and is the value of the recovered difference block of the current encoding target Cb block. Also, Cb(n) represents the surrounding recovered Cb sample value, Cr(n) represents the surrounding recovered Cr sample value, and λ is >>9.

[0113] Hereinafter, a method for predicting Cr from Cb in a decoding target block according to the present disclosure is described.

[0114] FIG. 12 is a diagram showing samples used in CCLM to predict a block according to the sixth embodiment of the present disclosure. In the sixth embodiment, the number of all surrounding reconstructed pixels to the left and above of the Cb block (or Cr block) is set as the number of samples.

[0115] In FIG. 12, (a) represents the Cr block and (b) represents the Cb block. According to the sixth embodiment of the present disclosure, N in [Equation 8] can be set to the sum of the width and height of the Cr block. In FIG. 12, samples used in the CCLM according to the sixth embodiment of the present disclosure are indicated by circles (●). That is, all surrounding reconstructed pixel values ​​on the left and upper sides of the Cr block and Cb block can be used to calculate α in [Equation 8].

[0116] FIG. 13 is a diagram showing samples used in CCLM for predicting blocks according to the seventh embodiment of the present disclosure. In the seventh embodiment, only the reconstructed pixels on one side (left or upper) of the surrounding reconstructed pixels of the Cb block and the Cr block are sampled and used in CCLM. At this time, whether to use the left surrounding reconstructed pixel value or the upper surrounding reconstructed pixel value can be inferred from the divided form of the block. For example, in the case of a block divided lengthwise along the horizontal axis, only the upper surrounding reconstructed pixel value may be used. Alternatively, conversely, only the left surrounding reconstructed pixel value may be used. Furthermore, information regarding whether to use the left surrounding reconstructed pixel value or the upper surrounding reconstructed pixel value may be transmitted information.

[0117] As in FIG. 12, in FIG. 13 (a) represents the Cr block and (b) represents the Cb block. According to the seventh embodiment of the present disclosure, N in [Equation 8] can be set to the larger value between the width and height of the Cr block. Also in FIG. 13, according to the seventh embodiment of the present disclosure, samples used in the CCLM are indicated by circles (●). That is, all surrounding reconstructed pixel values ​​on the upper side of the Cr block and Cb block can be used to calculate α in [Equation 8].

[0118] FIG. 14 is a diagram showing samples used in CCLM to predict a block according to the eighth embodiment of the present disclosure. In the eighth embodiment, the number of samples of surrounding reconstructed pixels is determined based on the smaller value between the width and height of the Cb block (or Cr block). If the width and height of the Cb block (or Cr block) are the same, either one may be set.

[0119] As in FIGS. 12 and 13, in FIG. 14 (a) represents the Cr block and (b) represents the Cb block. According to the eighth embodiment of the present disclosure, N in [Equation 8] can be set to twice the smaller value between the width and height of the Cr block. In FIG. 14, since the height value is smaller than the width and height of the Cr block, N becomes twice the height of the Cr block. In FIG. 14 as well, samples used in the CCLM according to the eighth embodiment of the present disclosure are indicated by circles (●). That is, since the height in the Cr block and Cb block is smaller than the width, all surrounding reconstructed pixel values ​​on the left are used as is to calculate α in [Equation 8], whereas the surrounding reconstructed pixel values ​​on the upper side of the Cr block and Cb block undergo a downsampling process and are used to calculate α in [Equation 8]. FIG. 14 illustrates an example in which the surrounding reconstructed pixel values ​​at positions (0,1) and (0,2), (0,3) and (0,4), (0,5) and (0,6), and (0,7) and (0,8) among the upper surrounding reconstructed pixels in the Cr block and Cb block are each downsampled and used to calculate α in [Equation 8]. Here, downsampling can be performed using various methods (e.g., a 2-tap filter, etc.).

[0120] FIG. 15 is a flowchart showing the sequence of an image decoding method according to the present disclosure.

[0121] In a method for decoding an image by predicting the block to be decoded, the image decoder first receives a bit stream and generates a residual block of the chroma block (1501).

[0122] Additionally, the video decoding device generates restored information of a luminance block corresponding to the chroma block and surrounding restored information of the luminance block (1503). Alternatively, it may receive the information. Additionally, it may also receive surrounding restored information of the chroma block.

[0123] The video decoder determines a scaling value and an offset value using the surrounding restored information of the chroma block and the surrounding restored information of the luma block (1505). Additionally, the scaling value and the offset value may be values ​​determined by further considering the information received as the bit stream.

[0124] The determined scaling value and offset value are applied to the restored information of the luminance block to generate a prediction block of the chroma block (1507). The prediction block of the chroma block may be determined by the correlation between the surrounding restoration information of the luminance block and the surrounding restoration information of the chroma block. Information related to the correlation may be transmitted from an image encoding device.

[0125] The image decoding device generates a restoration block of the chroma block based on the difference block of the chroma block and the prediction block of the chroma block (1509).

[0126] The video decoding device can decode the video using the generated restoration block.

[0127] Figure 15 describes an image decoding method for predicting chroma from luma, but it can also be applied to an image decoding method for predicting Cr from Cb.

[0128] Although FIG. 15 describes the sequential execution of processes 1501 to 1507, this is merely an illustrative explanation of the technical concept of one embodiment of the present invention. In other words, a person skilled in the art to which one embodiment of the present invention belongs may modify and adapt the process in various ways, such as changing the order described in FIG. 15 or executing one or more of processes 1501 to 1507 in parallel, without departing from the essential characteristics of one embodiment of the present invention; therefore, FIG. 15 is not limited to a chronological order.

[0129] Meanwhile, the processes illustrated in FIG. 15 can be implemented as computer-readable code on a computer-readable recording medium. A computer-readable recording medium includes all types of recording devices in which data that can be read by a computer system is stored. That is, a computer-readable recording medium includes storage media such as magnetic storage media (e.g., ROM, floppy disk, hard disk, etc.), optical reading media (e.g., CD-ROM, DVD, etc.), and carrier waves (e.g., transmission over the Internet). Additionally, computer-readable recording media can be distributed across networked computer systems, allowing computer-readable code to be stored and executed in a distributed manner.

[0130] The above description is merely an illustrative explanation of the technical concept of the present embodiment, and a person skilled in the art to which the present embodiment belongs would be able to make various modifications and variations within the scope of the essential characteristics of the present embodiment. Accordingly, the present embodiments are intended to explain, not limit, the technical concept of the present embodiment, and the scope of the technical concept of the present embodiment is not limited by these embodiments. The scope of protection of the present embodiment shall be interpreted by the claims below, and all technical concepts within an equivalent scope shall be interpreted as being included within the scope of rights of the present embodiment.

Claims

Claim 1 A video decoding method comprises: determining a residual block of a chroma block from a bit stream; generating downsampled luminance samples of a luminance block from restored luminance samples of a luminance block corresponding to the chroma block; selecting one set from a plurality of available sets, each consisting of available restored samples surrounding the luminance block, to be used for generating downsampled surrounding luminance samples of the luminance block; generating downsampled surrounding luminance samples of the luminance block based on the set selected from the plurality of available sets; determining restored surrounding chroma samples corresponding to the downsampled surrounding luminance samples of the luminance block; determining parameters of a Cross Component Linear Model (CCLM) using the downsampled surrounding luminance samples and the restored surrounding chroma samples; and generating a prediction block of the chroma block from the downsampled luminance samples of the luminance block based on the parameters of the CCLM. A video decoding method comprising the step of generating a restoration block of a chroma block based on a difference block of the chroma block and a prediction block of the chroma block, wherein the plurality of available sets include i) a set of restored surrounding luminance samples of left columns adjacent to the luminance block, and ii) a set of restored surrounding luminance samples of upper rows adjacent to the luminance block. Claim 2 ◈Claim 2 was abandoned upon payment of the registration fee.◈ An image decoding method according to Claim 1, characterized in that the sampling format for the chroma block and the luma block is a 4:2:0 format. Claim 3 ◈Claim 3 was abandoned upon payment of the registration fee.◈ An image decoding method according to Claim 1, characterized in that the number of downsampled surrounding luminance samples of the luminance block is equal to twice the smaller value between the sum of the width and height of the chroma block and the width and height of the chroma block. Claim 4 ◈Claim 4 was abandoned upon payment of the registration fee.◈ An image decoding method according to Claim 1, further comprising the step of determining from the bit stream information specifying one downsampling filter to be used to generate downsampled peripheral luma samples of the luma block among a plurality of available downsampling filters. Claim 5 ◈Claim 5 was abandoned upon payment of the registration fee.◈ An image decoding method according to Claim 1, wherein one set to be used to generate downsampled peripheral luma samples of the luma block among the plurality of available sets is selected based on the ratio between the width and height of the chroma block. Claim 6 delete Claim 7 A video encoding method comprises: generating downsampled luminance samples of a luminance block from restored luminance samples of a luminance block corresponding to a chroma block; selecting one set from a plurality of available sets, each consisting of available restored samples surrounding the luminance block, to be used for generating downsampled surrounding luminance samples of the luminance block; generating downsampled surrounding luminance samples of the luminance block based on the set selected from the plurality of available sets; determining restored surrounding chroma samples corresponding to the downsampled surrounding luminance samples of the luminance block; determining parameters of a Cross Component Linear Model (CCLM) using the downsampled surrounding luminance samples and the restored surrounding chroma samples; generating a prediction block of the chroma block from the downsampled luminance samples of the luminance block based on the parameters of the CCLM; and determining a residual block for the chroma block based on the prediction block of the chroma block. A video encoding method comprising the step of encoding the difference block, wherein the plurality of available sets include i) a set of restored surrounding luminance samples of left columns adjacent to the luminance block, and ii) a set of restored surrounding luminance samples of upper rows adjacent to the luminance block. Claim 8 ◈Claim 8 was abandoned upon payment of the registration fee.◈ A video encoding method according to Claim 7, characterized in that the sampling format for the chroma block and the luma block is a 4:2:0 format. Claim 9 ◈Claim 9 was abandoned upon payment of the registration fee.◈ A video encoding method according to Claim 7, characterized in that the number of downsampled peripheral luminance samples of the luminance block is equal to twice the smaller value between the sum of the width and height of the chroma block and the width and height of the chroma block. Claim 10 ◈Claim 10 was abandoned upon payment of the registration fee.◈ An image encoding method according to claim 7, further comprising the step of encoding information specifying one downsampling filter used to generate downsampled peripheral luma samples of the luma block among a plurality of available downsampling filters. Claim 11 delete Claim 12 delete Claim 13 A method for providing image data to an image decoding device, comprising the step of encoding the image data into a bitstream; The method includes the step of transmitting the bitstream to the image decoder, and the step of encoding the image data comprises: generating downsampled luminance samples of the luminance block from restored luminance samples of the luminance block corresponding to the chroma block; selecting one set from a plurality of available sets, each consisting of available restored samples around the luminance block, to be used for generating downsampled surrounding luminance samples of the luminance block; generating downsampled surrounding luminance samples of the luminance block based on the set selected from the plurality of available sets; determining restored surrounding chroma samples corresponding to the downsampled surrounding luminance samples of the luminance block; determining parameters of a Cross Component Linear Model (CCLM) using the downsampled surrounding luminance samples and the restored surrounding chroma samples; and generating a prediction block of the chroma block from the downsampled luminance samples of the luminance block based on the parameters of the CCLM. A method comprising: determining a residual block for a chroma block based on a prediction block of the chroma block; and encoding the residual block, wherein the plurality of available sets include i) a set of restored surrounding luminance samples of left columns adjacent to the luminance block, and ii) a set of restored surrounding luminance samples of upper rows adjacent to the luminance block. Claim 14 delete Claim 15 delete Claim 16 delete