Methods and devices of extrapolation filter-based prediction mode

The extrapolation filter-based prediction mode addresses the challenge of accurately predicting sample values in video coding, resulting in improved compression efficiency and reduced bit rates.

WO2025103344A1PCT designated stage expired Publication Date: 2025-05-22BEIJING DAJIA INTERNET INFORMATION TECH CO LTD

Patent Information

Application Number
PCT/CN2024/131703
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-21
Filing Date
2024-11-13
Publication Date
2025-05-22

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in efficiently compressing video data due to limited bandwidth and memory resources, particularly in accurately predicting sample values for intra prediction modes.

Method used

The proposed method employs an extrapolation filter-based prediction mode for video encoding and decoding, where filter coefficients are determined based on sample values from a current template, allowing for accurate prediction of sample values for both luma and chroma components.

Benefits of technology

This approach enhances video coding efficiency by improving prediction accuracy, leading to better compression performance and reduced bit rates without compromising video quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024131703_22052025_PF_FP_ABST
    Figure CN2024131703_22052025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for video decoding, comprising: determining a current template corresponding to a current block to be predicted, wherein the current template is a reconstructed template in a frame containing the current block; determining, based on sample values of the current template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode, wherein the sample values of the current template comprise luma sample values and chroma sample values of the current template; and predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients.
Need to check novelty before this filing date? Find Prior Art

Description

METHODS AND DEVICES OF EXTRAPOLATION FILTER-BASED PREDICTION MODE

[0001] CROSS-REFERENCE TO RELATED APPLICATION

[0002] This application is based upon and claims priorities to U.S. Provisional Application No. 63 / 598,308 filed on November 13, 2023 and PCT application No. PCT / CN2023 / 140648 filed on December 21, 2023. The entire contents thereof are incorporated herein by reference in their entireties.TECHNICAL FIELD

[0003] This application is related to video coding and compression. More specifically, this application relates to methods and devices of extrapolation filter-based prediction mode.BACKGROUND

[0004] 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

[0005] Embodiments of the present disclosure provide methods and devices of extrapolation filter-based prediction mode.

[0006] According to one aspect of the present disclosure, there is provided a method for video decoding, comprising: determining a current template corresponding to a current block to be predicted, wherein the current template is a reconstructed template in a frame containing the current block; determining, based on sample values of the current template, filter  coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode, wherein the sample values of the current template comprise luma sample values and chroma sample values of the current template; and predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0007] According to one aspect of the present disclosure, there is provided a method for video encoding, comprising: determining a current template corresponding to a current block to be predicted, wherein the current template is a reconstructed template in a frame containing the current block; determining, based on sample values of the current template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode, wherein the sample values of the current template comprise luma sample values and chroma sample values of the current template; predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients; and generating a bitstream based on the predicted sample values of the current block.

[0008] According to one aspect of the present disclosure, there is provided a method for video decoding, comprising: determining a training template not adjacent to a current block to be predicted, wherein the training template is a reconstructed template in a frame containing the current block; determining, based on at least part of sample values of the training template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode; and predicting the current block by using the extrapolation filter with the determined filter coefficients.

[0009] According to one aspect of the present disclosure, there is provided a method for video encoding, comprising: determining a training template not adjacent to a current block to be predicted, wherein the training template is a reconstructed template in a frame containing the current block; determining, based on at least part of sample values of the training template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode; predicting the current block by using the extrapolation filter with the determined filter coefficients; and generating a bitstream based on the predicted current block.

[0010] According to one aspect of the present disclosure, there is provided an apparatus, comprising: one or more processors; and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the decoding method of the present disclosure.

[0011] According to one aspect of the present disclosure, there is provided an apparatus, comprising: one or more processors; and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the encoding method of the present disclosure.

[0012] According to one aspect of the present disclosure, there is provided a computer program product, storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of the present disclosure.

[0013] According to one aspect of the present disclosure, there is provided a computer readable medium storing a bitstream, wherein the bitstream is to be decoded by performing the operations of the method of the present disclosure, or the bitstream is obtained by performing the operations of the method of the present disclosure.

[0014] According to one aspect of the present disclosure, there is provided a method of storing a bitstream comprising: performing a method for video encoding according to the present disclosure to generate a bitstream; and storing the bitstream; wherein the bitstream is to be decoded by the method for video decoding according to the present disclosure.

[0015] 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.BRIEF DESCRIPTION OF THE DRAWINGS

[0016] 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.

[0017] Figure 1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks in accordance with some implementations of the present disclosure.

[0018] Figure 2 is a block diagram illustrating an exemplary video encoder in accordance with some implementations of the present disclosure.

[0019] Figure 3 is a block diagram illustrating an exemplary video decoder in accordance with some implementations of the present disclosure.

[0020] Figures 4A, 4B, 4C, 4D and 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.

[0021] Figure 5 illustrates a diagram of intra modes as defined in VVC.

[0022] Figure 6 illustrates a diagram of multiple reference lines for intra prediction.

[0023] Figure 7A and 7B illustrate diagrams of reference samples for Position-Dependent intra Prediction Combination (PDPC) in a top-right diagonal mode and a bottom-left diagonal mode respectively.

[0024] Figure 8A illustrates a diagram of sub-partitions for 4x8 and 8×4 CUs.

[0025] Figure 8B illustrates a diagram of sub-partitions for CUs other than 4×8, 8×4 and 4×4 CUs.

[0026] Figure 9 illustrates a diagram of locations of left and above samples of a CU involved in a Cross-Component Linear Model (CCLM) prediction.

[0027] Figure 10 illustrates a diagram of a Matrix weighted Intra Prediction (MIP) process.

[0028] Figure 11 illustrates a diagram of spatial part of the convolutional filter.

[0029] Figure 12 illustrates a diagram of reference area (with its paddings) used to derive the filter coefficients.

[0030] Figure 13 illustrates a diagram of four Sobel based gradient patterns for GLM.

[0031] Figure 14 illustrates a diagram of three defined types of reconstructed areas.

[0032] Figure 15 illustrates a diagram of three defined types of filter shapes that each have fifteen inputs and generate one output.

[0033] Figure 16 illustrates an example of generating predictions for different positions in the current block by a diagonal order.

[0034] Figure 17 illustrates top and left neighboring blocks used in CIIP weight derivation.

[0035] Figure 18 illustrates spatial GPM candidates.

[0036] Figure 19 illustrates GPM template.

[0037] Figure 20 illustrates GPM blending.

[0038] Figure 21 illustrates examples of prediction for different positions in the current block.

[0039] Figure 22 illustrates a diagram of spatial terms corresponding to neighboring luma samples.

[0040] Figure 23 illustrates a diagram of examples of different shape / number of filter taps.

[0041] Figure 24 illustrates a diagram of examples of different shape / number of filter taps.

[0042] Figure 25 illustrates a diagram of examples of different shape / number of filter taps.

[0043] Figure 26 illustrates a diagram of possible positions of candidate regions.

[0044] Figure 27 illustrates a diagram of possible positions of candidates.

[0045] Figure 28 illustrates a diagram of examples of different shape / number of filter taps.

[0046] Figure 29 illustrates a diagram of examples of different shape / number of filter taps.

[0047] Figure 30 illustrates a diagram of examples of different weights of masks.

[0048] Figure 31 illustrates a workflow of a method for video decoding according to one or more aspects of the present disclosure.

[0049] Figure 32 illustrates a workflow of a method for video encoding according to one or more aspects of the present disclosure.

[0050] Figure 33 illustrates a workflow of a method for video decoding according to one or more aspects of the present disclosure.

[0051] Figure 34 illustrates a workflow of a method for video encoding according to one or more aspects of the present disclosure.

[0052] Figure 35 is a diagram illustrating a computing environment coupled with a user interface, according to some implementations of the present disclosure.DETAILED DESCRIPTION

[0053] 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.

[0054] 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 be 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.

[0055] Figure 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 Figure 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.

[0056] 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.

[0057] 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 storage 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.

[0058] As shown in Figure 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.

[0059] 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 data 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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 Figure 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 Figure 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.

[0065] Figure 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 for the term “image” or “picture” in the field of video coding.

[0066] As shown in Figure 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.

[0067] 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 Figure 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, the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components.

[0068] As shown in Figure 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.

[0069] 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.

[0070] 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 may 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.

[0071] 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.

[0072] 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.

[0073] 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 frames stored in the DPB 64. The motion estimation unit 42 sends the calculated motion vector to the motion compensation unit 44 and then to the entropy encoding unit 56.

[0074] 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.

[0075] 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 BC 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.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] The transform processing unit 52 may send the resulting transform coefficients to 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.

[0081] 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 Figure 1, or archived in the storage device 32 as shown in Figure 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.

[0082] 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.

[0083] 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.

[0084] Figure 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 video encoder 20 in connection with Figure 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.

[0085] 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.

[0086] 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 Figure 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.

[0087] 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 decodes 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.

[0088] 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.

[0089] 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.

[0090] 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.

[0091] 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.

[0092] 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 region 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.

[0093] 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.

[0094] 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.

[0095] 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 Figure 1.

[0096] 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.

[0097] As shown in Figure 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 Figure 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.

[0098] 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 Figure 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. Figure 4D depicts a quad-tree data structure illustrating the end result of the partition process of the CTU 400 as depicted in Figure 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 Figure 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 Figures 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. As shown in Figure 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.

[0099] 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.

[0100] 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.

[0101] 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.

[0102] Furthermore, as illustrated in Figure 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, 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.

[0103] 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.

[0104] 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.

[0105] 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 TUs of the current CU. After reconstructing the coding blocks for each CU of a frame, video decoder 30 may reconstruct the frame.

[0106] 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.

[0107] 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.

[0108] 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 Figure 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.

[0109] 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 the video decoder 30 to use the same motion vector predictor within the motion vector candidate list for encoding and decoding the current CU.

[0110] In general, the basic intra prediction scheme applied in VVC is almost kept the same as that of HEVC, except that several prediction tools are further extended, added and / or improved, e.g., extended intra prediction with wide-angle intra modes, Multiple Reference Line (MRL) intra prediction, Position-Dependent intra Prediction Combination (PDPC) , Intra Sub-Partition (ISP) prediction, Cross-Component Linear Model (CCLM) prediction, and Matrix weighted Intra Prediction (MIP) .

[0111] Extended intra prediction with wide-angle intra modes

[0112] Like HEVC, VVC uses a set of reference samples neighboring a current CU (i.e., above the current CU or left to the current CU) to predict samples of the current CU. However, to capture finer edge directions present in natural video (especially for video content in high resolutions, e.g., 4K) , a number of angular intra modes is extended from 33 in HEVC to 93 in VVC. Figure 5 illustrates a diagram of intra modes as defined in VVC. As shown in Figure 5, among the 93 angular intra modes, modes 2 to 66 are conventional angular intra modes, and modes -1 to -14 and modes 67 to 80 are wide-angle intra modes. In addition to the angular intra modes, the planar mode (mode 0 in Figure 5) and Direct Current (DC) mode (mode 1 in Figure 5) of HEVC are also applied in VVC.

[0113] Since a quad / binary / ternary tree partition structure is applied in VVC, besides video blocks in square shape, rectangular video blocks also exist for the intra prediction in VVC. Due to unequal width and height of one given video block, various sets of angular intra modes may be selected from the 93 angular intra modes for different block shapes. More specifically, for both square and rectangular video blocks, besides planar and DC modes, 65 angular intra  modes among the 93 angular intra modes are also supported for each block shape. When a rectangular block shape of a video block satisfies a certain condition, an index of a wide-angle intra mode of the video block may be adaptively determined by the video decoder 30 according to an index of a conventional angular intra mode received from the video encoder 20 using a mapping relationship as shown in Table 1 below. That is, for non-square blocks, the wide-angle intra modes are signaled by the video encoder 20 using the indexes of the conventional angular intra modes, which are mapped to indexes of the wide-angle intra modes by the video decoder 30 after being parsed, thus ensuring that a total number (i.e., 67) of intra modes (i.e., the planar mode, the DC mode and 65 angular intra modes among the 93 angular intra modes) is unchanged, and the intra mode coding method is unchanged. As a result, a good efficiency of signaling intra modes is achieved while providing a consistent design across different block sizes.

[0114] Table 1 shows a mapping relationship between indexes of conventional angular intra modes and indexes of wide-angle intra modes for the intra prediction of different block shapes in VCC, wherein W represents a width of a video block, and H represents a height of the video block.

[0115] Table 1

[0116] MRL intra prediction

[0117] Similarly to the intra prediction in HEVC, all the intra modes (i.e., planar, DC and angular intra modes) in VVC utilize a set of reference samples above and left to a current video  block for intra prediction. However, differently from HEVC where only the nearest row / column (i.e., a zeroth line 601 in Figure 6) of reference samples are used, MRL intra prediction is introduced in VVC where in addition to the nearest row / column of reference samples, two additional rows / columns of reference samples (i.e., a first line 603 and a third line 605 in Figure 6) may be used for the intra prediction. An index of a selected row / column of reference samples is signaled from the video encoder 20 to the video decoder 30. When a non-nearest row / column of reference samples (i.e., the first line 603 or the third line 605 in Figure 6) is selected, the planar mode is excluded from a set of intra modes that may be used to predict the current video block. The MRL intra prediction is disabled for a first row / column of video blocks inside a current CTU to prevent using extended reference samples outside the current CTU.

[0118] PDPC

