Improved cross component residual prediction
By employing a cross component residual model to determine model parameters for video blocks, the method enhances chroma sample prediction in video coding, addressing compression challenges and improving video quality.
Patent Information
- Application Number
- PCT/US2024/042185
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-16
- Filing Date
- 2024-08-14
- Publication Date
- 2025-02-20
AI Technical Summary
Existing video coding technologies face challenges in efficiently compressing video data due to limited bandwidth and memory resources, particularly in predicting chroma samples effectively.
The implementation of a cross component residual model that determines model parameters based on video blocks to generate refined prediction chroma samples, enhancing prediction accuracy and compression efficiency.
This approach improves video decoding and encoding processes by providing more accurate chroma sample predictions, leading to better compression efficiency and video quality.
Smart Images

Figure US2024042185_20022025_PF_FP_ABST
Abstract
Description
Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT IMPROVED CROSS COMPONENT RESIDUAL PREDICTION CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application is based upon and claims priority to U.S. Provisional Application No.63 / 533,056 filed on August 16, 2023, the entire content thereof is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] This application is related to video coding and compression. More specifically, this application relates to video processing apparatuses and methods for cross component residual prediction. BACKGROUND
[0003] 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 gaming consoles, smart phones, video teleconferencing devices, video streaming devices, etc. The electronic devices transmit and receive or otherwise communicate digital video data across a communication network, and / or store the digital video data on a storage device. Due to a limited bandwidth capacity of the communication network and limited memory resources of the storage device, video coding may be used to compress the video data according to one or more video coding standards before it is communicated or stored. For example, video coding standards include Versatile Video Coding (VVC), Joint Exploration test Model (JEM), High-Efficiency Video Coding (HEVC / H.265), Advanced Video Coding (AVC / H.264), Moving Picture Expert Group (MPEG) coding, or the like. Video coding generally utilizes prediction methods (e.g., inter-prediction, intra-prediction, or the like) that take advantage of redundancy inherent in the video data. Video coding aims to compress video data into a form that uses a lower bit rate, while avoiding or minimizing degradations to video quality. SUMMARY
[0004] Implementations of the present disclosure provide a method for video decoding. The method may include determining, by a decoder, one or more model parameters of a cross component residual model based on a video block from a video frame. The method may also include applying, by the decoder, the cross component residual model, as defined by the oneAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT or more model parameters, to generate refined prediction chroma samples associated with the video block.
[0005] Implementations of the present disclosure provide a method for video encoding. The method may include determining, by an encoder, one or more model parameters of a cross component residual model based on a video block from a video frame. The method may also include applying, by the encoder, the cross component residual model, as defined by the one or more model parameters, to generate refined prediction chroma samples associated with the video block.
[0006] Implementations of the present disclosure also provide a method at a decoder side. The method includes receiving a bitstream by a decoder. The bitstream is decoded by performing the method of video decoding disclosed herein.
[0007] Implementations of the present disclosure also provide a method at an encoder side. The method includes storing a bitstream by an encoder. The bitstream is generated by performing the method of video encoding disclosed herein.
[0008] Implementations of the present disclosure also provide an apparatus for video decoding. The apparatus may include a memory configured to store a bitstream and a processor coupled to the memory. The processor may be configured to perform a method for video decoding disclosed herein to decode the bitstream or a method at a decoder side disclosed herein to receive the bitstream.
[0009] Implementations of the present disclosure also provide an apparatus for video encoding. The apparatus may include a memory configured to store a bitstream and a processor coupled to the memory. The processor may be configured to perform a method for video encoding disclosed herein to generate the bitstream or a method at an encoder side disclosed herein to store the bitstream.
[0010] Implementations of the present disclosure also provide a non-transitory computer- readable storage medium having stored therein a bitstream, where the bitstream is decoded by a method for video decoding disclosed herein or the bitstream is received by a method at a decoder side disclosed herein.
[0011] Implementations of the present disclosure also provide a non-transitory computer- readable storage medium having stored therein a bitstream, where the bitstream is generated by a method for video encoding disclosed herein or the bitstream is stored by a method at an encoder side disclosed herein.
[0012] It is to be understood that both the foregoing general description and the following detailed description are examples only and are not restrictive of the present disclosure.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate examples consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
[0014] FIG. 1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks in accordance with some implementations of the present disclosure.
[0015] FIG. 2 is a block diagram illustrating an exemplary video encoder in accordance with some implementations of the present disclosure.
[0016] FIG. 3 is a block diagram illustrating an exemplary video decoder in accordance with some implementations of the present disclosure.
[0017] FIGS. 4A through 4E are block diagrams illustrating how a frame is recursively partitioned into multiple video blocks of different sizes and shapes in accordance with some implementations of the present disclosure.
[0018] FIG. 5 shows locations of left samples and above samples of a coding unit (CU) involved in a Cross Component Linear Model (CCLM) mode in accordance with some implementations of the present disclosure.
[0019] FIG.6 shows a process of slope adjustment in the CCLM mode in accordance with some implementations of the present disclosure.
[0020] FIG.7 shows spatial locations of luma samples applied in a convolutional filter in accordance with some implementations of the present disclosure.
[0021] FIG.8 shows a reference area used to derive filter coefficients of a convolutional filter in accordance with some implementations of the present disclosure.
[0022] FIG.9 shows a reference area with paddings used to derive filter coefficients of a Convolutional Cross Component Model (CCCM) in accordance with some implementations of the present disclosure.
[0023] FIG. 10 shows four gradient filters for a Gradient Linear Model (GLM) in accordance with some implementations of the present disclosure.
[0024] FIG.11 shows luma samples for the CCCM without downsampling in accordance with some implementations of the present disclosure.
[0025] FIG.12 shows a diagram of gradient calculation in a Gradient and Location based Convolutional Cross Component Model (GL-CCCM) in accordance with some implementations of the present disclosure.
[0026] FIG.13 illustrates a diagram of various downsampling filters used in the CCCM inAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT accordance with some implementations of the present disclosure.
[0027] FIG.14 shows a low-pass filter that is applied to filter prediction samples generated by Multi-Model CCLM (MM-CCLM) and / or Multi-Model CCCM (MM-CCCM) in accordance with some implementations of the present disclosure.
[0028] FIG. 15A shows a process of cross component residual prediction using a cross component residual model (CCRM) in accordance with some implementations of the present disclosure.
[0029] FIG. 15B shows luma samples in relation to a chroma sample to be predicted in accordance with some implementations of the present disclosure.
[0030] FIG. 16A shows various cross component residual prediction schemes in accordance with some implementations of the present disclosure.
[0031] FIG. 16B shows another process of cross component residual prediction using a CCRM model in accordance with some implementations of the present disclosure.
[0032] FIG.17 is a flow chart of an exemplary method for video coding in accordance with some implementations of the present disclosure.
[0033] FIGs. 18A-18C show various subsampling methods for deriving a set of filter coefficients for a CCRM model in accordance with some implementations of the present disclosure.
[0034] FIG.19 shows various filter shapes for a cross component filter in a CCRM model in accordance with some implementations of the present disclosure.
[0035] FIG. 20 is a diagram illustrating a computing environment coupled with a user interface, according to some implementations of the present disclosure. DETAILED DESCRIPTION
[0036] Reference will now be made in detail to specific implementations, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth in order to assist in understanding the subject matter presented herein. But various alternatives may be used without departing from the scope of claims and the subject matter may be practiced without these specific details. For example, the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities.
[0037] It should be illustrated that the terms “first,” “second,” and the like used in the description, claims of the present disclosure, and the accompanying drawings are used to distinguish objects, and not used to describe any specific order or sequence. It should beAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT understood that the data used in this way may be interchanged under an appropriate condition, such that the embodiments of the present disclosure described herein may be implemented in orders besides those shown in the accompanying drawings or described in the present disclosure.
[0038] FIG. 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel in accordance with some implementations of the present disclosure. As shown in FIG.1, the system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a destination device 14. The source device 12 and the destination device 14 may comprise any of a wide variety of electronic devices, including cloud servers, server computers, desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or the like. In some implementations, the source device 12 and the destination device 14 are equipped with wireless communication capabilities.
[0039] In some implementations, the destination device 14 may receive the encoded video data to be decoded via a link 16. The link 16 may comprise any type of communication medium or device capable of moving 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 transmit the encoded video data directly 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 a Radio Frequency (RF) spectrum or one or more physical transmission lines. 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 any other equipment that may be useful to facilitate communication from the source device 12 to the destination device 14.
[0040] In some other implementations, the encoded video data may be transmitted from an output interface 22 to a storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the destination device 14 via an input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, Digital Versatile Disks (DVDs), Compact Disc Read-Only Memories (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data. In a further example, the storageAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT device 32 may correspond to a file server or another intermediate storage device that may hold the encoded video data generated by the source device 12. The destination device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing the encoded video data and transmitting the encoded video data to the destination device 14. Exemplary file servers include a web server (e.g., for a website), a File Transfer Protocol (FTP) server, Network Attached Storage (NAS) devices, or a local disk drive. The destination device 14 may access the encoded video data through any standard data connection, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., Digital Subscriber Line (DSL), cable modem, etc.), or a combination of both that is suitable for accessing encoded video data stored on a file server. The transmission of the encoded video data from the storage device 32 may be a streaming transmission, a download transmission, or a combination of both.
[0041] As shown in FIG. 1, the source device 12 includes a video source 18, a video encoder 20 and the output interface 22. The video source 18 may include a source such as a video capturing device, e.g., a video camera, a video archive containing previously captured video, a video feeding interface to receive 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 one example, if the video source 18 is a video camera of a security surveillance system, the source device 12 and the destination device 14 may form camera phones or video phones. However, the implementations described in the present application may be applicable to video coding in general, and may be applied to wireless and / or wired applications.
[0042] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be transmitted directly to the destination device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored onto the storage device 32 for later access by the destination device 14 or other devices, for decoding and / or playback. The output interface 22 may further include a modem and / or a transmitter. The encoded video data may comprise a sequence of pictures, each of which may comprise one or more sample arrays, for example, luma (Y) only for monochrome; luma and two chroma in YCbCr or YCgCo domain; or green, blue, and red in GBR (also known as RGB) domain. For convenience of notation and terminology in this application, in some embodiments, variables and terms associated with each set of three sample arrays may be referred to as luma and chroma, where the two chroma arrays may be referred to as Cb and Cr, regardless of the actual color representation method in use. The video dataAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT may be in a chroma format of 4:0:0, 4:2:0, 4:2:2, or 4:4:4, but the present application is not limited thereto.
[0043] The destination device 14 includes the input interface 28, a video decoder 30, and a display device 34. The input interface 28 may include a receiver and / or a modem and receive the encoded video data over the link 16. The encoded video data communicated over the link 16, or provided on the storage device 32, may include a variety of syntax elements generated by the video encoder 20 for use by the video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server.
[0044] In some implementations, the destination device 14 may include the display device 34, which can be an integrated display device and an external display device that is configured to communicate with the destination device 14. The 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.
[0045] The video encoder 20 and the video decoder 30 may operate according to proprietary or industry standards, such as VVC, HEVC, MPEG-4, Part 10, AVC, or extensions of such standards. It should be understood that the present application is not limited to a specific video encoding / decoding standard and may be applicable to other video encoding / decoding standards. It is generally contemplated that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current or future standards. Similarly, it is also generally contemplated that the video decoder 30 of the destination device 14 may be configured to decode video data according to any of these current or future standards.
[0046] The video encoder 20 and the video decoder 30 each may be implemented as any of a variety of suitable encoder and / or decoder 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 combinations thereof. When implemented partially in software, an electronic device may store instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (CODEC) in a respective device.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT
[0047] In some implementations, at least a part of components of the source device 12 (for example, the video source 18, the video encoder 20 or components included in the video encoder 20 as described below with reference to Fig.2, and the output interface 22) and / or at least a part of components of the destination device 14 (for example, the input interface 28, the video decoder 30 or components included in the video decoder 30 as described below with reference to Fig. 3, and the display device 34) may operate in a cloud computing service network which may provide software, platforms, and / or infrastructure, such as Software as a Service (SaaS), Platform as a Service (PaaS), or Infrastructure as a Service (IaaS). In some implementations, one or more components in the source device 12 and / or the destination device 14 which are not included in the cloud computing service network may be provided in one or more client devices, and the one or more client devices may communicate with server computers in the cloud computing service network through a wireless communication network (for example, a cellular communication network, a short-range wireless communication network, or a global navigation satellite system (GNSS) communication network) or a wired communication network (e.g., a local area network (LAN) communication network or a power line communication (PLC) network). In an embodiment, at least a part of operations described herein may be implemented as cloud-based services provided by one or more server computers which are implemented by the at least a part of the components of the source device 12 and / or the at least a part of the components of the destination device 14 in the cloud computing service network; and one or more other operations described herein may be implemented by the one or more client devices. In some implementations, the cloud computing service network may be a private cloud, a public cloud, or a hybrid cloud. The terms such as “cloud,” “cloud computing,” “cloud-based” etc. herein may be used interchangeably as appropriate without departing from the scope of the present disclosure. It should be understood that the present disclosure is not limited to being implemented in the cloud computing service network described above. Instead, the present disclosure may also be implemented in any other type of computing environments currently known or developed in the future.
[0048] FIG.2 is a block diagram illustrating an exemplary video encoder 20 in accordance with some implementations described in the present application. The video encoder 20 may perform intra 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. It should be noted that the term “frame” may be used as synonyms forAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT the term “image” or “picture” in the field of video coding.
[0049] As shown in FIG. 2, the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a Decoded Picture Buffer (DPB) 64, a summer 50, a transform processing unit 52, a quantization unit 54, and an entropy encoding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra prediction processing unit 46, and an intra Block Copy (BC) unit 48. In some implementations, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and a summer 62 for video block reconstruction. An in-loop filter 63, such as a deblocking filter, may be positioned between the summer 62 and the DPB 64 to filter block boundaries to remove blockiness artifacts from reconstructed video. Another in-loop filter, such as Sample Adaptive Offset (SAO) filter, Cross Component Sample Adaptive Offset (CCSAO) filter and / or Adaptive in-Loop Filter (ALF), may also be used in addition to the deblocking filter to filter an output of the summer 62. It should be illustrated that for the CCSAO technique, the present application is not limited to the embodiments described herein, and instead, the application may be applied to a situation where an offset is selected for any of a luma component and two chroma components (which may represent Y, Cb and Cr in YCbCr domain; Y, Cg and Co in YCgCo domain; or G, B and R in RGB domain for convenience of notation and terminology in this application as described above) according to any other of the luma component and the two chroma components to modify said any component based on the selected offset. Further, it should also be illustrated that a first component mentioned herein may be any of the luma component and the two chroma components, a second component mentioned herein may be any other of the luma component and the two chroma components, and a third component mentioned herein may be a remaining one of the luma component and the two chroma components. In some examples, the in-loop filters may be omitted, and the decoded video block may be directly provided by the summer 62 to the DPB 64. The video encoder 20 may take the form of a fixed or programmable hardware unit or may be divided among one or more of the illustrated fixed or programmable hardware units.
[0050] The video data memory 40 may store video data to be encoded by the components of the video encoder 20. The video data in the video data memory 40 may be obtained, for example, from the video source 18 as shown in FIG. 1. The DPB 64 is a buffer that stores reference video data (for example, reference frames or pictures) for use in encoding video data by the video encoder 20 (e.g., in intra or inter predictive coding modes). The video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices. In various examples,Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components.
[0051] As shown in FIG.2, after receiving the video data, the partition unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning may also include partitioning a video frame into slices, tiles (for example, sets of video blocks), or other larger Coding Units (CUs) according to predefined splitting structures such as a Quad- Tree (QT) structure associated with the video data. The video frame is or may be regarded as a two-dimensional array or matrix of samples with sample values. A sample in the array may also be referred to as a pixel or a pel. A number of samples in horizontal and vertical directions (or axes) of the array or picture define a size and / or a resolution of the video frame. The video frame may be divided into multiple video blocks by, for example, using QT partitioning. The video block again is or may be regarded as a two-dimensional array or matrix of samples with sample values, although of smaller dimension than the video frame. A number of samples in horizontal and vertical directions (or axes) of the video block define a size of the video block. The video block may further be partitioned into one or more block partitions or sub-blocks (which may form again blocks) by, for example, iteratively using QT partitioning, Binary-Tree (BT) partitioning or Triple-Tree (TT) partitioning or any combination thereof. It should be noted that the term “block” or “video block” as used herein may be a portion, in particular a rectangular (square or non- square) portion, of a frame or a picture. With reference, for example, to HEVC and VVC, the block or video block may be or correspond to a Coding Tree Unit (CTU), a CU, a Prediction Unit (PU) or a Transform Unit (TU) and / or may be or correspond to a corresponding block, e.g. a Coding Tree Block (CTB), a Coding Block (CB), a Prediction Block (PB) or a Transform Block (TB) and / or to a sub-block.
[0052] The prediction processing unit 41 may select one of a plurality of possible predictive coding modes, such as one of a plurality of intra predictive coding modes or one of a plurality of inter predictive coding modes, for the current video block based on error results (e.g., coding rate and the level of distortion). The prediction processing unit 41 may provide the resulting intra or inter prediction coded block to the summer 50 to generate a residual block and to the summer 62 to reconstruct the encoded block for use as part of a reference frame subsequently. The prediction processing unit 41 also provides syntax elements, such as motion vectors, intra- mode indicators, partition information, and other such syntax information, to the entropy encoding unit 56.
[0053] In order to select an appropriate intra predictive coding mode for the current video block, the intra prediction processing unit 46 within the prediction processing unit 41 mayAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT perform intra predictive coding of the current video block relative to one or more neighbor blocks in the same frame as the current block to be coded to provide spatial prediction. The motion estimation unit 42 and the motion compensation unit 44 within the prediction processing unit 41 perform inter predictive coding of the current video block relative to one or more predictive blocks in one or more reference frames to provide temporal prediction. The video encoder 20 may perform multiple coding passes, e.g., to select an appropriate coding mode for each block of video data.
[0054] In some implementations, the motion estimation unit 42 determines the inter prediction mode for a current video frame by generating a motion vector, which indicates the displacement of a video block within the current video frame relative to a predictive block within a reference video frame, according to a predetermined pattern within a sequence of video frames. Motion estimation, performed by the motion estimation unit 42, is the process of generating motion vectors, which estimate motion for video blocks. A motion vector, for example, may indicate the displacement of a video block within a current video frame or picture relative to a predictive block within a reference frame relative to the current block being coded within the current frame. The predetermined pattern may designate video frames in the sequence as P frames or B frames. The 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 the motion estimation unit 42 for inter prediction, or may utilize the motion estimation unit 42 to determine the block vector.
[0055] A predictive block for the video block may be or may correspond to a block or a reference block of a reference frame that is deemed as closely matching the 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 metrics. In some implementations, the video encoder 20 may calculate values for sub-integer pixel positions of reference frames stored in the DPB 64. For example, the video encoder 20 may interpolate values of one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel precision.
[0056] The motion estimation unit 42 calculates a motion vector for a video block in an inter prediction coded frame by comparing the position of the video block to 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), each of which identifies one or more reference framesAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT 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 encoding unit 56.
[0057] Motion compensation, performed by the motion compensation unit 44, may involve fetching or generating the predictive block based on the motion vector determined by the motion estimation unit 42. Upon receiving the motion vector for the current video block, the motion compensation unit 44 may locate a predictive block to which the motion vector points in one of the reference frame lists, retrieve the predictive block from the DPB 64, and forward the predictive block to the summer 50. The summer 50 then forms a residual video block of pixel difference values by subtracting pixel values of the predictive block provided by the motion compensation unit 44 from the pixel values of the current video block being coded. The pixel difference values forming the residual video block may include luma or chroma component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video blocks of a video frame for use by the video decoder 30 in decoding the video blocks of the video frame. The syntax elements may include, for example, syntax elements defining the motion vector used to identify the predictive block, any flags indicating the prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes.
[0058] In some implementations, the intra BC unit 48 may generate vectors and fetch predictive blocks in a manner similar to that described above in connection with the motion estimation unit 42 and the motion compensation unit 44, but with the predictive blocks being in the same frame as the current block being coded and with the vectors being referred to as block vectors as opposed to motion vectors. In particular, the intra BC unit 48 may determine an intra-prediction mode to use to encode a current block. In some examples, the intra BC unit 48 may encode a current block using various intra-prediction modes, e.g., during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select, among the various tested intra-prediction modes, an appropriate intra- prediction mode to use and generate an intra-mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values using a rate-distortion analysis for the various tested intra-prediction modes, and select the intra-prediction mode having the best rate- distortion characteristics among the tested modes as the appropriate intra-prediction mode to use. Rate-distortion analysis generally determines an amount of distortion (or error) between an encoded block and an original, unencoded block that was encoded to produce the encoded block, as well as a bitrate (i.e., a number of bits) used to produce the encoded block. Intra BCAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT unit 48 may calculate ratios from the distortions and rates for the various encoded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
[0059] In other examples, the intra BC unit 48 may use the motion estimation unit 42 and the motion compensation unit 44, in whole or in part, to perform such functions for Intra BC prediction according to the implementations described herein. In either case, for Intra block copy, a predictive block may be a block that is deemed as closely matching the block to be coded, in terms of pixel difference, which may be determined by SAD, SSD, or other difference metrics, and identification of the predictive block may include calculation of values for sub- integer pixel positions.
[0060] Whether the predictive block is from the same frame according to intra prediction, or a different frame according to inter prediction, the video encoder 20 may form a residual video block by subtracting pixel values of the predictive block from the pixel values of the current video block being coded, forming pixel difference values. The pixel difference values forming the residual video block may include both luma and chroma component differences.
[0061] The intra prediction processing unit 46 may intra-predict a current video block, as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra block copy prediction performed by the intra BC unit 48, as described above. In particular, the intra prediction processing unit 46 may determine an intra prediction mode to use to encode a current block. To do so, the intra prediction processing unit 46 may encode a current block using various intra prediction modes, e.g., during separate encoding passes, and the intra prediction processing 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 processing unit 46 may provide information indicative of the selected intra-prediction mode for the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in the bitstream.
[0062] After the prediction processing unit 41 determines the predictive block for the current video block via either inter prediction or intra prediction, the summer 50 forms 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 TUs and is provided to the transform processing unit 52. The transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform, such as a Discrete Cosine Transform (DCT) or a conceptually similar transform.
[0063] The transform processing unit 52 may send the resulting transform coefficients toAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT the quantization unit 54. The quantization unit 54 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 modified by adjusting a quantization parameter. In some examples, the quantization unit 54 may then perform a scan of a matrix including the quantized transform coefficients. Alternatively, the entropy encoding unit 56 may perform the scan.
[0064] Following quantization, the entropy encoding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, e.g., Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), Syntax-based context-adaptive Binary Arithmetic Coding (SBAC), Probability Interval Partitioning Entropy (PIPE) coding or another entropy encoding methodology or technique. The encoded bitstream may then be transmitted to the video decoder 30 as shown in FIG.1, or archived in the storage device 32 as shown in FIG.1 for later transmission to or retrieval by the video decoder 30. The entropy encoding unit 56 may also entropy encode the motion vectors and the other syntax elements for the current video frame being coded.
[0065] The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transformation, respectively, to reconstruct the residual video block in the pixel domain for generating a reference block for prediction of other video blocks. As noted above, the motion compensation unit 44 may generate a motion compensated predictive block from one or more reference blocks of the frames stored in the DPB 64. The motion compensation unit 44 may also apply one or more interpolation filters to the predictive block to calculate sub-integer pixel values for use in motion estimation.
[0066] The summer 62 adds the reconstructed residual block to the motion compensated predictive block produced by the motion compensation unit 44 to produce a reference block for storage in the DPB 64. The reference block may then be used by the intra BC unit 48, the motion estimation unit 42 and the motion compensation unit 44 as a predictive block to inter predict another video block in a subsequent video frame.
[0067] FIG.3 is a block diagram illustrating an exemplary video decoder 30 in accordance with some implementations 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, a summer 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra prediction unit 84, and an intra BC unit 85. The video decoder 30 may perform a decoding process generally reciprocal to the encoding process described above with respect to the videoAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT encoder 20 in connection with FIG. 2. For example, the motion compensation unit 82 may generate prediction data based on motion vectors received from the entropy decoding unit 80, while the intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from the entropy decoding unit 80.
[0068] In some examples, a unit of the video decoder 30 may be tasked to perform the implementations of the present application. Also, in some examples, the implementations of the present disclosure may be divided among one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform the implementations of the present application, alone, or in combination with other units of the video decoder 30, such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80. In some examples, the video decoder 30 may not include the intra BC unit 85 and the functionality of intra BC unit 85 may be performed by other components of the prediction processing unit 81, such as the motion compensation unit 82.
[0069] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by the other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source, such as a camera, via wired or wireless network communication of video data, or by accessing physical data storage media (e.g., a flash drive or hard disk). The video data memory 79 may include a Coded Picture Buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use in decoding video data by the video decoder 30 (e.g., in intra or inter predictive coding modes). 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 DRAM (SDRAM), Magneto-resistive RAM (MRAM), Resistive RAM (RRAM), or other types of memory devices. For illustrative purpose, the video data memory 79 and the DPB 92 are depicted as two distinct components of the video decoder 30 in FIG. 3. But 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 off-chip relative to those components.
[0070] During the decoding process, the video decoder 30 receives an encoded video bitstream that represents video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive the syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodesAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT the bitstream to generate quantized coefficients, motion vectors or intra-prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-prediction mode indicators and other syntax elements to the prediction processing unit 81.
[0071] When the 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 unit 84 of the prediction processing unit 81 may generate prediction data for a video block of the current video frame based on a signaled intra prediction mode and reference data from previously decoded blocks of the current frame.
[0072] When the video frame is coded as an inter-predictive coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 produces one or more predictive blocks for a video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each of the predictive blocks may be produced from a reference frame within one of the reference frame lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using default construction techniques based on reference frames stored in the DPB 92.
[0073] In some examples, when the video block is coded according to the intra BC mode described herein, the intra BC unit 85 of the prediction processing unit 81 produces predictive blocks for the current video block based on block vectors and other syntax elements received from the entropy decoding unit 80. The predictive blocks may be within a reconstructed region of the same picture as the current video block defined by the video encoder 20.
[0074] The motion compensation unit 82 and / or the intra BC unit 85 determines prediction information for a video block of the current video frame by parsing the motion vectors and other syntax elements, and then uses the prediction information to produce the predictive blocks for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to code video blocks of the video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter predictive encoded video block of the frame, inter prediction status for each inter predictive coded video block of the frame, and other information to decode the video blocks in the current video frame.
[0075] Similarly, the intra BC unit 85 may use some of the received syntax elements, e.g., a flag, to determine that the current video block was predicted using the intra BC mode, construction information of which video blocks of the frame are within the reconstructed regionAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information to decode the video blocks in the current video frame.
[0076] The motion compensation unit 82 may also perform interpolation using the interpolation filters as used by the video encoder 20 during encoding of the video blocks to calculate interpolated values for sub-integer pixels of reference blocks. In this case, the motion compensation unit 82 may determine the interpolation filters used by the video encoder 20 from the received syntax elements and use the interpolation filters to produce predictive blocks.
[0077] The inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by the entropy decoding unit 80 using the same quantization parameter calculated by the video encoder 20 for each video block in the video frame to determine a degree of quantization. The inverse transform processing unit 88 applies an inverse transform, e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct the residual blocks in the pixel domain.
[0078] After the motion compensation unit 82 or the intra BC unit 85 generates the predictive block for the current video block based on the vectors and other syntax elements, the summer 90 reconstructs decoded video block for the current video block by summing the residual block from the inverse transform processing unit 88 and a corresponding predictive block generated by the motion compensation unit 82 and the intra BC unit 85. An in-loop filter 91 such as deblocking filter, SAO filter, CCSAO filter and / or ALF may be positioned between the summer 90 and the DPB 92 to further process the decoded video block. In some examples, the in-loop filter 91 may be omitted, and the decoded video block may be directly provided by the summer 90 to the DPB 92. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames used for subsequent motion compensation of next video blocks. The DPB 92, or a memory device separate from the DPB 92, may also store decoded video for later presentation on a display device, such as the display device 34 of FIG. 1.
[0079] 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 SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other instances, a frame may be monochrome and therefore includes only one two-dimensional array of luma samples.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT
[0080] As shown in FIG.4A, the video encoder 20 (or more specifically the partition unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs ordered consecutively in a raster scan order from left to right and from top to bottom. Each CTU is a largest logical coding unit and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set, such that all the CTUs in a video sequence have the same size being one of 128×128, 64×64, 32×32, and 16×16. But it should be noted that the present application is not necessarily limited to a particular size. As shown in FIG. 4B, each CTU may comprise one CTB of luma samples, two corresponding coding tree blocks of chroma samples, and syntax elements used to code the samples of the coding tree blocks. The syntax elements describe properties of different types of units of a coded block of pixels and how the video sequence can be reconstructed at the video decoder 30, including inter or intra prediction, intra prediction mode, motion vectors, and other parameters. In monochrome pictures or pictures having three separate color planes, a CTU may comprise a single coding tree block and syntax elements used to code the samples of the coding tree block. A coding tree block may be an NxN block of samples.
[0081] To achieve a 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 and divide the CTU into smaller CUs. As depicted in FIG.4C, the 64x64 CTU 400 is first divided into four smaller CUs, each having a block size of 32x32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four CUs of 16x16 by block size. The two 16x16 CUs 430 and 440 are each further divided into four CUs of 8x8 by block size. FIG. 4D depicts a quad-tree data structure illustrating the end result of the partition process of the CTU 400 as depicted in FIG.4C, each leaf node of the quad-tree corresponding to one CU of a respective size ranging from 32x32 to 8x8. Like the CTU depicted in FIG.4B, each CU may comprise a CB of luma samples and two corresponding coding blocks of chroma samples of a frame of the same size, and syntax elements used to code the samples of the coding blocks. In monochrome pictures or pictures having three separate color planes, a CU may comprise a single coding block and syntax structures used to code the samples of the coding block. It should be noted that the quad-tree partitioning depicted in FIGS.4C and 4D is only for illustrative purposes and one CTU can be split into CUs to adapt to varying local characteristics based on quad / ternary / binary-tree partitions. In the multi-type tree structure, one CTU is partitioned by a quad-tree structure and each quad-tree leaf CU can be further partitioned by a binary and ternary tree structure. AsAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT shown in FIG.4E, there are five possible partitioning types of a coding block having a width W and a height H, i.e., quaternary partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.
[0082] In some implementations, the video encoder 20 may further partition a coding block of a CU into one or more MxN PBs. A PB is a rectangular (square or non-square) block of samples on which the same prediction, inter or intra, is applied. A PU of a CU may comprise a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements used to predict the PBs. In monochrome pictures or pictures having three separate color planes, a PU may comprise a single PB and syntax structures used to predict the PB. The video encoder 20 may generate predictive luma, Cb, and Cr blocks for luma, Cb, and Cr PBs of each PU of the CU.
[0083] The video encoder 20 may use intra prediction or inter prediction to generate the predictive blocks for a PU. If the video encoder 20 uses intra prediction to generate the predictive blocks of a PU, the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of the frame associated with the PU. If the video encoder 20 uses inter prediction to generate the predictive blocks of a PU, the video encoder 20 may generate the predictive blocks of the PU based on decoded samples of one or more frames other than the frame associated with the PU.
[0084] After the video encoder 20 generates predictive luma, Cb, and Cr blocks for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the CU’s predictive luma blocks from its original luma coding block such that each sample in the CU’s luma residual block indicates a difference between a luma sample in one of the CU's predictive luma blocks and a corresponding sample in the CU's original luma coding block. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, such that each sample in the CU's Cb residual block indicates a difference between a Cb sample in one of the CU's predictive Cb blocks and a corresponding sample in the CU's original Cb coding block and each sample in the CU's Cr residual block may indicate a difference between a Cr sample in one of the CU's predictive Cr blocks and a corresponding sample in the CU's original Cr coding block.
[0085] Furthermore, as illustrated in FIG. 4C, the video encoder 20 may use quad-tree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks respectively. A transform block is a rectangular (square or non- square) block of samples on which the same transform is applied. A TU of a CU may comprise a transform block of luma samples, two corresponding transform blocks of chroma samples,Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT and syntax elements used to transform 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 the TU may be a sub-block of the CU's luma residual block. The Cb transform block may be a sub-block of the CU's Cb residual block. The Cr transform block may be a sub-block of the CU's Cr residual block. In monochrome pictures or pictures having three separate color planes, a TU may comprise a single transform block and syntax structures used to transform the samples of the transform block.
[0086] The video encoder 20 may apply one or more transforms to a luma transform block of a TU to generate a luma coefficient block for the TU. A coefficient block may be a two- dimensional array of transform coefficients. A transform coefficient may be a scalar quantity. The video encoder 20 may apply one or more transforms to a Cb transform block of a TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to a Cr transform block of a TU to generate a Cr coefficient block for the TU.
[0087] 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 possibly reduce the amount of data used to represent the transform coefficients, providing further compression. After the video encoder 20 quantizes a coefficient block, the video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream that includes a sequence of bits that forms a representation of coded frames and associated data, which is either saved in the storage device 32 or transmitted to the destination device 14.
[0088] After receiving a bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct the frames of the video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally reciprocal to the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform inverse transforms on the coefficient blocks associated with TUs of a current CU to reconstruct residual blocks associated with the TUs of the current CU. The video decoder 30 also reconstructs the coding blocks of the current CU by adding the samples of the predictive blocks for PUs of the current CU to corresponding samples of the transform blocks of the TUsAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT of the current CU. After reconstructing the coding blocks for each CU of a frame, video decoder 30 may reconstruct the frame.
[0089] As noted above, video coding achieves video compression using primarily two modes, i.e., intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter- prediction). It is noted that IBC could be regarded as either intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to the coding efficiency than intra-frame prediction because of the use of motion vectors for predicting a current video block from a reference video block.
[0090] But with the ever improving video data capturing technology and more refined video block size for preserving details in the video data, the amount of data required for representing motion vectors for a current frame also increases substantially. One way of overcoming this challenge is to benefit from the fact that not only a group of neighboring CUs in both the spatial and temporal domains have similar video data for predicting purpose but the motion vectors between these neighboring CUs are also similar. Therefore, it is possible to use the motion information of spatially neighboring CUs and / or temporally co-located CUs as an approximation of the motion information (e.g., motion vector) of a current CU by exploring their spatial and temporal correlation, which is also referred to as “Motion Vector Predictor (MVP)” of the current CU.
[0091] Instead of encoding, into the video bitstream, an actual motion vector of the current CU determined by the motion estimation unit 42 as described above in connection with FIG. 2, the motion vector predictor of the current CU is subtracted from the actual motion vector of the current CU to produce a Motion Vector Difference (MVD) for the current CU. By doing so, there is no need to encode the motion vector determined by the motion estimation unit 42 for each CU of a frame into the video bitstream and the amount of data used for representing motion information in the video bitstream can be significantly decreased.
[0092] Like the process of choosing a predictive block in a reference frame during inter- frame prediction of a code block, a set of rules need to be adopted by both the video encoder 20 and the video decoder 30 for constructing a motion vector candidate list (also known as a “merge list”) for a current CU using those potential candidate motion vectors associated with spatially neighboring CUs and / or temporally co-located CUs of the current CU and then selecting one member from the motion vector candidate list as a motion vector predictor for the current CU. By doing so, there is no need to transmit the motion vector candidate list itself from the video encoder 20 to the video decoder 30 and an index of the selected motion vector predictor within the motion vector candidate list is sufficient for the video encoder 20 and theAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT video decoder 30 to use the same motion vector predictor within the motion vector candidate list for encoding and decoding the current CU.
[0093] In the Enhanced Compression Model (ECM), cross component prediction techniques are utilized to improve the compression efficiency of chroma components. Example cross component prediction techniques and their improved variants are introduced herein.
[0094] A brief description of CCLM prediction is provided below. To reduce the cross component redundancy, a CCLM prediction mode is used in the VVC, where chroma samples of a video block (e.g., a CU) are predicted based on reconstructed luma samples (e.g., recL(i, j))of the CU by using a filtering function of a linear model as follows using expression (1):predC(i, j) = α · recL'(i, j) + β. (1)
[0095] In the above expression (1), predC(i, j)represents a prediction chroma sample in asample position(i, j)of the CU; recL′(i, j)represents a downsampled reconstructed lumasample of the CU which is obtained by performing downsampling on a reconstructed lumasample recL(i, j)in the sample position(i, j)of the CU; and α and β are linear modelcoefficients (also referred to as linear model parameters) which are derived from at most four neighbouring chroma samples and their corresponding downsampled luma samples. Suppose that a current chroma block has a size of W×H, where W represents a width and H represents a height of the chroma block. Then, an adjusted width W’ and an adjusted H’ can be obtained as follows using expressions (2)-(4): W’ = W, H’ = H, when a linear model (LM) mode is applied; (2) W’ =W + H, when an LM_A mode is applied; (3) H’ = H + W, when an LM_L mode is applied. (4)
[0096] In the LM mode, above samples and left samples of the CU are used together to calculate the linear model parameters α and β. The above samples can be samples on top of (or above) the CU. The left samples can be samples on the left of the CU. LM_A may denote a linear model with above samples. In the LM_A mode, only the above samples of the CU are used to calculate the linear model parameters α and β. LM_L may denote a linear model with left samples. In the LM_L mode, only the left samples of the CU are used to calculate the linear model parameters α and β.
[0097] Based on the adjusted width W’ and the adjusted height H’, locations of above samples of a chroma block are denoted as S[0, −1], …, S[W’ − 1, −1], and locations of left samples of the chroma block are denoted as S[−1, 0], …, S[−1, H’ − 1]. Positions of four neighbouring chroma samples are selected according to three cases. In a first case, S[W’ / 4,Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT −1], S[ 3 * W’ / 4, −1], S[ −1, H’ / 4], and S[ −1, 3 * H’ / 4] are selected as the positions of the four neighbouring chroma samples when (i) the LM mode is applied and (ii) both the above samples and the left samples are available. In a second case, S[ W’ / 8, −1], S[ 3 * W’ / 8, −1], S[ 5 * W’ / 8, −1], and S[ 7 * W’ / 8, −1] are selected as the positions of the four neighbouring chroma samples when (i) the LM_A mode is applied and (ii) the above samples are available (or when only the above samples are available). In a third case, S[ −1, H’ / 8], S[ −1, 3 * H’ / 8], S[ −1, 5 * H’ / 8], and S[ −1, 7 * H’ / 8] are selected as the positions of the four neighbouring chroma samples when (i) the LM_L mode is applied and (ii) the left samples are available (or when only the left samples are available).
[0098] Four neighbouring luma samples corresponding to the selected locations (e.g., the selected locations in the above first, second or third case) are obtained by a downsampling operation. For example, neighboring reconstructed luma samples are downsampled to obtain four neighbouring luma samples corresponding to the selected locations, so that the obtained four neighbouring luma samples can be downsampled reconstructed luma samples corresponding to the selected locations. Then, the obtained four neighboring luma samples are compared four times among themselves to find two larger values (denoted as x0A and x1A) and two smaller values (denoted as x0B and x1B) among themselves. Chroma sample values corresponding to the two larger values and the two smaller values are denoted as y0A, y1A, y0B, and y1B, respectively. Then, Xa, Xb, Yaand Ybare derived as follows using expressions (5)-(8):
[0099] In the above expressions (5)-(8), “>>” represents a right shift operator. Subsequently, the linear model parameters ^^^^ and ^^^^ are obtained according to the following expressions (9) and (10):β = ^^^^^^^^− α · ^^^^^^^^. (10)
[0100] FIG. 5 shows a diagram of locations of left samples and above samples of a CU involved in the CCLM mode. For example, FIG. 5 shows locations of left samples 502 andAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT locations of above samples 504 of an N×N chroma block 501 in the CU. FIG.5 also shows locations of downsampled left samples 506 and downsampled above samples 508 of an 2N× 2N luma block 503 in the CU.
[0101] The parameter computation described above can be performed as part of the decoding process. Therefore, there is no need to signal a syntax element to convey values of α and β from video encoder 20 to video decoder 30.
[0102] The CCLM included in the VVC can be extended by adding three Multi-Model Linear Model (MMLM) modes (JVET-D0110). In each MMLM mode, the neighboring reconstructed samples are classified into two classes using a threshold which is an average of the neighboring reconstructed luma samples. The parameters of a linear model in each class can be derived using the Least-Mean-Square (LMS) method. For the CCLM mode, the LMS method is also used to derive the parameters of the linear model. A slope adjustment can be applied to the CCLM prediction and the MMLM prediction. The adjustment is configured to tilt a linear function which maps luma values to chroma values with respect to a center point determined by an average luma value of the reference samples.
[0103] With respect to the slope adjustment of the CCLM, the CCLM may use a model with 2 parameters to map luma values to chroma values. A slope parameter “a” and a bias parameter “b” can be used to determine a filtering function as shown in the following expression (11) (as shown in the left graph of FIG.6): chromaVal = a * lumaVal + b. (11)
[0104] In the above expression (11), chromaVal and lumaVal may represent a chroma sample value and a luma sample value, respectively. An adjustment “u” to the slope parameter “a” is signaled to update the filtering function of the model to a form as follows (as shown with a solid line in the right graph of FIG.6): chromaVal = a’ * lumaVal + b’. (12)
[0105] In the above expression (12), a’ = a + u, and b’ = b - u * yr. yrrepresents an average luma value of the reference samples. With this adjustment, the filtering function is tilted or rotated around the point having the average luma value yr. The average luma value yrof the reference samples can provide a meaningful modification to the model, as shown in FIG.6.
[0106] The slope adjustment parameter “u” can be provided as an integer between -4 and 4, inclusive, and signaled in the bitstream. The unit of the slope adjustment parameter is 1 / 8th of a chroma sample value per one luma sample value (for 10-bit content). The slope adjustment is available for the CCLM models that use both above reference samples and left reference samples of the video block (“LM_CHROMA_IDX” and “MMLM_CHROMA_IDX”), but notAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT for the “single side” modes (e.g., when only above reference samples or only left reference samples are available). This adjustment is based on the trade-off consideration between coding efficiency and complexity. When the slope adjustment is applied for a multi-model CCLM mode, both models in the two classes of the multi-model CCLM mode can be adjusted, and thus up to two slope updates (e.g., up to two slope adjustment parameters) are signaled for a single chroma block.
[0107] On the encoder side, a Sum of Absolute Transformed Difference (SATD) based search can be performed to search for the best value of the slope update for Cr, and a similar SATD based search can be performed to search for the best value of the slope update for Cb. If either search leads to a non-zero slope adjustment parameter, a combined slope adjustment pair (e.g., including the SATD based update for Cr and the SATD based update for Cb) is included in the list of Rate Distortion (RD) checks for the TU.
[0108] A convolutional cross component intra prediction model is provided herein. In this case, a convolutional cross component model (CCCM) is applied to predict chroma samples from reconstructed luma samples like that in the CCLM modes. Like the CCLM, the reconstructed luma samples are downsampled to match a lower resolution chroma grid when chroma sub-sampling is used. Similar to the CCLM, top reference samples, left reference samples, or both top and left reference samples, are used as templates for model derivation.
[0109] Also similar to the CCLM, there is an option of using a single model or multi-model variant of CCCM. The multi-model variant uses two models, including a first model derived for samples being greater than an average luma reference value (e.g., an average luma value of the reference samples) and a second model for the rest of the samples, like that of the CCLM design. The multi-model CCCM mode can be selected for PUs which have at least 128 reference samples available.
[0110] A convolutional filter (e.g., a convolutional 7-tap filter) can be applied in the CCCM mode, which includes (i) a 5-tap plus sign shape spatial component, (ii) a non-linear term PNL, and (iii) a bias term. As shown in FIG.7, the input to the 5-tap spatial component of the filter may include: (i) a center (C) luma sample which is collocated with a chroma sample to be predicted; (ii) a north (N) luma sample above the center luma sample; (iii) a south (S) luma sample below the center luma sample; (iv) a west (W) luma sample on the left of the center luma sample; and (v) an east (E) luma sample on the right of the center luma sample. The north, south, west and east luma samples are neighboring samples of the center luma sample.
[0111] The non-linear term PNLis represented as power of two of the center luma sample C and scaled to the sample value range of the content as follows in expression (13):Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT PNL= P(C) = (C*C + midVal) >> bitDepth. (13)
[0112] In the above expression (13), midVal represents a middle chroma value, and bitDepth represents the sample value range of the content. For example, for 10-bit content, midVal = 512, bitDepth = 10, and the above expression (13) can be rewritten as follows in expression (14): PNL= P(C) = (C*C + 512) >> 10. (14)
[0113] The bias term B represents a scalar offset between the input and the output (similar to the offset term in CCLM) and can be set to the middle chroma value (e.g., 512 for 10-bit content). As a result, the output of the filter applied in the CCCM mode can be calculated as a convolution between the filter coefficients ci(e.g., c0, c1, c2, c3, c4, c5, c6) and the input values (e.g., C, N, S, E, W, PNL, B), and clipped to the range of valid chroma samples. For example, a filtering function in the CCCM mode can be written as follows: predChromaVal = c0C + c1N + c2S + c3E + c4W + c5PNL+ c6B. (15)
[0114] In the above expression (15), predChromaVal represents a value of a prediction chroma sample (e.g., a prediction value of a chroma sample); C represents a center luma sample which is collocated with the chroma sample to be predicted; N, S, E, and W represent the north, south, west and east luma samples of the center luma sample, respectively; PNLrepresents the non-linear term; and B represents the bias term.
[0115] Calculation of the filter coefficients ci(e.g., c0, c1, c2, c3, c4, c5, c6) are described below. Specifically, the filter coefficients can be calculated by minimizing a mean squared error (MSE) between prediction chroma samples and reconstructed chroma samples in a reference area. For example, as shown in FIG.8, a current video block 801 may have a current template 802. A reference block 803 corresponding to video block 801 is shown in FIG.8, and has a reference template 804 corresponding to current template 802. The template 802 and reference template 804 are utilized to derive the filter coefficients. The filter coefficients can be calculated by minimizing an MSE between (i) prediction chroma samples calculated based on the expression (15) for the chroma samples in reference template 804 and (ii) the reconstructed chroma samples in current template 802.
[0116] In another example, FIG. 9 illustrates a reference area 901 which includes 6 lines of chroma samples above a PU 900 and 6 lines of chroma samples on the left of PU 900. Reference area 901 may extend by a width of one line of chroma samples to the right of the PU boundary and by a height of one line of chroma samples below the PU boundary. Extensions to reference area 901 are illustrated by shaded areas 904. Reference area 901 may be adjustedAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT to include only available samples. Extensions 904 to reference area 901 are needed to support the “side samples” of the plus sign shape spatial filter and are padded when samples in extensions 904 are unavailable.
[0117] The MSE minimization can be performed by calculating an autocorrelation matrix for the luma input and a cross-correlation vector between the luma input and the chroma output. The autocorrelation matrix is LDL decomposed (where L represents a lower unit triangular matrix, and D represents a diagonal matrix), and the filter coefficients are calculated using back-substitution. The process is similar to the calculation of the ALF filter coefficients in the ECM, where the LDL decomposition rather than the Cholesky decomposition is chosen to avoid using square root operations.
[0118] The autocorrelation matrix can be calculated using the reconstructed values of luma and chroma samples. These samples are full range (e.g., between 0 and 1023 for 10-bit content), resulting in relatively large values in the autocorrelation matrix. This requires a high bit depth operation during the model parameter calculation. However, fixed offsets can be removed from luma and chroma samples in each PU for each model. This can reduce the magnitudes of the values used in the model parameter calculation, and allows reducing the precision needed for the fixed-point arithmetic. As a result, the 16-bit decimal precision is provided instead of the 22-bit precision of the original CCCM implementation.
[0119] Reference sample values which are outside the top-left corner of the PU are used as the offsets (offsetLuma, offsetCb, and offsetCr) for simplicity. The sample values used in both model parameter calculation and final prediction (i.e., including luma and chroma samples in the reference area, and luma samples in the current PU) are reduced by these offset values according to following expressions (16)-(22): C' = C – offsetLuma, (16) N' = N – offsetLuma, (17) S' = S – offsetLuma, (18) E' = E – offsetLuma, (19) W' = W – offsetLuma, (20) PNL' = nonLinear(C') = (C'* C' + midVal)>>bitDepth, (21) B = midVal = 1 << (bitDepth – 1). (22)
[0120] Then, the chroma value is predicted using a filtering function determined by the following expression (23): predChromaVal = c0C' + c1N' + c2S' + c3E' + c4W' + c5PNL' + c6B + offsetChroma. (23)
[0121] In the above expression (23), predChromaVal represents a value of the predictionAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT chroma sample. For the Cr component, offsetChroma is equal to offsetCr. For the Cb component, offsetChroma is equal to offsetCb. To avoid any additional sample level operations, the luma offset is removed during the luma reference sample interpolation. This can be done, for example, by substituting the rounding term used in the luma reference sample interpolation with an updated offset including both the rounding term and the offsetLuma. The chroma offset can be removed by deducting the chroma offset directly from the reference chroma samples. Alternatively, impact of the chroma offset can be removed from the cross component vector giving the identical result. In order to add the chroma offset back to the output of the convolutional prediction operation, the chroma offset is added to the bias term of the convolutional model.
[0122] The process of the CCCM model parameter calculation needs division operations. However, division operations are not always considered implementation friendly. Consistent with some implementations, the division operations may be replaced with the multiplication (with a scale factor) and shift operation, where the scale factor and the number of shifts are calculated based on denominator similar to the method used in the calculation of CCLM parameters.
[0123] A brief description of a Gradient Linear Model (GLM) is also provided herein. For the YUV 4:2:0 color format, a GLM method can be used to predict the chroma samples from luma sample gradients. Two modes are supported in the GLM method, including a two- parameter GLM mode and a three-parameter GLM mode. Compared with the CCLM mode, the two-parameter GLM mode utilizes luma sample gradients to derive a function of a linear model instead of downsampling the luma values. Specifically, the input to the CCLM mode (i.e., the downsampled luma samples ^^^^) are replaced by luma sample gradients ^^^^ when the two-parameter GLM mode is applied. The other parts of the CCLM mode (e.g., parameter derivation, prediction sample linear transform) are kept unchanged in the two-parameter GLM mode. For example, a filtering function of the two-parameter GLM mode can be determined by the following expression (24): ^^^^_ ^^^^ ^^^^ ^^^^ ^^^^ = ^^^^ ∙ ^^^^ + ^^^^. (24)
[0124] In the above expression (24), C_Pred represents a prediction value of a chroma sample (e.g., a value of a prediction chroma sample), G represents a luma sample gradient, and ^^^^ and ^^^^ represent model parameters.
[0125] In the three-parameter GLM mode, a chroma sample can be predicted based on both the luma sample gradients and downsampled luma values with different model parameters.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT The model parameters of the three-parameter GLM mode are derived from 6 rows and 6 columns of adjacent samples by the MSE minimization method based on the LDL decomposition as used in the CCCM mode. For example, a filtering function of the three- parameter GLM mode can be determined by the following expression (25): ^^^^_ ^^^^ ^^^^ ^^^^ ^^^^ = ^^^^0∙ ^^^^ + ^^^^1∙ ^^^^ + ^^^^2∙ ^^^^. (25)
[0126] In the above expression (25), ^^^^0, ^^^^1, ^^^^2, and ^^^^ represents model parameters. G represents a luma sample gradient. L represents a downsampled luma value.
[0127] For signaling, when the CCLM mode is enabled to the current CU, a flag is signaled to indicate whether GLM is enabled for both the Cb and Cr components. If the GLM is enabled, another flag is signaled to indicate which of the two GLM modes is selected, and a syntax element is further signaled to select one of four gradient filters for the gradient calculation. The four gradient filters for the GLM are illustrated in FIG.10.
[0128] With respect to the bitstream signaling, a mode usage is signaled with a CABAC coded PU level flag. A new CABAC context can be included to support this signaling. In the signaling, CCCM is considered as a sub-mode of CCLM. That is, the CCCM flag is only signaled if the intra prediction mode is LM_CHROMA.
[0129] A brief description of the CCCM mode using non-downsampled luma samples is provided herein. In some applications, the CCCM mode is applied using non-downsampled luma samples (e.g., the luma samples are used directly without a downsampling operation). This CCCM mode can also be referred to as CCCM without downsampling. For example, the CCCM mode with a 3×2 filter using non-downsampled luma samples can be applied, which includes 6-tap spatial terms, four non-linear terms, and a bias term. As shown in FIG.11, the 6-tap spatial terms correspond to 6 neighboring luma samples (i.e., L0, L1, …, L5) around the chroma sample (e.g., C) to be predicted. The four non-linear terms are derived from the luma samples L0, L1, L2, and L3. A filtering function of this CCCM mode using non-downsampled luma samples can be expressed using the following expression (26): ^^^^_ ^^^^ ^^^^ ^^^^ ^^^^ =∑5^^^^=0 ^^^^ ^^^^ ∙ ( ^^^^ ^^^^ − offsetLuma) +∑9^^^^=6 ^^^^ ^^^^ ∙ ((( ^^^^ ^^^^−4 −offsetLuma)2+ ^^^^) ≫^^^^ ^^^^ ^^^^ ^^^^ ^^^^ ^^^^ ^^^^ℎ) + ^^^^10∙ ^^^^ + offsetChroma. (26)
[0130] In the above expression (26), ^^^^^^^^represent a coefficient (e.g., i = 0, 1, ..., 9), ^^^^represents an offset. ∑5 ^^^^ ∙ ( ^^^^ − offset ∑9^^^^=0 ^^^^ ^^^^ Luma) represent the 6-tap spatial terms. ^^^^=6 ^^^^ ^^^^ ∙((( ^^^^ ^^^^−4 −offsetLuma)2 + ^^^^) ≫ ^^^^ ^^^^ ^^^^ ^^^^ ^^^^ ^^^^ ^^^^ℎ) represent the four non-linear terms. Like theprevious CCCM design with downsampled luma samples, up to 6 rows of chroma samples above the current CU and 6 columns of chroma samples on the left to the current CU are appliedAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT to derive the model parameters. The model parameters are derived based on the same LDL decomposition method used in the previous CCCM design. The CCCM mode using non- downsampled luma samples is signaled as an additional CCCM mode. When the CCCM mode is selected, a flag is signaled and used for both two chroma components to indicate whether the default CCCM mode using downsampled luma samples or the CCCM mode using non- downsampled luma samples is applied. Additionally, the sequence parameter set (SPS) signaling is introduced to indicate whether the CCCM mode using non-downsampled luma samples is enabled.
[0131] With respect to the Gradient and Location based convolutional cross component model (GL-CCCM), luma values can be mapped into chroma values using a filter with inputs including a spatial luma sample, two gradient values, two sets of location information, a non- linear term, and a bias term. The GL-CCCM mode uses gradient and location information instead of the 4 spatial neighbor samples used in the filter of the CCCM mode. A filtering function of the GL-CCCM mode used for the chroma prediction can be written using the following expression (27):
[0132] In the above expression (27), ^^^^ represents a center spatial luma sample; ^^^^^^^^and ^^^^^^^^represent two gradient values, e.g., a vertical gradient and a horizontal gradient, respectively; ^^^^ and ^^^^ represent two sets of location information, e.g., spatial coordinates of the center luma sample ^^^^ such as a vertical coordinate and a horizontal coordinate of the center luma sample, respectively; ^^^^^^^^ ^^^^represents a non-linear term; and ^^^^ represents a bias term. With reference to FIG. 12, ^^^^^^^^and ^^^^^^^^can be calculated using the following expressions (28) and (29), respectively: ^^^^ ^^^^ =(2 ^^^^ + ^^^^ ^^^^ + ^^^^ ^^^^)–(2 ^^^^ + ^^^^ ^^^^ + ^^^^ ^^^^), (28)^^^^^^^^= (2 ^^^^ + ^^^^ ^^^^ + ^^^^ ^^^^) – (2 ^^^^ + ^^^^ ^^^^ + ^^^^ ^^^^). (29)
[0133] In the above expressions (28) and (29), N, NW, NE, S, SW, SE, W, NW, and E represent a north luma sample, a northwest luma sample, a northeast luma sample, a south luma sample, a southwest luma sample, a southeast luma sample, a west luma sample, and an east luma sample neighboring the center luma sample C, respectively, as shown in FIG. 12. The rest of the model parameters in the expression (27) are the same as those in the expression (15) described above. A reference area for the parameter calculation can be the same as the CCCM mode described above.
[0134] The usage of the GL-CCCM mode is signaled with a CABAC coded PU level flag.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT In the signaling, GL-CCCM is considered as a sub-mode of CCCM. That is, the GL-CCCM flag is only signaled if an original CCCM flag is true.
[0135] Similar to the CCCM mode, the GL-CCCM mode has 6 modes for calculating the parameters, including: (i) a single-model GL-CCCM from above template samples and left template samples; (i) a single-model GL-CCCM from above template samples; (iii) a single- model GL-CCCM from left template samples; (iv) a multi-model GL-CCCM from above template samples and left template samples; (v) a multi-model GL-CCCM from above template samples; and (vi) a multi-model GL-CCCM from left template samples. In some examples, video encoder 20 performs an SATD based search for the 6 GL-CCCM modes along with the CCCM modes to find the best candidates for full RD tests.
[0136] With respect to the CCCM mode with multiple downsampling filters, the multiple downsampling filters can be applied to a group of reconstructed luma samples. A linear combination of these downsampled reconstructed samples is multiplied by the derived filter coefficients to form the final chroma predictor. The horizontal and vertical locations of the center luma sample are also considered in the tested model. The cross component models (e.g., Model 1, Model 2, Model 3) shown in the following expressions (30)-(32) are tested as additional CCCM modes with a mode index signaled in the bitstream. For example, filtering functions of these models can be written in the following expressions (30)-(32): Model 1: predChroma = c0* H(C) + c1* G1(C) + c2* G2(C) + c3* G3(C) + c4* P(H(C)) + c5* P(G1(C)) + c6* P(G2(C)) + c7* X + c8* Y + c9* B, (30) Model 2: predChroma = c0* H(C) + c1* H(W) + c2* H(E) + c3* G1(C) + c4* G1(W) + c5* G1(E) + c6* P(H(C)) + c7* P(H(W)) + c8* P(H(E)) + c9* X + c10* B, (31) Model 3: predChroma = c0* H(C) + c1* H(NE) + c2* H(SW) + c3* G3(C) + c4* G3(NE) + c5* G3(SW) + c6* P(H(C)) + c7* P(H(NE)) + c8* P(H(SW)) + c9* Y + c10* B. (32)
[0137] In the above expressions (30)-(32), H(·), G1(·), G2(·), and G3(·) are various downsampling filters as shown in FIG.13. C denotes a center luma sample collocated with the chroma sample to be predicted, and N, S, W, E, NE, SW are north, south, west, east, northeast and southwest luma samples around C, respectively, as shown in FIG. 12; ciare filter coefficients (e.g., i = 0, 1, ..., 10); P(·) represents a non-linear term and can be calculated using the expression (13); B represents a bias term; and X and Y are the horizontal and vertical locations of the center luma sample with respect to the top-left coordinates of the video block, respectively.
[0138] With respect to local-boosting cross component prediction, prediction samples of MM-CCLM / MM-CCCM can be filtered with neighboring samples. As shown in FIG. 14, aAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT 3×3 low-pass filter is applied to filter prediction samples generated by MM-CCLM / MM- CCCM. For a sample on a top or left boundary, a filtering window may involve neighboring reconstructed samples. For inner samples, the filtering window only involves prediction samples, which may be padded. A flag is signaled to indicate whether filtering is applied for a block coded with MM-CCLM / MM-CCCM.
[0139] A brief description of a Cross Component Prediction (CCP) merge mode is provided herein. Specifically, for chroma coding, a flag is signaled to indicate whether a CCP mode (including CCLM, CCCM, GLM, and their variants) or a non-CCP mode (e.g., a conventional chroma intra prediction mode, a fusion of chroma intra prediction mode) is used. If the CCP mode is selected, another flag is signaled to indicate how to derive the CCP type and parameters, i.e., either from a CCP merge list or signaled / derived on-the-fly. The CCP merge list is constructed from spatial adjacent candidates, spatial non-adjacent candidates, or history-based candidates. After including these candidates in the CCP merge list, default candidates (e.g., default models) may be further included into the merge list if the merge is not full yet. In order to remove redundant CCP models from the merge list, a pruning operation is applied. After constructing the merge list, the CCP models in the merge list are reordered depending on their respective SAD costs which are obtained using a neighboring template of the current block.
[0140] With respect to spatial adjacent candidates and non-adjacent candidates in the CCP merge mode, positions and an inclusion order of the spatial adjacent candidates and the non- adjacent candidates are the same as those determined in the ECM for regular inter merge prediction candidates. With respect to history-based candidates, a history-based table is maintained to include the recently used CCP models as the history-based candidates, and the table is reset at the beginning of each CTU row. If the current merge list is not full after including the spatial adjacent candidates and non-adjacent candidates, the CCP models in the history-based table are added into the merge list.
[0141] With respect to default candidates, CCLM candidates with default scaling parameters are included into the merge list only when the merge list is not full after including the spatial adjacent candidates, the spatial non-adjacent candidates, or the history-based candidates into the list. If the current merge list has no candidates with the single-model CCLM mode, the default scaling parameters are {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8, -3 / 8, 4 / 8, -4 / 8, 5 / 8, -5 / 8, 6 / 8}. Otherwise, the default scaling parameters are {0, the scaling parameter of the first CCLM candidate + {1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8, -3 / 8, 4 / 8, -4 / 8, 5 / 8, -5 / 8, 6 / 8}}. The offset parameter is derived according to the default scaling parameters, an average neighboring reconstructed luma sample value, and an average neighboring reconstructed Cb / Cr sample value.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT
[0142] A flag is signaled to indicate whether the CCP merge mode is applied or not. If the CCP merge mode is applied, an index is signaled to indicate which candidate model in the merge list is used by the current block. In addition, the CCP merge mode is not allowed for the current chroma coding block when the current CU is coded by intra sub-partitions (ISP) with a single tree, or when a block size of the current chroma coding block is less than or equal to 16.
[0143] A brief description for a cross component residual prediction technique is provided herein. A cross component residual model (CCRM) can be applied to predict chroma samples from reconstructed luma samples when the video block uses inter prediction or intra block copy (IBC). FIG. 15A illustrates a process of the cross component residual prediction technique with a CCRM model on a decoder side. The CCRM model may include a cross component filter for each chroma component (the Cb or Cr component). In step 1502, the cross component filter may be derived using a prediction luma block predY and a prediction chroma block (predCb or predCr). In step 1503, a reconstructed luma block may be generated by combining (e.g., summing) the prediction luma block predY with a residual luma block resY. In step 1504, the cross component filter derived in step 1502 may be applied to the reconstructed luma block generated in step 1503 to generate a cross-component prediction chroma block. Then, in step 1506 or 1508, the cross-component prediction chroma block may be combined with the prediction chroma block (predCb or predCr) to produce a refined prediction chroma block. In some implementations, to combine the cross-component prediction chroma block with the prediction chroma block, the cross-component prediction chroma block may be weighted using a first weight 0.75, and the prediction chroma block (predCb or predCr) may be weighted using a second weight 0.25 (e.g., the refined prediction chroma block = the cross-component prediction chroma block*0.75 + the prediction chroma block*0.25). Subsequently, in step 1510 or 1512, the refined prediction chroma block may be combined with a residual chroma block (resCb or resCr) to generate a reconstructed chroma block (Cb or Cr).
[0144] For example, the CCRM model may include a first cross component filter for the Cr component and a second cross component filter for the Cb component. In step 1502, filter coefficients for the first cross component filter may be determined based on (i) prediction luma samples in the prediction luma block predY and (ii) prediction Cr samples in the prediction Cr block predCr. In step 1504, the first cross component filter derived in step 1502 may be applied to the reconstructed luma samples generated in step 1503 to generate cross-component prediction Cr samples. Then, in step 1508, the cross-component prediction Cr samples may be combined with prediction Cr samples to produce refined prediction Cr samples, respectivelyAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT (e.g., the refined prediction Cr sample = the cross-component prediction Cr sample*0.75 + the prediction Cr sample*0.25). Subsequently, in step 1512, the refined prediction Cr samples may be added to residual Cr samples to generate reconstructed Cr samples, respectively.
[0145] Similarly, in step 1502, filter coefficients for the second cross component filter may be determined based on (i) the prediction luma samples in the prediction luma block predY and (ii) prediction Cb samples in the prediction Cb block predCb. In step 1504, the second cross component filter derived in step 1502 may be applied to the reconstructed luma samples generated in step 1503 to generate cross-component prediction Cb samples. Then, in step 1506, the cross-component prediction Cb samples may be combined with prediction Cb samples to produce refined prediction Cb samples, respectivley (e.g., the refined prediction Cb sample = the cross-component prediction Cb sample*0.75 + the prediction Cb sample*0.25). Subsequently, in step 1510, the refined prediction Cb samples may be added to residual Cb samples to generate reconstructed Cb samples, respectively.
[0146] In some implementations, each cross component filter (e.g., the first cross component filter for the Cr component or the second cross component filter for the Cb component described above) may be a 8-tap filter including 6 spatial luma-sample terms, a nonlinear term, and a bias term. The 6 spatial luma-sample terms may use 6 spatial luma samples (L0, …, L5) as inputs, respectively. A filter shape of the cross component filter is shown in FIG. 15B, where the spatial luma samples (L0, …, L5) are obtained from the luma grid which selects the 6 luma samples closest to a position of a chroma sample to be predicted (e.g., at a position C) without downsampling. A value of a cross-component prediction chroma sample output from the cross component filter may be obtained using the following expression (33): predChroma = c0*L0+ c1*L1+ c2*L2+ c3*L3+ c4*L4+ c5*L5+ c6*nonlinear((L0+L3+1) >> 1) + c7*B. (33)
[0147] In the above expression (33), predChroma represents the value of the cross- component prediction chroma sample corresponding to the chroma sample to be predicted; L0, L1, L2, L3, L4, and L5are reconstructed luma samples around the chroma sample at the position C as shown in FIG.15B; nonlinear(·) represents the CCCM’s nonlinear operator; B represents a bias value; and cirepresents a filter coefficient with i=0, 1, ..., 7 for the cross component filter.
[0148] In some implementations, the filter coefficients for the cross component filter can be derived using the division-free Gaussian elimination method in ECM, and offsets are applied to samples prior to the filter derivation. To derive the filter coefficients, at most 256 chroma samples are used.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT
[0149] Usage of the cross component residual prediction technique is signaled with a CABAC coded TU level flag (e.g., a CCRM flag). A new CABAC context can be included to support this mode. This CCRM flag is only signaled when the TU’s luma Cbf is non-zero and the CU’s prediction mode (predMode) is either inter prediction (MODE_INTER) or intra block copy (MODE_IBC).
[0150] The cross component residual prediction technique described above can improve the efficiency of chroma coding in the ECM. However, its design can still be further improved. Example deficiencies in the cross component residual prediction technique described above are identified blow. For example, at most 256 chroma samples are utilized to derive the filter coefficients of the cross component filter in the cross component residual prediction technique described above. When a video block has a large block size (e.g., the total number of chroma samples are more than 256), the pixels (e.g., the chroma samples) are subsampled with one or more subsampling step sizes for the derivation of the filter coefficients. However, the subsampling method may not be optimal for the coding efficiency.
[0151] In another example, a filter shape of the cross component filter which maps luma samples to chroma samples is fixed as shown in FIG.15B. Keeping the filter shape unchanged may result in a failure to deal with the diverse characteristics of video content.
[0152] In still another example, as shown in the above expression (33), the filtering operation of the cross component filter is directly applied to the luma samples L0, L1, L2, L3, L4, and L5without the downsampling operation like CCLM and CCCM. Such design may limit the receptive field of the cross component filter.
[0153] In yet another example, as shown in in step 1506 or 1508 of FIG.15A, the refined prediction chroma sample is a weighted sum of (i) the prediction chroma sample derived from inter prediction or intra block copy and (ii) the cross-component prediction chroma sample output from the cross component filter. However, in this specific example, the weighting factors (e.g., 0.75 and 0.25) for this summation are fixed, which may not be optimal for coding efficiency.
[0154] Consistent with some aspects of the present disclosure, improved cross component residual prediction schemes are disclosed herein to address one or more of the above-identified deficiencies so that the coding efficiency is further improved. The improved cross component residual prediction schemes disclosed herein may be applied individually or combinedly, which is not limited herein. Referring to FIG. 16A, improved cross component residual prediction schemes 1600 disclosed herein may include a subsampling scheme 1602, an adaptive filter shape selection scheme 1604, a CCRM scheme 1606 with downsampling filtering, and anAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT adaptive weighting factor selection scheme 1608. FIG. 16B shows a process of cross component residual prediction using a CCRM model in accordance with some implementations of the present disclosure. One or more of schemes 1602, 1604, 1606, and 1608 can be applied in the process of cross component residual prediction shown in FIG.16B. FIGs.16A and 16B are described below together.
[0155] Referring to FIG.16B, the CCRM model may include a cross component filter for each chroma component (e.g., the Cb component or the Cr component). The process of FIG. 16B can be performed for each chroma component. In step 1612, the cross component filter may be derived using prediction luma samples and prediction chroma samples associated with a video block. In some implementations, a block size of a prediction chroma block formed by the prediction chroma samples is not greater than a predetermined threshold (e.g., the total number of the prediction chroma samples in the prediction chroma block is not greater than 256). A set of filter coefficients for the cross component filter can be derived using the division- free Gaussian elimination method in ECM, and offsets are applied to samples prior to the filter derivation, like that described above with reference to FIG.15A.
[0156] In some implementations, the block size of the prediction chroma block is greater than the predetermined threshold (e.g., the total number of the prediction chroma samples in the prediction chroma block is greater than 256). The prediction chroma samples may be downsampled to generate downsampled prediction chroma samples based on the block size of the prediction chroma block. For example, subsampling scheme 1602 of FIG. 16A can be applied to generate the downsampled prediction chroma samples, as described below in more detail. Then, a set of filter coefficients for the cross component filter can be determined based on the downsampled prediction chroma samples and prediction luma samples associated with the video block. For example, the set of filter coefficients for the cross component filter can be derived using the division-free Gaussian elimination method in ECM based on the downsampled prediction chroma samples and the prediction luma samples.
[0157] Additionally in step 1612 of FIG.16B, a filter shape of the cross component filter may be adaptively selected from a plurality of candidate filter shapes. For example, adaptive filter shape selection scheme 1604 of FIG. 16A can be applied to select the filter shape, as described below in more detail. The selected filter shape can be explicitly signaled from the encoder side to the decoder side or implicitly derived at the decoder side. For example, FIG. 19 shows three candidate filter shapes for the cross component filter. A filter shape in section (a) of FIG.19 is a default filter shape in the CCRM, and filter shapes in sections (b) and (c) of FIG.19 are two newly introduced filter shapes. Like that shown in FIG.15B, the spatial lumaAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT samples (L0, …, L5) in FIG. 19 are obtained from the luma grid which selects the 6 luma samples closest to a position of a chroma sample to be predicted (e.g., at a position C) without downsampling.
[0158] Referring back to FIG. 16B, in step 1614, reconstructed luma samples associated with the video block may be generated by combining (e.g., summing) the prediction luma samples with residual luma samples associated with the video block, respectively. In step 1616, the cross component filter derived in step 1612 may be applied to filter the reconstructed luma samples generated in step 1614 to generate cross-component prediction chroma samples. For example, CCRM scheme 1606 with downsampling filtering can be applied to generate the cross-component prediction chroma samples, as described below in more detail. Then, in step 1618, the cross-component prediction chroma samples may be combined with the prediction chroma samples to produce refined prediction chroma samples based on a first weighting factor w1and a second weighting factor w2, respectively. For example, the first weighting factor w1can be applied to the cross-component prediction chroma samples to generate weighted cross- component prediction chroma samples (e.g., A = cross-component prediction chroma samples*w1). The second weighting factor w2can be applied to the prediction chroma samples to generate weighted prediction chroma samples (e.g., B = prediction chroma samples*w2). The weighted cross-component prediction chroma samples can be combined with the weighted prediction chroma samples to generate the refined prediction chroma samples, respectively (e.g., a refined prediction chroma sample = a cross-component prediction chroma sample*w1+ a prediction chroma sample*w2). Adaptive weighting factor selection scheme 1608 of FIG. 16A can be applied to select the first weighting factor and the second weighting factor, as described below in more detail. Subsequently, in step 1620, the refined prediction chroma samples may be combined with residual chroma samples associated with the video block to generate reconstructed chroma samples, respectively.
[0159] Referring back to FIG. 16A, subsampling scheme 1602 can be applied to downsample the prediction chroma block having a block size greater than the predetermined threshold (e.g., the total number of the prediction chroma samples in the prediction chroma block is greater than 256). Several example implementations of subsampling scheme 1602 are disclosed herein. In a first example implementation, a start position for subsampling the prediction chroma samples may be determined based on the block size of the prediction chroma block. Then, the prediction chroma samples may be subsampled to generate the downsampled prediction chroma samples based on the start position. For example, FIG.18A shows a portion of a prediction chroma block. A start position for subsampling the prediction chroma block isAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT a first pixel 1802 of the prediction chroma block. A subsampling step size for the horizontal direction and the vertical direction can be 4 pixels. The portion of the prediction chroma block shown in FIG.18A has a size of 8×8, and can be downsampled to include four downsampled prediction chroma samples 1802, 1804, 1806, and 1808.
[0160] In another example, as shown in FIG.18B, a sampling step size for the horizontal and vertical directions can be the same as that of FIG.18A, whereas the start position for the subsampling is changed according to the block size. For instance, the start position for the subsampling can be adjusted according to the following expression (34): startX = stepX >> 1 and startY = stepY >>1. (34)
[0161] In the above expression (34), startX and startY represent a horizontal coordinate and a vertical coordinate of the start position, respectively, and stepX and stepY are sampling step sizes for the horizontal and vertical directions, respectively. As shown in FIG.18B, the start position for the subsampling is changed to a pixel 1812 of the prediction chroma block according to the above expression (34). The sampling step size for the horizontal and vertical directions can be 4 pixels. As a result, the portion of the prediction chroma block shown in FIG. 18B with a size of 8×8 can be downsampled to include four downsampled prediction chroma samples 1812, 1814, 1816, and 1818.
[0162] In a second example implementation of subsampling scheme 1602, the prediction chroma samples to be subsampled can be divided into a plurality of subsampling groups based on a ratio between (i) a block size of a downsampled block formed by the downsampled prediction chroma samples and (ii) a block size of the prediction chroma block. For example, the total number of the downsampled prediction chroma samples in the downsampled block may be M1(e.g., M1≤256), and the total number of the prediction chroma samples in the prediction chroma sample block may be M2. Then, the prediction chroma samples can be divided into M2 / M1subsampling groups. The prediction chroma samples in each subsampling group can be averaged to generate a downsampled prediction chroma sample for the corresponding subsampling group. For example, referring to FIG. 18C, the portion of the prediction chroma block shown in FIG.18C can be divided into 4 subsampling groups. The prediction chroma samples in a first subsampling group 1822 are averaged to generate a first downsampled prediction chroma sample. Similarly, the prediction chroma samples in a second subsampling group 1824, the prediction chroma samples a third subsampling group 1826, and a fourth subsampling group 1828 are averaged to generate a second downsampled prediction chroma sample, a third downsampled prediction chroma sample, and a fourth downsampled prediction chroma sample, respectively. As a result, the portion of the prediction chroma blockAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT shown in FIG. 18C with a size of 8×8 can be downsampled to include four downsampled prediction chroma samples.
[0163] Referring back to FIG. 16A, adaptive filter shape selection scheme 1604 can be applied to select a filter shape for the cross component filter. Several example implementations of scheme 1604 are disclosed herein. In a first example implementation, a filter shape index of the selected filter shape can be explicitly signaled in a bitstream. The selected filter shape can be an optimal filter shape selected for the cross component filter. To begin with, a plurality of candidate filter shapes can be predetermined for both video encoder 20 and video decoder 30. Next, at the encoder side, the plurality of candidate filter shapes can be checked with rate- distortion optimization to select the filter shape, as described below in more detail. A filter shape index corresponding to the selected filter shape can be signaled to video decoder 30 through a bitstream. Then, at the decoder side, the filter shape can be selected from the plurality of candidate filter shapes based on the received filter shape index.
[0164] To perform the rate-distortion optimization on the selection of the filter shape, initially, a plurality of rate-distortion costs can be determined for the plurality of candidate filter shapes, respectively. For example, rate-distortion analysis may be performed for each candidate filter shape to determine (i) an amount of distortion “D” between an encoded block and the original (unencoded) video block and (ii) a bitrate “R” used to produce the encoded block, when the corresponding candidate filter shape is applied in the cross-component filter. A rate-distortion cost “RD cost” for the corresponding candidate filter shape can be calculated as “RD cost = D + λR,” where λ represents a Lagrange coefficient. Then, a candidate filter shape having a minimal rate-distortion cost among the plurality of rate-distortion costs can be selected from the plurality of candidate filter shapes as the filter shape.
[0165] Two exemplary methods of binarization and context modeling of the filter shape index are provided in the following Table 1 and Table 2. Table 1: The first method of binarization and context modeling of the filter shape indexTable 2: The second method of binarization and context modeling of the filter shape indexAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT
[0166] In a second example implementation, the filter shape can be determined implicitly at both the encoder side and the decoder side. A plurality of candidate filter shapes can be predetermined for both the encoder side and the decoder side, and a candidate filter shape which leads to the minimum filter-shape testing cost can be selected as the filter shape. For example, a plurality of filter-shape testing costs can be determined for the plurality of candidate filter shapes, respectively, as described below in more detail. A candidate filter shape having the minimal filter-shape testing cost among the plurality of filter-shape testing costs can be selected from the plurality of candidate filter shapes as the filter shape.
[0167] Two example methods for determining the filter-shape testing costs for the plurality of candidate filter shapes are disclosed herein. In a first example method, the implicit filter shape selection is only applied to chroma blocks having a block size greater than a predetermined threshold (e.g., when the total number of chroma samples in the chroma block is larger than 256). In each block, the chroma samples within the block can be classified into two categories. The chroma samples in a first category are used to derive the filter coefficients, while the chroma samples in a second category are used for filter shape selection (i.e., for testing the different candidate filter shapes).
[0168] In the first example method, initially, the prediction chroma samples in the prediction chroma block may be divided into the first category for deriving the set of filter coefficients and the second category for selecting the filter shape. Next, for each candidate filter shape from the plurality of candidate filter shapes, a set of filter coefficients for the cross component filter having the candidate filter shape can be determined based on the prediction chroma samples in the first category. For instance, a set of filter coefficients for the cross component filter having the candidate filter shape can be derived using the division-free Gaussian elimination method in ECM, like that described above with reference to FIG.15A or FIG.16B.
[0169] Subsequently, a filter-shape testing cost corresponding to the candidate filter shape can be determined based on the prediction chroma samples in the second category and the cross component filter having the set of filter coefficients and the candidate filter shape. For instance, the cross component filter having the candidate filter shape and the set of filter coefficients is applied to filter reconstructed luma samples associated with the second category to generate cross-component prediction chroma samples for testing (e.g., like that in step 1616 of FIG.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT 16B). The cross-component prediction chroma samples for testing and the prediction chroma samples in the second category can be combined to generate refined prediction chroma samples for testing (e.g., like that in step 1618 of FIG.16B). Reconstructed chroma samples for testing can be generated based on the refined prediction chroma samples for testing and residual chroma samples associated with the second category (e.g., like that in step 1620 of FIG.16B). The filter-shape testing cost for the candidate filter shape can be determined based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the second category. For example, the filter-shape testing cost can be a minimum square error (MSE), an SAD, an SSD, or any other suitable difference metric between the reconstructed chroma samples for testing and the reconstructed chroma samples associated with the second category.
[0170] In a second example method, the filter shape can be selected based on a template of the video block (e.g., a template as shown in FIG.8). That is, the filter-shape testing costs can be determined based on the template of the video block. To begin with, during the prediction stage, both the video block (e.g., a current PU) and a template corresponding to the video block can be predicted. Then, for each candidate filter shape, a set of filter coefficients for the cross component filter can be derived based on the prediction chroma samples associated with the video block. For example, a set of filter coefficients for the cross component filter having the candidate filter shape can be derived using the division-free Gaussian elimination method in ECM, like that described above with reference to FIG.15A or FIG.16B.
[0171] Next, the cross component filter having the set of filter coefficients and the candidate filter shape is applied to the template of the video block to generate a filter-shape testing cost for the candidate filter shape. For example, the cross component filter having the candidate filter shape and the set of filter coefficients can be applied to filter reconstructed luma samples associated with the template to generate cross-component prediction chroma samples for testing (e.g., like that in step 1616 of FIG.16B). The cross-component prediction chroma samples for testing can be combined with prediction chroma samples associated with the template to generate refined prediction chroma samples for testing (e.g., like that in step 1618 of FIG.16B). Reconstructed chroma samples for testing can be generated based on the refined prediction chroma samples for testing and residual chroma samples associated with the template (e.g., like that in step 1620 of FIG.16B). The filter-shape testing cost for the candidate filter shape can be determined based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template. The filter-shape testing cost can be, for example, an MSE, an SAD, an SSD, or any other suitable differenceAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT metric between the reconstructed chroma samples for testing and the reconstructed chroma samples associated with the template. By performing similar operations, the plurality of filter- shape testing costs for the plurality of candidate filter shapes can be determined, respectively.
[0172] Referring to FIG.16A again, CCRM scheme 1606 with downsampling filtering can be applied to perform a downsampling operation on the luma component, followed by filtering the reconstructed luma samples using the cross component filter. For example, in step 1616 of FIG.16B, the reconstructed luma samples can be firstly downsampled using a downsampling filter to generate downsampled reconstructed luma samples. Afterwards, the downsampled reconstructed luma samples may be filtered using the cross component filter to generate the cross-component prediction chroma samples. That is, the reconstructed luma block can be downsampled firstly using a downsampling filter to generate a downsampled reconstructed luma block. The cross component filter can be a convolutional 7-tap filter including a 5-tap plus sign shape spatial component, a nonlinear term, and a bias term. The cross component filter can be applied to the downsampled reconstructed luma block to predict the chroma block as shown in the following expression (35): predChromaVal = c0*C + c1*N + c2*S + c3*E + c4*W + c5*PNL+ c6*B. (35)
[0173] In the above expression (35), predChromaVal represents a value of a prediction chroma sample (e.g., a prediction value of a chroma sample). C, N, S, E, and W are reconstructed luma samples in the downsampled reconstructed luma block (e.g., downsampled reconstructed luma samples). As shown in FIG. 7, C represents a center reconstructed luma sample which is collocated with the chroma sample to be predicted; and N, S, E, and W represent the north, south, west and east reconstructed luma samples of the center reconstructed luma sample, respectively. PNLrepresents the non-linear term, and B represents the bias term. PNL= (C*C + midVal) >> bitDepth, like that in the above expression (13).
[0174] In some implementations, a plurality of candidate downsampling filters can be predetermined for both video encoder 20 and video decoder 30. At the encoder side, rate- distortion optimization can be applied to select the downsampling filter (e.g., an optimal downsampling filter) from the plurality of candidate downsampling filters, as described below in more detail. The downsampling filter index of the selected downsampling filter can be signaled in the bitstream to video decoder 30. At the decoder side, responsive to receiving the downsampling filter index, the candidate downsampling filter corresponding to the downsampling filter index can be selected from the plurality of candidate downsampling filters as the downsampling filter.
[0175] To apply the rate-distortion optimization to select the downsampling filter, initially,Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT a plurality of rate-distortion costs can be determined for the plurality of candidate downsampling filters using rate-distortion analysis, respectively. For example, for each candidate downsampling filter, the rate-distortion analysis may be used to determine (i) an amount of distortion “D” between an encoded block (corresponding to the current video block) and the original (unencoded) video block and (ii) a bitrate “R” used to produce the encoded block, when the candidate downsampling filter is applied to downsample the reconstructed luma samples. A rate-distortion cost “RD cost” for the candidate downsampling filter can be calculated as “RD cost = D + λR.” Then, a candidate downsampling filter having a minimal rate-distortion cost among the plurality of rate-distortion costs can be selected from the plurality of candidate downsampling filters as the downsampling filter.
[0176] Referring to FIG.16A again, adaptive weighting factor selection scheme 1608 can be applied to adaptively select the first weighting factor w1and the second weighting factor w2for each video block. As described above, the weighting factors in step 1506 or 1508 of FIG. 15A are fixed for all video blocks. However, by applying adaptive weighting factor selection scheme 1608 disclosed herein, the first weighting factor w1and the second weighting factor w2can be adaptively changed for each video block to further improve the coding efficiency. The first and second weighting factors may form a weighting factor pair (w1, w2). In some implementations, the sum of the first weighting factor w1and the second weighting factor w2is equal to 1. If one of the first weighting factor w1and the second weighting factor w2is determined, the other one of the first weighting factor w1and the second weighting factor w2is also determined.
[0177] Several example implementations of adaptive weighting factor selection scheme 1608 are disclosed herein. In a first example implementation, a plurality of candidate weighting factor pairs can be predetermined for both video encoder 20 and video decoder 30. At the encoder side, rate-distortion optimization can be applied to select the weighting factor pair (e.g., an optimal weighting factor pair) from the plurality of candidate weighting factor pairs, as described below in more detail. A weighting factor index corresponding to the weighting factor pair can be signaled in the bitstream. Then, at the decoder side, responsive to receiving the weighting factor index, the candidate weighting factor pair corresponding to the weighting factor index can be selected from the plurality of candidate weighting factor pairs as the weighting factor pair.
[0178] To apply the rate-distortion optimization to select the weighting factor pair, initially, a plurality of rate-distortion costs for the plurality of candidate weighting factor pairs can be determined using rate-distortion analysis, respectively. For example, for each candidateAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT weighting factor pair, the rate-distortion analysis may be used to determine (i) an amount of distortion “D” between an encoded block (corresponding to the current video block) and the original (unencoded) video block and (ii) a bitrate “R” used to produce the encoded block, when the candidate weighting factor pair is applied to generate the refined prediction chroma samples. A rate-distortion cost “RD cost” for the candidate weighting factor pair can be calculated as “RD cost = D + λR.” Then, a candidate weighting factor pair having a minimal rate-distortion cost among the plurality of rate-distortion costs can be selected from the plurality of candidate weighting factor pairs as the weighting factor pair.
[0179] In a second example implementation, the weighting factor pair can be implicitly derived at both the encoder side and the decoder side. A reconstructed template neighboring to the video block can be utilized to select the weighting factor pair. Specifically, a plurality of weighting-factor testing costs can be determined for a plurality of candidate weighting factor pairs, respectively, based on a template of the video block, as described below in more detail. A candidate weighting factor pair having a minimal weighting-factor testing cost among the plurality of weighting-factor testing costs can be selected from the plurality of weighting factor pairs as the weighting factor pair.
[0180] To determine the weighting-factor testing cost for each candidate weighting factor pair based on the template of the video block, the cross component filter can be applied to filter reconstructed luma samples associated with the template to generate cross-component prediction chroma samples for testing (e.g., like that in step 1616 of FIG. 16B). The cross- component prediction chroma samples for testing and prediction chroma samples associated with the template can be combined to generate refined prediction chroma samples for testing based on the candidate weighting factor pair (e.g., like that in in step 1618 of FIG. 16B). Reconstructed chroma samples for testing can be generated based on the refined prediction chroma samples for testing and residual chroma samples associated with the template (e.g., like that in step 1620 of FIG. 16B). The weight-factor testing cost for the candidate weighting factor pair can be determined based on a difference (e.g., an MSE, an SSD, etc.) between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template.
[0181] FIG.17 is a flow chart of an exemplary method 1700 for video coding in accordance with some implementations of the present disclosure. Method 1700 may be implemented by a processor associated with video encoder 20 or video decoder 30 (e.g., method 1700 may be implemented on the encoder side and / or the decoder side), and may include steps 1702-1704 as described below. Some of the steps may be optional to perform the disclosure providedAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT herein. Further, some of the steps may be performed simultaneously, or in a different order than shown in FIG.17.
[0182] In step 1702, the processor may determine one or more model parameters of a CCRM model based on a video block from a video frame of a video.
[0183] In step 1704, the processor may apply the CCRM model to generate refined prediction chroma samples associated with the video block based on the one or more model parameters.
[0184] In some implementations, the CCRM model may include a cross component filter. To apply the CCRM model to generate the refined prediction chroma samples in step 1704, the processor is further configured to: filter reconstructed luma samples associated with the video block using the cross component filter to generate cross-component prediction chroma samples; and combine the cross-component prediction chroma samples and prediction chroma samples associated with the video block to generate the refined prediction chroma samples. For example, operations like those described above in steps 1616 and 1618 of FIG. 16B can be performed to generate the refined prediction chroma samples.
[0185] In some implementations, the one or more model parameters may include a set of filter coefficients for the cross component filter. To determine the one or more model parameters associated with the cross component residual model in step 1702, the processor is further configured to: downsample the prediction chroma samples to generate downsampled prediction chroma samples based on a block size of a prediction chroma block formed by the prediction chroma samples; and determine the set of filter coefficients for the cross component filter based on the downsampled prediction chroma samples and prediction luma samples associated with the video block. For example, operations like those described above in step 1612 of FIG. 16B can be performed to determine the set of filter coefficients for the cross component filter.
[0186] In some implementations, to downsample the prediction chroma samples to generate the downsampled prediction chroma samples, the processor is further configured to: determine a start position for subsampling the prediction chroma samples based on the block size of the prediction chroma block; and subsample the prediction chroma samples to generate the downsampled prediction chroma samples based on the start position. Alternatively, the processor is further configured to: divide the prediction chroma samples into a plurality of subsampling groups based on a ratio between a block size of a downsampled block formed by the downsampled prediction chroma samples and the block size of the prediction chroma block; and average the prediction chroma samples in each subsampling group to generate aAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT downsampled prediction chroma sample for the subsampling group. For example, operations like those described above with reference to subsampling scheme 1602 of FIG. 16A can be performed to generate the downsampled prediction chroma samples.
[0187] In some implementations, the one or more model parameters may include a filter shape of the cross component filter. To determine the one or more model parameters of the cross component residual model in step 1702 at the encoder side, the processor is further configured to: determine a plurality of rate-distortion costs for a plurality of candidate filter shapes using rate-distortion analysis, respectively; select, from the plurality of candidate filter shapes, a candidate filter shape having a minimal rate-distortion cost among the plurality of rate-distortion costs as the filter shape; and signal a filter shape index of the filter shape to a decoder. On the other hand, to determine the one or more model parameters of the cross component residual model in step 1702 at the decoder side, the processor is further configured to: receive the filter shape index signaled by the encoder; and select, from the plurality of candidate filter shapes, the candidate filter shape corresponding to the filter shape index as the filter shape. For example, operations like those described above with reference to adaptive filter shape selection scheme 1604 of FIG.16A can be performed to select the filter shape.
[0188] In some implementations, to determine the one or more model parameters of the cross component residual model in step 1702, the processor is further configured to: determine a plurality of filter-shape testing costs corresponding to a plurality of candidate filter shapes, respectively; and select, from the plurality of candidate filter shapes, a candidate filter shape having a minimal filter-shape testing cost among the plurality of filter-shape testing costs as the filter shape. For example, operations like those described above with reference to adaptive filter shape selection scheme 1604 of FIG.16A can be performed to select the filter shape.
[0189] In some implementations, to determine the plurality of filter-shape testing costs corresponding to the plurality of candidate filter shapes, respectively, the processor is configured to divide the prediction chroma samples into a first category for deriving the set of filter coefficients and a second category for selecting the filter shape. For each candidate filter shape from the plurality of candidate filter shapes, the processor is further configured to: determine the set of filter coefficients for the cross component filter having the candidate filter shape based on the prediction chroma samples in the first category; and determine the filter- shape testing cost corresponding to the candidate filter shape based on the prediction chroma samples in the second category and the cross component filter having the set of filter coefficients and the candidate filter shape. For example, operations like those described above with reference to adaptive filter shape selection scheme 1604 of FIG.16A can be performed toAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT determine the filter-shape testing costs for the plurality of candidate filter shapes, respectively.
[0190] In some implementations, to determine the plurality of filter-shape testing costs corresponding to the plurality of candidate filter shapes, respectively, the processor is further configured to: for each candidate filter shape from the plurality of candidate filter shapes, determine the set of filter coefficients for the cross component filter having the candidate filter shape based on the prediction chroma samples associated with the video block; and determine the filter-shape testing cost corresponding to the candidate filter shape based on a template of the video block and the cross component filter having the set of filter coefficients and the candidate filter shape. For example, operations like those described above with reference to adaptive filter shape selection scheme 1604 of FIG. 16A can be performed to determine the filter-shape testing costs for the plurality of candidate filter shapes, respectively.
[0191] In some implementations, to determine the filter-shape testing cost corresponding to the candidate filter shape, the processor is further configured to: apply the cross component filter having the candidate filter shape and the set of filter coefficients to filter reconstructed luma samples associated with the template to generate cross-component prediction chroma samples for testing; combine the cross-component prediction chroma samples for testing and prediction chroma samples associated with the template to generate refined prediction chroma samples for testing; generate reconstructed chroma samples for testing based on the refined prediction chroma samples for testing and residual chroma samples associated with the template; and determine the filter-shape testing cost based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template. For example, operations like those described above with reference to adaptive filter shape selection scheme 1604 of FIG.16A can be performed to determine the filter-shape testing cost for the candidate filter shape.
[0192] In some implementations, to filter the reconstructed luma samples associated with the video block using the cross component filter to generate the cross-component prediction chroma samples, the processor is further configured to: downsample the reconstructed luma samples using a downsampling filter to generate downsampled reconstructed luma samples; and filter the downsampled reconstructed luma samples using the cross component filter to generate the cross-component prediction chroma samples. For example, operations like those described above in step 1616 of FIG.16B can be performed to generate the cross-component prediction chroma samples.
[0193] In some implementations, on the encoder side, the processor is further configured to: determine a plurality of rate-distortion costs for a plurality of candidate downsamplingAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT filters using rate-distortion analysis, respectively; select, from the plurality of candidate downsampling filters, a candidate downsampling filter having a minimal rate-distortion cost among the plurality of rate-distortion costs as the downsampling filter; and signal a downsampling filter index of the downsampling filter to a decoder. On the other hand, at the decoder side, the processor is further configured to determine the downsampling filter based on the downsampling filter index signaled by the encoder. For example, operations like those described above with reference to CCRM scheme 1606 of FIG. 16A can be performed to determine the downsampling filter.
[0194] In some implementations, the one or more model parameters may include a weighting factor pair including a first weighting factor and a second weighting factor.
[0195] In some implementations, to combine the cross-component prediction chroma samples and the prediction chroma samples associated with the video block to generate the refined prediction chroma samples, the processor is further configured to: apply the first weighting factor to the cross-component prediction chroma samples to generate weighted cross-component prediction chroma samples; apply the second weighting factor to the prediction chroma samples to generate weighted prediction chroma samples; and combine the weighted cross-component prediction chroma samples with the weighted prediction chroma samples to generate the refined prediction chroma samples, respectively. For example, operations like those described above in step 1618 of FIG.16B can be performed to generate the refined prediction chroma samples.
[0196] In some implementations, to determine the one or more model parameters of the cross component residual model in step 1702 at the encoder side, the processor is further configured to: determine a plurality of rate-distortion costs for a plurality of candidate weighting factor pairs using rate-distortion analysis, respectively; select, from the plurality of candidate weighting factor pairs, a candidate weighting factor pair having a minimal rate- distortion cost among the plurality of rate-distortion costs as the weighting factor pair; and signal a weighting factor index corresponding to the weighting factor pair to a decoder. On the other hand, to determine the one or more model parameters of the cross component residual model in step 1702 at the decoder side, the processor is further configured to: receive the weighting factor index signaled by the encoder; and select, from the plurality of candidate weighting factor pairs, the candidate weighting factor pair corresponding to the weighting factor index as the weighting factor pair. For example, operations like those described above with reference to adaptive weighting factor selection scheme 1608 of FIG. 16A can be performed to determine the weighting factor pair.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT
[0197] In some implementations, to determine the one or more model parameters of the cross component residual model in step 1702, the processor is further configured to: determine a plurality of weighting-factor testing costs corresponding to a plurality of candidate weighting factor pairs, respectively; and select, from the plurality of weighting factor pairs, a candidate weighting factor pair having a minimal weighting-factor testing cost among the plurality of weighting-factor testing costs as the weighting factor pair. For example, operations like those described above with reference to adaptive weighting factor selection scheme 1608 of FIG. 16A can be performed to determine the weighting factor pair.
[0198] In some implementations, to determine the plurality of weighting-factor testing costs corresponding to the plurality of candidate weighting factor pairs, respectively, the processor is further configured to, for each candidate weighting factor pair from the plurality of weighting factor pairs, determine the weighting-factor testing cost corresponding to the candidate weighting factor pair based on a template of the video block. Specifically, the processor is further configured to: apply the cross component filter to filter reconstructed luma samples associated with the template to generate cross-component prediction chroma samples for testing; combine the cross-component prediction chroma samples for testing and prediction chroma samples associated with the template to generate refined prediction chroma samples for testing based on the candidate weighting factor pair; generate reconstructed chroma samples for testing based on the refined prediction chroma samples for testing and residual chroma samples associated with the template; and determine the weight-factor testing cost based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template. For example, operations like those described above with reference to adaptive weighting factor selection scheme 1608 of FIG.16A can be performed to determine the weighting-factor testing cost.
[0199] FIG.20 shows a computing environment 2000 coupled with a user interface 2050. The computing environment 2000 can be part of a data processing server. The computing environment 2000 includes a processor 2020, a memory 2030, and an Input / Output (I / O) interface 2040.
[0200] The processor 2020 typically controls overall operations of the computing environment 2000, such as the operations associated with display, data acquisition, data communications, and image processing. The processor 2020 may include one or more processors to execute instructions to perform all or some of the steps in the above-described methods. Moreover, the processor 2020 may include one or more modules that facilitate the interaction between the processor 2020 and other components. The processor may be a CentralAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT Processing Unit (CPU), a microprocessor, a single chip machine, a Graphical Processing Unit (GPU), or the like.
[0201] The memory 2030 is configured to store various types of data to support the operation of the computing environment 2000. The memory 2030 may include predetermined software 2032. Examples of such data includes instructions for any applications or methods operated on the computing environment 2000, video datasets, image data, etc. The memory 2030 may be implemented by using any type of volatile or non-volatile memory devices, or a combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read- Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic memory, a flash memory, a magnetic or optical disk.
[0202] The I / O interface 2040 provides an interface between the processor 2020 and peripheral interface modules, such as a keyboard, a click wheel, buttons, and the like. The buttons may include but are not limited to, a home button, a start scan button, and a stop scan button. The I / O interface 2040 can be coupled with an encoder and decoder.
[0203] In an embodiment, there is also provided a non-transitory computer-readable storage medium comprising a plurality of programs, for example, in the memory 2030, executable by the processor 2020 in the computing environment 2000, for performing the above-described methods and / or storing a bitstream generated by the encoding method described above or a bitstream to be decoded by the decoding method described above. In one example, the plurality of programs may be executed by the processor 2020 in the computing environment 2000 to receive (for example, from the video encoder 20 in FIG.2) a bitstream or data stream including encoded video information (for example, video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.), and may also be executed by the processor 2020 in the computing environment 2000 to perform the decoding method described above according to the received bitstream or data stream. In another example, the plurality of programs may be executed by the processor 2020 in the computing environment 2000 to perform the encoding method described above to encode video information (for example, video blocks representing video frames, and / or associated one or more syntax elements, etc.) into a bitstream or data stream, and may also be executed by the processor 2020 in the computing environment 2000 to transmit the bitstream or data stream (for example, to the video decoder 30 in FIG. 3). Alternatively, the non-transitory computer-readable storage medium may have stored therein a bitstream or a data stream comprising encoded video information (for example, video blocks representing encoded video frames, and / or associatedAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT one or more syntax elements etc.) generated by an encoder (for example, the video encoder 20 in FIG.2) using, for example, the encoding method described above for use by a decoder (for example, the video decoder 30 in FIG.3) in decoding video data. The non-transitory computer- readable storage medium may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, an optical data storage device or the like.
[0204] In an embodiment, there is provided a bitstream generated by the encoding method described above or a bitstream to be decoded by the decoding method described above. In an embodiment, there is provided a bitstream comprising encoded video information generated by the encoding method described above or encoded video information to be decoded by the decoding method described above.
[0205] In an embodiment, the is also provided a computing device comprising one or more processors (for example, the processor 2020); and the non-transitory computer-readable storage medium or the memory 2030 having stored therein a plurality of programs executable by the one or more processors, wherein the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described methods.
[0206] In an embodiment, there is also provided a computer program product having instructions for storage or transmission of a bitstream comprising encoded video information generated by the encoding method described above or encoded video information to be decoded by the decoding method described above. In an embodiment, there is also provided a computer program product comprising a plurality of programs, for example, in the memory 2030, executable by the processor 2020 in the computing environment 2000, for performing the above-described methods. For example, the computer program product may include the non-transitory computer-readable storage medium.
[0207] In an embodiment, the computing environment 2000 may be implemented with one or more ASICs, DSPs, Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), FPGAs, GPUs, controllers, micro-controllers, microprocessors, or other electronic components, for performing the above methods.
[0208] In an embodiment, there is also provided a method of storing a bitstream, comprising storing the bitstream on a digital storage medium, wherein the bitstream comprises encoded video information generated by the encoding method described above or encoded video information to be decoded by the decoding method described above.
[0209] In an embodiment, there is also provided a method for transmitting a bitstream generated by the encoder described above. In an embodiment, there is also provided a method for receiving a bitstream to be decoded by the decoder described above.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT
[0210] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative implementations will be apparent to those of ordinary skill in the art having the benefit of the teachings presented in the foregoing descriptions and the associated drawings.
[0211] Unless specifically stated otherwise, an order of steps of the method according to the present disclosure is only intended to be illustrative, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but may be changed according to practical conditions. In addition, at least one of the steps of the method according to the present disclosure may be adjusted, combined or deleted according to practical requirements.
[0212] The examples were chosen and described in order to explain the principles of the disclosure and to enable others skilled in the art to understand the disclosure for various implementations and to best utilize the underlying principles and various implementations with various modifications as are suited to the particular use contemplated. Therefore, it is to be understood that the scope of the disclosure is not to be limited to the specific examples of the implementations disclosed and that modifications and other implementations are intended to be included within the scope of the present disclosure.
Claims
Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT CLAIMS What is claimed is:
1. A method for video decoding, comprising: determining, by a decoder, one or more model parameters of a cross component residual model based on a video block from a video frame; and applying, by the decoder, the cross component residual model, as defined by the one or more model parameters, to generate refined prediction chroma samples associated with the video block.
2. The method of claim 1, wherein the cross component residual model comprises a cross component filter, and applying the cross component residual model to generate the refined prediction chroma samples comprises: filtering reconstructed luma samples associated with the video block using the cross component filter to generate cross-component prediction chroma samples; and combining the cross-component prediction chroma samples and prediction chroma samples associated with the video block to generate the refined prediction chroma samples.
3. The method of claim 2, wherein the one or more model parameters comprise a set of filter coefficients for the cross component filter, and determining the one or more model parameters of the cross component residual model comprises: downsampling the prediction chroma samples to generate downsampled prediction chroma samples based on a block size of a prediction chroma block formed by the prediction chroma samples; and determining the set of filter coefficients for the cross component filter based on the downsampled prediction chroma samples and prediction luma samples associated with the video block.
4. The method of claim 3, wherein downsampling the prediction chroma samples to generate the downsampled prediction chroma samples comprises: determining a start position for subsampling the prediction chroma samples based on the block size of the prediction chroma block; and subsampling the prediction chroma samples to generate the downsampled prediction chroma samples based on the start position.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT 5. The method of claim 3, wherein downsampling the prediction chroma samples to generate the downsampled prediction chroma samples comprises: dividing the prediction chroma samples into a plurality of subsampling groups based on a ratio between a block size of a downsampled block formed by the downsampled prediction chroma samples and the block size of the prediction chroma block; and averaging the prediction chroma samples in each subsampling group to generate a downsampled prediction chroma sample for the subsampling group.
6. The method of claim 2, wherein the one or more model parameters comprise a filter shape of the cross component filter, and determining the one or more model parameters of the cross component residual model comprises: receiving a filter shape index signaled by an encoder; and selecting, from a plurality of candidate filter shapes, a candidate filter shape corresponding to the filter shape index as the filter shape.
7. The method of claim 2, wherein the one or more model parameters comprise a filter shape of the cross component filter, and determining the one or more model parameters of the cross component residual model comprises: determining a plurality of filter-shape testing costs corresponding to a plurality of candidate filter shapes, respectively; and selecting, from the plurality of candidate filter shapes, a candidate filter shape having a minimal filter-shape testing cost among the plurality of filter-shape testing costs as the filter shape.
8. The method of claim 7, wherein determining the plurality of filter-shape testing costs corresponding to the plurality of candidate filter shapes, respectively, comprises: dividing the prediction chroma samples into a first category for deriving the set of filter coefficients and a second category for selecting the filter shape; and for each candidate filter shape from the plurality of candidate filter shapes, determining the set of filter coefficients for the cross component filter having the candidate filter shape based on the prediction chroma samples in the first category; and determining the filter-shape testing cost corresponding to the candidate filterAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT shape based on the prediction chroma samples in the second category and the cross component filter having the set of filter coefficients and the candidate filter shape.
9. The method of claim 7, wherein determining the plurality of filter-shape testing costs corresponding to the plurality of candidate filter shapes, respectively, comprises: for each candidate filter shape from the plurality of candidate filter shapes, determining the set of filter coefficients for the cross component filter having the candidate filter shape based on the prediction chroma samples associated with the video block; and determining the filter-shape testing cost corresponding to the candidate filter shape based on a template of the video block and the cross component filter having the set of filter coefficients and the candidate filter shape.
10. The method of claim 9, wherein determining the filter-shape testing cost corresponding to the candidate filter shape comprises: applying the cross component filter having the candidate filter shape and the set of filter coefficients to filter reconstructed luma samples associated with the template to generate cross- component prediction chroma samples for testing; combining the cross-component prediction chroma samples for testing and prediction chroma samples associated with the template to generate refined prediction chroma samples for testing; generating reconstructed chroma samples for testing based on the refined prediction chroma samples for testing and residual chroma samples associated with the template; and determining the filter-shape testing cost based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template.
11. The method of claim 2, wherein filtering the reconstructed luma samples associated with the video block using the cross component filter to generate the cross-component prediction chroma samples comprises: downsampling the reconstructed luma samples using a downsampling filter to generate downsampled reconstructed luma samples; and filtering the downsampled reconstructed luma samples using the cross component filter to generate the cross-component prediction chroma samples.Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT 12. The method of claim 2, wherein the one or more model parameters comprise a weighting factor pair comprising a first weighting factor and a second weighting factor, and combining the cross-component prediction chroma samples and the prediction chroma samples associated with the video block to generate the refined prediction chroma samples comprises: applying the first weighting factor to the cross-component prediction chroma samples to generate weighted cross-component prediction chroma samples; applying the second weighting factor to the prediction chroma samples to generate weighted prediction chroma samples; and combining the weighted cross-component prediction chroma samples with the weighted prediction chroma samples to generate the refined prediction chroma samples, respectively.
13. The method of claim 2, wherein the one or more model parameters comprise a weighting factor pair comprising a first weighting factor and a second weighting factor, and determining the one or more model parameters of the cross component residual model comprises: receiving a weighting factor index signaled by an encoder; and selecting, from a plurality of candidate weighting factor pairs, a candidate weighting factor pair corresponding to the weighting factor index as the weighting factor pair.
14. The method of claim 2, wherein the one or more model parameters comprise a weighting factor pair comprising a first weighting factor and a second weighting factor, and determining the one or more model parameters of the cross component residual model comprises: determining a plurality of weighting-factor testing costs corresponding to a plurality of candidate weighting factor pairs, respectively; and selecting, from the plurality of weighting factor pairs, a candidate weighting factor pair having a minimal weighting-factor testing cost among the plurality of weighting-factor testing costs as the weighting factor pair.
15. The method of claim 14, wherein determining the plurality of weighting-factor testing costs corresponding to the plurality of candidate weighting factor pairs, respectively, comprises:Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT for each candidate weighting factor pair from the plurality of weighting factor pairs, determining the weighting-factor testing cost corresponding to the candidate weighting factor pair based on a template of the video block.
16. The method of claim 15, wherein determining the weighting-factor testing cost corresponding to the candidate weighting factor pair based on the template of the video block comprises: applying the cross component filter to filter reconstructed luma samples associated with the template to generate cross-component prediction chroma samples for testing; combining the cross-component prediction chroma samples for testing and prediction chroma samples associated with the template to generate refined prediction chroma samples for testing based on the candidate weighting factor pair; generating reconstructed chroma samples for testing based on the refined prediction chroma samples for testing and residual chroma samples associated with the template; and determining the weight-factor testing cost based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template.
17. A method for video encoding, comprising: determining, by an encoder, one or more model parameters of a cross component residual model based on a video block from a video frame; and applying, by the encoder, the cross component residual model, as defined by the one or more model parameters, to generate refined prediction chroma samples associated with the video block.
18. The method of claim 17, wherein the cross component residual model comprises a cross component filter, and applying the cross component residual model to generate the refined prediction chroma samples comprises: filtering reconstructed luma samples associated with the video block using the cross component filter to generate cross-component prediction chroma samples; and combining the cross-component prediction chroma samples and prediction chroma samples associated with the video block to generate the refined prediction chroma samples.
19. The method of claim 18, wherein the one or more model parameters comprise a setAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT of filter coefficients for the cross component filter, and determining the one or more model parameters of the cross component residual model comprises: downsampling the prediction chroma samples to generate downsampled prediction chroma samples based on a block size of a prediction chroma block formed by the prediction chroma samples; and determining the set of filter coefficients for the cross component filter based on the downsampled prediction chroma samples and prediction luma samples associated with the video block.
20. The method of claim 19, wherein downsampling the prediction chroma samples to generate the downsampled prediction chroma samples comprises: determining a start position for subsampling the prediction chroma samples based on the block size of the prediction chroma block; and subsampling the prediction chroma samples to generate the downsampled prediction chroma samples based on the start position.
21. The method of claim 19, wherein downsampling the prediction chroma samples to generate the downsampled prediction chroma samples comprises: dividing the prediction chroma samples into a plurality of subsampling groups based on a ratio between a block size of a downsampled block formed by the downsampled prediction chroma samples and the block size of the prediction chroma block; and averaging the prediction chroma samples in each subsampling group to generate a downsampled prediction chroma sample for the subsampling group.
22. The method of claim 18, wherein the one or more model parameters comprise a filter shape of the cross component filter, and determining the one or more model parameters of the cross component residual model comprises: determining a plurality of rate-distortion costs for a plurality of candidate filter shapes using rate-distortion analysis, respectively; selecting, from the plurality of candidate filter shapes, a candidate filter shape having a minimal rate-distortion cost among the plurality of rate-distortion costs as the filter shape; and signaling a filter shape index of the filter shape to a decoder.
23. The method of claim 18, wherein the one or more model parameters comprise aAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT filter shape of the cross component filter, and determining the one or more model parameters of the cross component residual model comprises: determining a plurality of filter-shape testing costs corresponding to a plurality of candidate filter shapes, respectively; and selecting, from the plurality of candidate filter shapes, a candidate filter shape having a minimal filter-shape testing cost among the plurality of filter-shape testing costs as the filter shape.
24. The method of claim 23, wherein determining the plurality of filter-shape testing costs corresponding to the plurality of candidate filter shapes, respectively, comprises: dividing the prediction chroma samples into a first category for deriving the set of filter coefficients and a second category for selecting the filter shape; and for each candidate filter shape from the plurality of candidate filter shapes, determining the set of filter coefficients for the cross component filter having the candidate filter shape based on the prediction chroma samples in the first category; and determining the filter-shape testing cost corresponding to the candidate filter shape based on the prediction chroma samples in the second category and the cross component filter having the set of filter coefficients and the candidate filter shape.
25. The method of claim 23, wherein determining the plurality of filter-shape testing costs corresponding to the plurality of candidate filter shapes, respectively, comprises: for each candidate filter shape from the plurality of candidate filter shapes, determining the set of filter coefficients for the cross component filter having the candidate filter shape based on the prediction chroma samples associated with the video block; and determining the filter-shape testing cost corresponding to the candidate filter shape based on a template of the video block and the cross component filter having the set of filter coefficients and the candidate filter shape.
26. The method of claim 25, wherein determining the filter-shape testing cost corresponding to the candidate filter shape comprises: applying the cross component filter having the candidate filter shape and the set of filter coefficients to filter reconstructed luma samples associated with the template to generate cross-Attorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT component prediction chroma samples for testing; combining the cross-component prediction chroma samples for testing and prediction chroma samples associated with the template to generate refined prediction chroma samples for testing; generating reconstructed chroma samples for testing based on the refined prediction chroma samples for testing and residual chroma samples associated with the template; and determining the filter-shape testing cost based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template.
27. The method of claim 18, wherein filtering the reconstructed luma samples associated with the video block using the cross component filter to generate the cross- component prediction chroma samples comprises: downsampling the reconstructed luma samples using a downsampling filter to generate downsampled reconstructed luma samples; and filtering the downsampled reconstructed luma samples using the cross component filter to generate the cross-component prediction chroma samples.
28. The method of claim 27, further comprising: determining a plurality of rate-distortion costs for a plurality of candidate downsampling filters using rate-distortion analysis, respectively; selecting, from the plurality of candidate downsampling filters, a candidate downsampling filter having a minimal rate-distortion cost among the plurality of rate-distortion costs as the downsampling filter; and signaling a downsampling filter index of the downsampling filter to a decoder.
29. The method of claim 18, wherein the one or more model parameters comprise a weighting factor pair comprising a first weighting factor and a second weighting factor, and combining the cross-component prediction chroma samples and the prediction chroma samples associated with the video block to generate the refined prediction chroma samples comprises: applying the first weighting factor to the cross-component prediction chroma samples to generate weighted cross-component prediction chroma samples; applying the second weighting factor to the prediction chroma samples to generate weighted prediction chroma samples; andAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT combining the weighted cross-component prediction chroma samples with the weighted prediction chroma samples to generate the refined prediction chroma samples, respectively.
30. The method of claim 18, wherein the one or more model parameters comprise a weighting factor pair comprising a first weighting factor and a second weighting factor, and determining the one or more model parameters of the cross component residual model comprises: determining a plurality of rate-distortion costs for a plurality of candidate weighting factor pairs using rate-distortion analysis, respectively; selecting, from the plurality of candidate weighting factor pairs, a candidate weighting factor pair having a minimal rate-distortion cost among the plurality of rate-distortion costs as the weighting factor pair; and signaling a weighting factor index corresponding to the weighting factor pair to a decoder.
31. The method of claim 18, wherein the one or more model parameters comprise a weighting factor pair comprising a first weighting factor and a second weighting factor, and determining the one or more model parameters of the cross component residual model comprises: determining a plurality of weighting-factor testing costs corresponding to a plurality of candidate weighting factor pairs, respectively; and selecting, from the plurality of weighting factor pairs, a candidate weighting factor pair having a minimal weighting-factor testing cost among the plurality of weighting-factor testing costs as the weighting factor pair.
32. The method of claim 31, wherein determining the plurality of weighting-factor testing costs corresponding to the plurality of candidate weighting factor pairs, respectively, comprises: for each candidate weighting factor pair from the plurality of weighting factor pairs, determining the weighting-factor testing cost corresponding to the candidate weighting factor pair based on a template of the video block.
33. The method of claim 32, wherein determining the weighting-factor testing costAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT corresponding to the candidate weighting factor pair based on the template of the video block comprises: applying the cross component filter to filter reconstructed luma samples associated with the template to generate cross-component prediction chroma samples for testing; combining the cross-component prediction chroma samples for testing and prediction chroma samples associated with the template to generate refined prediction chroma samples for testing based on the candidate weighting factor pair; generating reconstructed chroma samples for testing based on the refined prediction chroma samples for testing and residual chroma samples associated with the template; and determining the weight-factor testing cost based on a difference between the reconstructed chroma samples for testing and reconstructed chroma samples associated with the template.
34. A method at a decoder side, comprising: receiving a bitstream by a decoder, wherein the bitstream is decoded by performing the method of video decoding according to any one of claims 1-16.
35. A method at an encoder side, comprising: storing a bitstream by an encoder, wherein the bitstream is generated by performing the method of video encoding according to any one of claims 17-33.
36. An apparatus for video decoding, comprising: a memory configured to store a bitstream; and a processor coupled to the memory and configured to perform the method according to any one of claims 1-16 to decode the bitstream or the method according to claim 34 to receive the bitstream.
37. An apparatus for video encoding, comprising: a memory configured to store a bitstream; and a processor coupled to the memory and configured to perform the method according to any one of claims 17-33 to generate the bitstream or the method according to claim 35 to store the bitstream.
38. A non-transitory computer-readable storage medium having stored therein aAttorney Docket No.: 10067-01-0022-PCT Kwai Reference: 2023KI0045USPCT bitstream, wherein the bitstream is decoded by the method according to any one of claims 1- 16 or the bitstream is received by the method according to claim 34.
39. A non-transitory computer-readable storage medium having stored therein a bitstream, wherein the bitstream is generated by the method according to any one of claims 17- 33 or the bitstream is stored by the method according to claim 35.
Citation Information
Patent Citations
Inter-component prediction
US20200374538A1
Residual refinement of color components
US20210297680A1
Joint component video frame filtering
US20220377324A1
Method, apparatus, and medium for video processing
WO2023134452A1