Two-step cross-component prediction mode
A method for video bitstream processing includes generating, using a first video block derived from a third video block of a first component and having a first size, a prediction block for a second video block of a video related to a second component, where the first component is different from the second component, and where the second video block has a second size that is different from the first size. The method also includes performing, using the prediction block, a conversion between the second video block and a bitstream representation of the video according to a two-step cross-component prediction mode (TSCPM).
1. A method of video processing, comprising:
deriving a prediction block for a chroma block of a current video block of a video based on a temporary video block, wherein the temporary video block is derived from a reconstructed luma block of the current video block, both the reconstructed luma block and the temporary video block have a first size, and the chroma block has a second size which is different from the first size; and
performing, a conversion between the current video block and a bitstream of the video based on the prediction block for the chroma block according to a cross-component prediction mode,
wherein the prediction block is generated by applying one or more downsampling filters to samples in the temporary video block, and wherein the one or more downsampling filters are pre-defined, and
wherein a prediction sample of the chroma block only depends on samples located at (2*x, 2*y) and (2*x, 2*y+1), and wherein the prediction sample is located at (x, y), x and y are integers and a top-left sample's coordinates of the temporary video block is set to (0, 0).
2. The method of claim 1 , wherein the first size is (M′+W0)×(N′+H0), the second size is M×N, and wherein either M′ is unequal to M or N′ is unequal to N.
3. The method of claim 1 , wherein the first size is (M′+W0)×(N′+H0), wherein the second size is M×N, and wherein one or both of W0 and H0 are equal to a value of zero.
4. The method of claim 1 , wherein the temporary video block is associated with a first set of samples and the reconstructed luma block is associated with a second set of samples, wherein at least one sample S Temp (x0, y0) in the first set of samples is derived as a first function of a corresponding sample S (x0,y0) from the second set of samples,
wherein x0 is within a first range of zero to (M′−1), inclusive, and y0 is within a second range of zero to (N′−1), inclusive, and
wherein M′ represents a width of the first size, and N′ represents a height of the second size.
5. The method of claim 4 , wherein in the first function, the S Temp (x0, y0) is defined as ((S(x0, y0)*a)>>k)+b.
6. The method of claim 4 , the method further comprising clipping the S Temp (x0, y0) to an allowed range of chroma values.
7. The method of claim 1 , wherein a selection of the one or more downsampling filters is based on a relative position of a sample to be predicted.
8. The method of claim 1 , wherein the one or more downsampling filters includes a downsampling filter with coefficient [1 1] for a sample located at (0, 0) relative to the temporary video block.
9. The method of claim 1 , wherein the one or more downsampling filters includes a 6-tap filter for a sample not located at (0, 0) relative to the temporary video block.
10. The method of claim 9 , wherein the 6-tap filter includes coefficients [1 2 1; 1 2 1].
11. The method of claim 1 , wherein the conversion includes encoding the current video block into the bitstream.
12. The method of claim 1 , wherein the conversion includes decoding the current video block from the bitstream.
13. 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:
derive a prediction block for a chroma block of a current video block of a video based on a temporary video block, wherein the temporary video block is derived from a reconstructed luma block of the current video block, both the reconstructed luma block and the temporary video block have a first size, and the chroma block has a second size which is different from the first size; and
perform, a conversion between the current video block and a bitstream of the video based on the prediction block for the chroma block according to a cross-component prediction mode,
wherein the prediction block is generated by applying one or more downsampling filters to samples in the temporary video block, wherein the one or more downsampling filters are pre-defined, and
wherein a prediction sample of the chroma block only depends on samples located at (2*x, 2*y) and (2*x, 2*y+1), wherein the prediction sample is located at (x, y), x and y are integers and a top-left sample's coordinates of the temporary video block is set to (0, 0).
14. The apparatus of claim 13 , wherein the first size is (M′+W0)×(N′+H0), the second size is M×N, and wherein either M′ is unequal to M or N′ is unequal to N.
15. The apparatus of claim 13 , wherein the first size is (M′+W0)×(N′+H0), wherein the second size is M×N, and wherein one or both of W0 and H0 are equal to a value of zero.
16. A non-transitory computer-readable storage medium storing instructions that cause a processor to:
derive a prediction block for a chroma block of a current video block of a video based on a temporary video block, wherein the temporary video block is derived from a reconstructed luma block of the current video block, both the reconstructed luma block and the temporary video block have a first size, and the chroma block has a second size which is different from the first size; and
perform, a conversion between the current video block and a bitstream of the video based on the prediction block for the chroma block according to a cross-component prediction mode,
wherein the prediction block is generated by applying one or more downsampling filters to samples in the temporary video block, and wherein the one or more downsampling filters are pre-defined, and
wherein a prediction sample of the chroma block only depends on samples located at (2*x, 2*y) and (2*x, 2*y+1), and wherein the prediction sample is located at (x, y), x and y are integers and a top-left sample's coordinates of the temporary video block is set to (0, 0).
17. A method for storing a bitstream of a video, comprising:
deriving a prediction block for a chroma block of a current video block of the video based on a temporary video block, wherein the temporary video block is derived from a reconstructed luma block of the current video block, both the reconstructed luma block and the temporary video block have a first size, and the chroma block has a second size which is different from the first size; generating the bitstream based on the prediction block for the chroma block according to a cross-component prediction mode; and
storing the bitstream in a non-transitory computer-readable recording medium,
wherein the prediction block is generated by applying one or more downsampling filters to samples in the temporary video block, and wherein the one or more downsampling filters are pre-defined, and
wherein a prediction sample of the chroma block only depends on samples located at (2*x, 2*y) and (2*x, 2*y+1), and wherein the prediction sample is located at (x, y), x and y are integers and a top-left sample's coordinates of the temporary video block is set to (0, 0).