[0119] As mentioned earlier, the intra prediction samples are generated from a set of neighboring reference samples, which may introduce discontinuities along block boundaries between a current video block and neighboring video blocks thereof. The PDPC tool is introduced in VVC to solve such problems by employing a weighted combination of intra prediction samples with boundary reference samples. In VVC, PDPC may be enabled for the following intra modes without signaling: planar mode, DC mode, angular intra modes with indexes less than or equal to that of a horizontal intra mode (i.e., mode 18) , and angular intra modes with indexes greater than or equal to that of a vertical intra mode (i.e., mode 50) and less than or equal to 80. If a Block Differential Pulse Coded Modulation (BDPCM) mode is applied for the current block or an index of a selected row / column of reference samples for MRL intra prediction is greater than 0, PDPC is not applied. Assuming that a prediction sample of a current sample located at coordinate (x, y) is pred (x, y) , a modified prediction sample pred’ (x, y) after the PDPC is performed is calculated as:

[0120] pred’ (x, y) = Clip3 (0, (1 << BitDepth ) - 1, (wL×R-1, y’ + wT×Rx’ , -1 +

[0121] (64 -wL -wT) ×pred (x, y) + 32 ) >>6)               (1)

[0122] where BitDepth represents a bit depth of samples, Rx’ , -1 and R-1, y’ represent reference samples located at top and left boundaries of the current sample, respectively, wL and wT are weights which are adaptively selected according to an intra mode and a block size of the current block, “>>” represents a bitwise right shift operation, and “<<” indicates a bitwise left shift operation.

[0123] The function Clip3 (x, y, z) in the equation (1) may be defined as follows:

[0124] Figure 7A and Figure 7B illustrate diagrams of reference samples for PDPC in a top-right diagonal mode and a bottom-left diagonal mode respectively. The prediction sample pred (x, y) is located at (x, y) in the prediction block. The reference sample Rx’ , -1 has a horizontal coordinate of x’ =x+y+1 and a vertical coordinate of -1, and the reference sample R-1, y’ has a horizontal coordinate of -1 and a vertical coordinate of y’ =x+y+1.

[0125] ISP prediction

[0126] The ISP prediction is a tool applied for luma intra prediction modes, which divides luma video blocks vertically or horizontally into 2 or 4 sub-partitions depending on block sizes thereof, as shown in Table 2. For example, a minimum block size for ISP is 4×8 or 8×4. Figure 8A and Figure 8B show diagrams of sub-partitions depending on a block size. If a block size W×H of a video block (for example, the video block 401 as shown in Figure 8A) is equal to 4×8 or 8×4, then the video block is divided into 2 sub-partitions. If a block size W×H of a video block (for example, the video block 403 as shown in Figure 8B) is greater than 4×8 or 8×4, then the video block is divided into 4 sub-partitions. A CU size that may use ISP is restricted to a maximum of 64×64. All sub-partitions fulfill a condition of having at least 16 samples.

[0127] Table 2

[0128] For each sub-partition, reconstructed samples are obtained by adding a residual signal to a prediction signal. Here, the residual signal is generated by processes such as entropy decoding, inverse quantization and inverse transform. The reconstructed samples of each sub-partition are available to generate prediction of a next sub-partition. In addition, a first sub-partition to be processed is the one containing a top-left sample of the CU, and after the first sub-partition is processed, the ISP prediction continues downwards (for horizontal splitting as shown in Figure 8A and Figure 8B) or rightwards (for vertical splitting as shown in Figure 8A and Figure 8B) . All sub-partitions share the same intra prediction mode.

[0129] CCLM prediction

[0130] To reduce the cross-component redundancy, a CCLM prediction mode is used in VVC, wherein chroma samples of a CU are predicted based on reconstructed luma samples  rec_L (i, j) of the CU by using a linear model as follows:

[0131] predC (i, j) =α·recL' (i, j) +β             (3)

[0132] where predC (i, j) represents predicted chroma samples in the CU, recL′ (i, j) represents down-sampled reconstructed luma samples of the CU which are obtained by performing down-sampling on the reconstructed luma samples recL (i, j) , and α and β are linear model parameters which are derived from at most four neighboring chroma samples and their corresponding down-sampled luma samples. Suppose that a current chroma block has a size of W×H, then W’ and H’ are obtained as follows:

[0133] W’ = W, H’ = H when an LM mode is applied;

[0134] W’ =W + H when an LM_A mode is applied;

[0135] H’ = H + W when an LM_L mode is applied.

[0136] In the LM mode, above samples and left samples of the CU are used together to calculate the linear model coefficients; in the LM_A mode, only the above samples of the CU are used to calculate the linear model coefficients; and in the LM_L mode, only the left samples of the CU are used to calculate the linear model coefficients.

[0137] If 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 neighboring chroma samples are selected as follows:

[0138] - S [W’  / 4, -1] , S [3 *W’  / 4, -1] , S [-1, H’  / 4] and S [-1, 3 *H’  / 4] are selected as the positions of the four neighboring chroma samples when the LM mode is applied and both of the above and left samples are available;

[0139] - 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 neighboring chroma samples when the LM_A mode is applied and the above samples are available or when only the above samples are available;

[0140] - 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 neighboring chroma samples when the LM_L mode is applied and the left samples are available or when only the left samples are available.

[0141] Four neighboring luma samples corresponding to the selected locations are obtained by a down-sampling operation and the obtained four neighboring luma samples are compared four times to find two larger values: x0A and x1A and two smaller values: x0B and x1B. 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, Ya and Yb are derived as:

[0142] Xa= (x0A + x1A +1) >>1;

[0143] Xb= (x0B + x1B +1) >>1;                       (4)

[0144] Ya= (y0A + y1A +1) >>1;

[0145] Yb= (y0B + y1B +1) >>1.

[0146] Finally, the linear model parameters α and β are obtained according to the following equations.

[0147] β=Y1-α·X1

[0148] Figure 9 shows a diagram of locations of left and above samples of the CU involved in the CCLM mode, including locations of left and above samples of an N×N chroma block 901 in the CU and locations of left and above samples of an 2N×2N luma block 903 in the CU.

[0149] The parameter computation described above is performed as part of the decoding process, and therefore no syntax element is used to convey values of α and β from the video encoder 20 to the video decoder 30.

[0150] MIP

[0151] MIP is an intra prediction method newly added into VVC. In the MIP prediction method, a prediction signal of samples of a rectangular block of width W and height H is generated by taking one column of H reconstructed neighboring boundary samples left to the rectangular block and one row of W reconstructed neighboring boundary samples above the rectangular block as input based on the following three steps, which are averaging, matrix vector multiplication and linear interpolation as shown in Figure 10.

[0152] First step: Averaging neighboring samples

[0153] Four samples or eight samples are determined by averaging the neighboring boundary samples bdrytop and bdryleft based on block size and shape. Specifically, the neighboring boundary samples bdrytop and bdryleft are reduced to boundary samples  and  by averaging the neighboring boundary samples bdrytop and bdryleft according to a predefined rule depending on the block size. Then, the reduced boundary samples  and  are concatenated to a reduced boundary vector bdryred which thus has a size of 4 for blocks of shape 4×4 and has a size of 8 for blocks of all other shapes. If Indexmode refers to the MIP-mode, this concatenation is defined as follows:

[0154] Second step: Matrix Vector Multiplication

[0155] A matrix vector multiplication, followed by addition of an offset, is carried out with the averaged samples in the reduced boundary vector bdryred as an input, to generate a reduced prediction signal of a down-sampled set of samples in the original block. More specifically, the reduced prediction signal predred is computed as:

[0156] predred = A·bdryred+b      (7)

[0157] Here, A is a matrix that has Wred· Hred rows and 4 columns if W=H=4 or 8 columns in all other cases. b is an offset vector of size Wred· Hred.

[0158] Here, Wred and Hred are defined as:

[0159] The matrix A and the offset vector b are taken from one of the sets S0, S1, S2. An index idx of a set from which the matrix A and the offset vector b are taken is defined as follows:

[0160] Here, each coefficient of the matrix A is represented with 8-bit precision. The set S0 consists of 16 matrices  each of which has 16 rows and 4 columns and 16 offset vectors  each of size 16, i∈ {0, …, 15} . Matrices and offset vectors of that set are used for blocks of size 4×4. The set S1 consists of 8 matrices  each of which has 16 rows and 8 columns and 8 offset vectors  each of size 16, i∈ {0, …, 7} . The set S2 consists of 6 matrices  each of which has 64 rows and 8 columns and of 6 offset vectors  of size 64, i∈ {0, …, 5} .

[0161] Third step: Interpolation

[0162] The prediction signal at the remaining positions is generated from the reduced prediction signal of the down-sampled set of samples by linear interpolation which is a single step linear interpolation in each direction. The interpolation is performed firstly in the horizontal direction and then in the vertical direction regardless of block shape or block size.

[0163] Intra block copy

[0164] Intra block copy (IBC) is a tool adopted in HEVC extensions on SCC. It is well known that it significantly improves the coding efficiency of screen content materials. Since IBC mode is implemented as a block level coding mode, block matching (BM) is performed at the encoder to find the optimal block vector (or motion vector) for each CU. Here, a block vector is used to indicate the displacement from the current block to a reference block, which is already reconstructed inside the current picture. The luma block vector of an IBC-coded CU  is in integer precision. The chroma block vector rounds to integer precision as well. When combined with AMVR, the IBC mode can switch between 1-pel and 4-pel motion vector precisions. An IBC-coded CU is treated as the third prediction mode other than intra or inter prediction modes. The IBC mode is applicable to the CUs with both width and height smaller than or equal to 64 luma samples.

[0165] At the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD check for blocks with either width or height no larger than 16 luma samples. For non-merge mode, the block vector search is performed using hash-based search first. If hash search does not return valid candidate, block matching based local search will be performed.

[0166] In the hash-based search, hash key matching (32-bit CRC) between the current block and a reference block is extended to all allowed block sizes. The hash key calculation for every position in the current picture is based on 4x4 subblocks. For the current block of a larger size, a hash key is determined to match that of the reference block when all the hash keys of all 4×4 subblocks match the hash keys in the corresponding reference locations. If hash keys of multiple reference blocks are found to match that of the current block, the block vector costs of each matched reference are calculated and the one with the minimum cost is selected.

[0167] In block matching search, the search range is set to cover both the previous and current CTUs.

[0168] At CU level, IBC mode is signalled with a flag and it can be signaled as IBC AMVP mode or IBC skip / merge mode as follows:

[0169] IBC skip / merge mode: a merge candidate index is used to indicate which of the block vectors in the list from neighboring candidate IBC coded blocks is used to predict the current block. The merge list includes spatial, HMVP, and pairwise candidates.

[0170] IBC AMVP mode: block vector difference is coded in the same way as a motion vector difference. The block vector prediction method uses two candidates as predictors, one from left neighbor and one from above neighbor (if IBC coded) . When either neighbor is not available, a default block vector will be used as a predictor. A flag is signaled to indicate the block vector predictor index.

[0171] Convolutional cross-component model (CCCM) for intra prediction

[0172] In this method convolutional cross-component model (CCCM) is applied to predict chroma samples from reconstructed luma samples in a similar spirit as done by the current CCLM modes. As with CCLM, the reconstructed luma samples are down-sampled to match the lower resolution chroma grid when chroma sub-sampling is used. Similar to CCLM, top, left or top and left reference samples are used as templates for model derivation.

[0173] Also, similarly to CCLM, there is an option of using a single model or multi-model variant of CCCM. The multi-model variant uses two models, one model derived for samples above the average luma reference value and another model for the rest of the samples  (following the spirit of the CCLM design) . Multi-model CCCM mode can be selected for PUs which have at least 128 reference samples available.

[0174] The convolutional 7-tap filter consist of a 5-tap plus sign shape spatial component, a nonlinear term and a bias term. The input to the spatial 5-tap component of the filter consists of a center (C) luma sample which is collocated with the chroma sample to be predicted and its above / north (N) , below / south (S) , left / west (W) and right / east (E) neighbors as illustrated in Figure 11.

[0175] The nonlinear term P is represented as power of two of the center luma sample C and scaled to the sample value range of the content:

[0176] P = (C*C + midVal ) >> bitDepth

[0177] That is, for 10-bit content it is calculated as:

[0178] P = (C*C + 512 ) >> 10

[0179] The bias term B represents a scalar offset between the input and output (similarly to the offset term in CCLM) and is set to middle chroma value (512 for 10-bit content) .

[0180] Output of the filter is calculated as a convolution between the filter coefficients ci and the input values and clipped to the range of valid chroma samples:

[0181] predChromaVal = c0C + c1N + c2S + c3E + c4W + c5P + c6B

[0182] The filter coefficients ci are calculated by minimising MSE between predicted and reconstructed chroma samples in the reference area. Figure 12 illustrates the reference area which consists of 2 or 6 lines of chroma samples above and left of the PU. Whether to use 6 lines or 2 lines of neighboring samples to derive the CCCM model parameters in the single model CCCM is determined by a template cost. Similarly, for the multi-model CCCM mode, the two candidates use 6 lines neighboring luma samples or luma samples collocated to the current chroma block to derive mean values which separate samples into two groups. The cost is derived by applying the candidate CCP (either 2 or 6 lines) on a template, calculating the sum of absolute difference (SAD) between CCP predicted samples and reconstructed samples in the template.

[0183] Reference area extends one PU width to the right and one PU height below the PU boundaries. Area is adjusted to include only available samples. The extensions to the area shown in blue are needed to support the “side samples” of the plus shaped spatial filter and are padded when in unavailable areas.

