Method and apparatus for video coding in 4:4:4 color format

The adaptive color transform with chroma residual scaling addresses inefficiencies in VVC for 4:4:4 chroma format by de-correlating color components, enhancing encoding efficiency and compression performance for high-fidelity video.

JP7734797B2Active Publication Date: 2025-09-05BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024099878
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-06-12
Filing Date
2024-06-20
Publication Date
2025-09-05
Estimated Expiration
2041-06-14

AI Technical Summary

Technical Problem

Existing video coding standards, such as VVC, are inefficient for 4:4:4 chroma format due to insufficient consideration of correlations between color components, leading to redundancy and suboptimal encoding performance for high-fidelity video applications.

Method used

Implementing an adaptive color transform (ACT) process with chroma residual scaling to de-correlate color components in the residual domain, allowing for improved encoding efficiency by conditionally applying inverse ACT and chroma residual scaling based on syntax elements.

Benefits of technology

Enhances encoding efficiency for 4:4:4 video by reducing redundancy and improving compression performance, particularly for high-fidelity video content with rich color information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007734797000012
    Figure 0007734797000012
  • Figure 0007734797000013
    Figure 0007734797000013
  • Figure 0007734797000014
    Figure 0007734797000014
Patent Text Reader

Abstract

To provide a method and system of conditionally applying a chroma residual scaling process.SOLUTION: A method of video coding comprises: receiving first and second coded block flags (CBFs) and a third syntax element that are associated with a coding unit, the first CBF being for residual samples of a first chroma component, the second CBF being for residual samples of a second chroma component, and the third syntax element indicating whether adaptive color transform (ACT) is applied to the coding unit; determining whether to apply the chroma residual scaling to the residual samples of the chroma components according to the first and second CBFs and the third syntax element; in accordance with a determination that the chroma residual scaling is to be applied to the residual samples of the first and second chroma components, scaling the residual samples of at least one of the first and second chroma components based on a corresponding scaling parameter.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Related Applications This application claims priority to U.S. Provisional Application No. 63 / 038,692, filed June 12, 2020, and entitled "METHODS AND APPARATUS ON 4:4:4 VIDEO CODING," which is incorporated by reference in its entirety. This application relates generally to video data encoding and compression, and more particularly to a method and system for conditionally applying a chroma residual scaling process via an adaptive color transform (ACT) process. [Background technology]

[0002] Digital video is supported by a variety of electronic devices, such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smartphones, video teleconferencing devices, and video streaming devices. Such electronic devices transmit, receive, encode, decode, and / or store digital video data by implementing video compression and decompression standards such as MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), High Efficiency Video Coding (HEVC), and Versatile Video Coding (VVC). Video compression generally involves performing spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or remove redundancy inherent in video data. For block-based video coding, a video frame is divided into one or more slices, with each slice having multiple video blocks, which may also be referred to as coding tree units (CTUs). Each CTU may contain one coding unit (CU) or may be recursively divided into smaller CUs until a predetermined minimum CU size is reached. Each CU (also named leaf CU) contains one or more transform units (TUs) and also includes one or more prediction units (PUs). Each CU may be coded in either intra mode, inter mode, or intra block copy (IBC) mode. Video blocks within an intra-coded (I) slice in a video frame are coded using spatial prediction with respect to reference samples in neighboring blocks within the same video frame.Video blocks within an inter-coded (P (forward predicted image) or B (bidirectional predicted image)) slice in a video frame may use spatial prediction relative to reference samples in neighboring blocks within the same video frame, or may use temporal prediction relative to reference samples in other previous and / or future reference video frames.

[0003] Spatial or temporal prediction based on previously coded reference blocks, such as neighboring blocks, results in a predicted block for the current video block being coded. The process of finding the reference block may be achieved by a block matching algorithm. Residual data representing pixel differences between the current block being coded and the predicted block is called a residual block or prediction error. Inter-coded blocks are coded according to motion vectors that point to reference blocks in reference frames and residual blocks that form the predicted block. The process of determining a motion vector is generally called motion prediction. Intra-coded blocks are coded according to intra-prediction modes and residual blocks. For further compression, the residual blocks may be transformed from the pixel domain to a transform domain, such as the frequency domain, to yield residual transform coefficients, which are then quantized. The quantized transform coefficients, initially arranged in a two-dimensional array, may be scanned to generate a one-dimensional vector of transform coefficients, which are then entropy coded into a video bitstream to achieve even further compression.

[0004] The encoded video bitstream is then stored on a computer-readable storage medium (e.g., flash memory) that is accessed by another electronic device with digital video capabilities, or transmitted directly to the electronic device via wired or wireless connections. The electronic device then performs video decompression (the inverse process of the video compression discussed above) by, for example, parsing the encoded video bitstream to obtain syntax elements from the bitstream, reconstructing the digital video data from the encoded video bitstream into its original format based at least in part on the syntax elements obtained from the bitstream, and rendering the reconstructed digital video data on a display of the electronic device.

[0005] As the quality of digital video moves from high definition to 4Kx2K or 8Kx4K, the amount of video data to be encoded / decoded increases exponentially, which means there is a constant effort to encode / decode video data more efficiently while maintaining the image quality of the decoded video data.

[0006] Certain video content, such as screen content video, is encoded in the 4:4:4 chroma format, in which all three components (the luminance component and two chrominance components) have the same resolution. Although the 4:4:4 chroma format contains more redundancy than the 4:2:0 chrominance format or the 4:2:2 chrominance format (which is detrimental to achieving good compression efficiency), the 4:4:4 chrominance format is still the preferred encoding format for many applications where high fidelity is required to preserve color information, such as sharp edges, in the decoded video. Given the redundancy present in the 4:4:4 chrominance video format, there is evidence that significant coding improvements can be achieved by exploiting the correlations between the three color components of 4:4:4 video (e.g., Y, Cb, and Cr in the YCbCr domain, or G, B, and R in the RGB domain). Due to these correlations, adaptive color space conversion (ACT) tools are employed to exploit the correlations between the three color components during the development of the HEVC screen content coding (SCC) extension. Summary of the Invention

[0007] This application describes implementations related to the encoding and decoding of video data, and more particularly, to methods and systems for conditionally applying a chroma residual scaling process via an adaptive color transformation (ACT) process.

[0008] For video signals originally captured in 4:4:4 color format, if high fidelity is desired for the decoded video signal, it is preferable to encode the video in the original space, e.g., RGB video, where information redundancy is abundant. Some inter-component encoding tools in the current VVC standard, such as cross-component linear model prediction (CCLM), can improve the efficiency of 4:4:4 video encoding, but do not fully eliminate the redundancy among the three components. This is because only the Y / G component is used to predict the Cb / B and Cr / R components, and the correlation between the Cb / B and Cr / R components is not taken into account. In contrast, further de-correlation of the three color components can improve the encoding performance of 4:4:4 video encoding.

[0009] In the current VVC standard, the designs of existing inter and intra tools are primarily focused on video captured in 4:2:0 chrominance format. Therefore, to achieve a better complexity / performance tradeoff, many of these coding tools (e.g., position-dependent intra prediction combination (PDPC), multi-reference line (MRL), and sub-split prediction (ISP)) are applicable only to the luma component and are ineffective for the chrominance component, or different operations (e.g., interpolation filters applied to motion-compensated prediction) are used for the luma and chrominance components. However, video signals in 4:4:4 chrominance format exhibit very different characteristics compared to 4:2:0 video. For example, the Cb / B and Cr / R components of 4:4:4 YCbCr video and RGB video represent richer color information and have higher frequency information (e.g., edges and textures) than the chrominance components of 4:2:0 video. Due to such considerations, it may always be optimal for VVC to use the same design of some existing encoding tools for both 4:2:0 and 4:4:4 video.

[0010] According to a first aspect of the present application, a method for decoding a video block coded using chroma residual scaling comprises: receiving, from a bitstream, a plurality of syntax elements associated with a coding unit, the syntax elements including a first coded block flag (CBF) for residual samples of a first chroma component of the coding unit, a second CBF for residual samples of a second chroma component of the coding unit, and a third syntax element indicating whether an adaptive color transform (ACT) is applied to the coding unit; determining, according to the first CBF, the second CBF, and the third syntax element, whether to perform chroma residual scaling on the residual samples of the first and second chroma components; scaling the residual samples of at least one of the first and second chroma components based on corresponding scaling parameters in response to a determination to perform chroma residual scaling on the residual samples of at least one of the first and second chroma components; and reconstructing samples of the coding unit using the luma residual samples and the chroma residual samples after scaling.

[0011] In some embodiments, determining whether to perform chroma residual scaling on residual samples of the first and second chroma components in accordance with the first CBF, the second CBF, and the third syntax element comprises: determining, in response to a determination by the third syntax element that ACT is applied to the coding unit, to apply an inverse ACT to luma residual samples and chroma residual samples of the coding unit, and after the inverse ACT, to perform chroma residual scaling on residual samples of the first and second chroma components regardless of the first CBF and the second CBF.

