Method and system for processing luma and chroma signals
The present disclosure provides systems and methods for processing video content. The method can include: receiving data representing a first block and a second block in a picture, the data comprising a plurality of chroma samples associated with the first block and a plurality of luma samples associated with the second block; determining an average value of the plurality of luma samples associated with the second block; determining a chroma scaling factor for the first block based on the average value; and processing the plurality of chroma samples associated with the first block using the chroma scaling factor.
1. A method of decoding a bitstream to output one or more pictures for a video stream, the method comprising:
determining, based on encoded syntax elements in the bitstream, a chroma scaling factor associated with a target coding block; and
performing chroma residual scaling of the target coding block using the chroma scaling factor,
wherein the chroma scaling factor is determined based on N luma samples, the N being independent of a size of the target coding block,
wherein the N luma samples are determined based on a first coding block associated with the target coding block, and
wherein when one or more of the N luma samples are outside a boundary of a picture, the one or more of the N luma samples are replaced with a luma sample on the picture boundary.
2. The method of claim 1 , wherein the encoded syntax elements include an index signaling the chroma scaling factor or being used for deriving the chroma scaling factor.
3. The method of claim 1 , wherein the luma sample on the picture boundary:
is determined from a plurality of luma samples on the picture boundary, and
has a distance closest to the one or more of the N luma samples outside the picture boundary.
4. The method of claim 1 , wherein the picture boundary is one of a right boundary or bottom boundary of the picture.
5. The method of claim 1 , wherein N is a power of 2.
6. The method of claim 1 , wherein N is a fixed number.
7. The method of claim 1 , wherein the N is dependent on a size of a coding tree block (CTB).
8. The method of claim 1 , wherein the N is less than or equal to the size of the coding tree unit for the picture.
9. The method of claim 1 , wherein the chroma scaling factor is determined based on an average value of the N luma samples.
10. A non-transitory computer-readable medium storing a data stream associated with a video sequence, wherein the data stream comprises syntax elements:
signaling a chroma scaling factor associated with a target coding block, or
being used for deriving the chroma scaling factor,
wherein the chroma scaling factor is determined based on N luma samples, the N being independent of a size of the target coding block,
wherein the N luma samples are determined based on a first coding block associated with the target coding block, and
wherein when one or more of the N luma samples are outside a boundary of a picture, the one or more of the N luma samples are replaced with a luma sample on the picture boundary.
11. The non-transitory computer readable medium of claim 10 , wherein the luma sample on the picture boundary:
is determined from a plurality of luma samples on the picture boundary, and
has a distance closest to the one or more of the N luma samples outside the picture boundary.
12. The non-transitory computer readable medium of claim 10 , wherein the picture boundary is one of a right boundary or bottom boundary of the picture.
13. The non-transitory computer readable medium of claim 10 , wherein N is a power of 2.
14. The non-transitory computer readable medium of claim 10 , wherein N is a fixed number.
15. The non-transitory computer readable medium of claim 10 , wherein the N is dependent on a size of a coding tree block (CTB).
16. The non-transitory computer readable medium of claim 10 , wherein the N is less than or equal to the size of the coding tree unit for the picture.
17. The non-transitory computer readable medium of claim 10 , wherein the chroma scaling factor is determined based on an average value of the N luma samples.
18. A video decoder, comprising:
a memory figured to store instructions; and
one or more processors configured to execute the instructions to cause the video decoder to perform:
determining, based on encoded syntax elements in a bitstream associated with a video sequence, a chroma scaling factor associated with a target coding block; and
performing chroma residual scaling of the target coding block using the chroma scaling factor,
wherein the chroma scaling factor is determined based on N luma samples, the N being independent of a size of the target coding block,
wherein the N luma samples are determined based on a first coding block associated with the target coding block, and
wherein when one or more of the N luma samples are outside a boundary of a picture, the one or more of the N luma samples are replaced with a luma sample on the picture boundary.
19. The video decoder of claim 18 , wherein the encoded syntax elements include an index signaling the chroma scaling factor or being used for deriving the chroma scaling factor.
20. The video decoder of claim 18 , wherein the luma sample on the picture boundary:
is determined from a plurality of luma samples on the picture boundary, and
has a distance closest to the one or more of the N luma samples outside the picture boundary.