[0184] The MSE minimization is performed by calculating autocorrelation matrix for the luma input and a cross-correlation vector between the luma input and chroma output. Autocorrelation matrix is LDL decomposed and the final filter coefficients are calculated using back-substitution. The process follows roughly the calculation of the ALF filter coefficients in ECM, however LDL decomposition was chosen instead of Cholesky decomposition to avoid  using square root operations.

[0185] The autocorrelation matrix is 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 high bit depth operation during the model parameters calculation. It is proposed to remove fixed offsets from luma and chroma samples in each PU for each model. This is driving down the magnitudes of the values used in the model creation and allows reducing the precision needed for the fixed-point arithmetic. As a result, 16-bit decimal precision is proposed to be used instead of the 22-bit precision of the original CCCM implementation.

[0186] Reference sample values just outside of 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 creation and final prediction (i.e., luma and chroma in the reference area, and luma in the current PU) are reduced by these fixed values, as follows:

[0187] C' = C –offsetLuma

[0188] N' = N –offsetLuma

[0189] S' = S –offsetLuma

[0190] E' = E –offsetLuma

[0191] W' = W –offsetLuma

[0192] P' = nonLinear (C' )

[0193] B = midValue = 1 << (bitDepth -1)

[0194] and the chroma value is predicted using the following equation, where offsetChroma is equal to offsetCr and offsetCb for Cr and Cb components, respectively:

[0195] predChromaVal = c0C' + c1N' + c2S' + c3E' + c4W' + c5P' + c6B + offsetChroma

[0196] In order 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. As an alternative way, impact of the chroma offset can be removed from the cross-component vector giving 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.

[0197] The process of CCCM model parameter calculation requires division operations. Division operations are not always considered implementation friendly. The division operation is replaced with multiplication (with a scale factor) and shift operation, where scale factor and number of shifts are calculated based on denominator similar to the method used in calculation of CCLM parameters.

[0198] Gradient Linear Model

[0199] For YUV 4: 2: 0 color format, a gradient linear model (GLM) method can be used to predict the chroma samples from luma sample gradients. Two modes are supported: a two-parameter GLM mode and a three-parameter GLM mode.

[0200] Compared with the CCLM, instead of down-sampled luma values, the two-parameter GLM utilizes luma sample gradients to derive the linear model. Specifically, when the two-parameter GLM is applied, the input to the CCLM process, i.e., the down-sampled luma samples L, are replaced by luma sample gradients G. The other parts of the CCLM (e.g., parameter derivation, prediction sample linear transform) are kept unchanged.

[0201] C = α·G+β

[0202] In the three-parameter GLM, a chroma sample can be predicted based on both the luma sample gradients and down-sampled luma values with different parameters. The model parameters of the three-parameter GLM are derived from 6 rows and columns adjacent samples by the LDL decomposition based MSE minimization method as used in the CCCM.

[0203] C = α0·G+α1·L+α2·β

[0204] For signaling, when the CCLM mode is enabled to the current CU, one flag is signaled to indicate whether GLM is enabled for both Cb and Cr components; if the GLM is enabled, another flag is signaled to indicate which of the two GLM modes is selected and one syntax element is further signaled to select one of 4 gradient filters for the gradient calculation, as illustrated in Figure 13.

[0205] An Extrapolation Filter-based intra Prediction (EIP) mode

[0206] The extrapolation filter-based intra prediction is processed in three steps. First, the minimum sample value, the maximum sample value and an offset value are obtained for a pre-determined reconstructed area (i.e., the template of the current block to be predicted) . The values can be luma sample values or chroma sample values. Second, the extrapolation filter coefficients are obtained from the reconstructed sample values from the template. Third, the extrapolation process generates predicted sample values, sample by sample, from the top-left to bottom-right corner within the current block.

[0207] The application of EIP is restricted to the block size not greater than 32x32 and intra slice only.

[0208] Similar to CCCM mode, the offset value should be removed when feeding the inputs to the extrapolation filter. In one example, the offset value for EIP can be the average sample value for the template. In another example, the sample value of a top-left reconstructed sample (adjacent to the current block) from the template of the current block is used as the offset value for EIP. The minimum sample value and the maximum sample value are obtained from reconstructed samples in the template of the current block.

[0209] Three types of templates and three filter shapes are proposed as shown in Figure 14  and Figure 15. Figure 14 illustrates three types of templates and a filter with a filter shape of 4x4 (the width of the filter (fWidth) being 4 samples, and the height of the filter (fHeight) being 4 samples) . The size of each template depends on the minimum value among the width and height of the current block (i.e., min (blockWidth, blockHeight) ) and the selected filter shape. For example, when the current block is an 8x16 block and the selected filter shape is 4x4, the aboveSize (number of lines above the current block) of the template is min (8, 16) + 4 –1 = 11, and the leftSize (number of lines to the left of the current block) of the template is min (8, 16) + 4 –1 = 11. Three types of fifteen-tap filters are shown in Figure 15 for which the boxes with sparse dot pattern correspond to the input samples and the box with dense dot pattern corresponds to the output sample to be predicted. When the current block uses the proposed EIP mode for prediction, the decoder decodes the relevant syntax elements to determine the selected type of template and the filter shape for the current block.

[0210] The selected filter moves in the selected template with a one-sample step to collect input samples and output samples of EIP. The auto-correlation matrix and cross-correlation vector are constructed while removing the offset value from input samples and output samples. Then, the EIP coefficients are obtained by the same method in CCCM.

[0211] The EIP mode generates predictions for the current block from the top-left position to the bottom-right position by a diagonal prediction order, as shown in Figure 16.

[0212] To reduce the prediction error, the minimum and maximum values from the template are applied to restrict the output range of each predicted value.

[0213] The calculation for predicted samples is shown as follows,

[0214] where pred (x, y) is the sample value to be predicted at (x, y) in the current block. min, max and offset are the values corresponding to the minimum sample value, the maximum sample value and the offset value described above in relation to EIP. ci is the itp coefficient of the derived extrapolation filter, the index of the coefficients in this example is from 0 to 14 (as shown by the first square 4x4 filter shape for which the boxes with sparse dot pattern correspond to the 0~14 input samples and the box with dense dot pattern corresponds to the output sample to be predicted) , t (x-xoffset, y-yoffset) is a reconstructed or predicted value used for the current position’s prediction. clip3 corresponds to the function as illustrated in equation (2) .

[0215] GPM (Geometric Partitioning Mode)

[0216] In VVC, GPM is supported for inter prediction. The GPM is signalled using a CU-level flag as one kind of merge mode, with other merge modes including the regular merge  mode, the MMVD (Merge mode with MVD) mode, the CIIP mode and the subblock merge mode. A total of 64 partitions are supported by GPM for each possible CU size W×H (W = 2m and H = 2n, with m, n ∈ {3, 4, 5, 6} ) excluding 8×64 and 64×8.

[0217] When the GPM is used, a CU is split into two parts by a geometrically located straight line. The position of the splitting line is mathematically derived from angle and offset parameters of a specific partition. Each part of the CU obtained by the geometrical partitioning is inter-predicted using its own motion; and only uni-prediction is allowed for each partition, that is, each part has one motion vector and one reference index. The uni-prediction motion constraint is applied to ensure that like the conventional bi-prediction, only two motion compensated predictions are needed for each CU.

[0218] If the GPM is used for the current CU, then a geometric partition index indicating a partition mode of the geometric partitioning (indicating an angle and an offset of the geometric partitioning) , and two merge indexes (one for each partition) are further signalled.

[0219] CIIP (Combined Inter-Intra Prediction)

[0220] In VVC, when a CU is coded in a merge mode, if the CU contains at least 64 luma samples (that is, a width of CU times a height of the CU is equal to or larger than 64) , and if both the width and the height of the CU are less than 128 luma samples, an additional flag is signalled to indicate if a CIIP mode is applied to the current CU. In the CIIP mode, a prediction signal is obtained by combining an inter prediction signal with an intra prediction signal. The inter prediction signal in the CIIP mode is derived using the same inter prediction process as that applied in the regular merge mode; and the intra prediction signal in the CIIP mode is derived following the regular intra prediction process with a planar mode. Then, the intra prediction signal and the inter prediction signal are combined using weighted averaging, where a weight value is calculated depending on coding modes of top and left neighboring blocks of the current CU 1601 (as shown in Figure 17) as follows:

[0221] -If the top neighboring block is available and is intra coded, then isIntraTop is set to 1, otherwise isIntraTop is set to 0;

[0222] -If the left neighboring block is available and is intra coded, then isIntraLeft is set to 1, otherwise isIntraLeft is set to 0;

[0223] -If (isIntraLeft + isIntraTop) is equal to 2, then the weight value for the intra prediction signal is set to 3;

[0224] -Otherwise, if (isIntraLeft + isIntraTop) is equal to 1, then the weight value for the intra prediction signal is set to 2;

[0225] -Otherwise, the weight value for the intra prediction signal is set to 1.

[0226] -The prediction signal PCIIP in the CIIP mode is derived as follows:

[0227] PCIIP = ( (4-wt) *Pinter+wt*Pintra+2) >>2        (11)

[0228] where Pinter is the inter prediction signal in the CIIP mode, Pintra is the intra prediction signal in the CIIP mode, wt is the weight value for the intra prediction signal, and >>represents a right shift operation.

[0229] Intra block copy in Versatile Video Coding (VVC)

[0230] Intra block copy (IBC) is a tool adopted in HEVC extensions on SCC. It is well known that it significantly improves the coding efficiency of screen content materials. Since IBC mode is implemented as a block level coding mode, block matching (BM) is performed at the encoder to find the optimal block vector (or motion vector) for each CU. Here, a block vector is used to indicate the displacement from the current block to a reference block, which is already reconstructed inside the current picture. The luma block vector of an IBC-coded CU is in integer precision. The chroma block vector rounds to integer precision as well. When combined with AMVR, the IBC mode can switch between 1-pel and 4-pel motion vector precisions. An IBC-coded CU is treated as the third prediction mode other than intra or inter prediction modes. The IBC mode is applicable to the CUs with both width and height smaller than or equal to 64 luma samples.

[0231] At the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD check for blocks with either width or height no larger than 16 luma samples. For non-merge mode, the block vector search is performed using hash-based search first. If hash search does not return valid candidate, block matching based local search will be performed.

[0232] In the hash-based search, hash key matching (32-bit CRC) between the current block and a reference block is extended to all allowed block sizes. The hash key calculation for every position in the current picture is based on 4x4 subblocks. For the current block of a larger size, a hash key is determined to match that of the reference block when all the hash keys of all 4×4 subblocks match the hash keys in the corresponding reference locations. If hash keys of multiple reference blocks are found to match that of the current block, the block vector costs of each matched reference are calculated and the one with the minimum cost is selected.

[0233] In block matching search, the search range is set to cover both the previous and current CTUs.

[0234] At CU level, IBC mode is signalled with a flag and it can be signaled as IBC AMVP mode or IBC skip / merge mode as follows:

[0235] IBC skip / merge mode: a merge candidate index is used to indicate which of the block vectors in the list from neighboring candidate IBC coded blocks is used to predict the current block. The merge list consists of spatial, HMVP, and pairwise candidates.

[0236] IBC AMVP mode: block vector difference is coded in the same way as a motion  vector difference. The block vector prediction method uses two candidates as predictors, one from left neighbor and one from above neighbor (if IBC coded) . When either neighbor is not available, a default block vector will be used as a predictor. A flag is signaled to indicate the block vector predictor index.

[0237] Spatial Geometric partitioning mode (SGPM)

[0238] SGPM is an intra mode that resembles the inter coding mode of GPM, where the two prediction parts are generated from intra predicted process. In this mode, a candidate list is built with each entry containing one partition mode and two intra prediction modes as shown in Figure 18.26 partition modes and 3 of intra prediction modes are used to form the combinations. The length of the candidate list is set equal to 16. The selected candidate index is signalled.

[0239] The list is reordered using template (Figure 19) where SAD between the prediction and reconstruction of the template is used for ordering. The template size is fixed to 1.

[0240] For each partition mode, an IPM (Intra Prediction Mode) list is derived for each part using the same intra-inter GPM list derivation. The IPM list size is set to 3. In the list, TIMD (Template-based Intra Mode Derivation) derived mode is replaced by 2 derived modes with horizontal and vertical orientations.

[0241] The SGPM mode is applied with a restricted blocks size: 4<=width<=64, 4<=height<=64, width<height*8, height<width*8, width*height>=32.

[0242] Adaptive blending is also used for spatial GPM, where blending depth τ is derived as follows, where Figure 20 illustrates an example of min (width, height) ==16:

[0243] If min (width, height) ==4, 1 / 2 τ is selected

[0244] else if min (width, height) ==8, τ is selected

[0245] else if min (width, height) ==16, 2 τ is selected

[0246] else if min (width, height) ==32, 4 τ is selected

[0247] else, 8 τ is selected.

[0248] Intra template matching prediction

[0249] Intra template matching prediction (Intra TMP) is a special intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, the encoder searches for the most similar template to the current template in a reconstructed part of the current frame and uses the corresponding block as a prediction block. The encoder then signals the use of this mode, and the same prediction operation is performed at the decoder side. The prediction signal is generated by matching the L-shaped causal neighbor of the current block with another block in a predefined search area consisting of: current CTU, top-left CTU, above CTU, left CTU. Sum of absolute differences (SAD) is used as a cost function. Within each region, the decoder searches for the template that has least SAD with respect to the current  template and uses its corresponding block as a prediction block.