[0012] According to a second aspect of the present application, a method for decoding a video block coded using chroma residual scaling comprises receiving, from a bitstream, a plurality of syntax elements associated with a coding unit, the syntax elements including a first coded block flag (CBF) for residual samples of a first chroma component of the coding unit, a second CBF for residual samples of a second chroma component of the coding unit, and a third syntax element indicating whether an adaptive color transform (ACT) is applied to the coding unit; determining, according to the first CBF and the second CBF, whether to perform chroma residual scaling on the residual samples of the first and second chroma components; scaling the residual samples of at least one of the first and second chroma components based on corresponding scaling parameters in response to a determination by the third syntax element that ACT is applied to the coding unit; and applying inverse ACT to luma residual samples and chroma residual samples of the coding unit after scaling.

[0013] According to a third aspect of the present application, an electronic device includes one or more processing units, a memory, and a plurality of programs stored in the memory, which, when executed by the one or more processing units, cause the electronic device to perform the method for decoding video data as described above.

[0014] According to a fourth aspect of the present application, a non-transitory computer-readable recording medium stores a plurality of programs for execution by an electronic device having one or more processing units, the programs, when executed by the one or more processing units, causing the electronic device to perform the method for decoding video data as described above.

[0015] The accompanying drawings, which are included to provide a further understanding of the embodiments, are incorporated in and constitute a part of this specification, illustrate the described embodiments, and together with the description, serve to explain the underlying principles, with like reference numerals referring to corresponding parts. [Brief explanation of the drawings]

[0016] [Figure 1] FIG. 1 is a block diagram illustrating an example video encoding and decoding system according to some embodiments of the present disclosure. [Figure 2] 1 is a block diagram illustrating an example video encoder according to some embodiments of this disclosure. [Figure 3] 1 is a block diagram illustrating an example video decoder according to some embodiments of the present disclosure. [Figure 4A] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of the present disclosure. [Figure 4B] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of the present disclosure. [Figure 4C] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of the present disclosure. [Figure 4D] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of the present disclosure. [Figure 4E] 1 is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes in accordance with some embodiments of the present disclosure. [Figure 5A] FIG. 1 is a block diagram illustrating an example of applying an adaptive color space conversion (ACT) technique to convert residuals between an RGB color space and a YCgCo color space, in accordance with some implementations of the present disclosure. [Figure 5B]FIG. 1 is a block diagram illustrating an example of applying an adaptive color space conversion (ACT) technique to convert residuals between an RGB color space and a YCgCo color space, in accordance with some implementations of the present disclosure. [Figure 6] FIG. 1 is a block diagram illustrating an application of luma mapping with chroma scaling (LMCS) techniques in an exemplary video data decoding process, in accordance with some implementations of the present disclosure. [Figure 7] 1 is a block diagram illustrating an example video decoding process in which a video decoder implements an inverse adaptive color space conversion (ACT) technique, in accordance with some implementations of the present disclosure. [Figure 8A] FIG. 1 is a block diagram illustrating an example video decoding process in which a video decoder performs inverse adaptive color space conversion (ACT) and chroma residual scaling techniques in accordance with some implementations of the present disclosure. [Figure 8B] FIG. 1 is a block diagram illustrating an example video decoding process in which a video decoder performs inverse adaptive color space conversion (ACT) and chroma residual scaling techniques in accordance with some implementations of the present disclosure. [Figure 9] 10 is a flowchart illustrating an example process by which a video decoder decodes video data by conditionally performing a chroma residual scaling operation on a residual of a coding unit, in accordance with some implementations of this disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0017] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in an understanding of the subject matter presented herein. However, it will be apparent to those skilled in the art that various alternatives may be used without departing from the scope of the claims and that the subject matter may be practiced without these specific details. For example, it will be apparent to those skilled in the art that the subject matter presented herein may be implemented in many types of electronic devices with digital video capabilities.

[0018] In some embodiments, a method is provided for improving the coding efficiency of the VVC standard for 4:4:4 video. Generally, the main features of the techniques in this disclosure are summarized below.

[0019] In some embodiments, these methods are implemented to improve existing ACT designs that enable adaptive color space conversion in the residual domain. In particular, special care is taken to handle the interaction of ACT with some existing coding tools in VVC.

[0020] Figure 1 is a block diagram illustrating an exemplary system 10 for concurrently encoding and decoding video blocks in accordance with some embodiments of the present disclosure. As shown in Figure 1, system 10 includes a source device 12 that generates and encodes video data that is subsequently decoded by a destination device 14. Source device 12 and destination device 14 may comprise any of a variety of electronic devices, including desktop or laptop computers, tablet computers, smartphones, set-top boxes, digital televisions, cameras, displays, digital media players, video game consoles, video streaming devices, etc. In some embodiments, source device 12 and destination device 14 are equipped with wireless communication capabilities.

[0021] In some embodiments, destination device 14 may receive the encoded video data to be decoded over link 16. Link 16 may comprise any type of communications medium or device capable of transferring encoded video data from source device 12 to destination device 14. In one example, link 16 may comprise a communications medium that enables source device 12 to directly transmit encoded video data to destination device 14 in real time. The encoded video data may be modulated according to a communications standard, such as a wireless communications protocol, and transmitted to destination device 14. The communications medium may comprise any wireless or wired communications medium, such as the radio frequency (RF) spectrum or one or more physical transmission paths. The communications medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communications medium may include routers, switches, base stations, or other equipment that helps facilitate communication from source device 12 to destination device 14.

[0022] In some other embodiments, the encoded video data may be transmitted from output interface 22 to recording device 32. The encoded video data in recording device 32 may then be accessed by destination device 14 via input interface 28. Recording device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray Disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or other digital storage media suitable for storing encoded video data. In a further example, recording device 32 may represent a file server or another intermediate storage device that may hold the encoded video data generated by source device 12. Destination device 14 may access the stored video data by streaming or downloading it from recording device 32. The file server may be any type of computer capable of storing encoded video data or transmitting the encoded video data to destination device 14. Exemplary file servers include a web server (e.g., for a website), an FTP server, a network attached storage (NAS) device, or a local disk drive. Destination device 14 may access the encoded video data over any standard data connection, including a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a DSL or cable modem), or a combination of both, suitable for accessing encoded video data stored on a file server. The transmission of the encoded video data from recording device 32 may be a streaming transmission, a download transmission, or a combination of both.

[0023] 1 , source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Video source 18 may include sources such as a video capture device, e.g., a video camera, a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video, or a combination of such sources. As an example, if video source 18 is a video camera in a security surveillance system, source device 12 and destination device 14 may form a camera phone or video phone. However, the embodiments described herein may be applicable to video coding generally and may be applied to wireless and / or wired applications.

[0024] Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be transmitted directly to destination device 14 through output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored in recording device 32 for later access by destination device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or a transmitter.

[0025] Destination device 14 includes an input interface 28, a video decoder 30, and a display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data over link 16. The encoded video data communicated over link 16 or provided by recording device 32 may include various syntax elements generated by video encoder 20 for use in decoding the video data by video decoder 30. The encoded video data, which may include such syntax elements, is transmitted over a communications medium and stored on a recording medium or file server.

[0026] In some embodiments, destination device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with destination device 14. Display device 34 displays the decoded video data to a user and may comprise any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0027] Video encoder 20 and video decoder 30 may operate based on proprietary or industry standards, such as VVC, HEVC, MPEG-4 Part 10 AVC (Advanced Video Coding), AVS, or extensions of these standards. It should be understood that the present application is not limited to a particular video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally contemplated that video encoder 20 of source device 12 may be configured to encode video data in accordance with any of these current or future standards. Similarly, it is generally contemplated that video decoder 30 of destination device 14 may be configured to decode video data in accordance with any of these current or future standards.

[0028] Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoding circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When implemented partially in software, the electronic device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the video encoding / decoding processes disclosed in this disclosure. Video encoder 20 and video decoder 30 may each be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device.

[0029] 2 is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described herein. Video encoder 20 may perform intra-predictive and inter-predictive coding of video blocks within video frames. Intra-predictive coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-predictive coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence.

[0030] As shown in FIG. 2, video encoder 20 includes a video data memory 40, a prediction processor 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processor 52, a quantizer 54, and an entropy encoder 56. Prediction processor 41 further includes a motion estimator 42, a motion compensation processor 44, a segmenter 45, an intra-prediction processor 46, and an intra-block copy (BC) processor 48. In some embodiments, video encoder 20 also includes an inverse quantizer 58 for reconstructing video blocks, an inverse transform processor 60, and an adder 62. An in-loop filter, such as a deblocking filter (not shown), may be disposed between adder 62 and DPB 64 to filter block boundaries and remove blocking artifacts from the reconstructed video. In addition to the deblocking filter, other in-loop filters (not shown) may also be used to filter the output of adder 62. In-loop filtering, such as sample adaptive offset (SAO) and adaptive in-loop filter (ALF), may further be applied to the reconstructed CU before it is placed in a reference picture store and used as a reference for encoding subsequent video blocks. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be divided among one or more fixed or programmable hardware units.

