Adaptive parameter selection for cross-component prediction in image and video compression
Aspects of the disclosure provide a method and an apparatus including processing circuitry that decodes prediction information indicating a cross-component linear model (CCLM) mode being applied to a chroma block in a current picture. For a first region in the chroma block, the processing circuitry determines a first adjustment value used to modify an offset parameter in the CCLM mode based on a first subset of reconstructed samples in a luma block collocated with the chroma block. The first subset of the reconstructed samples does not include one or more samples in the luma block. The processing circuitry updates the offset parameter based on the first adjustment value. The processing circuitry determines a second adjustment value used to modify a slope parameter in the CCLM mode based on a second subset of the reconstructed samples in the luma block and updates the slope parameter based on the second adjustment value.
1. A method of video processing in a decoder, comprising:
decoding prediction information of a chroma block to be reconstructed in a current picture, the prediction information indicating that a cross-component linear model (CCLM) mode is applied to the chroma block; and
for a first region in the chroma block,
determining a first adjustment value used to modify an offset parameter in the CCLM mode based on a first subset of reconstructed samples in a luma block that is collocated with the chroma block in the current picture, the first subset of the reconstructed samples not including one or more samples in the luma block;
updating the offset parameter based at least on the first adjustment value;
determining a second adjustment value used to modify a slope parameter in the CCLM mode based on a second subset of the reconstructed samples in the luma block;
updating the slope parameter based at least on the second adjustment value; and
reconstructing the first region in the chroma block based at least on the updated offset parameter and the updated slope parameter using the CCLM mode.
2. The method of claim 1 , wherein
the first region in the chroma block includes the entire chroma block;
the first subset of the reconstructed samples in the luma block is one reconstructed sample in the luma block; and
the determining the first adjustment value includes determining the first adjustment value to be a sample value of the one reconstructed sample in the luma block.
3. The method of claim 1 , wherein
the first region includes the entire chroma block;
the first subset of the reconstructed samples includes a plurality of reconstructed samples in the luma block, and
the determining the first adjustment value includes determining the first adjustment value to be an average of sample values of the plurality of reconstructed samples in the luma block.
4. The method of claim 1 , wherein
the first region includes the entire chroma block; and
the prediction information further indicates which of the reconstructed samples in the luma block is included in the first subset of the reconstructed samples.
5. The method of claim 1 , wherein
the chroma block further includes a second region;
the first subset of the reconstructed samples is a first reconstructed sample in the luma block, and
for the second region in the chroma block,
determining a second adjustment parameter used to adjust the offset parameter in the CCLM mode based on a second sample in the luma block, the second sample being different from the first sample;
determining a second updated offset parameter based at least on the offset parameter and the second adjustment parameter; and
reconstructing the second region in the chroma block based at least on the second updated offset parameter using the CCLM mode.
6. The method of claim 1 , wherein
the chroma block further includes a second region;
the luma block includes a first luma region and a second luma region that are collocated with the first region and the second region, respectively;
the first subset of the reconstructed samples includes a plurality of samples in the first luma region; and
for the second region in the chroma block,
determining a second adjustment parameter used to adjust the offset parameter in the CCLM mode based on a plurality of samples in the second luma region;
determining a second updated offset parameter based at least on the offset parameter and the second adjustment parameter; and
reconstructing the second region in the chroma block based at least on the second updated offset parameter using the CCLM mode.
7. The method of claim 1 , wherein
the chroma block further includes a second region;
the luma block includes a first luma region and a second luma region that are collocated with the first region and the second region, respectively;
the first subset of the reconstructed samples includes a top-left sample, a top-right sample, a bottom-left sample, and a bottom-right sample in the first luma region;
the determining the first adjustment value includes determining the first adjustment value to be an average of the top-left sample, the top-right sample, the bottom-left sample, and the bottom-right sample in the first luma region; and
for the second region in the chroma block,
determining a second adjustment parameter used to adjust the offset parameter in the CCLM mode to be an average of a top-left sample, a top-right sample, a bottom-left sample, and a bottom-right sample in the second luma region;
determining a second updated offset parameter based at least on the second offset parameter and the second adjustment parameter; and
reconstructing the second region in the chroma block based at least on the second updated offset parameter using the CCLM mode.
8. The method of claim 1 , wherein
the determining the updated offset parameter includes determining the updated offset parameter to be (b−u×y r ), b being the offset parameter, u being the second adjustment value used to modify the slope parameter, y r being the first adjustment value; and
the reconstructing the first region includes reconstructing the first region in the chroma block based on the updated offset parameter and the updated slope parameter using the CCLM mode.
9. The method of claim 8 , further comprising:
for the first region, determining the second adjustment value used to modify the slope parameter based on (i) reconstructed luma samples in one or more neighboring luma blocks of the luma block and (ii) the second subset of the reconstructed samples in the luma block.
10. The method of claim 9 , wherein the determining the second adjustment value used to modify the slope parameter comprises:
for the first region, determining the second adjustment value used to modify the slope parameter based on a difference between an average of the reconstructed luma samples in the one or more neighboring luma blocks and an average of the second subset of the reconstructed samples in the luma block.
11. The method of claim 1 , wherein the second subset of the reconstructed samples includes the first subset of the reconstructed samples.
12. The method of claim 1 , wherein the determining the second adjustment value comprises:
determining the second adjustment value based on the reconstructed samples in the entire luma block.
13. An apparatus for video decoding, comprising:
processing circuitry configured to:
decode prediction information of a chroma block to be reconstructed in a current picture, the prediction information indicating that a cross-component linear model (CCLM) mode is applied to the chroma block; and
for a first region in the chroma block,
determine a first adjustment value used to adjust an offset parameter in the CCLM mode based on a first subset of reconstructed samples in a luma block that is collocated with the chroma block in the current picture, the first subset of the reconstructed samples not including one or more samples in the luma block;
update the offset parameter based at least on the first adjustment value;
determining a second adjustment value used to modify a slope parameter in the CCLM mode based on a second subset of the reconstructed samples in the luma block;
updating the slope parameter based at least on the second adjustment value; and
reconstruct the first region in the chroma block based at least on the updated offset parameter using the CCLM mode.
14. The apparatus of claim 13 , wherein
the first region in the chroma block includes the entire chroma block;
the first subset of the reconstructed samples in the luma block is one reconstructed sample in the luma block; and
the processing circuitry is configured to determine the first adjustment value to be a sample value of the one reconstructed sample in the luma block.
15. The apparatus of claim 13 , wherein
the first region includes the entire chroma block;
the first subset of the reconstructed samples includes a plurality of reconstructed samples in the luma block, and
the processing circuitry is configured to determine the first adjustment value to be an average of sample values of the plurality of reconstructed samples in the luma block.
16. The apparatus of claim 13 , wherein
the first region includes the entire chroma block; and
the prediction information further indicates which of the reconstructed samples in the luma block is included in the first subset of the reconstructed samples.
17. The apparatus of claim 13 , wherein
the chroma block further includes a second region;
the first subset of the reconstructed samples is a first reconstructed sample in the luma block, and
for the second region in the chroma block, the processing circuitry is configured to:
determine a second adjustment parameter used to adjust the offset parameter in the CCLM mode based on a second sample in the luma block, the second sample being different from the first sample;
determine a second updated offset parameter based at least on the offset parameter and the second adjustment parameter; and
reconstruct the second region in the chroma block based at least on the second updated offset parameter using the CCLM mode.
18. The apparatus of claim 13 , wherein
the chroma block further includes a second region;
the luma block includes a first luma region and a second luma region that are collocated with the first region and the second region, respectively;
the first subset of the reconstructed samples includes a plurality of samples in the first luma region; and
for the second region in the chroma block, the processing circuitry is configured to:
determine a second adjustment parameter used to adjust the offset parameter in the CCLM mode based on a plurality of samples in the second luma region;
determine a second updated offset parameter based at least on the offset parameter and the second adjustment parameter; and
reconstruct the second region in the chroma block based at least on the second updated offset parameter using the CCLM mode.
19. The apparatus of claim 13 , wherein
the chroma block further includes a second region;
the luma block includes a first luma region and a second luma region that are collocated with the first region and the second region, respectively;
the first subset of the reconstructed samples includes a top-left sample, a top-right sample, a bottom-left sample, and a bottom-right sample in the first luma region; and
the processing circuitry is configured to:
determine the first adjustment value to be an average of the top-left sample, the top-right sample, the bottom-left sample, and the bottom-right sample in the first luma region; and
for the second region in the chroma block,
determine a second adjustment parameter used to adjust the offset parameter in the CCLM mode to be an average of a top-left sample, a top-right sample, a bottom-left sample, and a bottom-right sample in the second luma region;
determine a second updated offset parameter based at least on the second offset parameter and the second adjustment parameter; and
reconstruct the second region in the chroma block based at least on the second updated offset parameter using the CCLM mode.
20. A non-transitory computer-readable storage medium storing instructions which when executed by at least one processor cause the at least one processor to perform:
decoding prediction information of a chroma block to be reconstructed in a current picture, the prediction information indicating that a cross-component linear model (CCLM) mode is applied to the chroma block; and
for a first region in the chroma block,
determining a first adjustment value used to modify an offset parameter in the CCLM mode based on a first subset of reconstructed samples in a luma block that is collocated with the chroma block in the current picture, the first subset of the reconstructed samples not including one or more samples in the luma block;
updating the offset parameter based at least on the first adjustment value
determining a second adjustment value used to modify a slope parameter in the CCLM mode based on a second subset of the reconstructed samples in the luma block;
updating the slope parameter based at least on the second adjustment value; and
reconstructing the first region in the chroma block based at least on the updated offset parameter and the updated slope parameter using the CCLM mode.