Method and apparatus of video coding in 4:4:4 color format
The method of conditionally applying chroma residual scaling with adaptive color transform in video coding standards addresses the inefficiencies in encoding 4:4:4 chrominance format by decorrelating color components, enhancing compression efficiency and maintaining high-fidelity video quality.
Patent Information
- Application Number
- JP2024099866
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-06-12
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-06-14
AI Technical Summary
Existing video coding standards, such as VVC, struggle with inefficient encoding of 4:4:4 chrominance format due to the lack of consideration for the correlation between the three color components, leading to suboptimal compression efficiency and increased data volume for high-fidelity video content.
Implementing a method for decoding video blocks that conditionally applies chroma residual scaling with an adaptive color transform (ACT) process, adjusting the encoding of chrominance components based on syntax elements to reduce redundancy and improve encoding efficiency.
Enhances encoding performance for 4:4:4 video by decorrelating color components, reducing redundancy, and improving compression efficiency while maintaining high-fidelity video quality.
Smart Images

Figure 2024120054000001
Abstract
Description
[Technical field]
[0001] Related Applications This application claims priority to U.S. Provisional Application No. 63 / 038,692, entitled “METHODS AND APPARATUS ON 4:4:4 VIDEO CODING,” filed June 12, 2020, 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, video streaming devices, etc. 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) standards. 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 predefined minimum CU size is reached. Each CU (also named leaf CU) contains one or more transform units (TU) and also includes one or more prediction units (PU). Each CU may be coded in either intra mode, inter mode, or intra block copy (IBC) mode. Video blocks in 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 in an inter-coded (P (forward predicted image) or B (bidirectionally predicted image)) slice in a video frame may use spatial prediction with respect to reference samples in neighboring blocks in the same video frame, or may use temporal prediction with respect to reference samples in other previous and / or future reference video frames.
[0003] Spatial or temporal prediction based on previously coded reference blocks, e.g., 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 referred to as a residual block or prediction error. Inter-coded blocks are coded according to motion vectors and residual blocks that point to reference blocks in a reference frame forming the predicted block. The process of determining a motion vector is generally referred to as motion prediction. Intra-coded blocks are coded according to an intra-prediction mode and a residual block. For further compression, the residual block may be transformed from the pixel domain to a transform domain, e.g., the frequency domain, resulting in 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 recording 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 connection. The electronic device then performs video decompression (the inverse process of video compression discussed above), e.g., by parsing the encoded video bitstream to obtain syntax elements from the bitstream, reconstructing digital video data from the encoded video bitstream into an 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 4K×2K or 8K×4K, the amount of video data to be encoded / decoded increases exponentially, which is a continuous effort on how to encode / decode video data more efficiently while maintaining the image quality of the decoded video data.
[0006] Certain video content, e.g., screen content video, is encoded in 4:4:4 chrominance format, where all three components (luminance and two chrominance components) have the same resolution. Although the 4:4:4 chrominance format contains more redundancy compared to the 4:2:0 and 4:2:2 chrominance formats (which are 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, during the development of the extension of HEVC screen content coding (SCC), an adaptive color space transformation (ACT) tool is employed to exploit the correlations between the three color components. Summary of the Invention
[0007] This application describes implementations relating to encoding and decoding 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, it is preferable to encode the video in the original space if high fidelity is desired for the decoded video signal, and the original color space, e.g., RGB video, is rich in information redundancy. Some inter-component encoding tools in the current VVC standard, e.g., 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 components are utilized 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 mainly focused on videos captured in 4:2:0 chrominance format. Therefore, to achieve a better complexity / performance tradeoff, many of those coding tools (e.g., position-dependent intra prediction combination (PDPC), multi-reference line (MRL), and sub-split prediction (ISP)) are only applicable to the luma component and are ineffective for the chroma component, or use different operations (e.g., interpolation filters applied to motion compensation prediction) for the luma and chroma components. However, a video signal in 4:4:4 chrominance format exhibits very different characteristics compared to 4:2:0 video. For example, the Cb / B and Cr / R components of 4:4:4 YCbCr and RGB videos exhibit richer color information and have higher frequency information (e.g., edges and textures) than the chroma components of 4:2:0 video. Due to such considerations, in VVC it may always be optimal 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 encoded with 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, the second CBF, and the third syntax element; 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 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 the 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 encoded with 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 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 processors, a memory, and a number of programs stored in the memory, which, when executed by the one or more processors, cause the electronic device to perform a 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 number of programs for execution by an electronic device having one or more processors, the programs, when executed by the one or more processors, 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 basic principles, with like reference numerals referring to corresponding parts. [Brief description 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. [Diagram 2] 1 is a block diagram illustrating an example video encoder according to some embodiments of the present disclosure. [Diagram 3] 1 is a block diagram illustrating an example video decoder according to some embodiments of the present disclosure. [Figure 4A] 2 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 this disclosure. [Figure 4B] 2 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 this disclosure. [Figure 4C] 2 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 this disclosure. [Figure 4D] 2 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 this disclosure. [Figure 4E] 2 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 this 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 RGB color space and 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 RGB color space and YCgCo color space in accordance with some implementations of the present disclosure. [Figure 6] FIG. 1 is a block diagram of an exemplary video data decoding process that applies a technique of luma mapping with chroma scaling (LMCS) in accordance with certain implementations of the present disclosure. [Figure 7] 1 is a block diagram illustrating an example video decoding process in which a video decoder implements a technique of inverse adaptive color space conversion (ACT) in accordance with certain implementations of the present disclosure. [Figure 8A] 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 certain implementations of the present disclosure. [Figure 8B] 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 certain implementations of the present disclosure. [Figure 9] 11 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 certain implementations of this disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[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 the understanding of the subject matter presented herein. However, it will be apparent to one 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 one skilled in the art that the subject matter presented herein may be practiced 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. In general, the main features of the techniques in this disclosure are summarized as follows:
[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 example 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, and the like. In some embodiments, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0021] In some embodiments, the destination device 14 may receive the encoded video data to be decoded over a link 16. The link 16 may comprise any type of communication medium or device capable of transferring the encoded video data from the source device 12 to the destination device 14. In one example, the link 16 may comprise a communication medium to enable the source device 12 to directly transmit the encoded video data to the destination device 14 in real time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to the destination device 14. The communication medium may comprise any wireless or wired communication medium, such as the radio frequency (RF) spectrum or one or more physical transmission paths. The communication 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 communication medium may include routers, switches, base stations, or other equipment that helps facilitate communication from the source device 12 to the 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 from recording device 32. The file server may be any type of computer capable of storing encoded video data and 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., DSL or cable modem), or a combination of both, suitable for accessing the 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 the 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 in general 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 a 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 according to 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 according to any of these current or future standards.
[0028] The video encoder 20 and the 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. Each of the video encoder 20 and the video decoder 30 may 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 example 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, the 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 coder 56. The prediction processor 41 further includes a motion estimator 42, a motion compensation unit 44, a partitioner 45, an intra prediction processor 46, and an intra block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantizer 58, an inverse transform processor 60, and an adder 62 for reconstructing video blocks. An in-loop filter, such as a deblocking filter (not shown), may be disposed between the adder 62 and the DPB 64 to filter block boundaries to remove block 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 the 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 the video data (e.g., in an intra-predictive or inter-predictive encoding 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 off-chip relative to those components.
[0032] As shown in FIG. 2, a partitioner 45 within the prediction processor 41 partitions the received video data into video blocks. This partitioning may include partitioning the video frame into slices, tiles, or other larger coding units (CUs) according to a predefined partitioning structure, such as a quadtree structure, associated with the video data. The video frame may be partitioned into a number of video blocks (or sets of video blocks referred to as tiles). The prediction processor 41 may select one of a number of possible predictive coding modes, such as one of a number of intra-predictive coding modes or one of a number of inter-predictive coding modes, for the current video block based on the error result (e.g., coding rate or distortion level). The prediction processor 41 may provide the resulting intra-predictive or inter-predictive coded block to an adder 50 to generate a residual block, and may provide the coded block to an adder 62 for later reconstructing for use as part of a reference frame. The prediction processor 41 also provides syntax elements, such as motion vectors, intra-mode indicators, partitioning information, and other such syntax information, to the entropy coder 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, for example to select an appropriate coding mode for each block of video data.
[0034] In some embodiments, motion estimator 42 determines an inter prediction mode for a current video frame by generating a motion vector indicating a displacement of a prediction unit (PU) of a video block within a 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 prediction performed by motion estimator 42 is a process of generating a motion vector that estimates the motion of a video block. The motion vector may indicate, for example, a displacement of a PU of a video block within a 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, e.g., 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 metric. 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 accuracy.
[0036] The motion estimation unit 42 calculates a motion vector for a PU of a video block of an inter-predictive coded frame 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 respectively 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 include fetching or generating a predictive block based on the motion vector determined by motion estimation unit 42. When motion compensation unit 44 receives a motion vector for a PU of a current video block, it 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 or chroma difference components, or both. Motion compensation unit 44 may also generate syntax elements related to the video blocks of the video frames for use by video decoder 30 in decoding the video blocks of the video frames. The syntax elements may include, for example, syntax elements that define the motion vectors used to describe the predictive blocks, any flags that indicate prediction modes, or other syntax information described herein. Note that motion estimation unit 42 and motion compensation unit 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, but the predictive block is in the same frame as the current block to be coded, and the vector is referred to as a block vector, as opposed to a motion vector. In particular, the intra BC unit 48 may determine to use an intra prediction mode 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 by rate-distortion analysis. The intra BC unit 48 may then select an appropriate intra prediction mode among the various intra prediction modes tested to use in generating the intra mode indicator. For example, the intra BC unit 48 may use the rate-distortion analysis to calculate rate-distortion values for the various intra prediction modes tested, and select the intra prediction mode with the best rate-distortion characteristics 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 uncoded block that is coded to generate the coded block. Intra BC unit 48 may calculate the distortion-to-rate ratio for various coded blocks to determine the intra prediction mode that gives 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 the embodiments described herein. In either case, for intra block copying, the predictive block may be a block that is considered to be a close equivalent 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 computing 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 encoded, 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 the 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 to use an intra prediction mode 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 coder 56. The entropy coder 56 may encode the information indicative of 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, summer 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 coder 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 technique. The coded bitstream may then be transmitted to video decoder 30 or recorded on storage 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 an inverse transform to reconstruct the residual video block in the pixel domain to generate a reference block for predicting other video blocks. As mentioned above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame 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] Summer 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 to inter predict 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 a motion vector 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 code video data (e.g., in an intra-predictive coding mode or an inter-predictive coding mode). The video data memory 79 and the 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, the video data memory 79 and the DPB 92 are depicted as two separate components of the video decoder 30 in FIG. 3. However, it will be apparent to one skilled in the art that the video data memory 79 and the DPB 92 may be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 may be on-chip with other components of the video decoder 30, or may be off-chip relative 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 processor 81.
[0051] When a video frame is coded as an intra-predictive 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 a 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 unit 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 decoding unit 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 defined by video encoder 20.
[0054] Motion compensation unit 82 and / or intra BC unit 85 determine prediction information for video blocks of a 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 a prediction mode (e.g., intra prediction or inter prediction) used to encode video blocks of the video frame, an inter prediction frame type (e.g., B or P), configuration information for one or more of the reference frame lists for the frame, a motion vector for each inter predictive coded video block in the frame, an inter prediction state for each inter predictive coded video block of the frame, and other information for decoding video blocks in the current video frame.
[0055] Similarly, 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 DPB 92, block vectors of each intra BC predicted video block of the frame, intra BC prediction states of each intra BC predicted video block of the frame, and other information for decoding 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 the reference block during encoding of the video block by video encoder 20. In this case, motion compensation unit 82 may determine from the received syntax elements the interpolation filter used by video encoder 20 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 the motion compensation unit 82 or the intra BC unit 85 generates a predictive block for the current video block based on the vectors and other syntax elements, the adder 90 reconstructs a decoded video block for the current video block by summing the residual block from the inverse transform processor 88 and the corresponding predictive block generated by the motion compensation unit 82 and the intra BC unit 85. An in-loop filter (not shown) may be disposed between the adder 90 and the DPB 92 to further process the decoded video block. 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 the DPB 92, which stores reference frames used for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation to a display device, such as the 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, the video encoder 20 (more specifically, the splitter 45) generates a coded representation of a frame by first splitting the frame into a set of coding tree units (CTUs). A video frame may include an integer number of CTUs sequentially ordered in a 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 CTUs are signaled by the video encoder 20 in the sequence parameter set such that all CTUs in a video sequence have the same size, which is 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) of luma samples, a corresponding coding tree block of two chrominance samples, and syntax elements used to code the samples of the coding tree block. The syntax elements describe the properties 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 a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements used to code samples of the coding tree block. A coding tree block may be an N×N block of samples.
[0061] To achieve better performance, the 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 the CTU to partition 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 block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are partitioned into four CUs, each with a block size of 16×16. Two 16×16 CUs 430 and 440 are further partitioned into four CUs, each with a block size of 8×8. FIG. 4D illustrates a quadtree data structure showing the final result of the partitioning process of the CTU 400 as illustrated in FIG. 4C, where each leaf node of the quadtree corresponds to one CU of a respective size ranging from 32×32 to 8×8. 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 code the samples of the coding block, similar to the CTU illustrated in FIG. 4B. In a monochrome picture or a picture with three separate color planes, the CU may include a single coding block and syntax structures used to code the samples of the coding block. It should be noted that the quadtree partitioning illustrated in FIG. 4C and FIG. 4D is merely illustrative, and one CTU may be partitioned into CUs based on quadtree / ternary / binary tree partitioning to fit 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 Fig. 4E, there are five division types, including 4-way, horizontal 2-way, vertical 2-way, horizontal 3-way, and vertical 3-way.
[0062] In some embodiments, video encoder 20 may further divide the coding blocks 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 a 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 in 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 a 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 the predictive luma block, the predictive Cb block, and the predictive Cr block for one or more PUs in the CU, the 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, the 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 luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and syntax structures used to transform the samples of the transform block.
[0066] Video encoder 20 may apply one or more transforms to a luma transform block of the 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 in which transform coefficients are quantized to somehow reduce the amount of data used to represent the transform coefficient, resulting in further compression. After quantizing the coefficient block, the video encoder 20 may entropy code 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 encoded 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 a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the 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 the TUs of the current CU to reconstruct residual blocks associated with the TUs of the current CU. Video decoder 30 may also reconstruct the coding blocks of the current CU by adding samples of the predictive blocks for the PUs of the current CU to samples of the transform blocks of the corresponding TUs of the current CU. Video decoder 30 may reconstruct the frame after reconstructing the coding blocks for each CU of the frame.
[0069] As mentioned above, video coding mainly uses two modes, intra-frame prediction (i.e., intra-prediction) and inter-frame prediction (i.e., inter-prediction), to achieve video compression. Palette-based coding is another coding scheme adopted by many video coding standards. Palette-based coding is particularly suitable for coding screen generated content, in which a video coder (e.g., video encoder 20 or video decoder 30) forms a palette table of colors representing a given block of video data. The palette table includes the most dominant (e.g., frequently used) pixel values in a given block. Pixel values that are not frequently represented in the video data of a given block are not included in the palette table or are included in the palette table as avoided colors.
[0070] Each entry in the palette table includes an index for a corresponding pixel value in the palette table. A 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 coding 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 of 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, larger, or smaller compared to 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., a binary 1) indicating that the associated input of the palette predictor is included in the palette table or a second value (e.g., a 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 of 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. Palette entries derived from the palette predictor require only a one-bit flag, whereas multiple m-bit values are required for directly signaled palette entries. Thus, signaling some or all of the palette entries using the 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 a 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. Thus, the palette predictor cannot be generated using entries in the previously used palette table. In such cases, a set of palette predictor initializers, values used to generate the palette predictor when the previously used palette table is not available, may be signaled in a sequence parameter set (SPS) and / or a picture parameter set (PPS). An SPS generally refers to a syntax structure of syntax elements that fits into a set 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 syntax structure of syntax elements that fits into one or more individual pictures within a CVS, as determined by the content of syntax elements found in each slice segment header. Thus, 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 an adaptive color space conversion (ACT) technique 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 convert 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 the existing ACT design, 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. The flag tu_act_enabled_flag is 1 to indicate that the residual of the current TU is coded in the YCgCo space, otherwise (i.e., the flag is 0), 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-YCgCo transform (also known as YCgCo-LS) is used, which is implemented based on the lifting operation depicted in FIG. 5B and the associated description.
[0078] As shown in FIG. 5A, the forward and inverse color transform matrices used in the 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 the 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 an application of 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 filter, SAO and ALF). In general, 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. Figure 6 shows a modified decoding process in which LMCS is applied. In Figure 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., addition 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., addition 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. 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 the coding efficiency. The in-loop mapping of luma samples in the existing LMCS design is built on two mapping functions: one forward mapping function FwdMap and one corresponding backward mapping function InvMap. The forward mapping function is signaled from the encoder to the decoder using one piecewise linear model with 16 equal-sized parts. The backward mapping function can be directly derived 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 indicating whether luma-dependent chroma residual scaling is applied or not. When luma mapping is not used, luma-dependent chroma residual scaling is always disabled and no additional flag is required. In addition, chroma residual scaling is always disabled for CUs that contain 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 certain implementations of this disclosure.
[0085] ACT in VVC converts the intra / inter prediction residual of one CU in 4:4:4 chrominance format from the original color space (e.g., RGB color space) to YCgCo color space, similar to the ACT design in HEVC SCC. As a result, the 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 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 YCgCo color space to the original color space (e.g., RGB or YCbCr). In addition, since ACT is not normalized in lossy mode, a QP adjustment of (-5, -5, -3) is applied to 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 transformation between different color spaces. Specifically, two different versions of color transformation are applied depending on whether the current CU is lossy or lossy in its encoding. Forward and inverse color transformation in the lossy case uses the lossy YCgCo transformation matrix as shown in FIG. 5A. In the lossless case, the lossless color transformation YCgCo-LS is applied as shown in FIG. 5B. Moreover, different from the existing ACT design, the following modifications are introduced to the ACT scheme to handle the interaction of the ACT scheme with other encoding tools in the VVC standard:
[0087] For example, since the residual of one CU in HEVC may be split into multiple TUs, an ACT control flag is signaled separately for each TU to indicate whether or not a color space transformation needs to be applied. However, as described above in relation to FIG. 4E, in VVC, a quadtree with nested bipartition and tripartition structures 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, one CU leaf node is also used as a unit of prediction and transformation processing without further partitioning, unless the maximum supported transform size is smaller than the width or height of one component of the CU. Based on such partition structure, ACT can be adaptively enabled / disabled at the CU level. Specifically, one flag cu_act_enabled_flag is signaled for each CU to select between the original color space and the YCgCo color space to code the residual of the CU. If this flag is 1, it indicates that all of the residuals of the TUs inside the CU are coded 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 of three components. According to an embodiment of the present disclosure, when a CU does not contain information of 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 in one CTU are partitioned into CUs based on the separate partitioning structure. As a result, the CU in the luma partitioning tree only contains the coding information of the luma component, and the CU in the chroma partitioning tree only contains the coding information of the two chroma components. According to the current VVC, the 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 slice is found to be applied to a separate tree, ACT is always disabled for all CUs (both luma CUs and chroma CUs) in 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 splitting is applied only to luma samples, and chroma samples are coded without further splitting 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 are composed of luma components only. According to an 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, an 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, the 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 (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 split 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 a YCgCo color space to code its residual, both luma mapping and chroma residual scaling are disabled (i.e., ACT is one). 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 coding its residual. There may be multiple ways to enable chroma residual scaling for a CU that applies ACT. In one way, chroma residual scaling is applied before inverse ACT in the decoding. This means that when ACT is applied, chroma residual scaling is applied to the chroma residual (i.e., Cg and Co residual) in the YCgCo domain. In another way, chroma residual scaling is applied after inverse ACT. Specifically, in the second method, chroma scaling is applied to the residual in the original color space. Assuming the input video is captured in RGB format, this means that chroma residual scaling is applied to the residuals of the B and R components.
[0092] In some embodiments, a sequence parameter set (SPS), for example sps_act_enabled_flag, is added to the syntax elements to indicate whether ACT is enabled at the sequence level. In addition, when color space conversion is applied to video content whose luma and chroma components have the same resolution (e.g., 4:4:4 chroma format), one bitstream conformance requirement needs to be added so that ACT can only be enabled for 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 equal to 1 indicates that ACT is enabled, and sps_act_enabled_flag equal to 0 indicates 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 is 0.
[0095] In another embodiment, instead of always signaling sps_act_enabled_flag, the signaling of the flag is conditional on the input signal of chrominance type. Specifically, if ACT can be applied only 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 is 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 indicates that the residual of the coding unit is coded in the YCgCo color space when it is 1, and indicates that the residual of the coding unit is coded in the original color space (e.g., RGB or YCbCr) when it is 0. The flag cu_act_enabled_flag is inferred to be 0 when it is 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 act 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 inverse ACT is applied or not. For inter and intra block copy (IBC) modes, the information about whether a CU contains a non-zero coefficient or not 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 only signal 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 an Intra CU.
[0101] In some embodiments, the ACT flag is used to conditionally enable / disable the CBF signaling of 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 the transform blocks except the last transform block, 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 only enabled 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 techniques of inverse adaptive color space transformation (ACT) and chroma residual scaling 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 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 a case, to avoid unnecessary chroma scaling in the decoder, an additional check condition on the chroma CBF flags may be added to ensure that chroma residual scaling is only invoked 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 with 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 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 are as follows:
[0108] 8.7.5.3 Picture reconstruction using a luminance-dependent chrominance residual scaling process on chrominance 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 less than or equal to 4. - 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 matches: - 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 that contains the luma sample at (xCurrY / sizeY*sizeY, yCurrY / sizeY*sizeY). The variables availL and availT are derived as follows: - The derivation process for neighboring block availability as specified in Section 6.4.4 is called with position (xCurr,yCurr) set equal to (xCuCb,yCuCb), neighboring 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 neighboring block availability as specified in Section 6.4.4 is called with position (xCurr,yCurr) set equal to (xCuCb,yCuCb), neighboring 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 orderly steps apply:
[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 be 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 a 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 example process in 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, in accordance with some implementations of the disclosure.
[0117] Video decoder 30 receives from the bitstream a number 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, the 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 samples of the coding unit using the luma residual samples and the chroma residual samples after scaling (940).
[0121] In some embodiments, determining 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) 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 the luma residual samples and the chroma residual samples of the coding unit, and performing chroma residual scaling on the residual samples of the first and second chroma components after the inverse ACT, 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 is prior to application of the inverse ACT.
[0123] In some embodiments, applying inverse quantization to the residual samples of the coding unit is before application of 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 not 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 encoded with 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 a corresponding scaling parameter; and in response to a determination by the third syntax element that ACT is applied to the coding unit, applying an inverse ACT to luma residual samples and chroma residual samples of the coding unit after scaling. In some embodiments, applying the inverse transform to the residual samples of the coding unit is before performing chroma residual scaling, hi some embodiments, applying inverse quantization to the residual samples of the coding unit is before applying the inverse transform.
[0130] In some embodiments, the step of determining whether to perform chrominance residual scaling on residual samples of the first and second chrominance components according to the first CBF and the second CBF comprises determining to perform chrominance residual scaling on residual samples of the chrominance components of the encoding 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 encoding 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 codes on a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable medium corresponding to a tangible medium, such as a data storage medium, or a communication medium, including any medium that facilitates transfer of a computer program from one place to another, for example via a communication protocol. Thus, a computer-readable medium may generally correspond to (1) a tangible, non-transitory computer-readable medium, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the embodiments described herein. A computer program product may include a computer-readable medium.
[0133] The terminology used in the description of the embodiments herein is for the purpose of describing only certain embodiments and is not intended to limit the scope of the claims. As used in the description of the embodiments and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise. The term "and / or" as used herein is also understood to refer to and include any and all possible combinations of one or more of the associated listed items. It is further understood that the terms "comprise" and / or "comprising" as 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] To describe various elements, terms such as first, second, etc. may be used herein, but it is 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 embodiment. 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 selected and described in order 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 appropriate for the particular use contemplated. It is therefore to be understood that the claims are not limited to the specific examples of the disclosed embodiments and modifications thereof, but that other embodiments are contemplated to be included within the scope of the appended claims.
Claims
1. 1. A method for decoding a video block encoded using chroma residual scaling, comprising: 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 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; determining whether to perform the chrominance residual scaling on the residual samples of the first and second chrominance components according to the first CBF, the second CBF, and the third syntax element; in response to determining to perform the chrominance residual scaling on the residual samples of 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 samples of the coding unit using the luma residual samples and the chroma residual samples after scaling; A method for providing the above.
2. 2. The method of claim 1, wherein determining whether to perform the chrominance residual scaling on the residual samples of the first and second chrominance components in accordance with the first CBF, the second CBF, and the third syntax element comprises: in response to a determination by the third syntax element that the ACT is applied to the coding unit, applying an inverse ACT to the luma residual samples and the chroma residual samples of the coding unit; determining, after the inverse ACT, to perform the chrominance residual scaling on the residual samples of the first and second chrominance components regardless of the first CBF and the second CBF.
3. 2. The method of claim 1, wherein determining whether to perform the chrominance residual scaling on the residual samples of the first and second chrominance components in accordance with the first CBF, the second CBF, and the third syntax element comprises: in response to a determination by the third syntax element that the ACT is not applied to the coding unit, determining to perform the chrominance residual scaling on the residual samples of a chrominance component of the coding unit when the CBF associated with the chrominance component is not zero; 11. The method of claim 10, further comprising: determining to avoid the chrominance residual scaling for the residual samples of a chrominance component of the coding unit when the CBF associated with the chrominance component is zero.
4. The method of claim 2 , further comprising the step of applying an inverse transform to the residual samples of the coding unit prior to applying the inverse ACT.
5. The method of claim 4 , further comprising the step of applying inverse quantization to the residual samples of the coding unit prior to application of the inverse transform.
6. 2. The method of claim 1 , when the non-zero chrominance residual sample is not present in the residual sample of the first chrominance component, the first CBF is zero; The method of claim 1, wherein the second CBF is zero when no non-zero chrominance residual samples are present in the residual samples of the second chrominance component.
7. The method of claim 1 , wherein the corresponding scaling parameters are derived from reconstructed luma samples at collocated positions.
8. The method of claim 2 , wherein the input to the inverse ACT is in YCgCo space.
9. The method of claim 2 , wherein the output to the inverse ACT is in RGB space.
10. 1. A method for decoding a video block encoded using chroma residual scaling, comprising: receiving from a bitstream a plurality of syntax elements associated with the coding unit, the syntax elements 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; determining whether to perform the chrominance residual scaling on the residual samples of the first and second chrominance components according to the first CBF and the second CBF; in response to determining to perform the chrominance residual scaling on the residual samples of 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; in response to a determination by the third syntax element that the ACT is applied to the coding unit, applying an inverse ACT to the luma residual samples and the chroma residual samples of the coding unit after scaling. A method for providing the above.
11. 11. The method of claim 10, wherein determining whether to perform the chrominance residual scaling on the residual samples of the first and second chrominance components according to the first and second CBFs comprises: determining to perform the chrominance residual scaling on the residual samples of a chrominance component of the coding unit when the CBF associated with the chrominance component is not zero; determining to avoid the chrominance residual scaling for the residual samples of a chrominance component of the coding unit when the CBF associated with the chrominance component is zero.
12. 11. The method of claim 10, when the non-zero chrominance residual sample is not present in the residual sample of the first chrominance component, the first CBF is zero; The method of claim 1, wherein the second CBF is zero when no non-zero chrominance residual samples are present in the residual samples of the second chrominance component.
13. The method of claim 10 , further comprising applying an inverse transform to the residual samples of the coding unit prior to performing the chroma residual scaling.
14. The method of claim 13 , further comprising applying inverse quantization to the residual samples of the coding unit prior to application of the inverse transform.
15. The method of claim 10 , wherein the corresponding scaling parameters are derived from reconstructed luma samples at collocated positions.
16. 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 processors, cause the electronic device to perform the method of any one of claims 1 to 15.
17. 16. A non-transitory computer readable storage medium storing a plurality of programs for execution by an electronic device having one or more processing units, the plurality of programs, when executed by the one or more processing units, causing the electronic device to perform a method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Method and apparatus for video coding in 4:4:4 color format
JP7509927B2
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