[0031] Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data memory 40 may be obtained, for example, from video source 18. DPB 64 is a buffer that records reference video data used by video encoder 20 to encode video data (e.g., in an intra-predictive coding mode or an inter-predictive coding mode). Video data memory 40 and DPB 64 may be formed by any of a variety of storage devices. In various examples, video data memory 40 may be on-chip with other components of video encoder 20 or may be off-chip relative to those components.

[0032] As shown in FIG. 2 , a partitioning unit 45 within the prediction processor 41 partitions the received video data into video blocks. This partitioning may include dividing the video frame into slices, tiles, or other larger coding units (CUs) according to a predetermined partitioning structure, such as a quadtree structure, associated with the video data. The video frame may be partitioned into multiple video blocks (or sets of video blocks called tiles). The prediction processor 41 may select one of multiple possible predictive coding modes, such as one of multiple intra-predictive coding modes or one of multiple inter-predictive coding modes, for the current video block based on error results (e.g., coding rate or distortion level). The prediction processor 41 may provide the resulting intra-predictively coded block or inter-predictively coded block to an adder 50 to generate a residual block, and may provide this coded block to an adder 62 for later reconstruction for use as part of a reference frame. The prediction processor 41 also provides syntax elements, such as motion vectors, intra-mode indicators, partition information, and other such syntax information, to an entropy encoder 56.

[0033] To select an appropriate intra-prediction coding mode for a current video block, an intra-prediction unit 46 within prediction unit 41 may perform intra-prediction coding of the current video block relative to one or more neighboring blocks in the same frame as the current block being coded, resulting in spatial prediction. A motion estimation unit 42 and a motion compensation unit 44 within prediction unit 41 perform inter-prediction coding of the current video block relative to one or more predictive blocks in one or more reference frames, resulting in temporal prediction. Video encoder 20 may perform multiple coding passes, e.g., to select an appropriate coding mode for each block of video data.

[0034] In some embodiments, motion estimator 42 determines the inter-prediction mode for a current video frame by generating a motion vector that indicates the displacement of a prediction unit (PU) of a video block within the current video frame relative to a predictive block within a reference video frame according to a predetermined pattern within a sequence of video frames. Motion estimation performed by motion estimator 42 is the process of generating motion vectors that estimate the motion of a video block. The motion vector may indicate, for example, the displacement of a PU of a video block within the current video frame or picture relative to a predictive block within a reference frame (or other coding unit) relative to a current block to be coded within the current frame (or other coding unit). The predetermined pattern may designate the video frame as a P-frame or a B-frame in the sequence. Intra BC unit 48 may determine vectors, such as block vectors, for intra BC coding in a manner similar to the determination of motion vectors by motion estimator 42 for inter prediction, or may utilize motion estimator 42 to determine block vectors.

[0035] A prediction block is a block of a reference frame that is considered to closely correspond to a PU of a video block to be coded in terms of pixel difference, which may be determined by sum of absolute difference (SAD), sum of square difference (SSD), or other difference measure. In some embodiments, video encoder 20 may calculate values ​​for sub-integer pixel locations of the reference frame stored in DPB 64. For example, video encoder 20 may interpolate values ​​for quarter-pixel, eighth-pixel, or other fractional-pixel locations of the reference frame. Thus, motion estimation unit 42 may perform motion search for whole pixel locations and fractional-pixel locations to output motion vectors with fractional-pixel precision.

[0036] For a PU of a video block of an inter-predictively coded frame, the motion estimation unit 42 calculates a motion vector by comparing the position of the PU with the position of a predictive block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), where the first reference frame list or the second reference frame list identifies one or more reference frames stored in the DPB 64. The motion estimation unit 42 sends the calculated motion vector to the motion compensation unit 44 and then to the entropy coding unit 56.

[0037] The motion compensation performed by motion compensation unit 44 may involve fetching or generating a predictive block based on the motion vector determined by motion estimation unit 42. Upon receiving the motion vector for the PU of the current video block, motion compensation unit 44 locates the predictive block to which the motion vector points in one of the reference frame lists, retrieves the predictive block from DPB 64, and forwards the predictive block to summer 50. Summer 50 then forms a residual video block of pixel difference values ​​by subtracting pixel values ​​of the predictive block provided by motion compensation unit 44 from pixel values ​​of the current video block to be coded. The pixel difference values ​​forming the residual video block may include luma difference components, chroma difference components, or both. Motion compensation unit 44 may also generate syntax elements related to the video blocks of the video frame for use by video decoder 30 in decoding the video blocks of the video frame. The syntax elements may include, for example, syntax elements that define the motion vectors used to describe the predictive blocks, any flags that indicate the prediction mode, or other syntax information described herein. Note that the motion estimator 42 and motion compensator 44 may be largely integrated, but are shown separately for conceptual purposes.

[0038] In some embodiments, the intra BC unit 48 may generate a vector to capture a predictive block in a manner similar to that described above with respect to the motion estimation unit 42 and the motion compensation unit 44, except that the predictive block is in the same frame as the current block being coded, and the vector is referred to as a block vector, as opposed to a motion vector. Specifically, the intra BC unit 48 may determine an intra prediction mode to use to code the current block. In some examples, the intra BC unit 48 may code the current block using various intra prediction modes, e.g., during separate coding passes, and analyze the performance of the intra prediction modes through rate-distortion analysis. The intra BC unit 48 may then select an appropriate intra prediction mode from the various tested intra prediction modes to use to generate an intra mode indicator. For example, the intra BC unit 48 may use rate-distortion analysis to calculate rate-distortion values ​​for the various tested intra prediction modes and select the intra prediction mode with the best rate-distortion characteristics from among the tested modes as the appropriate intra prediction mode to use. The rate-distortion analysis generally determines the bitrate (i.e., number of bits) used to generate a coded block, along with the amount of distortion (or error) between the coded block and the original block that was coded to generate the coded block. The intra BC unit 48 may calculate the distortion-to-rate ratio for various coded blocks to determine the intra prediction mode that provides the best rate-distortion value for the block.

[0039] In other examples, the intra BC unit 48 may use, in whole or in part, the motion estimation unit 42 and the motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the predictive block may be a block that is considered to closely correspond to the block to be coded in terms of pixel differences, and may be determined by sum of absolute differences (SAD), sum of squared differences (SSD), or other difference measures. Identifying the predictive block may include calculating values ​​for sub-integer pixel positions.

[0040] Whether the predictive block is from the same frame via intra prediction or a different frame via inter prediction, video encoder 20 may form a residual video block by subtracting pixel values ​​of the predictive block from pixel values ​​of the current video block being coded, forming pixel difference values. The pixel difference values ​​that form the residual video block may include both luma and chroma difference components.

[0041] The intra-prediction unit 46 may intra-predict the current video block as an alternative to inter-prediction performed by the motion estimation unit 42 and motion compensation unit 44 or intra-block copy prediction performed by the intra-BC unit 48, as described above. In particular, the intra-prediction unit 46 may determine an intra-prediction mode to use to encode the current block. To do so, the intra-prediction unit 46 may encode the current block using various intra-prediction modes, for example, during separate encoding passes, and the intra-prediction unit 46 (or a mode selection unit in some examples) may select an appropriate intra-prediction mode to use from the tested intra-prediction modes. The intra-prediction unit 46 may provide information indicative of the selected intra-prediction mode for the block to the entropy coding unit 56. The entropy coding unit 56 may encode information indicating the selected intra-prediction mode in the bitstream.

[0042] After prediction processor 41 determines a predictive block for the current video block, either by inter-prediction or intra-prediction, adder 50 generates a residual video block by subtracting the predictive block from the current video block. The residual video data in the residual block may be included in one or more transform units (TUs) and provided to transform processor 52. Transform processor 52 converts the residual video data into residual transform coefficients using a transform, such as a discrete cosine transform (DCT) or a conceptually similar transform.

[0043] The transform processor 52 may send the resulting transform coefficients to a quantizer 54, which quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be varied by adjusting a quantization parameter. In some examples, the quantizer 54 may then perform a scan of a matrix containing the quantized transform coefficients. Alternatively, the entropy encoder 56 may perform the scan.

[0044] Following quantization, entropy coder 56 entropy codes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy coding (PIPE), or another entropy coding technique or technology. The coded bitstream may then be transmitted to video decoder 30 or recorded on recording device 32 for later transmission to or retrieval by video decoder 30. Entropy coder 56 may also entropy code motion vectors and other syntax elements for the current video frame being coded.

[0045] Inverse quantization unit 58 applies inverse quantization, and inverse transform unit 60 applies inverse transform, to reconstruct the residual video block in the pixel domain to generate reference blocks for predicting other video blocks. As previously mentioned, motion compensation unit 44 may generate motion-compensated prediction blocks from one or more reference blocks of frames stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0046] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 as a prediction block for inter predicting another video block in a subsequent video frame.