[0250] The dimensions of all regions (SearchRange_w, SearchRange_h) are set proportional to the block dimension (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel. That is:

[0251] SearchRange_w = a *BlkW

[0252] SearchRange_h = a *BlkH

[0253] where ‘a’ is a constant that controls the gain / complexity trade-off. In practice, ‘a’ is equal to 5. The Intra template matching tool is enabled for CUs with size less than or equal to 64 in width and height. This maximum CU size for Intra template matching is configurable.

[0254] The Intra template matching prediction mode is signaled at CU level through a dedicated flag when DIMD is not used for current CU.

[0255] Although the existing extrapolation filter-based intra prediction mode can provide significant improvement of intra coding in the ECM, there is room to further improve its performance. Meanwhile, some parts of the existing extrapolation filter-based intra prediction mode also need to be simplified for efficient codec hardware implementations or improved for better coding efficiency. Furthermore, the tradeoff between its implementation complexity and its coding efficiency benefit needs to be further improved.

[0256] In this disclosure, to address the issues as pointed out above, methods are provided to further improve the existing design of extrapolation filter-based intra prediction mode (EIP) . In general, the main features of the proposed technologies in this disclosure are summarized as follows.

[0257] In one example, the template may be adjacent to the current block. Reference from local regions can improve the accuracy of prediction in prediction.

[0258] In one example, the template may be not adjacent to the current block. In this example, reference from non-local regions can improve the accuracy of prediction in prediction.

[0259] In one example, only one hypothesis may be utilized. For example, the combination of different templates and filter shapes will lead to different predicted blocks. The best matching block which leads to the minimum matching cost is selected as the final prediction.

[0260] In another example, multiple hypothesis may be utilized. For example, more than one predicted blocks are further fused as the final prediction for the current block.

[0261] In one example, extrapolation filter-based sub-partitions is proposed to further improve the prediction accuracy of the extrapolation filter-based prediction mode.

[0262] In one example, classification-based methods of extrapolation filter-based prediction is proposed to further improve the prediction accuracy of the extrapolation filter-based prediction mode.

[0263] It is noted that the figures in this disclosure may be combined with all examples  mentioned in this disclosure.

[0264] It is noted that the disclosed methods may be applied independently or jointly.

[0265] It is noted that the disclosed methods may be applied in different sampling formats, e.g. 4: 2: 0, 4: 2: 2 and 4: 4: 4 YUV / RGB formats.

[0266] Improvement of EIP

[0267] According to one or more embodiments of the disclosure, reconstructed samples in the template and / or predicted samples in the current block may be used as inputs to the filter when generating predictions, depending on the location of the sample to be predicted. Example 1 of Figure 21 illustrates using both reconstructed samples in the template and predicted samples in the current block for predicting the sample to be predicted, while Example 2 of Figure 21 illustrates using only predicted samples in the current block for the generating a prediction for the sample to be predicted.

[0268] According to one or more embodiments of the disclosure, the convolutional N-tap (N is an integer and larger than 1) filter may include (N-1-M) -tap (M is an integer) spatial terms, M nonlinear terms and a bias term. The (N-1-M) -tap spatial terms correspond to neighboring samples (e.g., L0, L1, …, L7 as shown in the exemplary filter in Figure 22) for the sample to be predicted (e.g., L8 in Figure 22) . The formula for each new sample to be predicted is as follows:

[0269] where αi is the coefficient associated with Li and β is an offset (e.g., 1 << (bitDepth -1) ) . The position and number of spatial term and nonlinear term may be different. Examples of different shape / number of filter taps are illustrated in Figure 23. For other examples, different positions of input samples and number of filter taps are shown in following table.

[0270] According to one or more embodiments of the disclosure, the filter shape may be rectangle and does not include the sample to be predicted, with N*M-1 filter taps (N and M are integers and larger than 1) . Examples of different shape / number of filter taps are further illustrated in Figure 24. According to one or more embodiments of the disclosure, the corresponding center point (C) position (i.e., the sample to be predicted) can be different and not at the bottom right corner of the filter. In these examples, unavailable sample values may be padded from neighboring samples. Examples of different position of center point (C) are illustrated in Figure 24.

[0271] According to one or more embodiments of the disclosure, the filter shape may be rectangle and does not include the bottom right sample (i.e., the sample to be predicted) , the number of filter taps used are N*M-1 (N and M are integers and larger than 1) . Examples of different shape / number of filter taps are illustrated in Figure 25, where (C) is the corresponding center point position (i.e., the location of the sample to be predicted) .

[0272] According to one or more embodiments of the disclosure, the number of filter taps may be predefined or signaled / switched in different coding levels such as the SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.

[0273] According to one or more embodiments of the disclosure, the template size used for deriving the filter coefficients may be N lines above and to the left of the current block depending on their availability, N is an integer.

[0274] According to one or more embodiments of the disclosure, the template size used for deriving the filter coefficients may be N lines above of the current block depending on their availability, N is an integer.

[0275] According to one or more embodiments of the disclosure, the template size used for deriving the filter coefficients may be N lines left of the current block depending on their availability, N is an integer.

[0276] According to one or more embodiments of the disclosure, the template size used for deriving the filter coefficients may depends on the filter shape. In one example, if the height of  filter shape is greater than its width, the template size may be N lines above of the current block depending on their availability, N is an integer.

[0277] According to one or more embodiments of the disclosure, the template size used for training may depends on block size. In one example, if the minimum of width and height of block size is grater than M, the template size used for training may be N lines above / left of the current block depending on their availability, N and M are integers and could be predefined.

[0278] According to one or more embodiments of the disclosure, the template size used for training may have a maximum or minimum limit. In one example, when the current block is an NxM block and the selected filter shape is 4x4. The aboveSize of reconstructed area is min(min (N, M) , K) + 4 –1, and the leftSize of reconstructed area is min (min (N, M) , K) + 4 –1, N / M is an integer, min (N, M) means taking the smaller value between N and M. K is an integer (e.g. 4, 8, 16, 32) .

[0279] According to one or more embodiments of the disclosure, the template may be predefined or signaled / switched in different coding levels such as the SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.

[0280] According to one or more embodiments of the disclosure, the training template containing reconstructed samples may be determined by IBC or Intra TMP. In one example, by Intra TMP, the most similar template to the current template in a reconstructed part of the current frame is determined and used as the training template. In another example, by a neighboring block vector from IBC, the template pointed by the block vector is used as the training template.

[0281] According to one or more embodiments of the disclosure, location information may be used to calculate model parameters for EIP mode, including utilizing horizontal / vertical / diagonal distance and their non-linear term, one or more location information may be used for the purpose. In one example, the location based parameter is related to the vertical and horizontal coordinates (Xc, Yc) of the center luma sample and it is calculated with respect to the top-left coordinates (Xtl, Ytl) of the block, e.g. Xc-Xtl+Yc-Ytl. In another example, the location based parameters are related to the vertical and horizontal coordinates (Xc, Yc) of the center luma sample and they are calculated with respect to the top-left coordinates (Xtl, Ytl) of the block, e.g. Xc-Xtl+Yc-Ytl, Xc-Xtl, Yc-Ytl. In yet another example, the location based parameter is related to the vertical and horizontal coordinates (Xc, Yc) of the center luma sample and it is calculated with respect to the top-left coordinates (Xtl, Ytl) of the block, e.g. (Xc-Xtl+Yc-Ytl)  / N, where N is predefined number, such as 2. In yet another example, the location based parameters are related to the vertical and horizontal coordinates (Xc, Yc) of the center luma sample and they are calculated with respect to the top-left coordinates (Xtl, Ytl) of the block, e.g. (Xc-Xtl+Yc-Ytl)  / N1, (Xc-Xtl)  / N2, (Yc-Ytl)  / N3, where N1~N3 are predefined numbers, such as 2, 3 and 4. In yet another example, the location based nonlinear terms are represented as power of two of the horizontal / vertical / diagonal  distance, e.g. (Xc-Xtl+Yc-Ytl) * (Xc-Xtl+Yc-Ytl) , (Xc-Xtl) * (Xc-Xtl) , (Yc-Ytl) * (Yc-Ytl) , where (Xc, Yc) are vertical and horizontal coordinates of the center luma sample and (Xtl, Ytl) are top-left coordinates.

[0282] According to one or more embodiments of the disclosure, one enable flag can be signaled in the bitstream to indicate the EIP mode used. The enable flag can be signaled in different coding levels such as the SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.

[0283] According to one or more embodiments of the disclosure, instead of explicitly signaling the selected mode flag, the mode flag can be derived at decoder to save bit overhead.

[0284] According to one or more embodiments of the disclosure, no additional control flag is required and the EIP mode will be derived under some predefined condition (e.g., specific modes, specific block sizes, specific partitions, etc. ) . When the predefined condition is matched, the EIP mode will be derived based on previous decoded information.

[0285] According to one or more embodiments of the disclosure, samples in regions non-adjacent to the current block can be used to derive a model for the current block. In such case, the template is selected from a plurality of template candidates in candidate regions. In one embodiment, one candidate region list with N candidates may be constructed by checking potential M×M regions in order. If a checked region is available, it is put into the candidate region list. For example, a candidate region list with 6 candidates is constructed by checking potential 8×8 regions in order. The top-left positions of the potential 8×8 regions are predetermined as { (-xStep, 0) , (0, -yStep) , (xStep, -yStep) , (-xStep, yStep) , (-xStep, -yStep) , (-2*xStep, 0) , (0, -2*yStep) , (-2 *xStep, 2 *yStep) , (2 *xStep, -2 *yStep) , (-2 *xStep, yStep) , (xStep, -2 *yStep) , (-2 *xStep, -yStep) , (-xStep, -2 *yStep) , (-2 *xStep, -2 *yStep) , (-xStep / 2, 0) , (0, -yStep / 2) , (xStep / 2, -yStep / 2) , (-xStep / 2, yStep / 2) , (-xStep / 2, -yStep / 2) } , where xStep = Max(width, 16) , yStep = Max (height, 16) . Figure 26 show some possible positions of candidate regions.

[0286] According to one or more embodiments of the disclosure, a training template not adjacent to a current block to be predicted (referred to as a “non-adjacent template” ) may be used to calculate model parameters for EIP mode (i.e., filter coefficients for the extrapolation filter) , including utilizing template matching from Intra TMP or block vector (BV) information from IBC for determining one or more non-adjacent templates for the purpose. The non-adjacent template may be located at the reconstructed part of a frame containing the current block. In one example, a non-adjacent template which is most similar to the current template (i.e., the template adjacent to the current block) by Intra TMP may be used to calculate filter coefficients for the extrapolation filter. In another example, in response to determining a neighboring block is predicted with IBC, a non-adjacent template pointed to, based on the current template, by the block vector of the neighboring block may be used to calculate filter coefficients for the extrapolation filter.

[0287] According to one or more embodiments of the disclosure, both the current template and the non-adjacent template may be used to calculate filter coefficients for the extrapolation filter, including utilizing prediction information from Intra TMP / IBC. In one example, both the current template and the non-adjacent template which is most similar to the current template by Intra TMP may be used to calculate the filter coefficients for the extrapolation filter. In another example, both the current template and the non-adjacent template pointed to, based on the current template, by a neighboring block vector may be used to calculate filter coefficients for the extrapolation filter. In one example, the extrapolation filter may have a filter shape formed by two parts, for example, the filter shape may be formed by a “Shape 0” of Figure 25 in the current template, and a single collocated “c” position in the non-adjacent template. Having a filter shape across the two templates will enable more samples from both the adjacent and non-adjacent regions to participate in the determination of filter coefficients for the extrapolation filter, leading to possible more accurate predictions for the current block based on EIP.

[0288] According to one or more embodiments of the disclosure, the extrapolation N-tap (N is an integer and larger than 1) filter may include M (M is an integer) spatial terms, K (K is an integer) nonlinear terms and with or without a bias term. The M spatial terms correspond to P (P is an integer) neighboring luma samples (e.g., L0, L1, …in the current template) and / or Q (Q is an integer) non-adjacent luma samples (e.g., NL0, NL1, …in the non-adjacent template) . The formula for a luma sample to be predicted is as follows:

[0289] where αi is the coefficient and β is the offset (e.g., 1 << (bitDepth -1) ) , K1 is the number of nonlinear terms for neighboring luma samples (e.g., L0, L1, …) , K2 is the number of nonlinear terms for non-adjacent luma samples (e.g., NL0, NL1, …) , and K=K1+K2. The position and number of spatial terms and nonlinear terms may be different. It should be understood that the embodiments are not limited to predicting luma samples. The chroma samples can be predicted based on neighboring chroma samples (e.g., C0, C1, …in the current template) and / or non-adjacent chroma samples (e.g., NC0, NC1, …in the non-adjacent template) in a same way as predicting luma samples.

[0290] In one example, an extrapolation 18-tap filter may include 16 spatial terms, one  nonlinear term and a bias term. The 16 spatial terms correspond to 15 neighboring luma samples (e.g., L0, L1, …) and 1 collocated or matched non-adjacent luma samples (e.g., NL15, ) . The formula for a luma sample to be predicted is as follows:

[0291] where αi is the coefficient and β is the offset (e.g., 1 << (bitDepth -1) ) .

[0292] According to one or more embodiments of the disclosure, one candidate region list with N candidates may be constructed by positions and inclusion order of the spatial non-adjacent neighboring candidates from two sets of spatial non-adjacent neighboring candidates in inter merge mode. If a checked region is available, it is put into the candidate region list. Figure 27 show some possible positions of candidates.

[0293] According to one or more embodiments of the disclosure, inherited flags of EIP from previously decoded block at the same or different coding levels, such as the CU / TB / CB / slice / picture / sequence level may be used in the current block. According to one or more embodiments of the disclosure, one control flag is signaled in CU / TB / CB / slice / picture / sequence level to indicate whether the signaling of inherited EIP is enabled or disabled. When the control flag is signaled as enabled, a flag of inherited EIP is further signaled to decoder to indicate whether the inherited EIP is used or not at the signaled level.

[0294] According to one or more embodiments of the disclosure, the filter shape and the derived parameters for the filter of EIP from previous decoded block at the same or different coding levels, such as the CU / TB / CB / slice / picture / sequence level, can be stored and used for the current block using EIP (which is called inherited EIP) . In one or another embodiment, a history-based EIP (H-EIP) table may be maintained similar to the HMVP table. The history-based EIP table comprises a set of video blocks predicted with EIP mode previously. In one embodiment, one index value can be signaled in the bitstream to indicate which candidate model in the H-EIP table is selected. In one embodiment, after decoding an EIP coded block, the corresponding table may be updated. In one embodiment, the size of H-EIP table is N. N is an integer (e.g. 4, 5, 6, 7) .

[0295] According to one or more embodiments of the disclosure, the filter coefficient precision in this method may be reduced. In other words, the precision of the stored filter coefficients for predicting the sample values of the current block may be reduced compared with the precision of derived filter coefficients used for predicting the sample values of the previous decoded block (e.g., from 12 bits to 8 bits or 10 bits, or from 10 bits to 8 bits) .

[0296] Multi-hypothesis EIP

[0297] According to one or more embodiments of the disclosure, more than one prediction for the current block are used and weighted to generate the final prediction of the current block. Assuming that N prediction block candidates are used, N being an integer (e.g. 2, 3, 4, 5) , at least one of the candidates is based on EIP to implement Multi-hypothesis EIP. For example, a prediction block candidate may be obtained based on inherited EIP, while other prediction block candidates may be calculated based on EIP with different filter shapes and / or different templates.

[0298] In one embodiment, the prediction block candidates are searched and selected according to the criterion of minimizing template matching cost, i.e., the top N candidates which lead to the minimum template matching cost are selected. The template matching cost can be not limited to SAD (sum of absolute difference) and SSE (sum of square error) .

[0299] In one embodiment, at least one of the prediction block candidates may be selected according to a predefine mode other than EIP, i.e., planar mode, IBC prediction, etc.

[0300] In one embodiment, at least one of the prediction block candidates may be selected according to a neighbor predefine mode, i.e., top predefine mode, left predefine mode, etc.

[0301] In one embodiment, the IBC prediction is combined with extrapolation filter-based intra prediction mode to increase prediction accuracy and adapt the characteristics of the copied block to the local neighbourhood.

[0302] In one embodiment, the weighting factors to generate the final prediction block are predefined and fixed at both the encoder and decoder side. As an example, equal weighting factors can be used, i.e., 1 / N for all the candidate blocks.

[0303] In one embodiment, the weighting factors can be derived based on the template matching costs. Denote the template matching costs of the N candidates as C1, C2, …, CN, the weighting factors are calculated as follow.

[0304] It should be noted that the template matching cost can be measured with (but not limited to) SAD and SSE.

[0305] In yet another embodiment, the weighting factors can be derived / switched based on the block size or syntax element signaled in different coding levels such as the SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.

[0306] In yet another embodiment, the weighting factors can be derived at the encoder side and then signaled in the bitstream to the decoder. Denote the N prediction block candidates asP1, P2, …, PN and the current block as X, then the weighting factors can be solved by the following equation:

[0307] Equation (13) can be solved using Wiener-Hopf equations as ALF. The derived filter  coefficients are then quantized to integer type and signaled in the block level.

[0308] In yet another embodiment, the weighting factors are derived based on the templates and the derived weighting factors are applied to the prediction block candidates to generate the final prediction block. Denote the templates of the prediction candidates as T1, T2, …, TN and the current block as T, then the weighting factors can be derived using the following equation:

[0309] Equation (14) can be solved using Wiener-Hopf equations. Then the final prediction block can be calculated as ωiPi, where Pi represents the i-th prediction block candidate.

[0310] EIP mode exploits the nonlocal correlation to improve the prediction accuracy, in which similar blocks are searched and used to generate the final prediction block. In this embodiment, it is proposed to combine the nonlocal mean filtering and multi-hypothesis EIP, which is described as follow. In the first step, N prediction block candidates are searched and identified as conducted in the EIP. In the second step, the weighting factor is calculated as follows.

[0311] where Di is used to measure the distance between the template of the i-th prediction block candidate and the template of the current block, h is used as the degree of weighting and Z [i] is the normalization constant:

[0312] To calculate the weighting factor in equation (14) , the strength of weighting should be determined first. In this disclosure, several methods are proposed to decide the weighting strength.

[0313] - In the first method, a weighting strength candidate list including some typical weighting strength values is defined and fixed at both encoder and decoder side. At the encoder side, the weighting strength values are checked using rate distortion optimization and the optimal weighting strength value is identified and signaled in the bitstream to the decoder side.

[0314] - In the second method, the weighting strength value is estimated using the template of the prediction block candidates and the template of the current block. Denote the templates of the prediction candidates as T1 , T2 , …, TN and the current block as T . Then the weighting strength value can be solved using the following equation:

[0315] - In the third method, the weighting strength value can be estimated using the QP value and variance of the template of the current block, i.e., the relationship between the weighting strength value, QP value and the template variance can be fitted offline.

[0316] To better exploit the nonlocal correlation in the EIP, in this embodiment singular value decomposition (SVD) is utilized to generate the final prediction block from the prediction block candidates. The width and height of the current block are denoted as W and H, the area of the current block is denoted as d=H×W.

[0317] - Step1. K prediction block candidates yi are searched and identified as conducted in the EIP.

[0318] - Step2. The K prediction block candidates of the current block y construct the block group G and are arranged as a matrix:

[0319] where YG is a matrix with size of d×K by arranging every candidate in group G as a column vector.

[0320] - Step3. Perform SVD decomposition on the matrix YG.

[0321] - Step4. Apply soft-thresholding operation on the singular value matrix ΛG.

[0322]

[0323] where softTh () is a function which shrinks the diagonal elements of ΛG with the threshold τ. For the k-th diagonal element in ΛG, it is shrunken by the nonlinear function Dτ(k) at level τ (k) :

[0324] Dτ(k) : λk, τ (k) = max ( |λk|-τ (k) , 0)        (21)

[0325] ΛG, τ is the matrix composed of the shrunken singular values, λk, τ (k) at diagonal positions.

[0326] - Step5. Perform inverse SVD to obtain the filtered patch group.

[0327] One of the key steps is to determine the thresholding values for each diagonal element in step 4. In this invention, the thresholding values are calculated as follows. The threshold is estimated for each group of image patches with the following equation:

[0328] where σn, G is the standard deviation of noise, and σx, G, k is the standard deviation of the  original block in the k-th dimension of SVD space for group G. The deviation of the original block in SVD space is estimated as follows,

[0329] where is the k-th singular value of When σx, G, k is zero, the soft-thresholding operation is skipped. In addition, the deviation of noise is estimated with the deviation of the predicted block using a power function which is parameterized with α and β.

[0330] σn=α×σyβ             (25)

[0331] where σy is calculated as follows,

[0332] Here yk (i) represents the i-th pixel of prediction block candidate vector yk.

[0333] Multi-hypothesis EIP signaling

[0334] In this disclosure, the proposed multi-hypothesis EIP can be utilized as a replacement of the current EIP mode or the encoder can adaptively select EIP mode or multi-hypothesis EIP mode.

[0335] In one embodiment, the proposed multi-hypothesis EIP is used as a replacement of the current EIP mode, i.e., always using multiple hypothesis for prediction. In yet another embodiment, one of the multi-hypothesis EIP methods in the above sections is used jointly with the current EIP mode. A flag is signaled in the bitstream to indicate whether multi-hypothesis EIP mode is applied to the CU.

[0336] In yet another embodiment, more than one multi-hypothesis EIP methods in the above sections is used jointly with the current EIP mode. A flag is firstly signaled in the bitstream to indicate whether multi-hypothesis EIP mode is applied. Then an index is signaled to indicate which of the multi-hypothesis EIP methods is applied to the CU.

[0337] Extrapolation filter-based sub-partitions

[0338] According to the embodiments of this disclosure, extrapolation filter-based sub-partitions (EISP) is proposed to further improve the prediction accuracy of the extrapolation filter-based prediction mode.

[0339] In one example, the EISP prediction may be applied for luma intra prediction modes, which divides luma video blocks vertically or horizontally into 2 or 4 sub-partitions depending on block sizes thereof, as shown in Table 2. For example, a minimum block size for EISP is 4×8 or 8×4. Figure 8A and Figure 8B show diagrams of sub-partitions depending on a block size. If a block size W×H of a video block (for example, the video block 401 as shown in Figure 8A) is equal to 4×8 or 8×4, then the video block is divided into 2 sub-partitions. If a block size  W×H of a video block (for example, the video block 403 as shown in Figure 8B) is greater than 4×8 or 8×4, then the video block is divided into 4 sub-partitions. A CU size that may use EISP is restricted to a maximum of 64×64. All sub-partitions fulfill a condition of having at least 16 samples.

[0340] For each sub-partition, reconstructed samples are obtained by adding a residual signal to a prediction signal. Here, the residual signal is generated by processes such as entropy decoding, inverse quantization and inverse transform. The prediction signal is obtained by predicting sample values of the sub-partition with EIP mode. The reconstructed samples of each sub-partition are available to generate prediction of a next sub-partition. In this way, compared with EIP for the video block, sub-partitioning enables more reconstructed samples to participate in the prediction of the block. In addition, a first sub-partition to be processed is the one containing a top-left sample of the CU, and after the first sub-partition is processed, the EISP prediction continues downwards (for horizontal splitting as shown in Figure 8A and Figure 8B) or rightwards (for vertical splitting as shown in Figure 8A and Figure 8B) for adjacent sub-partitions. All sub-partitions share the same EIP mode.

[0341] Classification based methods of extrapolation filter-based prediction

[0342] According to the embodiments of this disclosure, classification-based methods of extrapolation filter-based prediction is proposed to further improve the prediction accuracy of the extrapolation filter-based prediction mode.

[0343] According to one or more embodiments of the disclosure, the methods comprise classifying the reconstructed luma samples into plural sample groups based on direction and strength of edge information and applying different EIP models to the reconstructed luma samples in different sample groups. Different methods may be used to achieve this goal.

[0344] According to one or more embodiments of the disclosure, the current sample (Y0) may be compared with neighboring N samples (Yi) to get a score, i.e., if Y0 > Yi then score += 1, else Y0 < Yi then score -= 1. The score may be quantized to form K classes. Then the current sample may be classified to K classes by its score. N and K are integers.

[0345] According to one or more embodiments of the disclosure, the current sample may be calculated with neighboring N samples to get an edge strength, i.e., one edge strength is calculated by subtracting the current sample and one neighbor sample. The edge strength may be quantized to K segments by K-1 thresholds Ti. Then the current sample may be classified to K classes by its edge strength. N and K are integers.

[0346] According to one or more embodiments of the disclosure, the current sample may be calculated with neighboring N samples to get an edge strength, i.e., one edge strength is calculated by one edge detection filter. The filter shape, filter taps, and mapping table may be predefined or signaled or switched in different coding levels such as the SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels. The edge strength may be quantized to K segments by K-1 thresholds Ti. Then the current sample may  be classified to K classes by its edge strength. N and K are integers.

[0347] In one example, different filter shapes and filter taps for classification may be designed as in Figure 28 and Figure 29.

[0348] Combined EIP-intra / inter prediction

[0349] According to one or more embodiments of the disclosure, the coding block coded with EIP mode is combined with the coding block coded with intra mode or inter mode. Different methods may be used to achieve this goal.

[0350] In the first method, it is proposed to combine the coding block coded with EIP mode and the coding block coded with intra or inter mode. Various methods can be utilized in this combination. In one example, similar to the CIIP technology in VVC, the coding block coded with EIP mode is regarded as the coding block coded with intra or inter merge mode, for an example, it may be combined with the coding block coded with planar intra prediction mode. In another example, similar to the Combination of CIIP with TIMD and TM (Template Matching) merge technology in ECM, the coding block coded with EIP mode is combined with the coding block coded with TIMD derived intra prediction mode or TM derived inter prediction mode.

[0351] When combining the coding block coded with EIP mode with the coding block coded with intra or inter mode, the weights may be designed similar to the CIIP technology in VVC and the Combination of CIIP with TIMD and TM merge technology in ECM, i.e. 1) the weights for both EIP coded block and intra or inter coded block are bigger than zero and less than one, or the weights for intra or inter coded block gradually change from one to zero from one area to another area in current block (vice versa for the weights for EIP coded block) ; 2) the weights for EIP coded block and intra or inter coded block may be decided based on coding modes of neighboring blocks and intra or inter mode of current block; 3) the weights for EIP coded block and intra or inter coded block may be uniform in the whole current block or different in different positions of current block.

