A video decoding method performed by a decoding apparatus, the method comprising: obtaining video information comprising prediction mode information for a current chroma block; deriving one of a plurality of cross-component linear model, CCLM, prediction modes as a CCLM prediction mode of the current chroma block based on the prediction mode information; deriving a sample number of neighboring chroma samples of the current chroma block based on the CCLM prediction mode of the current chroma block, a width and height of the current chroma block and a specific value; deriving the neighboring chroma samples of the sample number; deriving down sampled neighboring luma samples corresponding to the neighboring chroma samples and down sampled luma samples of a current luma block; calculating CCLM parameters based on the neighboring chroma samples and the down sampled neighboring luma samples; deriving prediction samples for the current chroma block based on the CCLM parameters and the down sampled luma samples of the current luma block; and generating reconstructed samples for the current chroma block based on the prediction samples, wherein the specific value is derived as 2, wherein the width and height of the current chroma block is N, wherein the plurality of CCLM prediction modes include a left top linear model, LM, mode, a top LM mode and a left LM mode, characterized in that based on the CCLM prediction mode of the current chroma block being the left LM mode, and 2N being less than or equal to twice the specific value, the derived neighboring chroma samples of the sample number are left neighboring chroma samples of the sample number, and the sample number of the left neighboring chroma samples is derived as 2N, and based on the CCLM prediction mode of the current chroma block being the left LM mode, and the 2N being greater than twice the specific value, the derived neighboring chroma samples of the sample number are left neighboring chroma samples of the sample number, and the sample number of the left neighboring chroma samples is derived as 4. obtaining video information comprising prediction mode information for a current chroma block; deriving one of a plurality of cross-component linear model, CCLM, prediction modes as a CCLM prediction mode of the current chroma block based on the prediction mode information; deriving a sample number of neighboring chroma samples of the current chroma block based on the CCLM prediction mode of the current chroma block, a width and height of the current chroma block and a specific value; deriving the neighboring chroma samples of the sample number; deriving down sampled neighboring luma samples corresponding to the neighboring chroma samples and down sampled luma samples of a current luma block; calculating CCLM parameters based on the neighboring chroma samples and the down sampled neighboring luma samples; deriving prediction samples for the current chroma block based on the CCLM parameters and the down sampled luma samples of the current luma block; and generating reconstructed samples for the current chroma block based on the prediction samples, wherein the specific value is derived as 2, wherein the width and height of the current chroma block is N, wherein the plurality of CCLM prediction modes include a left top linear model, LM, mode, a top LM mode and a left LM mode, characterized in that based on the CCLM prediction mode of the current chroma block being the left LM mode, and 2N being less than or equal to twice the specific value, the derived neighboring chroma samples of the sample number are left neighboring chroma samples of the sample number, and the sample number of the left neighboring chroma samples is derived as 2N, and based on the CCLM prediction mode of the current chroma block being the left LM mode, and the 2N being greater than twice the specific value, the derived neighboring chroma samples of the sample number are left neighboring chroma samples of the sample number, and the sample number of the left neighboring chroma samples is derived as 4.