[0047] 3 is a block diagram illustrating an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-prediction processing unit 84, and an intra-BC unit 85. The video decoder 30 may perform a decoding process that is generally inverse to the encoding process described for the video encoder 20 in connection with FIG. 2. For example, the motion compensation unit 82 may generate prediction data based on motion vectors received from the entropy decoding unit 80, while the intra-prediction processing unit 84 may generate prediction data based on an intra-prediction mode indicator received from the entropy decoding unit 80.

[0048] In some examples, units of video decoder 30 may be tasked with performing embodiments of the present application. Also, in some examples, embodiments of the present disclosure may be divided among one or more units of video decoder 30. For example, intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of video decoder 30, such as motion compensation unit 82, intra prediction processing unit 84, and entropy decoding unit 80. In some examples, video decoder 30 may not include intra BC unit 85, and the functionality of intra BC unit 85 may be performed by other components of prediction processing unit 81, such as motion compensation unit 82.

[0049] Video data memory 79 may store video data, such as an encoded video bitstream, that is decoded by other components of video decoder 30. The video data stored in video data memory 79 may be obtained from recording device 32, from a local video source such as a camera, by wired or wireless network communication of the video data, or by accessing a physical data storage medium such as a flash drive or hard disk. Video data memory 79 may include a coded picture buffer (CPB) that stores coded video data from the coded video bitstream. A decoded picture buffer (DPB) 92 of video decoder 30 stores reference video data used by video decoder 30 to encode video data (e.g., in an intra-predictive coding mode or an inter-predictive coding mode). Video data memory 79 and DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous dynamic random access memory (SDRAM), magneto-resistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, video data memory 79 and DPB 92 are depicted as two separate components of video decoder 30 in FIG. 3 . However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or separate memory devices. In some examples, video data memory 79 may be on-chip with other components of video decoder 30, or may be off-chip with respect to those components.

[0050] During the decoding process, video decoder 30 receives an encoded video bitstream representing video blocks of encoded video frames and associated syntax elements. Video decoder 30 may receive video frame-level and / or video block-level syntax elements. An entropy decoding unit 80 of video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors or intra-prediction mode indicators, and other syntax elements. Entropy decoding unit 80 then forwards the motion vectors and other syntax elements to a prediction processing unit 81.

[0051] When a video frame is coded as an intra-predictively coded (I) frame or for intra-coded predictive blocks in other types of frames, the intra-prediction processing unit 84 of the prediction processing unit 81 may generate predictive data for video blocks of the current video frame based on the signaled intra-prediction mode and reference data from previously decoded blocks of the current frame.

[0052] When a video frame is coded as an inter-predictive (i.e., B or P) frame, motion compensation unit 82 of prediction processor 81 generates one or more predictive blocks for video blocks of the current video frame based on the motion vectors and other syntax elements received from entropy decoder 80. Each of the predictive blocks may be generated from a reference frame within one of the reference frame lists. Video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference frames stored in DPB 92.

[0053] In some examples, when a video block is encoded according to the intra BC modes described herein, intra BC unit 85 of prediction processor 81 generates a predictive block for the current video block based on the block vectors and other syntax elements received from entropy decoding unit 80. The predictive block may be within the same reconstructed region of the picture as the current video block as defined by video encoder 20.

[0054] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for video blocks of the current video frame by analyzing the motion vectors and other syntax elements, and then use the prediction information to generate predictive blocks for the current video block to be decoded. For example, motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra-prediction or inter-prediction) used to encode the video blocks of the video frame, the inter-prediction frame type (e.g., B or P), configuration information for one or more of the reference frame lists for the frame, the motion vectors of each inter-predictively coded video block in the frame, the inter-prediction state of each inter-predictively coded video block of the frame, and other information for decoding the video blocks in the current video frame.

[0055] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as flags, to determine that the current video block was predicted using an intra BC mode, configuration information of the video blocks of the frame that are within the reconstructed region and that should be stored in the DPB 92, block vectors of each intra BC predicted video block of the frame, the intra BC prediction state of each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.

[0056] Motion compensation unit 82 may also perform the interpolation using an interpolation filter such as that used to calculate sub-integer pixel interpolated values ​​of a reference block during encoding of the video block by video encoder 20. In this case, motion compensation unit 82 may determine the interpolation filter used by video encoder 20 from the received syntax element and generate the predictive block using the interpolation filter.

[0057] An inverse quantizer 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoder 80 using the same quantization parameters calculated by video encoder 20 to determine the degree of quantization for each video block in a video frame. An inverse transform processor 88 applies an inverse transform, such as an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct residual blocks in the pixel domain.

[0058] After motion compensation unit 82 or intra BC unit 85 generates a predictive block for the current video block based on the vectors and other syntax elements, summer 90 reconstructs a decoded video block for the current video block by summing the residual block from inverse transform processor 88 with the corresponding predictive block generated by motion compensation unit 82 and intra BC unit 85. To further process the decoded video block, an in-loop filter (not shown) may be disposed between summer 90 and DPB 92. In-loop filtering, such as a deblocking filter, sample adaptive offset (SAO), and adaptive in-loop filter (ALF), may be applied to the reconstructed CU before being placed in the reference picture store. The decoded video block in a given frame is then stored in DPB 92, which stores reference frames used for subsequent motion compensation of the next video block. DPB 92 or a memory device separate from DPB 92 may also store decoded video for later presentation to a display device, such as display device 34 of FIG. 1 .

[0059] In a typical video coding process, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chrominance samples. SCr is a two-dimensional array of Cr chrominance samples. In other cases, a frame may be black and white and therefore include only one two-dimensional array of luma samples.

[0060] As shown in FIG. 4A, video encoder 20 (more specifically, divider 45) generates a coded representation of a frame by first dividing the frame into a set of coding tree units (CTUs). A video frame may include an integer number of CTUs sequentially ordered in raster scan order from left to right and top to bottom. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, which may be one of 128×128, 64×64, 32×32, and 16×16. However, it should be noted that the present application is not necessarily limited to a particular size. As shown in FIG. 4B, each CTU may include one coding tree block (CTB) consisting of luma samples, a corresponding coding tree block consisting of two chrominance samples, and syntax elements used to encode the samples in the coding tree block. The syntax elements describe the characteristics of various types of units of coding blocks of pixels and how a video sequence may be reconstructed at video decoder 30, including inter- or intra-prediction, intra-prediction mode, motion vectors, and other parameters. For black and white pictures or pictures with three distinct color planes, a CTU may include a single coding tree block and syntax elements used to encode the samples of the coding tree block. A coding tree block may be an NxN block of samples.

[0061] To achieve better performance, video encoder 20 may recursively perform tree partitioning, such as binary-tree partitioning, ternary-tree partitioning, quad-tree partitioning, or a combination thereof, on the coding tree blocks of a CTU to divide the CTU into smaller coding units (CUs). As shown in FIG. 4C , a 64×64 CTU 400 is first partitioned into four smaller CUs, each with a 32×32 block size. Among the four smaller CUs, CU 410 and CU 420 are each partitioned into four CUs with a 16×16 block size. Two 16×16 CUs, 430 and 440, are further partitioned into four CUs with an 8×8 block size. FIG. 4D illustrates a quadtree data structure showing the final result of the partitioning process of the CTU 400 as illustrated in FIG. 4C, with each leaf node of the quadtree corresponding to one CU of a respective size ranging from 32×32 to 8×8. Similar to the CTU illustrated in FIG. 4B, each CU may include a coding block (CB) of luma samples, two corresponding coding blocks of chroma samples of the same size frame, and syntax elements used to encode the samples of the coding block. In a monochrome picture or a picture with three distinct color planes, a CU may include a single coding block and syntax structures used to encode the samples of the coding block. Note that the quadtree partitioning illustrated in FIGS. 4C and 4D is for illustrative purposes only; a CTU may be partitioned into CUs based on quadtree, ternary, or binary tree partitioning to suit various local characteristics. In the composite tree structure, one CTU is divided by a quadtree structure, and the leaf CU of each quadtree can be further divided by a binary tree structure and a ternary tree structure. As shown in Figure 4E, there are five division types: 4-way division, horizontal 2-way division, vertical 2-way division, horizontal 3-way division, and vertical 3-way division.

[0062] In some embodiments, video encoder 20 may further divide a coding block of a CU into one or more M×N prediction blocks (PBs). A prediction block is a rectangular (square or non-square) block of samples to which uniform (inter or intra) prediction is applied. A prediction unit (PU) of a CU may include a prediction block of luma samples, two corresponding prediction blocks of chroma samples, and syntax elements used to predict the prediction block. In a monochrome picture or a picture with three separate color planes, a PU may include a single prediction block and syntax structures used to predict the prediction block. Video encoder 20 may generate predicted luma, Cb and Cr blocks for luma, and Cb and Cr prediction blocks for each PU of a CU.

