Single-line cross component linear model prediction mode
Devices, systems, and methods for digital video coding that include cross-component prediction are described. In a representative aspect, a method for video coding includes receiving a bitstream representation of a current block of video data comprising a luma component and a chroma component, determining parameters of a linear model based on a first set of samples that are generated by down-sampling a second set of samples of the luma component, and processing, based on the parameters of the linear model, the bitstream representation to generate the current block.
1. A method of processing video data, comprising:
determining, for a conversion between a current video block of a video that is a chroma block and a bitstream of the video, a corresponding luma block for the current video block, wherein a color format for the current video block and the corresponding luma block is 4:2:0, and a cross component linear model is applied for the current video block;
generating down-sampled inside luma samples of the corresponding luma block;
generating down-sampled above neighboring luma samples of the corresponding luma block, wherein different down-sampled filtering schemes are used to generate the down-sampled above neighboring luma samples based on a position of the corresponding luma block, and wherein in response to the position of the corresponding luma block meeting a first position rule, a first down-sampled filtering scheme is used to generate the down-sampled above neighboring luma samples, and wherein the first position rule is that a top boundary of the corresponding luma block is overlapping with a top boundary of a current luma coding tree block (CTB) including the corresponding luma block, and wherein only one above luma sample row and a horizontal 3-tap filter are used to generate the down-sampled above neighboring luma samples in the first down-sampled filtering scheme;
deriving parameters of the cross component linear model at least based on the down-sampled above neighboring luma samples;
generating predicted chroma samples of the current video block based on the parameters of the cross component linear model and the down-sampled inside luma samples; and
performing the conversion based on the predicted chroma samples.
2. The method of claim 1 , wherein the only one above luma sample row is adjacent to the corresponding luma block.
3. The method of claim 2 , wherein the only one above luma sample row comprises above adjacent luma samples and above-right adjacent luma samples.
4. The method of claim 2 , wherein the first down-sampled filtering scheme calculates down-sampled above neighboring luma sample d[i] from luma sample a[i] of the only one above luma sample row as:
d[i ]=( a[ 2 i− 1]+2* a[ 2 i]+a[ 2 i+ 1]+2)>>2.
5. The method of claim 4 , wherein in a case that the luma sample a [i] is unavailable, apply a padding process.
6. The method of claim 5 , wherein in a case that a [ 2 i - 1 ] is unavailable, down-sampled above neighboring luma samples d[i] are derived as:
d[i ]=(3* a[ 2 i]+a[ 2 i+ 1]+2)>>2.
7. The method of claim 1 , wherein in response to the position of the corresponding luma block not meeting the first position rule, a second down-sampled filtering scheme is used to generate the down-sampled above neighboring luma samples.
8. The method of claim 7 , wherein multiple above luma sample rows and a filter with taps more than 3 are used to generate the down-sampled above neighboring luma samples in the second down-sampled filtering scheme.
9. The method of claim 8 , wherein at least one of multiple above luma sample rows is not adjacent to a block corresponding to the at least one of multiple above luma sample rows.
10. The method of claim 7 , further comprising:
applying a third down-sampled filtering scheme to generate the down-sampled inside luma samples of the corresponding luma block, wherein the third down-sampled filtering scheme uses same filtering taps and filtering coefficients with the second down-sampled filtering scheme.
11. The method of claim 7 , further comprising:
applying a fourth down-sampled filtering scheme to generate down-sampled left neighboring luma samples of the corresponding luma block, wherein the fourth down-sampled filtering scheme uses same filtering taps and filtering coefficients with the second down-sampled filtering scheme;
and the parameters of the cross component linear model are further derived based on the down-sampled left neighboring luma samples.
12. The method of claim 1 , wherein the first down-sampled filtering scheme corresponds to down-sampling above neighboring luma samples to lower left positions.
13. The method of claim 1 , wherein the conversion includes encoding the current video block into the bitstream.
14. The method of claim 1 , wherein the conversion includes decoding the current video block from the bitstream.
15. An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:
determine, for a conversion between a current video block of a video that is a chroma block and a bitstream of the video, a corresponding luma block for the current video block, wherein a color format for the current video block and the corresponding luma block is 4:2:0, and a cross component linear model is applied for the current video block;
generate down-sampled inside luma samples of the corresponding luma block;
generate down-sampled above neighboring luma samples of the corresponding luma block, wherein different down-sampled filtering schemes are used to generate the down-sampled above neighboring luma samples based on a position of the corresponding luma block, and wherein in response to the position of the corresponding luma block meeting a first position rule, a first down-sampled filtering scheme is used to generate the down-sampled above neighboring luma samples, and wherein the first position rule is that a top boundary of the corresponding luma block is overlapping with a top boundary of a current luma coding tree block (CTB) including the corresponding luma block, and wherein only one above luma sample row and a horizontal 3-tap filter are used to generate the down-sampled above neighboring luma samples in the first down-sampled filtering scheme;
derive parameters of the cross component linear model at least based on the down-sampled above neighboring luma samples;
generate predicted chroma samples of the current video block based on the parameters of the cross component linear model and the down-sampled inside luma samples; and
perform the conversion based on the predicted chroma samples.
16. The apparatus of claim 15 , wherein the only one above luma sample row is adjacent to the corresponding luma block.
17. The apparatus of claim 16 , wherein the only one above luma sample row comprises above neighboring luma samples and above-right neighboring luma samples.
18. A non-transitory computer-readable storage medium storing instructions that cause a processor to:
determine, for a conversion between a current video block of a video that is a chroma block and a bitstream of the video, a corresponding luma block for the current video block, wherein a color format for the current video block and the corresponding luma block is 4:2:0, and a cross component linear model is applied for the current video block;
generate down-sampled inside luma samples of the corresponding luma block;
generate down-sampled above neighboring luma samples of the corresponding luma block, wherein different down-sampled filtering schemes are used to generate the down-sampled above neighboring luma samples based on a position of the corresponding luma block, and wherein in response to the position of the corresponding luma block meeting a first position rule, a first down-sampled filtering scheme is used to generate the down-sampled above neighboring luma samples, and wherein the first position rule is that a top boundary of the corresponding luma block is overlapping with a top boundary of a current luma coding tree block (CTB) including the corresponding luma block, and wherein only one above luma sample row and a horizontal 3-tap filter are used to generate the down-sampled above neighboring luma samples in the first down-sampled filtering scheme;
derive parameters of the cross component linear model at least based on the down-sampled above neighboring luma samples;
generate predicted chroma samples of the current video block based on the parameters of the cross component linear model and the down-sampled inside luma samples; and
perform the conversion based on the predicted chroma samples.
19. The non-transitory computer-readable storage medium of claim 18 , wherein the only one above luma sample row is adjacent to the corresponding luma block.
20. A non-transitory computer-readable recording medium storing a bitstream which is generated by a method performed by a video processing apparatus, wherein the method comprises:
determining, for a current video block of a video that is a chroma block, a corresponding luma block for the current video block, wherein a color format for the current video block and the corresponding luma block is 4:2:0, and a cross component linear model is applied for the current video block;
generating down-sampled inside luma samples of the corresponding luma block;
generating down-sampled above neighboring luma samples of the corresponding luma block, wherein different down-sampled filtering schemes are used to generate the down-sampled above neighboring luma samples based on a position of the corresponding luma block, and wherein in response to the position of the corresponding luma block meeting a first position rule, a first down-sampled filtering scheme is used to generate the down-sampled above neighboring luma samples, wherein the first position rule is that a top boundary of the corresponding luma block is overlapping with a top boundary of a current luma coding tree block (CTB) including the corresponding luma block, and wherein only one above luma sample row and a horizontal 3-tap filter are used to generate the down-sampled above neighboring luma samples in the first down-sampled filtering scheme;
deriving parameters of the cross component linear model at least based on the down-sampled above neighboring luma samples;
generating predicted chroma samples of the current video block based on the parameters of the cross component linear model and the down-sampled inside luma samples; and
generating the bitstream based on the predicted chroma samples.