[0352] For example, the weights for EIP coded block and intra or inter coded block may be decided as follows: When the up and left neighboring blocks of current block are both intra coded and the intra mode of current block is planar mode, the weights for EIP coded block and intra coded block are 1 / 4 and 3 / 4 in the whole current block. When the up and left neighboring blocks of current block are both EIP coded and the intra mode of current block is planar mode, the weights for EIP coded block and intra coded block are 3 / 4 and 1 / 4 in the whole current block. When one of the up or left neighboring block is EIP coded, the other neighboring block is intra coded, and the intra mode of current block is planar mode, the weights for EIP coded block and intra coded block are 1 / 2 and 1 / 2 in the whole current block.

[0353] When the intra mode of current block is near horizontal angular modes (2 <=angular mode index < 34) , the current block is vertically divided as shown in Figure 8A and Figure 8B; when the intra mode of current block is near vertical angular modes (34 <= angular  mode index <= 66) , the current block is horizontally divided as shown in Figure 8A and Figure 8B.The weights for EIP coded block (wEIP) and intra coded block (wIntra) for different sub-blocks as shown in Figure 8B are shown in Table 3. Besides, the weights for EIP coded block and intra coded block may be decided in a CIIP-PDPC version. In this version, the intra mode of current block is set to planar mode, the weights for intra coded block gradually decrease when the combination position moves from top left to bottom right in current block, and vice versa for the weights for EIP coded block.