[0063] Video encoder 20 may use intra prediction or inter prediction to generate the predictive blocks for a PU. If video encoder 20 uses intra prediction to generate the predictive blocks for a PU, video encoder 20 may generate the predictive blocks for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate the predictive blocks for the PU, video encoder 20 may generate the predictive blocks for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0064] After generating a predictive luma block, a predictive Cb block, and a predictive Cr block for one or more PUs in a CU, video encoder 20 may generate a luma residual block for the CU by subtracting the predictive luma block of the CU from the original luma coding block of the CU, such that each sample in the luma residual block of the CU indicates a difference between a luma sample in one of the predictive luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, video encoder 20 may generate a Cb residual block and a Cr residual block of the CU, respectively, such that each sample in the Cb residual block of the CU indicates a difference between a Cb sample in one of the predictive Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate a difference between a Cr sample in one of the predictive Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0065] Moreover, as shown in FIG. 4C , video encoder 20 uses quadtree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks. A transform block is a rectangular (square or non-square) block of samples to which the same transform is applied. A transform unit (TU) of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements used to predict the transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the CU's luma residual block. The Cb transform block may be a sub-block of the CU's Cb residual block. The Cr transform block may be a sub-block of the CU's Cr residual block. In monochrome pictures or pictures with three separate color planes, a TU may include a single transform block and syntax structures used to transform the transform block samples.

[0066] Video encoder 20 may apply one or more transforms to a luma transform block of a TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficients may be scalar quantities. Video encoder 20 may apply one or more transforms to a Cb transform block of the TU to generate a Cb coefficient block for the TU. Video encoder 20 may apply one or more transforms to a Cr transform block of the TU to generate a Cr coefficient block for the TU.

[0067] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process by which transform coefficients are quantized to somehow reduce the amount of data used to represent the transform coefficients, resulting in further compression. After quantizing the coefficient block, the video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform context-adaptive binary arithmetic coding (CABAC) on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream including a series of bits forming a representation of the coded frame and associated data, which may be stored on a recording device 32 or transmitted to a destination device 14.

[0068] After receiving the bitstream generated by video encoder 20, video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. Video decoder 30 may reconstruct frames of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing video data is generally the reverse of the encoding process performed by video encoder 20. For example, video decoder 30 may perform an inverse transform on coefficient blocks associated with TUs of the current CU to reconstruct residual blocks associated with the TUs of the current CU. Video decoder 30 also reconstructs coding blocks of the current CU by adding samples of predictive blocks for PUs of the current CU to samples of transform blocks of corresponding TUs of the current CU. Video decoder 30 may reconstruct a frame after reconstructing coding blocks for each CU of the frame.

[0069] As mentioned above, video coding achieves video compression primarily using two modes: intra-frame prediction (i.e., intra-prediction) and inter-frame prediction (i.e., inter-prediction). Palette-based coding is another coding method adopted by many video coding standards. Palette-based coding is particularly suitable for encoding content generated on a screen, in which a video coder (e.g., video encoder 20 or video decoder 30) forms a palette table of colors to represent video data of a given block. The palette table includes the most dominant (e.g., frequently used) pixel values ​​in the given block. Pixel values ​​that are not frequently represented in the video data of a given block are either not included in the palette table or are included in the palette table as avoided colors.

[0070] Each entry in the palette table contains an index for a corresponding pixel value in the palette table. The palette index for a sample in a block may be coded to indicate the entry in the palette table used to predict or reconstruct the sample. This palette mode begins with the process of generating a palette predictor for the first block of a picture, slice, tile, or such grouping of video blocks. As described below, palette predictors for subsequent video blocks are generally generated by updating a previously used palette predictor. For illustrative purposes, it is assumed that the palette predictor is defined at the picture level. In other words, a picture may contain multiple coded blocks, each with its own palette table, but there is one palette predictor for the entire picture.

[0071] To reduce the number of bits required to signal palette entries in a video bitstream, a video decoder may utilize a palette predictor to determine new palette entries for a palette table used to reconstruct a video block. For example, the palette predictor may include palette entries from a previously used palette table, or may be initialized with a most recently used palette table by including all entries from the most recently used palette table. In some embodiments, the palette predictor may include fewer than all entries from the most recently used palette table and then incorporate some entries from other previously used palette tables. The size of the palette predictor may be the same as, larger than, or smaller than the size of the palette tables used to encode different blocks. In one example, the palette predictor is implemented as a first-in-first-out (FIFO) table containing 64 palette entries.

[0072] To generate a palette table for a block of video data from the palette predictor, the video decoder may receive a one-bit flag for each input of the palette predictor from the encoded video bitstream. The one-bit flag may have a first value (e.g., binary 1) indicating that the associated input of the palette predictor is included in the palette table or a second value (e.g., binary 0) indicating that the associated input of the palette predictor is not included in the palette table. If the size of the palette predictor is larger than the palette table used for the block of video data, the video decoder may stop receiving further flags once the maximum size of the palette table is reached.

[0073] In some embodiments, some entries in the palette table may be directly signaled in the coded video bitstream rather than being determined using a palette predictor. For such entries, the video decoder may receive three separate m-bit values ​​from the coded video bitstream indicating pixel values ​​for the luma component and two chroma components associated with the entry, where m represents the bit depth of the video data. While multiple m-bit values ​​are required for directly signaled palette entries, palette entries derived from a palette predictor require only a one-bit flag. Thus, signaling some or all of the palette entries using a palette predictor can significantly reduce the number of bits required to signal new palette table entries, thereby improving the overall coding efficiency of palette mode coding.

[0074] In many cases, the palette predictor for a block is determined based on the palette table used to code one or more previously coded blocks. However, when coding the first coding tree unit in a picture, slice, or tile, the palette table of the previously coded block may not be available. Therefore, it is not possible to generate a palette predictor using entries in the previously used palette table. In such cases, a set of palette predictor initializers, values ​​used to generate a palette predictor when the previously used palette table is unavailable, may be signaled in a sequence parameter set (SPS) and / or a picture parameter set (PPS). An SPS generally refers to a syntactic structure of syntax elements that fits into a series of consecutive coded video pictures, called a coded video sequence (CVS), as determined by the content of syntax elements found in a PPS referenced by syntax elements found in each slice segment header. A PPS generally refers to a syntactic structure of syntax elements that fits into one or more individual pictures within a CVS, as determined by syntax elements found in each slice segment header. Therefore, an SPS is generally considered a higher level syntax structure than a PPS, meaning that the syntax elements contained in an SPS generally change less frequently and fit a larger portion of the video data compared to the syntax elements contained in a PPS.

[0075] 5A-5B are block diagrams illustrating examples of applying adaptive color space conversion (ACT) techniques to convert residuals between RGB color space and YCgCo color space in accordance with some implementations of the present disclosure.

[0076] In the HEVC screen content coding extension, ACT is applied to adaptively transform the residual from one color space (e.g., RGB) to another color space (e.g., YCgCo) such that the correlation (e.g., redundancy) between the three color components (e.g., R, G, and B) is significantly reduced in the YCgCo color space. Furthermore, in existing ACT designs, the adaptation of different color spaces is performed at the transform unit (TU) level by signaling one flag, tu_act_enabled_flag, for each TU. If the flag tu_act_enabled_flag is 1, it indicates that the residual of the current TU is coded in the YCgCo space; otherwise (i.e., the flag is 0), it indicates that the residual of the current TU is coded in the original color space (i.e., without color space conversion). In addition, different color space conversion formulas are applied depending on whether the current TU is coded in a lossless mode or a lossy mode. Specifically, the forward and reverse color space conversion formulas for the lossy mode between the RGB color space and the YCgCo color space are defined in FIG. 5A.

[0077] For the lossless mode, a lossless version of the RGB to YCgCo conversion (also known as YCgCo-LS) is used, which is implemented based on the lifting operation depicted in Figure 5B and the associated description.

[0078] As shown in Figure 5A, the forward and inverse color transform matrices used in lossy mode are not normalized. Therefore, the YCgCo signal after the color transform is applied is smaller than the original signal. To compensate for the magnitude reduction caused by the forward color transform, an adjusted quantization parameter is applied to the residual in the YCgCo domain. Specifically, when a color space transform is applied, the QP used to quantize the residual in the YCgCo domain is Y , Q.P. Cg and QP Co are set to QP-5, QP-5 and QP-3, respectively, where QP is the quantization parameter used in the original color space.

[0079] FIG. 6 is a block diagram of applying a technique of Luminance Mapping with Chrominance Scaling (LMCS) in an example video data decoding process, in accordance with some implementations of the present disclosure.

[0080] In VVC, LMCS is used as a new coding tool applied before in-loop filters (e.g., deblocking filters, SAO, and ALF). Generally, LMCS has two main modules: 1) in-loop mapping of luma components based on an adaptive piecewise linear model, and 2) luma-dependent chroma residual scaling. FIG. 6 shows a modified decoding process in which LMCS is applied. In FIG. 6, the decoding modules processed in the mapped domain include an entropy decoding module, an inverse quantization module, an inverse transform module, a luma intra prediction module, and a luma sample reconstruction module (i.e., summation of luma prediction samples and luma residual samples). The decoding modules processed in the original (i.e., unmapped) domain include a motion compensation prediction module, a chroma intra prediction module, a chroma sample reconstruction module (i.e., summation of chroma prediction samples and chroma residual samples), and all in-loop filter modules such as a deblocking module, an SAO module, and an ALF module. The new available modules introduced by LMCS include a forward mapping of luma samples module 610 , a backward mapping of luma samples module 620 , and a chroma residual scaling module 630 .

