| CPC H04N 19/105 (2014.11) [H04N 19/132 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/186 (2014.11)] | 3 Claims |

|
1. An image decoding method performed by a decoding apparatus, the method comprising:
obtaining residual information for a chroma block;
deriving neighboring chroma reference samples for the chroma block based on an intra prediction mode of the chroma block being a cross-component linear model (CCLM) mode;
deriving neighboring luma reference samples of a luma block corresponding to the chroma block and luma samples in the luma block;
deriving downsampled neighboring luma reference samples and downsampled luma samples by downsampling the neighboring luma reference samples and the luma samples;
deriving a linear model parameter based on the downsampled neighboring luma reference samples and the neighboring chroma reference samples;
generating prediction samples for the chroma block based on the linear model parameter and the downsampled luma samples of the luma block;
generating residual samples for the chroma block based on the residual information for the chroma block;
reconstructing the chroma block based on the prediction samples for the chroma block and the residual samples for the chroma block; and
performing a deblocking filtering on a reconstructed picture including the chroma block,
wherein the neighboring luma reference samples include top neighboring luma reference samples located above a top boundary of the luma block,
wherein the downsampled neighboring luma reference samples include a downsampled top neighboring luma reference sample, and
wherein based on the top boundary of the luma block being overlapped with a boundary of a coding tree unit (CTU), the downsampled top neighboring luma reference sample is derived based on an equation below,
pTopDsY[x]=(pY[2*x−1][−1]+2*pY[2*x][−1]+pY[2*x+1][−1]+2)>>2,
where pTopDsY[x] represents the downsampled top neighboring luma reference sample, x represents an x-axis direction position of the downsampled top neighboring luma reference sample, pY[2*x−1][−1], pY[2*x][−1] and pY[2*x+1][−1] represent sample values of the top neighboring luma reference samples, respectively, and a y-axis direction position of the top neighboring luma reference samples is −1.
|