[0354] Table 3. The modified weights used for angular modes.

[0355] When combining the coding block coded with EIP mode with the coding block coded with intra or inter mode, the weights may also be designed in a mask version, i.e. the weights for EIP coded block and intra or inter coded block may be one or zero for different areas of current block. The specific weights for EIP coded block and intra or inter coded block may be decided based on coding modes of neighboring blocks and intra or inter mode of current block. For example, the weights for EIP coded block and intra coded block may be decided as follows: when the intra mode of current block is near horizontal angular modes (2 <= angular mode index < 34) , if the up and left neighboring blocks of current block are both intra coded, the weights for intra coded block is one in the left 3 / 4 area of current block and zero in the right 1 / 4 area of current block as shown in (a) of Figure 30, and vice versa for the weights for EIP coded block; if only one neighboring block is intra coded, the weights for intra coded block is one in the left 1 / 2 area of current block and zero in the right 1 / 2 area of current block as shown in (b) of Figure 30, and vice versa for the weights for EIP coded block; if none of the up and left neighboring blocks of current block are intra coded, the weights for intra coded block is one in the left 1 / 4 area of current block and zero in the right 3 / 4 area of current block as shown in (c) of Figure 30, and vice versa for the weights for EIP coded block.

[0356] When the intra mode of current block is near vertical angular modes (34 <= angular mode index <= 66) , if the up and left neighboring blocks of current block are both intra coded, the weights for intra coded block is one in the top 3 / 4 area of current block and zero in the bottom 1 / 4 area of current block as shown in (d) of Figure 30, and vice versa for the weights  for EIP coded block; if only one neighboring block is intra coded, the weights for intra coded block is one in the top 1 / 2 area of current block and zero in the bottom 1 / 2 area of current block as shown in (e) of Figure 30, and vice versa for the weights for EIP coded block; if none of the up and left neighboring blocks of current block are intra coded, the weights for intra coded block is one in the top 1 / 4 area of current block and zero in the bottom 3 / 4 area of current block as shown in (f) of Figure 30, and vice versa for the weights for EIP coded block.

[0357] When the intra mode of current block is planar mode, if the up and left neighboring blocks of current block are both intra coded, the weights for intra coded block is one in the top left 3 / 4 area (horizontal index is smaller than 1 / 2 width of current block or vertical index is smaller than 1 / 2 height of current block) of current block and zero in the right bottom 1 / 4 area (horizontal index is equal or bigger than 1 / 2 width of current block and vertical index is equal or bigger than 1 / 2 height of current block) of current block as shown in (g) of Figure 30, and vice versa for the weights for EIP coded block; if only up neighboring block is intra coded, the weights for intra coded block is one in the top 1 / 2 area of current block and zero in the bottom 1 / 2 area of current block as shown in (e) of Figure 30, and vice versa for the weights for EIP coded block; if only left neighboring block is intra coded, the weight for intra coded block is one in the left 1 / 2 area of current block and zero in the right 1 / 2 area of current block as shown in (b) of Figure 30, and vice versa for the weights for EIP coded block; if none of the up and left neighboring blocks of current block are intra coded, the weights for intra coded block is one in the top left 1 / 4 area (horizontal index is smaller than 1 / 2 width of current block and vertical index is smaller than 1 / 2 height of current block) of current block and zero in the bottom right 3 / 4 area (horizontal index is equal or bigger than 1 / 2 width of current block or vertical index is equal or bigger than 1 / 2 height of current block) of current block as shown in (h) of Figure 30, and vice versa for the weights for EIP coded block.

[0358] When combining the coding block coded with EIP mode with the coding block coded with intra or inter mode, the weights can also be designed based on template matching methods, where the sum of absolute difference (SAD) , sum of square difference (SSD) or sum of absolute transformed difference (SATD) between the prediction and reconstruction samples of the current block template can be utilized to compute the weights for EIP coded block and intra or inter coded block. For example, the weights for EIP coded block wEIP and inter coded block winter are decided as follow. Similarly, the weights for EIP coded block wEIP and intra coded block wintra may be decided by replacing the following subscript of inter with intra:

[0359] When utilizing the template of current block for computing the weights of EIP  coded block and intra or inter coded block, both left and top neighboring blocks can be utilized if they are available, or only left neighboring blocks or only top neighboring blocks are utilized if it is available. The utilization of both left and top neighboring blocks, only top neighboring blocks or only left neighboring blocks can be decided in a RDO (Rate Distortion Optimization) process or in a predefined criteria. For example, if the intra mode of current block is planar mode or DC mode, both left and top neighboring blocks are utilized; if the intra mode of current block is near horizontal angular modes (2 <= angular mode index < 34) , only left neighboring blocks are utilized; if the intra mode of current block is near vertical angular modes (34 <=angular mode index <= 66) , only top neighboring blocks are utilized.

[0360] When combining the coding block coded with EIP mode with the coding block coded with intra or inter mode, the weights derived based on template matching methods can be compared with the weights derived referring to CIIP in ECM (or the weights designed in a mask version) in a RDO process, which means a flag in coding block level needs to be transmitted into bit stream to signal which method is utilized; or the weights derived based on template matching methods can be used to replace total or partial of the weights derived referring to CIIP in ECM (or the weights designed in a mask version) . For example, if the intra mode of current block is planar mode or DC mode, the weights of intra coded block and EIP coded block are decided based on template matching methods; otherwise, the weights are decided referring to CIIP in ECM (or in a mask version) .

[0361] In the second method, it is proposed to combine the coding block coded with EIP mode with the coding block coded with inter mode. Various methods may be utilized in this combination. In one example, similar to the CIIP technology in VVC, the coding block coded with EIP mode is regarded as the coding block coded with planar intra mode, and it is combined with the coding block coded with inter merge mode. In another example, the coding block coded with EIP mode is regarded as the coding block coded with inter merge mode, and it is combined with the coding block coded with inter merge mode by equally averaging.

[0362] In the third method, it is proposed to combine the coding block coded with EIP mode with the coding block coded with intra mode and the coding block coded with inter mode. Various methods may be utilized in this combination. In one example, the coding block coded with EIP mode, the coding block coded with intra mode, and the coding block coded with inter mode are directly combined by equally averaging. In another example, firstly the coding block coded with EIP mode is separately combined with the coding block coded with intra mode and inter mode as presented in the first and second method. Then, the separate combined results are combined by equally averaging.

[0363] GPM with EIP and inter prediction

[0364] According to one or more embodiments of the disclosure, the EIP mode is combined with GPM in the form of GPM with EIP and inter prediction. Different methods may be used to achieve this goal.

[0365] In the first method, one “inter prediction” part of GPM with inter and inter prediction method is replaced with EIP, where the EIP predicted results are weighted averaged with the inter merge prediction results to obtain the final prediction signal.

[0366] In the second method, one “inter prediction” part of GPM with inter and inter prediction method in ECM is replaced with improvement of EIP, where some template matching tools can be utilized to further improve the coding performance.

[0367] SGPM with EIP and intra prediction

[0368] According to one or more embodiments of the disclosure, the EIP mode is combined with SGPM in the form of SGPM with EIP and intra prediction. Different methods may be used to achieve this goal.

[0369] In the first method, one “intra prediction” part of SGPM with intra and intra prediction method is replaced with EIP, where the EIP results are weighted averaged with the intra prediction results to obtain the final prediction signal.

[0370] In the second method, one “intra prediction” part of SGPM with intra and intra prediction method in ECM is replaced with improvement of EIP, where some template matching tools can be utilized to further improve the coding performance.

[0371] GPM with EIP and IBC prediction

[0372] According to one or more embodiments of the disclosure, the IBC prediction is combined with GPM in the form of GPM with EIP and IBC prediction. Different methods may be used to achieve this goal.

[0373] In the first method, both “inter prediction” parts of GPM with inter and inter prediction method in VVC is replaced with EIP and IBC prediction. In one example, that means that IBC merge prediction and EIP results are weighted averaged with each other according to a splitting line in the coding block. The weight can be obtained referring to GPM with inter and inter prediction method in VVC.

[0374] In the second method, both “inter prediction” parts of GPM with inter and inter prediction method in ECM is replaced with EIP and IBC prediction, where some template matching tools can be utilized to further improve the coding performance.

[0375] When combining the IBC prediction with GPM in the form of GPM with EIP and IBC prediction, the IBC prediction results can be from the regular merge candidates, TM refined merge candidates, or merge candidates with block vector difference (MBVD) .

[0376] Template-based EIP index reordering

[0377] The EIP mode may utilize a candidate list containing the EIP-related mode candidates. According to one or more embodiments of the disclosure, to reduce the overhead of signaling EIP-related modes, one template-based EIP index reordering is used for the EIP-related mode candidates. In an example, the EIP-related modes may include an EIP mode with different templates and different filters, a combined EIP-intra prediction mode, a combined EIP-inter prediction mode, a combined EIP-intra and inter prediction mode, a combined EIP  and inter prediction mode in GPM, a combined EIP and intra prediction mode in SGPM and a combined EIP and IBC prediction mode in GPM. Different methods may be used to achieve this goal.

[0378] In the first method, at the encoder side, given the derived EIP-related mode candidates, for example, parameters for EIP-related mode candidates are obtained, the template cost between reconstructed sample values of the template of the current block and their corresponding prediction sample values predicted with each EIP-related mode candidate respectively are calculated, and are then used to sort (or reorder) all the EIP-related mode candidates. Specifically, an EIP-related mode candidate with a smaller template cost will be assigned to a smaller index value while another EIP-related mode candidate with a larger template cost will be assigned to a larger index value. To determine the EIP index value for the current block, a current block cost between original sample values of the current block and their corresponding prediction sample values predicted with each EIP-related mode candidate respectively are calculated. In a preferred example, the EIP-related mode candidate with the minimum current block cost is determined to be a final EIP mode. Additionally, an EIP index value for the current block is determined from the sorted EIP-related mode candidates based on the EIP-related mode candidate with the minimum current block cost. The selected EIP index value can be coded with a context model to further reduce the signaling overhead. At the decoder side, the final EIP mode is derived by: 1) deriving the parameters for EIP-related mode candidates (e.g., coefficients of the filters for the EIP-related mode candidates) ; 2) calculating the corresponding template cost using each EIP-related mode candidate; 3) sorting the EIP-related mode candidates in the ascending order based on the calculated template costs; 4) selecting an EIP-related mode candidate as the final EIP mode from the sorted EIP-related mode candidates based on the EIP index value that is received, wherein steps (1) - (3) performed at the decoder side are similar to corresponding steps performed at the encoder side.

[0379] In the second method, an initial EIP-related mode candidate list is firstly constructed according to the existing EIP mode list generation process, wherein the EIP-related mode candidates in the list may originate from history-based EIP-related mode and / or spatial neighboring EIP-related mode candidates. After that, the candidates in the list are reordered according to their template costs. An EIP index value corresponding to a selected EIP-related mode candidate in the reordered candidate list is signalled from encoder to decoder. For simplicity, the steps such as deriving, calculating, reordering (or sorting) , determining, selecting and coding performed at the encoder and decoder sides are not described again and may refer to the corresponding step in the first method.

[0380] In the third method, an initial EIP mode candidate list is firstly constructed according to the existing EIP mode list generation process, wherein the EIP-related mode candidates in the list may originate from history-based EIP-related mode and / or spatial neighboring EIP-related mode candidates. After that, one or more of the candidates in the list  may be replaced by respective multi-model EIP mode according to their template costs. As an example, the implementation of multi-model EIP mode may refer to above section “Classification based methods of extrapolation filter-based prediction” . Taking one candidate as an example, a first template cost of the current block is calculated based on an EIP-related mode candidate in the list and a second template cost of the current block is calculated based on respective multi-model EIP mode. The EIP-related mode candidate in the list may be replaced by the respective multi-model EIP mode when the second template cost is smaller than the first template cost, wherein the EIP-related mode candidate in the list may be referred to as a single-model EIP mode compared with the multi-model EIP mode. The revised list containing the multi-model EIP mode may then be reordered as discussed above. An EIP index corresponding to a selected EIP mode candidate in the reordered candidate list is signalled from encoder to decoder. For simplicity, the steps such as deriving, calculating, reordering (or sorting) , determining, selecting and coding performed at the encoder and decoder sides are not described again and may refer to the corresponding step in the first method.

[0381] According to one or more embodiments of the disclosure, to achieve different performance / complexity tradeoff, methods are proposed in the following to enable / disable the proposed template-based EIP mode reordering. In one method, it is proposed to only enable the template-based EIP mode reordering only when the number of EIP-related mode candidate (s) is greater than a threshold, e.g., 1.

[0382] According to one or more embodiments of the disclosure, to achieve different performance / complexity tradeoff, methods are proposed in the following to use the proposed template-based EIP mode reordering and set the number of EIP-related mode candidate (s) in the reordered candidate list. In one method, the EIP index value corresponding to a selected EIP-related mode candidate in the reordered candidate list is signalled from encoder to decoder only when the EIP index value corresponding to the selected EIP-related mode candidate is less than a threshold, e.g., 8.