[0081] The in-loop mapping of LMCS can adjust the dynamic range of the input signal to improve coding efficiency. The in-loop mapping of luma samples in existing LMCS designs is built on two mapping functions: one forward mapping function FwdMap and one corresponding inverse mapping function InvMap. The forward mapping function is signaled from the encoder to the decoder using a piecewise linear model with 16 equal-sized parts. The inverse mapping function can be derived directly from the forward mapping function and therefore does not need to be signaled.

[0082] The parameters of the luminance mapping model are signaled at the slice level. A presence flag is first signaled to indicate whether a luminance mapping model should be signaled for the current slice. If a luminance mapping model exists for the current slice, the corresponding piecewise linear model parameters are further signaled. In addition, another LMCS control flag is signaled at the slice level to enable / disable LMCS for the slice.

[0083] The chroma residual scaling module 630 is designed to compensate for the interaction of quantization precision between the luma signal and its corresponding chroma signal when in-loop mapping is applied to the luma signal. Whether chroma residual scaling is enabled or disabled for the current slice is also signaled in the slice header. If luma mapping is enabled, an additional flag is signaled to indicate whether luma-dependent chroma residual scaling is applied. When luma mapping is not used, luma-dependent chroma residual scaling is always disabled and no additional flag is required. Additionally, chroma residual scaling is always disabled for CUs containing four or fewer chroma samples.

[0084] FIG. 7 is a block diagram illustrating an example video decoding process in which a video decoder implements an inverse adaptive color space conversion (ACT) technique, in accordance with some implementations of this disclosure.

[0085] Similar to the ACT design in HEVC SCC, ACT in VVC converts the intra / inter prediction residual of one CU in 4:4:4 chroma format from the original color space (e.g., RGB color space) to the YCgCo color space. As a result, redundancy among the three color components can be reduced for better coding efficiency. FIG. 7 illustrates a decoding flow diagram showing how inverse ACT is applied by adding an inverse ACT module 710 to a VVC configuration. When processing a CU coded with ACT enabled, entropy decoding, inverse quantization, and an inverse DCT / DST-based transform are first applied to the CU. Then, as illustrated in FIG. 7, inverse ACT is invoked to convert the decoded residual from the YCgCo color space to the original color space (e.g., RGB or YCbCr). In addition, because ACT is not normalized in lossy mode, a QP adjustment of (-5, -5, -3) is applied to the Y, Cg, and Co components to compensate for the magnitude change of the converted residual.

[0086] In some embodiments, the ACT method reuses the same ACT core transform of HEVC to perform color conversion between different color spaces. Specifically, two different versions of the color transform are applied depending on whether the current CU is lossy or lossy in its encoding. Forward and inverse color transforms in the lossy case use the lossy YCgCo transform matrix as shown in FIG. 5A. In the lossless case, the lossless color transform YCgCo-LS is applied as shown in FIG. 5B. Furthermore, unlike existing ACT designs, the following modifications are introduced to the ACT scheme to handle its interaction with other coding tools in the VVC standard:

[0087] For example, since the residual of one CU in HEVC may be split into multiple TUs, a separate ACT control flag is signaled for each TU to indicate whether or not a color space transformation needs to be applied. However, as described above in connection with FIG. 4E, in VVC, a quadtree nesting two-partition structure and three-partition structure is applied to replace the concept of multiple partition types, thereby eliminating the separate CU, PU, ​​and TU partitions in HEVC. This means that in most cases, if the maximum supported transform size is not smaller than the width or height of one component of the CU, a single CU leaf node is also used as the unit of prediction and transform processing without further partitioning. Based on such a partition structure, ACT can be adaptively enabled / disabled at the CU level. Specifically, for each CU, a flag cu_act_enabled_flag is signaled to select between the original color space and the YCgCo color space for encoding the residual of the CU. If this flag is 1, it indicates that all of the residuals of the TUs within the CU are encoded in the YCgCo color space. Otherwise, if the flag cu_act_enabled_flag is 0, all residuals of the CU are coded in the original color space.

[0088] In some embodiments, there are various scenarios for disabling ACT. When ACT is enabled for a CU, it needs to access the residuals of all three components to perform color space conversion. However, the VVC design cannot guarantee that each CU always contains information for all three components. According to an embodiment of the present disclosure, if a CU does not contain information for all three components, ACT is forced to be disabled.

[0089] In some embodiments, first, when a separate tree partitioning structure is applied, luma samples and chroma samples within one CTU are partitioned into CUs based on the separate partitioning structure. As a result, a CU in the luma partitioning tree contains only the coding information of the luma component, and a CU in the chroma partitioning tree contains only the coding information of the two chroma components. According to the current VVC, switching between the separate tree partitioning structure and the separate tree partitioning structure is performed at the slice level. Therefore, according to an embodiment of the present disclosure, when a separate tree is applied to a slice, ACT is always disabled for all CUs (both luma CUs and chroma CUs) within this slice without signaling the ACT flag, and the ACT flag is inferred to be zero instead.

[0090] Second, in some embodiments, when ISP mode (described further below) is enabled, TU partitioning is applied only to luma samples, and chroma samples are coded without further partitioning into multiple TUs. Assuming the number of ISP subpartitions (i.e., TUs) for one intra CU is N, according to the current ISP design, only the last TU contains both luma and chroma components, and the first N-1 ISP TUs consist of only luma components. According to one embodiment of the present disclosure, ACT is disabled in ISP mode. There are two ways to disable ACT for ISP mode. In the first method, the ACT enable / disable flag (i.e., cu_act_enabled_flag) is signaled before signaling the ISP mode syntax. In such a case, when the flag cu_act_enabled_flag is 1, ISP mode is not signaled in the bitstream and is always inferred to be zero (i.e., off). In the second method, ISP mode signaling is used to avoid signaling the ACT flag. Specifically, in this method, the ISP mode is signaled prior to the flag cu_act_enabled_flag. When the ISP mode is selected, the flag cu_act_enabled_flag is not signaled and is inferred to be zero. Otherwise (if the ISP mode is not selected), the flag cu_act_enabled_flag is still signaled to adaptively select a color space for residual coding of the CU.

[0091] In some embodiments, when the luma and chroma partitioning structure is misaligned, in addition to forcibly disabling ACT for the CU, LMCS for the CU to which ACT is applied is disabled. In one embodiment, when a CU selects the YCgCo color space to encode its residual, both luma mapping and chroma residual scaling are disabled (i.e., ACT is unity). In another embodiment, when ACT is enabled for a CU, only chroma residual scaling is disabled, and luma mapping may still be applied to adjust the dynamic range of the output luma samples. In a final embodiment, both luma mapping and chroma residual scaling are enabled for a CU that applies ACT for encoding its residual. There may be several ways to enable chroma residual scaling for a CU to which ACT is applied. In one method, chroma residual scaling is applied before inverse ACT in decoding. This method means that when ACT is applied, chroma residual scaling is applied to the chroma residual in the YCgCo domain (i.e., Cg residual and Co residual). In another method, chroma residual scaling is applied after inverse ACT. Specifically, in the second method, chrominance scaling is applied to the residual in the original color space. Assuming the input video is captured in RGB format, this means that chrominance residual scaling is applied to the residuals of the B and R components.

[0092] In some embodiments, a sequence parameter set (SPS), such as sps_act_enabled_flag, is added to a syntax element to indicate whether ACT is enabled at the sequence level. In addition, when color space conversion is applied to video content in which the luma and chroma components have the same resolution (e.g., 4:4:4 chroma format), a bitstream conformance requirement needs to be added so that ACT can only be enabled for the 4:4:4 chroma format. Table 1 shows the modified SPS syntax table with the above syntax added.

[0093] [Table 1]

[0094] Specifically, sps_act_enabled_flag equals 1 to indicate that ACT is enabled, and sps_act_enabled_flag equals 0 to indicate that ACT is disabled, such that the flag cu_act_enabled_flag is not signaled to the CU referencing the SPS and is inferred to be 0. When ChromaArrayType is not 3, it is a bitstream conformance requirement that the value of sps_act_enabled_flag be 0.

[0095] In another embodiment, instead of always signaling sps_act_enabled_flag, the signaling of the flag is conditional on a chrominance type input signal. Specifically, if ACT can only be applied when the luma and chrominance components are of the same resolution, then the flag sps_act_enabled_flag is signaled only when the input video is captured in 4:4:4 chrominance format. The modified SPS syntax table with such a change would be as follows:

[0096] [Table 2]

[0097] In some embodiments, syntax design specifications for decoding video data using ACT are shown in the table below.

[0098] [Table 3-1] [Table 3-2] [Table 3-3] [Table 3-4] [Table 3-5] [Table 3-6] [Table 3-7] [Table 3-8]

[0099] The flag cu_act_enabled_flag, when set to 1, indicates that the residual of the coding unit is coded in the YCgCo color space, and when set to 0, indicates that the residual of the coding unit is coded in the original color space (e.g., RGB or YCbCr). The flag cu_act_enabled_flag is inferred to be 0 when not present.

[0100] In some embodiments, ACT signaling is conditional on the coded block flag (CBF). As shown in Figures 5A and 5B, ACT may only operate on the decoded residual if the current CU contains at least one non-zero coefficient. If all of the coefficients obtained from entropy decoding are zero, the reconstructed residual is the same whether or not inverse ACT is applied. For inter and intra block copy (IBC) modes, information about whether a CU contains non-zero coefficients is indicated by the coded block flag (CBF) of the CU root, i.e., cu_cbf. When the flag is 1, it means that the residual syntax element is present in the bitstream for the current CU. Otherwise (i.e., the flag is 0), it means that the residual syntax element of the current CU is not signaled, and all of the residual of the CU is inferred to be zero. Therefore, for inter and IBC modes, it is proposed to signal only the flag cu_act_enabled_flag when the root CBF flag cu_cbf of the current CU is 1. Otherwise (i.e., if the flag cu_cbf is 0), the flag cu_act_enabled_flag is not signaled and ACT is always disabled for decoding the residual of the current CU. On the other hand, unlike the inter and IBC modes, the root CBF flag is not signaled for the intra mode, i.e., the flag in cu_cbf cannot be used to condition on the presence of the flag cu_act_enabled_flag for intra CUs.

[0101] In some embodiments, the ACT flag is used to conditionally enable / disable CBF signaling for the luma component when ACT is applied to an intra CU. Specifically, when an intra CU uses ACT, the decoder always assumes that at least one component contains a non-zero coefficient. Thus, if ACT is enabled for an intra CU and there is no non-zero residual in any transform block except the last one, the CBF for that last transform block is inferred to be unsignaled. For an intra CU that contains only one TU, this means that if the CBFs for the two chroma components (indicated by tu_cbf_cb and tu_cbf_cr) are zero, the CBF flag of the last component (i.e., tu_cbf_luma) is always inferred to be unsignaled. In one embodiment, such luma CBF inference rules are enabled only for intra CUs that contain only a single TU for residual coding.

[0102] 8A and 8B are block diagrams illustrating an example video decoding process in which a video decoder performs inverse adaptive color space transformation (ACT) and chroma residual scaling techniques in accordance with some implementations of this disclosure. In some embodiments, the video bitstream is encoded using both ACT (e.g., inverse ACT 710 in FIG. 7) and chroma residual scaling (e.g., chroma residual scaling 630 in FIG. 6). In some other embodiments, the video bitstream is encoded using only chroma residual scaling without ACT, thereby making inverse ACT 710 unnecessary.

[0103] 8A illustrates an embodiment in which the video coder performs chroma residual scaling 630 before the inverse ACT 710. As a result, the video coder performs luma mapping in the color space transformed domain using chroma residual scaling 630. For example, assuming the input video is captured in RGB format and transformed to the YCgCo color space, the video coder performs chroma residual scaling 630 on the chroma residuals Cg and Co according to the luma residual Y in the YCgCo color space.

[0104] In some embodiments, when chroma residual scaling is applied in the YCgCo domain as shown in FIG. 8A , the corresponding chroma residual samples provided to the chroma residual scaling module are in the YCgCo domain. Correspondingly, the chroma CBF flags of the current block, i.e., tu_cb_cbf and tu_cr_cbf, may be used to indicate whether there are non-zero chroma residual samples that need to be scaled. In such cases, to avoid unnecessary chroma scaling in the decoder, an additional check condition for the chroma CBF flags may be added to ensure that chroma residual scaling is invoked only when at least one of the two chroma CBF flags is non-zero.

[0105] 8B illustrates an alternative embodiment in which the video coder performs chroma residual scaling 630 after the inverse ACT 710. As a result, the video coder performs luma mapping in the original color space domain using chroma residual scaling 630. For example, assuming the input video is captured in RGB format, the video coder applies chroma residual scaling to the B and R components.

[0106] In some embodiments, when chroma residual scaling is applied in the RGB domain as shown in FIG. 8B , the corresponding chroma residual samples provided to the chroma residual scaling module are in the RGB domain. In this case, the chroma CBF flag cannot indicate whether the corresponding B and R residual samples are all zero. Therefore, in this method, when ACT is applied to one CU, the above two chroma CBF flags cannot be used to determine whether chroma residual scaling should be avoided. When ACT is not applied to one CU, the above two chroma CBF flags in the YCgCo space can still be used to determine whether chroma residual scaling can be avoided.

[0107] In some embodiments, the following are modifications to the current VVC specification when enforcement signaling conditions regarding checking the ACT flag at the CU level are applied to chroma residual scaling at the decoder.

[0108] 8.7.5.3 Picture reconstruction using a luma-dependent chroma residual scaling process on chroma samples

[0109] - recSamples[xCurr+i][yCurr+j] is set equal to Clipl(predSamples[i][j]+resSamples[i][j]) if one or more of the following conditions are true: - ph_chroma_residual_scale_flag is 0. - sh_lmcs_used_flag is 0. - nCurrSw*nCurrSh is 4 or less. - tu_cb_coded_flag[xCurr][yCurr] is 0, tu_cr_coded_flag[xCurr][yCurr] is 0, and cu_act_enabled_flag[xCurr*SubWidthC][yCurr*SubHeightC] is 0.

[0110] - Otherwise, the following is relevant: - The current luminance position (xCurrY, yCurrY) is derived as follows: (xCurrY,yCurrY)=(xCurr*SubWidthC,yCurr*SubHeightC)(1234) - Luma position (xCuCb, yCuCb) is specified as the top-left luma sample position of the coding unit containing the luma sample at (xCurrY / sizeY*sizeY, yCurrY / sizeY*sizeY). The variables availL and availT are derived as follows: - The derivation process for determining neighbor block availability as specified in Section 6.4.4 is called with position (xCurr,yCurr) set equal to (xCuCb,yCuCb), neighbor luminance position (xNbY,yNbY) set equal to (xCuCb-1,yCuCb), checkPredModeY set to FALSE, and cIdx set to 0 as input, and the output is assigned to availL. - The derivation process for determining neighbor block availability as specified in Section 6.4.4 is called with position (xCurr,yCurr) set equal to (xCuCb,yCuCb), neighbor luminance position (xNbY,yNbY) set equal to (xCuCb,yCuCb-1), checkPredModeY set to FALSE, and cIdx set to 0 as input, and the output is assigned to availT.

[0111] The variable currPic specifies the array of reconstructed luma samples in the current picture.

[0112] - For the derivation of the variable varScale, the following sequence of steps applies:

[0113] 1. The variable invAvgLuma is derived as follows: The array recLuma[i] and the variable cnt for i=0..(2*sizeY-1) are derived as follows: The variable cnt is set to 0. - When availL is TRUE, the array recLuma[i], for i=0..sizeY-1, is set equal to currPic[xCuCb-1][Min(yCuCb+i,pps_pic_height_in_luma_samples-1)], for i=0..sizeY-1, and cnt is set equal to sizeY. - When availT is TRUE, the array recLuma[cnt+i], for i=0..sizeY-1, is set equal to currPic[Min(xCuCb+i,pps_pic_width_in_luma_samples-1)][yCuCb-1], for i=0..sizeY-1, and cnt is set equal to (cnt+sizeY). The variable invAvgLuma is derived as follows: - If cnt is greater than 0, the following matches:

number

[0114] 2. The variable idxYInv is derived by invoking the identification of the piecewise function index process for the luma samples as specified in Section 8.8.2.3, with the variable lumaSample as input set equal to invAvgLuma and idxYInv as the output.

[0115] 3. The variable varScale is derived as follows: varScale=ChromaScaleCoeff[idxYInv](1237)

[0116] FIG. 9 is a flowchart 900 illustrating an exemplary process by which a video decoder (e.g., video decoder 30) decodes video data by conditionally performing a chroma residual scaling operation on the residual of a coding unit, according to some implementations of the present disclosure.

[0117] Video decoder 30 receives from the bitstream a plurality of syntax elements associated with the coding unit, including a first coded block flag (CBF) for residual samples of a first chrominance component of the coding unit, a second CBF for residual samples of a second chrominance component of the coding unit, and a third syntax element indicating whether an adaptive color transform (ACT) is applied to the coding unit (910).

[0118] Video decoder 30 then determines whether to perform chroma residual scaling on the residual samples of the first and second chroma components in accordance with the first CBF, the second CBF, and the third syntax element (920).

[0119] In response to determining to perform chrominance residual scaling on the residual samples of at least one of the first and second chrominance components, video decoder 30 further scales the residual samples of at least one of the first and second chrominance components based on the corresponding scaling (930).