[0383] According to one or more embodiments of the disclosure, to achieve different performance / complexity tradeoff, methods are proposed in the following to use different templates for template-based EIP mode reordering. In one method, the template for deriving the parameters for EIP-related mode candidates and the template for calculating distortions for template-based EIP index reordering are different, e.g., the template for calculating template costs for template-based EIP index reordering may be smaller than or part of the template for deriving the parameters for EIP-related mode candidates, for example, the template for calculating template costs may be two rows and two columns closest to the current prediction block.

[0384] According to one or more embodiments of the disclosure, the template size used to calculate costs may be N lines above and to the left of the current block depending on their availability, N is an integer.

[0385] According to one or more embodiments of the disclosure, the template size used to calculate costs may be N lines above of the current block depending on their availability, N is an integer.

[0386] According to one or more embodiments of the disclosure, the template size used to calculate costs may be N lines left of the current block depending on their availability, N is an integer.

[0387] According to one or more embodiments of the disclosure, the template size used to calculate costs may depends on filter shape. In one example, if the height of filter shape is greater than its width, the template size used to calculate costs may be N lines above of the current block depending on their availability, N is an integer.

[0388] According to one or more embodiments of the disclosure, the template for calculating template costs and / or the template for deriving the parameters for EIP-related mode candidates may be predefined or signaled / switched in different coding levels such as SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.

[0389] Chroma EIP  / Cross Component EIP (CCEIP)

[0390] According to one or more embodiments of the disclosure, EIP tools are used for luma or chroma prediction based on luma and / or chroma samples. That is, the chroma samples may be predicted based on neighboring chroma samples and / or associated luma samples, while luma samples may be predicted based on neighboring luma samples and / or associated chroma samples. Different methods may be used to achieve this goal.

[0391] According to one or more embodiments of the disclosure, chroma samples may be predicted based on luma and / or chroma samples with EIP mode (referred to as chroma EIP mode) . The prediction may be processed in three steps. First, a chroma offset value and / or a luma offset value are obtained from pre-defined positions in a reconstructed area for the current block. Second, the extrapolation filter coefficients are obtained from the neighboring chroma and / or luma reconstructed samples of the current block’s pre-determined current template. Third, the extrapolation process generates a predicted chroma value, position by position, from the top-left to bottom-right corner within the current block.

[0392] According to one or more embodiments of the disclosure, the area of training samples (i.e., the current template) in chroma EIP mode may be the same or different compared to luma EIP mode. The current template corresponding to the current block is in a reconstructed part of a frame containing the current block. The current template includes both the luma and chroma samples for deriving the filter coefficients of the extrapolation filter to be used in EIP mode.

[0393] According to one or more embodiments of the disclosure, in a training process for chroma EIP mode, the training samples in chroma EIP mode may include reconstructed chroma samples, reconstructed luma samples, e.g. collocated reconstructed luma sample for a reconstructed chroma sample, and / or the neighboring reconstructed luma samples of the  collocated reconstructed luma sample. In the training process of the extrapolation filter, a number of reconstructed chroma samples are obtained as an output of the extrapolation filter, while at least one of: 1) one or more neighboring reconstructed chroma sample for each of the number of reconstructed chroma samples, 2) a collocated reconstructed luma sample for each of the number of reconstructed chroma samples, and 3) one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample, is obtained as an input of the extrapolation filter. The extrapolation filter coefficients may be derived based on the obtained input and output.

[0394] According to one or more embodiments of the disclosure, when predicting chroma samples, the chroma EIP mode may use reconstructed or predicted (if reconstructed chroma samples are not available) chroma samples, reconstructed luma samples, e.g. the collocated reconstructed luma sample for the chroma sample to be predicted, and / or the neighboring reconstructed luma samples of the collocated reconstructed luma sample. Since the extrapolation filter coefficients has been determined in the training process, the coefficients may be applied to the corresponding samples for predicting the chroma sample value, as discussed below.

[0395] According to one or more embodiments of the disclosure, the extrapolation N-tap (N is an integer and larger than 1) filter may include M (M is an integer) spatial terms, K (K is an integer) nonlinear terms and with or without a bias term. The M spatial terms correspond to P (P is an integer) neighboring chroma samples (e.g., C0, C1, …) and / or Q (Q is an integer) collocated and / or its neighboring luma samples (e.g., L0, L1, …) . The formula for a chroma sample to be predicted is as follows:

[0396] where αi is the coefficient associated with Li and β is the offset (e.g., 1 << (bitDepth -1) ) , K1 is the number of nonlinear terms for neighboring chroma samples (e.g., C0, C1, …) , K2 is the number of nonlinear terms for collocated and / or its neighboring luma samples (e.g., L0, L1, …) , and K=K1+K2. The position and number of spatial term and nonlinear term may be different.

[0397] In one example, an extrapolation 18-tap filter may include 16 spatial terms, one nonlinear term and a bias term. The 16 spatial terms correspond to 15 neighboring chroma  samples (e.g., C0, C1, …) and 1 collocated luma sample (e.g., L15, ) . The formula for a chroma sample to be predicted is as follows:

[0398] where αi is the coefficient and β is the offset (e.g., 1 << (bitDepth -1) ) .

[0399] According to one or more embodiments of the disclosure, only N (N is a positive integer) pairs of samples are used as training samples to derive the extrapolation filter coefficients for chroma EIP mode. Each sample pair includes a chroma sample and its corresponding luma sample, wherein the corresponding luma sample could be a down-sampled luma sample (e.g. down-sampled using one of the following equations (I) - (VII) ) or a reconstructed luma sample without down-sampling (e.g. a reconstructed luma sample directly determined using one of the following equations (VIII) - (XIII) ) . In the examples, equations (I) (II) (IV) and (V) each represents a down-sampled luma sample based on a collocated reconstructed luma sample for the reconstructed chroma sample and neighboring reconstructed luma samples of the collocated reconstructed luma sample; equations (III) (VI) and (VII) each represents a down-sampled luma sample based on neighboring reconstructed luma samples of the collocated reconstructed luma sample; equation (VIII) represents the corresponding luma sample being the collocated reconstructed luma sample; and equations (IX) - (XIII) each represents the corresponding luma sample being one of the neighboring reconstructed luma samples of the collocated reconstructed luma sample.

[0400] (I) Rec′ L [x , y ] = (RecL [2x , 2y ] *2+RecL [2x+1 , 2y ] +RecL [2x-1 , 2y ] +RecL [2x , 2y+1 ] *2+RecL [2x+1 , 2y+1 ] +RecL [2x-1 , 2y+1 ] +4) >>3

[0401] (II) Rec′ L [x , y ] = (RecL [2x , 2y ] *2+RecL [2x+1 , 2y ] +RecL [2x-1 , 2y ] +2) >>2

[0402] (III) Rec′ L [x , y ] = (RecL [2x , 2y+1 ] *2+RecL [2x+1 , 2y+1 ] +RecL [2x-1 , 2y+1 ] +2) >>2

[0403] (IV) Rec′ L [x , y ] = (RecL [2x , 2y ] +RecL [2x , 2y+1 ] +1) >>1

[0404] (V) Rec′ L [x , y ] = (RecL [2x , 2y ] +RecL [2x+1 , 2y ] +1) >>1

[0405] (VI) Rec′ L [x , y ] = (RecL [2x+1 , 2y ] +RecL [2x+1 , 2y+1 ] +1) >>1

[0406] (VII) Rec′ L [x , y ] = (RecL [2x+1 , 2y+1 ] +RecL [2x+1 , 2y+1 ] +1) >>1

[0407] (VIII) Rec′ L [x , y ] =RecL [2x , 2y ]

[0408] (IX) Rec′ L [x , y ] =RecL [2x+1 , 2y ]

[0409] (X) Rec′ L [x , y ] =RecL [2x-1 , 2y ]

[0410] (XI) Rec′ L [x , y ] =RecL [2x , 2y+1 ]

[0411] (XII) Rec′ L [x , y ] =RecL [2x+1 , 2y+1 ]

[0412] (XIII) Rec′ L [x , y ] =RecL [2x-1 , 2y+1 ]

[0413] According to one or more embodiments of the disclosure, luma samples may be predicted based on luma and / or chroma samples with EIP mode (referred to as luma EIP mode) in a similar way as the chroma EIP mode. According to one or more embodiments of the disclosure, the extrapolation N-tap (N is an integer and larger than 1) filter may be used to predict luma sample, including M (M is an integer) spatial terms, K (K is an integer) nonlinear terms and with or without a bias term. The M spatial terms correspond to P (P is an integer) neighboring luma samples (e.g., L0, L1, …) and / or Q (Q is an integer) collocated and / or its neighboring chroma samples (e.g., C0, C1, …) . The formula for a luma sample to be predicted is as follows:

[0414] where αi is the coefficient and β is the offset (e.g., 1 << (bitDepth -1) ) , K1 is the number of nonlinear terms for neighboring luma samples (e.g., L0, L1, …) , K2 is the number of nonlinear terms for collocated and / or its neighboring chroma samples (e.g., C0, C1, …) , and K=K1+K2. The position and number of spatial term and nonlinear term may be different.

[0415] In one example, an extrapolation 17-tap filter may include 16 spatial terms and a bias term. The 16 spatial terms correspond to 8 neighboring luma samples (e.g., L0, L1, …) and 8 collocated and neighboring chroma samples (e.g., C0, C1, …) . The formula for a luma sample to be predicted is as follows:

[0416] where αi is the coefficient and β is the offset (e.g., 1 << (bitDepth -1) ) .

[0417] Figure 31 illustrates a workflow of a method 3100 for video decoding according to one or more aspects of the present disclosure.

[0418] At step 3110, the method 3100 comprises determining a current template corresponding to a current block to be predicted, wherein the current template is a reconstructed template in a frame containing the current block.

[0419] At step 3120, the method 3100 comprises determining, based on sample values of the current template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode, wherein the sample values of the current template comprise luma sample values and chroma sample values of the current template.

[0420] At step 3130, the method 3100 comprises predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0421] In one example, the sample values of the current template comprise a first set of sample values comprising one or more sample values of at least one of: 1) one or more neighboring reconstructed chroma samples for each of a plurality of reconstructed chroma samples, 2) a collocated reconstructed luma sample for each of the plurality of reconstructed chroma samples, or 3) one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample; wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises: determining the filter coefficients of the extrapolation filter by training the extrapolation filter with: sample values of the plurality of reconstructed chroma samples as outputs of the extrapolation filter, and the first set of sample values as inputs of the extrapolation filter; and wherein predicting sample values of the current block by using the extrapolation filter with the determined filter  coefficients comprises: predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0422] In one example, predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients further comprises: predicting a sample value to be predicted based on sample values of reconstructed samples of the current block and the determined filter coefficients; or predicting a sample value to be predicted based on sample values of predicted samples of the current block and the determined filter coefficients in response to determining reconstructed samples of the current block are not available.

[0423] In one example, the sample values of the current template comprise a plurality of sample value pairs each comprising a reconstructed chroma sample value and a corresponding luma sample value, wherein the corresponding luma sample value comprises a sample value of one of: a down-sampled luma sample based on a collocated reconstructed luma sample for the reconstructed chroma sample and one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample, a down-sampled luma sample based on one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample, the collocated reconstructed luma sample, or one of the neighboring reconstructed luma samples of the collocated reconstructed luma sample; wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises: determining the filter coefficients of the extrapolation filter by training the extrapolation filter with the plurality of sample value pairs; and wherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises: predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0424] In one example, the sample values of the current template comprise a second set of sample values comprising one or more sample values of at least one of: 1) one or more neighboring reconstructed luma samples for each of a plurality of reconstructed luma samples, 2) a collocated reconstructed chroma sample for each of the plurality of reconstructed luma samples, or 3) one or more neighboring reconstructed chroma samples of the collocated reconstructed chroma sample; wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises: determining the filter coefficients of the extrapolation filter by training the extrapolation filter with: sample values of the plurality of reconstructed luma samples as outputs of the extrapolation filter, and the second set of sample values as inputs of the extrapolation filter; and wherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises: predicting luma sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0425] Figure 32 illustrates a workflow of a method 3200 for video encoding according to  one or more aspects of the present disclosure.

[0426] At step 3210, the method 3200 comprises determining a current template corresponding to a current block to be predicted, wherein the current template is a reconstructed template in a frame containing the current block.

[0427] At step 3220, the method 3200 comprises determining, based on sample values of the current template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode, wherein the sample values of the current template comprise luma sample values and chroma sample values of the current template.

[0428] At step 3230, the method 3200 comprises predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0429] At step 3240, the method 3200 comprises generating a bitstream based on the predicted sample values of the current block.

[0430] In one example, the sample values of the current template comprise a first set of sample values comprising one or more sample values of at least one of: 1) one or more neighboring reconstructed chroma samples for each of a plurality of reconstructed chroma samples, 2) a collocated reconstructed luma sample for each of the plurality of reconstructed chroma samples, or 3) one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample; wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises: determining the filter coefficients of the extrapolation filter by training the extrapolation filter with: sample values of the plurality of reconstructed chroma samples as outputs of the extrapolation filter, and the first set of sample values as inputs of the extrapolation filter; and wherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises: predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0431] In one example, predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients further comprises: predicting a sample value to be predicted based on sample values of reconstructed samples of the current block and the determined filter coefficients; or predicting a sample value to be predicted based on sample values of predicted samples of the current block and the determined filter coefficients in response to determining reconstructed samples of the current block are not available.