[0120] Video decoder 30 further reconstructs the samples of the coding unit using the luma and chroma residual samples after scaling (940).

[0121] In some embodiments, determining whether to perform chroma residual scaling on residual samples of the first and second chroma components according to the first CBF, the second CBF, and the third syntax element (920) comprises determining, in response to a determination by the third syntax element that ACT is applied to the coding unit, to apply an inverse ACT to luma residual samples and chroma residual samples of the coding unit, and after the inverse ACT, to perform chroma residual scaling on residual samples of the first and second chroma components regardless of the first CBF and the second CBF.

[0122] In some embodiments, applying an inverse transform to the residual samples of the coding unit occurs before applying the inverse ACT.

[0123] In some embodiments, applying inverse quantization to the residual samples of the coding unit occurs before applying the inverse transform.

[0124] In some embodiments, determining whether to perform chroma residual scaling on residual samples of the first and second chroma components in accordance with the first CBF, the second CBF, and the third syntax element (920) comprises, in response to a determination by the third syntax element that ACT is not applied to the coding unit, determining to perform chroma residual scaling on residual samples of the chroma components of the coding unit when the CBFs associated with the chroma components are non-zero, or determining to avoid chroma residual scaling on residual samples of the chroma components of the coding unit when the CBFs associated with the chroma components are zero.

[0125] In some embodiments, the first CBF is zero when no non-zero chroma residual samples are present in the residual samples of the first chroma component, and in some embodiments, the second CBF is zero when no non-zero chroma residual samples are present in the residual samples of the second chroma component.

[0126] In some embodiments, the corresponding scaling parameters are derived from the reconstructed luma samples at the collocated positions.

[0127] In some embodiments, the input to the inverse ACT is in YCbCo space.

[0128] In some embodiments, the output to the inverse ACT is in RGB space.

[0129] In some embodiments, a method for decoding a video block coded using chroma residual scaling comprises receiving from a bitstream a plurality of syntax elements associated with a coding unit, the syntax elements including a first coded block flag (CBF) for residual samples of a first chroma component of the coding unit, a second CBF for residual samples of a second chroma component of the coding unit, and a third syntax element indicating whether an adaptive color transform (ACT) is applied to the coding unit; determining whether to perform chroma residual scaling on the residual samples of the first and second chroma components according to the first CBF and the second CBF; in response to a determination to perform chroma residual scaling on the residual samples of at least one of the first and second chroma components, scaling the residual samples of at least one of the first and second chroma components based on corresponding scaling parameters; and in response to a determination by the third syntax element that ACT is applied to the coding unit, applying inverse ACT to the luma residual samples and the chroma residual samples of the coding unit after scaling. In some embodiments, applying an inverse transform to the residual samples of the coding unit occurs before performing chroma residual scaling. In some embodiments, applying inverse quantization to the residual samples of the coding unit occurs before applying the inverse transform.

[0130] In some embodiments, determining whether to perform chrominance residual scaling on residual samples of the first and second chrominance components according to the first and second CBFs comprises determining to perform chrominance residual scaling on residual samples of the chrominance components of the coding unit when the CBFs associated with the chrominance components are not zero, and determining to avoid chrominance residual scaling on residual samples of the chrominance components of the coding unit when the CBFs associated with the chrominance components are zero.

[0131] Further embodiments also include various subsets of the above embodiments combined or otherwise rearranged in various other embodiments.

[0132] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable media corresponding to tangible media, such as data storage media, or communication media, including any medium that facilitates transfer of a computer program from one place to another, for example via a communication protocol. As such, computer-readable media may generally correspond to (1) tangible, non-transitory computer-readable media or (2) communication media, such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures to implement the embodiments described herein. A computer program product may include computer-readable media.

[0133] The terminology used in describing the embodiments herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of the claims. As used in describing the embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The term "and / or," as used herein, will also be understood to refer to and include any and all possible combinations of one or more of the associated listed items. It will be further understood that the terms "comprise" and / or "comprising," when used herein, specify the presence of stated features, elements, and / or components, but do not exclude the presence or addition of one or more other features, elements, components, and / or groups thereof.

[0134] Although terms such as "first," "second," and the like may be used herein to describe various elements, it should be understood that these elements should not be limited by these terms. These terms are used merely to distinguish one element from another. For example, a first electrode may be referred to as a second electrode, and similarly, a second electrode may be referred to as a first electrode, without departing from the scope of the embodiments. The first electrode and the second electrode are both electrodes, but are not the same electrode.

[0135] The description in this application has been presented for purposes of illustration and description and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications, variations, and alternative embodiments will be apparent to those skilled in the art having the benefit of the teachings presented in the foregoing description and the associated drawings. The embodiments have been chosen and described to best explain the principles and practical applications of the invention, to enable others skilled in the art to understand the invention in terms of various embodiments, and to best utilize the basic principles and various embodiments with various modifications as suited to the particular uses contemplated. It is therefore to be understood that the scope of the claims is not limited to the particular examples of the disclosed embodiments and modifications thereof, but that other embodiments are contemplated as being within the scope of the appended claims.

Claims

1. 1. A method of video encoding, comprising: determining whether to perform chrominance residual scaling on at least one residual sample of a first and second chrominance component of a coding unit according to at least one of a plurality of conditions, the plurality of conditions including: whether a quantized transform coefficient of the first chrominance component includes a non-zero chrominance quantized transform coefficient; whether a quantized transform coefficient of the second chrominance component includes a non-zero chrominance quantized transform coefficient; and whether an adaptive color transform (ACT) is applied to the coding unit, the coding unit being associated with a predetermined partitioning scheme including: partitioning into four, partitioning into three horizontally, partitioning into three vertically, partitioning into two horizontally, or partitioning into two vertically; In response to determining to perform the chrominance residual scaling on the residual samples of the at least one of the first and second chrominance components, scaling the residual samples of the at least one of the first and second chrominance components based on a corresponding scaling parameter; reconstructing chrominance samples of the coding unit using the chrominance residual samples after scaling; encoding at least one of a first coded block flag (CBF) of the first chrominance component of the coding unit, a second CBF of the second chrominance component of the coding unit, and a third syntax element indicating whether ACT is applied to the coding unit into a video bitstream; Equipped with in response to determining that the ACT is applied to the coding unit, an inverse ACT is applied to the luma residual samples and the chroma residual samples of the coding unit, the input to the inverse ACT being in YCgCo space and the output to the inverse ACT being in RGB space; The step of determining whether to perform chrominance residual scaling on at least one residual sample of the first and second chrominance components of the coding unit includes: in response to determining that the ACT is applied to the coding unit, determining to perform the chrominance residual scaling on residual samples of the first and second chrominance components after the inverse ACT, regardless of whether the quantized transform coefficients of the first chrominance component include non-zero chrominance quantized transform coefficients and whether the quantized transform coefficients of the second chrominance component include non-zero chrominance quantized transform coefficients.

2. 2. The method of claim 1, wherein the step of determining whether to perform chrominance residual scaling on residual samples of at least one of the first and second chrominance components of the coding unit comprises: In response to a determination by the third syntax element that the ACT does not apply to the coding unit, determining that the chrominance residual scaling is to be performed on the residual samples of one chrominance component when the quantized transform coefficients of the first CBF and the second CBF of the first and second chrominance components of the coding unit include non-zero chrominance quantized transform coefficients; determining not to perform the chrominance residual scaling on the residual samples of the one chrominance component of the coding unit when the quantized transform coefficients of the one chrominance component do not include any non-zero chrominance quantized transform coefficients.

3. 2. The method of claim 1, further comprising applying an inverse transform to transform coefficients of the coding unit before applying the inverse ACT.

4. The method of claim 3 , further comprising applying inverse quantization to the quantized transform coefficients of the coding unit before applying the inverse transform.

5. 10. The method of claim 1, When no non-zero chrominance quantized transform coefficients exist in the quantized transform coefficients of the first chrominance component, the first CBF is zero; The method, wherein the second CBF is zero when no non-zero chrominance quantized transform coefficients exist in the quantized transform coefficients of the second chrominance component.

6. The method of claim 1 , wherein the corresponding scaling parameters are derived from reconstructed luminance samples.

7. The method of claim 1 , wherein the first CBF, the second CBF, or the third syntax element is inferred to be zero when not present in the video bitstream.

8. 1. An electronic device, comprising: one or more processing units; a memory coupled to the one or more processing units; a plurality of programs stored in the memory; The plurality of programs, when executed by the one or more processing units, cause the electronic device to perform the method of any one of claims 1 to 7.

9. A computer program comprising a plurality of instructions for storing a bitstream, said bitstream comprising encoded data produced by a method according to any one of claims 1 to 7.

10. A method for transmitting a bitstream generated by a method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Methods and apparatus of video coding in 4:4:4 chroma format

    WO2021061794A1

  • Methods and apparatus of video coding in 4:4:4 chroma format

    WO2021072379A1