[0432] In one example, the sample values of the current template comprise a plurality of sample value pairs each comprising a reconstructed chroma sample value and a corresponding luma sample value, wherein the corresponding luma sample value comprises a sample value of one of: a down-sampled luma sample based on a collocated reconstructed luma sample for the reconstructed chroma sample and one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample, a down-sampled luma sample based on one or more  neighboring reconstructed luma samples of the collocated reconstructed luma sample, the collocated reconstructed luma sample, or one of the neighboring reconstructed luma samples of the collocated reconstructed luma sample; wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises: determining the filter coefficients of the extrapolation filter by training the extrapolation filter with the plurality of sample value pairs; and wherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises: predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0433] In one example, the sample values of the current template comprise a second set of sample values comprising one or more sample values of at least one of: 1) one or more neighboring reconstructed luma samples for each of a plurality of reconstructed luma samples, 2) a collocated reconstructed chroma sample for each of the plurality of reconstructed luma samples, or 3) one or more neighboring reconstructed chroma samples of the collocated reconstructed chroma sample; wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises: determining the filter coefficients of the extrapolation filter by training the extrapolation filter with: sample values of the plurality of reconstructed luma samples as outputs of the extrapolation filter, and the second set of sample values as inputs of the extrapolation filter; and wherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises: predicting luma sample values of the current block by using the extrapolation filter with the determined filter coefficients.

[0434] Figure 33 illustrates a workflow of a method 3300 for video decoding according to one or more aspects of the present disclosure.

[0435] At step 3310, the method 3300 comprises determining a training template not adjacent to a current block to be predicted, wherein the training template is a reconstructed template in a frame containing the current block.

[0436] At step 3320, the method 3300 comprises determining, based on at least part of sample values of the training template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode.

[0437] At step 3330, the method 3300 comprises predicting the current block by using the extrapolation filter with the determined filter coefficients.

[0438] In one example, determining the training template not adjacent to a current block to be predicted comprises: determining, by utilizing template matching from Intra Template Matching Prediction (Intra TMP) mode, a template most similar to a current template adjacent to the current block as the training template; or determining a template based on a block vector of a neighboring block predicted with Intra block copy (IBC) mode as the training template.

[0439] In one example, the method 3300 further comprises determining a current template  adjacent to the current block, wherein determining the filter coefficients of the extrapolation filter for EIP mode comprises determining the filter coefficients based on sample values of the training template and sample values of the current template.

[0440] Figure 34 illustrates a workflow of a method 3400 for video encoding according to one or more aspects of the present disclosure.

[0441] At step 3410, the method 3400 comprises determining a training template not adjacent to a current block to be predicted, wherein the training template is a reconstructed template in a frame containing the current block.

[0442] At step 3420, the method 3400 comprises determining, based on at least part of sample values of the training template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode.

[0443] At step 3430, the method 3400 comprises predicting the current block by using the extrapolation filter with the determined filter coefficients.

[0444] At step 3440, the method 3400 comprises generating a bitstream based on the predicted current block.

[0445] In one example, determining the training template not adjacent to a current block to be predicted comprises: determining, by utilizing template matching from Intra Template Matching Prediction (Intra TMP) mode, a template most similar to a current template adjacent to the current block as the training template; or determining a template based on a block vector of a neighboring block predicted with Intra block copy (IBC) mode as the training template.

[0446] In one example, the method 3400 further comprises determining a current template adjacent to the current block, wherein determining the filter coefficients of the extrapolation filter for EIP mode comprises determining the filter coefficients based on sample values of the training template and sample values of the current template.

[0447] Figure 35 shows a computing environment 3510 coupled with a user interface 3550. The computing environment 3510 can be part of a data processing server. The computing environment 3510 includes a processor 3520, a memory 3530, and an Input / Output (I / O) interface 3540.

[0448] The processor 3520 typically controls overall operations of the computing environment 3510, such as the operations associated with display, data acquisition, data communications, and image processing. The processor 3520 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 3520 may include one or more modules that facilitate the interaction between the processor 3520 and other components. The processor may be a Central Processing Unit (CPU) , a microprocessor, a single chip machine, a Graphical Processing Unit (GPU) , or the like.

[0449] The memory 3530 is configured to store various types of data to support the operation of the computing environment 3510. The memory 3530 may include predetermined  software 3532. Examples of such data includes instructions for any applications or methods operated on the computing environment 3510, video datasets, image data, etc. The memory 3530 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.

[0450] The I / O interface 3540 provides an interface between the processor 3520 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 3540 can be coupled with an encoder and decoder.

[0451] In an embodiment, there is also provided a non-transitory computer-readable storage medium comprising a plurality of programs, for example, in the memory 3530, executable by the processor 3520 in the computing environment 3510, 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 3520 in the computing environment 3510 to receive (for example, from the video encoder 20 in Figure 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 3520 in the computing environment 3510 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 3520 in the computing environment 3510 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 3520 in the computing environment 3510 to transmit the bitstream or data stream (for example, to the video decoder 30 in Figure 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 associated one or more syntax elements etc. ) generated by an encoder (for example, the video encoder 20 in Figure 2) using, for example, the encoding method described above for use by a decoder (for example, the video decoder 30 in Figure 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.

[0452] 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.

[0453] In an embodiment, the is also provided a computing device comprising one or more processors (for example, the processor 3520) ; and the non-transitory computer-readable storage medium or the memory 3530 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.

[0454] 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 3530, executable by the processor 3520 in the computing environment 3510, for performing the above-described methods. For example, the computer program product may include the non-transitory computer-readable storage medium.

[0455] In an embodiment, the computing environment 3510 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.

[0456] 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.

[0457] 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.

[0458] 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.

[0459] 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.

[0460] 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

1.A method for video decoding, comprising:determining a current template corresponding to a current block to be predicted, wherein the current template is a reconstructed template in a frame containing the current block;determining, based on sample values of the current template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode, wherein the sample values of the current template comprise luma sample values and chroma sample values of the current template; andpredicting sample values of the current block by using the extrapolation filter with the determined filter coefficients.2.The method of claim 1, wherein the sample values of the current template comprise a first set of sample values comprising one or more sample values of at least one of: one or more neighboring reconstructed chroma samples for each of a plurality of reconstructed chroma samples, a collocated reconstructed luma sample for each of the plurality of reconstructed chroma samples, or one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample;wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients of the extrapolation filter by training the extrapolation filter with:sample values of the plurality of reconstructed chroma samples as outputs of the extrapolation filter, andthe first set of sample values as inputs of the extrapolation filter; andwherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises:predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.3.The method of claim 1, wherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients further comprises:predicting a sample value to be predicted based on sample values of reconstructed samples of the current block and the determined filter coefficients; orpredicting a sample value to be predicted based on sample values of predicted samples of the current block and the determined filter coefficients in response to determining reconstructed samples of the current block are not available.4.The method of claim 1, wherein the sample values of the current template comprise a plurality of sample value pairs each comprising a reconstructed chroma sample value and a corresponding luma sample value, wherein the corresponding luma sample value comprises a sample value of one of:a down-sampled luma sample based on a collocated reconstructed luma sample for the reconstructed chroma sample and one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample,a down-sampled luma sample based on one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample,the collocated reconstructed luma sample, orone of the neighboring reconstructed luma samples of the collocated reconstructed luma sample;wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients of the extrapolation filter by training the extrapolation filter with the plurality of sample value pairs; andwherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises:predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.5.The method of claim 1, wherein the sample values of the current template comprise a second set of sample values comprising one or more sample values of at least one of: one or more neighboring reconstructed luma samples for each of a plurality of reconstructed luma samples, a collocated reconstructed chroma sample for each of the plurality of reconstructed luma samples, or one or more neighboring reconstructed chroma samples of the collocated reconstructed chroma sample;wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients of the extrapolation filter by training the extrapolation filter with:sample values of the plurality of reconstructed luma samples as outputs of the extrapolation filter, andthe second set of sample values as inputs of the extrapolation filter; andwherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises:predicting luma sample values of the current block by using the extrapolation filter with the determined filter coefficients.6.A method for video encoding, comprising:determining a current template corresponding to a current block to be predicted, wherein the current template is a reconstructed template in a frame containing the current block;determining, based on sample values of the current template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode, wherein the sample values of the current template comprise luma sample values and chroma sample values of the current template;predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients; andgenerating a bitstream based on the predicted sample values of the current block.7.The method of claim 6, wherein the sample values of the current template comprise a first set of sample values comprising one or more sample values of at least one of: one or more neighboring reconstructed chroma samples for each of a plurality of reconstructed chroma samples, a collocated reconstructed luma sample for each of the plurality of reconstructed chroma samples, or one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample;wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients of the extrapolation filter by training the extrapolation filter with:sample values of the plurality of reconstructed chroma samples as outputs of the extrapolation filter, andthe first set of sample values as inputs of the extrapolation filter; andwherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises:predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.8.The method of claim 6, wherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients further comprises:predicting a sample value to be predicted based on sample values of reconstructed samples of the current block and the determined filter coefficients; orpredicting a sample value to be predicted based on sample values of predicted samples of the current block and the determined filter coefficients in response to determining reconstructed samples of the current block are not available.9.The method of claim 6, wherein the sample values of the current template comprise a plurality of sample value pairs each comprising a reconstructed chroma sample value and a corresponding luma sample value, wherein the corresponding luma sample value comprises a sample value of one of:a down-sampled luma sample based on a collocated reconstructed luma sample for the reconstructed chroma sample and one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample,a down-sampled luma sample based on one or more neighboring reconstructed luma samples of the collocated reconstructed luma sample,the collocated reconstructed luma sample, orone of the neighboring reconstructed luma samples of the collocated reconstructed luma sample;wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients of the extrapolation filter by training the extrapolation filter with the plurality of sample value pairs; andwherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises:predicting chroma sample values of the current block by using the extrapolation filter with the determined filter coefficients.10.The method of claim 6, wherein the sample values of the current template comprise a second set of sample values comprising one or more sample values of at least one of: one or more neighboring reconstructed luma samples for each of a plurality of reconstructed luma samples, a collocated reconstructed chroma sample for each of the plurality of reconstructed luma samples, or one or more neighboring reconstructed chroma samples of the collocated reconstructed chroma sample;wherein determining, based on sample values of the current template, filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients of the extrapolation filter by training the extrapolation filter with:sample values of the plurality of reconstructed luma samples as outputs of the extrapolation filter, andthe second set of sample values as inputs of the extrapolation filter; andwherein predicting sample values of the current block by using the extrapolation filter with the determined filter coefficients comprises:predicting luma sample values of the current block by using the extrapolation filter with the determined filter coefficients.11.A method for video decoding, comprising:determining a training template not adjacent to a current block to be predicted, wherein the training template is a reconstructed template in a frame containing the current block;determining, based on at least part of sample values of the training template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode; andpredicting the current block by using the extrapolation filter with the determined filter coefficients.12.The method of claim 11, wherein determining the training template not adjacent to a current block to be predicted comprises:determining, by utilizing template matching from Intra Template Matching Prediction (Intra TMP) mode, a template most similar to a current template adjacent to the current block as the training template; ordetermining a template based on a block vector of a neighboring block predicted with Intra block copy (IBC) mode as the training template.13.The method of claim 11, further comprising:determining a current template adjacent to the current block,wherein determining the filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients based on sample values of the training template and sample values of the current template.14.A method for video encoding, comprising:determining a training template not adjacent to a current block to be predicted, wherein the training template is a reconstructed template in a frame containing the current block;determining, based on at least part of sample values of the training template, filter coefficients of an extrapolation filter for Extrapolation Filter-based intra Prediction (EIP) mode;predicting the current block by using the extrapolation filter with the determined filter coefficients; andgenerating a bitstream based on the predicted current block.15.The method of claim 14, wherein determining the training template not adjacent to a current block to be predicted comprises:determining, by utilizing template matching from Intra Template Matching Prediction (Intra TMP) mode, a template most similar to a current template adjacent to the current block as the training template; ordetermining a template based on a block vector of a neighboring block predicted with Intra block copy (IBC) mode as the training template.16.The method of claim 14, further comprising:determining a current template adjacent to the current block,wherein determining the filter coefficients of the extrapolation filter for EIP mode comprises:determining the filter coefficients based on sample values of the training template and sample values of the current template.17.An apparatus, comprising:one or more processors; andone or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the decoding method of any of claims 1-5, 11-13.18.An apparatus, comprising:one or more processors; andone or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the encoding method of any of claims 6-10, 14-16.19.A computer program product, storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the decoding method of any of claims 1-5, 11-13 or the operations of the encoding method of any of claims 6-10, 14-16.20.A computer readable medium storing a bitstream, whereinthe bitstream is to be decoded by performing the operations of the method of any of claims 1-5, 11-13, orthe bitstream is obtained by performing the operations of the method of any of claims 6-10, 14-16.21.A method of storing a bitstream comprising:performing a method for video encoding according to any one of claims 6-10, 14-16 to generate a bitstream; andstoring the bitstream; wherein the bitstream is to be decoded by the method for video decoding according to any one of claims 1-5, 11-13.

Citation Information

Patent Citations

  • Encoder, decoder, encoding method, and decoding method

    US20200204802A1

  • Simplifications of cross-component linear model

    US20210227240A1

  • Chroma Block Prediction Method and Device

    US20220368928A1

Cited By

  • Method and apparatus for sub-block extrapolation based intra prediction

    WO2026195343A1