Methods and devices for filtered intra block copy
Filtered Intra Block Copy (FIBC) technology with AR-BVP improves video coding efficiency, addressing bandwidth and memory constraints by optimizing compression and quality in digital video data processing.
Patent Information
- Application Number
- PCT/CN2025/097449
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-03
- Filing Date
- 2025-05-27
- Publication Date
- 2025-12-11
Smart Images

Figure CN2025097449_11122025_PF_FP_ABST
Abstract
Description
METHODS AND DEVICES FOR FILTERED INTRA BLOCK COPYCROSS-REFERENCE TO RELATED APPLICATION
[0001] This application is based upon and claims priority to Provisional Application No. PCT / CN2024 / 096963 filed on June 3, 2024. The entire content thereof is incorporated herein by reference in its entirety.TECHNICAL FIELD
[0002] This application is related to video coding and compression. More specifically, this application relates to methods and apparatus on improving the coding efficiency of filtered intra block copy (FIBC) .BACKGROUND
[0003] Digital video is supported by a variety of electronic devices. 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, to generate encoded video data that uses a lower bit rate, while avoiding or minimizing degradations to video quality.SUMMARY
[0004] Embodiments of the present disclosure provide methods and apparatus on improving the coding efficiency of the image / video blocks which applies FIBC technology.
[0005] According to one aspect of the present disclosure, there is provided a method for video decoding, comprising: determining guiding block vectors for a current block; determining an Auto-Relocated Block Vector Prediction (AR-BVP) based on the guiding block vectors; determining an auto-relocated reference block based on the AR-BVP, wherein the auto-relocated reference block is a reconstructed block in a same frame as the current block; and predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of the auto-relocated reference block.
[0006] According to one aspect of the present disclosure, there is provided a method for video encoding, comprising: determining guiding block vectors for a current block; determining an Auto-Relocated Block Vector Prediction (AR-BVP) based on the guiding block vectors; determining an auto-relocated reference block based on the AR-BVP, wherein the auto-relocated reference block is a reconstructed block in a same frame as the current block; predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of the auto-relocated reference block; and generating a bitstream based on the predicted sample values of the current block.
[0007] According to one aspect of the present disclosure, there is provided a method for video decoding, comprising: obtaining a candidate list comprising candidate block vectors including at least one block vector for at least one neighboring block of a current block, wherein the at least one neighboring block is encoded with Intra Block Copy (IBC) mode or Intra Template Matching Prediction (Intra TMP) mode; receiving an index indicating a selected block vector of the candidate block vectors; and predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of a reference block associated with the selected block vector.
[0008] According to one aspect of the present disclosure, there is provided a method for video encoding, comprising: obtaining a candidate list comprising candidate block vectors including at least one block vector for at least one neighboring block of a current block, wherein the at least one neighboring block is encoded with Intra Block Copy (IBC) mode or Intra Template Matching Prediction (Intra TMP) mode; selecting a candidate block vector from the candidate list as a selected block vector; predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of a reference block associated with the selected block vector; and generating a bitstream based on the predicted sample values of the current block.
[0009] 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 method of the present disclosure.
[0010] According to one aspect of the present disclosure, there is provided a computer readable storage medium storing a bitstream to be decoded by the decoding method according to the present disclosure.
[0011] According to one aspect of the present disclosure, there is provided a computer readable storage medium storing a bitstream generated by the encoding method according to the present disclosure.
[0012] According to one aspect of the present disclosure, there is provided a method for storing a bitstream, comprising: storing a bitstream to be decoded by the decoding method according to the present disclosure.
[0013] According to one aspect of the present disclosure, there is provided a method for storing a bitstream, comprising: storing a bitstream generated by the encoding method according to the present disclosure.
[0014] According to one aspect of the present disclosure, there is provided a method for transmitting a bitstream, comprising: transmitting a bitstream to be decoded by the decoding method according to the present disclosure.
[0015] According to one aspect of the present disclosure, there is provided a method for transmitting a bitstream, comprising: transmitting a bitstream generated by the encoding method according to the present disclosure.
[0016] 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
[0017] 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.
[0018] 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.
[0019] Figure 2 is a block diagram illustrating an exemplary video encoder in accordance with some implementations of the present disclosure.
[0020] Figure 3 is a block diagram illustrating an exemplary video decoder in accordance with some implementations of the present disclosure.
[0021] 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.
[0022] Figure 5 illustrates a diagram of positions of spatial candidates.
[0023] Figure 6 illustrates a diagram of candidate pairs considered for redundancy check of spatial candidates.
[0024] Figure 7 illustrates a diagram of scaling of a motion vector for a temporal candidate.
[0025] Figure 8 illustrates a diagram of candidate positions for a temporal candidate.
[0026] Figure 9 illustrates a diagram of Merge mode with Motion Vector Difference (MMVD) search points.
[0027] Figure 10 illustrates uni-prediction motion vector selection for Geometric Partitioning Mode (GPM) .
[0028] Figure 11 illustrates top and left neighboring blocks used in CIIP weight derivation.
[0029] Figure 12 illustrates current CTU processing order and its available reference samples in current and left CTU.
[0030] Figure 13 illustrates padding candidates for the replacement of the zero-vector in the IBC list.
[0031] Figure 14 illustrates reference area for IBC when CTU (m, n) is coded.
[0032] Figure 15 illustrates IBC reference area for camera-captured content.
[0033] Figures 16A and 16B illustrate the division method for angular modes.
[0034] Figures 17A, 17B and 17C illustrate available IPM candidates and Figure 17D illustrates an example of GPM with intra and intra prediction.
[0035] Figure 18 illustrates the edge on templates.
[0036] Figure 19 illustrates the intra template matching search area used.
[0037] Figure 20 illustrates the template used for template matching based OBMC.
[0038] Figure 21 illustrates the template and reference samples of the template in reference pictures.
[0039] Figure 22 illustrates the template and reference samples of the template for block with sub-block motion using the motion information of the subblocks of the current block.
[0040] Figure 23 illustrates the luma blocks used to derive direct block vector.
[0041] Figure 24 illustrates an example of how to derive AR-BVP.
[0042] Figure 25 illustrates the five positions in Bn.
[0043] Figure 26 illustrates a diagram of the filter shape and training area of the reference block.
[0044] Figure 27 illustrates examples of prediction for different positions in the current block.
[0045] Figure 28 illustrates a diagram of spatial terms correspond to neighboring luma samples.
[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 shape / number of filter taps.
[0048] Figure 31 illustrates a diagram of examples of different shape / number of filter taps.
[0049] Figure 32 illustrates a diagram of possible positions of candidate regions.
[0050] Figure 33 illustrates a diagram of possible positions of candidates.
[0051] Figure 34 illustrates a diagram of the filter shape and training area of the reference block.
[0052] Figure 35 illustrates a workflow of a method for video decoding according to one or more aspects of the present disclosure.
[0053] Figure 36 illustrates a workflow of a method for video encoding according to one or more aspects of the present disclosure.
[0054] Figure 37 illustrates a workflow of a method for video decoding according to one or more aspects of the present disclosure.
[0055] Figure 38 illustrates a workflow of a method for video encoding according to one or more aspects of the present disclosure.
[0056] Figure 39 is a diagram illustrating a computing environment coupled with a user interface, according to some implementations of the present disclosure.DETAILED DESCRIPTION
[0057] 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.
[0058] 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.
[0059] 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.
[0060] As shown in Figure 1, the source device 12 includes a video source 18, a video encoder 20 and an 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.
[0061] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. 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. A bit depth BitDepth of samples of sample arrays may be an integer in a range of 8 to 16. For example, a vlaue of BitDepth may be 8, 9, 10, 11, 12, 13, 14, 15 or 16. It should be illustrated that the value of BitDepth is not limited thereto, and may be any other value proposed in the future.
[0062] The encoded video data may be transmitted directly to the destination device 14 through the output interface 22 of the source device 12 via a link 16. The output interface 22 may include a modem and / or a transmitter. The link 16 may comprise any type of wireless communication medium or device and / or any type of wired communication medium or device capable of transmitting the encoded video data from the source device 12 to the destination device 14. The encoded video data may also (or alternatively) be stored onto a storage device 32 for later access by the destination device 14 via for example an input interface 28 or by other devices, for decoding and / or playback. 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.
[0063] 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. Alternatively, the destination device 14 may access the stored video data from the storage device 32 via streaming, downloading or a combination of both. The encoded video data 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. The display device 34 may be an integrated display device or an external display device that is configured to communicate with the destination device 14, and may display the decoded video data to a user.
[0064] The video encoder 20 and the video decoder 30 may operate (for example, encode and decode video data) according to proprietary or industry standards, such as 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 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 current and future video encoding / decoding standards.
[0065] 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.
[0066] In some implementations, at least a part of components of the source device 12 and / or the destination device 14 (for example, components shown in Figure 1, Figure 2 and / or Figure 3) 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 or wired communication 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 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 be 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.
[0067] Figure 2 is a block diagram illustrating an exemplary video encoder 20 in accordance with some implementations described in the present application.
[0068] 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 (IBC) 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 a sample of 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 one or more samples of any other of the luma component and the two chroma components to modify the sample of said any component based on the selected offset. Alternatively, there is also provided an SAO technique which is substantially the same as the CCSAO technique, except that for the SAO technique, an offset is selected for a sample of any of a luma component and two chroma components according to one or more samples of said any component to modify the sample of 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.
[0069] 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. 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. 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.
[0070] As shown in Figure 2, after receiving the video data, the partition unit 45 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.
[0071] The prediction processing unit 41 may select one of a plurality of possible predictive coding modes, such as one of a plurality of intra or 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 at least one of syntax elements, such as motion vectors, intra or inter mode indicators, partition information, and other such syntax information, to the entropy encoding unit 56.
[0072] In order to select an appropriate intra predictive coding mode for the current video block, the intra prediction processing unit 46 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 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.
[0073] In some implementations, the motion estimation unit 42 generates a motion vector of the current block in a motion estimation process according to a predetermined pattern within a sequence of video frames. The motion vector may indicate displacement of a video block within a current frame 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. In some implementations, a Motion Vector Predictor (MVP) of the current block which may be determined from motion information of spatially neighboring blocks and / or temporally co-located blocks of the current block is subtracted from an actual motion vector of the current block to produce a Motion Vector Difference (MVD) for the current block. Then, instead of encoding, into the video bitstream, the actual motion vector of the current block, information of the MVP and MVD may be encoded into the video bitstream. The IBC unit 48 may determine vectors, e.g., block vectors, for IBC 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. It is noted that an IBC mode may be regarded as either an intra prediction mode or a prediction mode other than the intra prediction mode and an inter prediction mode.
[0074] 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.
[0075] The motion estimation unit 42 determines motion vector information 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 determined motion vector information to the motion compensation unit 44 and then to the entropy encoding unit 56.
[0076] Motion compensation, performed by the motion compensation unit 44, may involve fetching or generating the predictive block based on the motion vector information determined by the motion estimation unit 42. Upon receiving the motion vector information for the current video block, the motion compensation unit 44 may locate a predictive block to which a 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 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.
[0077] In some implementations, the IBC 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.
[0078] In other examples, the IBC 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 IBC 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.
[0079] 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 IBC unit 48, as described above. In particular, the intra prediction processing unit 46 may determine an intra prediction mode to encode a current block. 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.
[0080] After the prediction processing unit 41 determines the predictive block for the current video block, the summer 50 forms a residual block by subtracting pixel values of the predictive block from the pixel values of the current video block, forming pixel difference values. The pixel difference values may include luma or chroma component differences or both. 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 one or more transforms, such as a Discrete Cosine Transform (DCT) or a conceptually similar transform.
[0081] 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.
[0082] 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.
[0083] The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transformation, respectively, to reconstruct the residual block in the pixel domain for generating a reference block for prediction of other video blocks.
[0084] The summer 62 adds the reconstructed residual block to the predictive block produced to produce a reference block for storage in the DPB 64.
[0085] 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 includes a motion compensation unit 82, an intra prediction unit 84, and an IBC 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.
[0086] In some examples, a unit of the video decoder 30 may be tasked to perform the implementations of the present disclosure. 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.
[0087] 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. 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. 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.
[0088] 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 entropy decodes the bitstream to generate quantized coefficients, motion vector information 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.
[0089] 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 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.
[0090] When the video frame is coded as an inter-predictive coded (i.e., B or P) frame, the motion compensation unit 82 produces one or more predictive blocks for a video block of the current video frame based on the motion vector information 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.
[0091] In some examples, when the video block is coded according to the IBC mode described herein, the IBC unit 85 produces predictive blocks for the current video block based on block vector information 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.
[0092] The motion compensation unit 82 and / or the IBC unit 85 determines prediction information for a video block of the current video frame by parsing the vector information and other syntax elements, and then uses the prediction information to produce the predictive blocks for the current video block. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode 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.
[0093] Similarly, the IBC 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 IBC 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 IBC predicted video block of the frame, IBC prediction status for each IBC predicted video block of the frame, and other information to decode the video blocks in the current video frame.
[0094] 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.
[0095] Like the process of choosing a predictive block in a reference frame during inter-frame prediction of a video block, a set of rules needs 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 block using those potential candidate motion vectors associated with spatially neighboring blocks and / or temporally co-located blocks of the current block and then selecting one member from the motion vector candidate list as a motion vector predictor for the current block. 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 block.
[0096] 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. 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.
[0097] 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. 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.
[0098] 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.
[0099] 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 CTBs of chroma samples, and syntax elements used to code the samples of the CTBs. 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 CTB and syntax elements used to code the samples of the CTB. A CTB may be an NxN block of samples.
[0100] 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 CTBs 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 CBs of chroma samples, and syntax elements used to code the samples of the CBs. In monochrome pictures or pictures having three separate color planes, a CU may comprise a single CB and syntax structures used to code the samples of the CB. It should be noted that the quad-tree partitioning depicted in Figure 4C and Figure 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 / or ternary tree structure. As shown in Figure 4E, there are five possible partitioning types of a CB 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
[0101] In some implementations, the video encoder 20 may further partition a CB 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, intra etc., 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.
[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 TB of luma samples, two corresponding TBs of chroma samples, and syntax elements used to transform the TBs. Thus, each TU of a CU may be associated with a TB, a Cb TB, and a Cr TB.In some examples, the luma TB associated with the TU may be a sub-block of the CU's luma residual block. The Cb TB may be a sub-block of the CU's Cb residual block. The Cr TB 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 TB and syntax structures used to transform the samples of the TB.
[0103] In general, the basic inter 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 merge prediction, MMVD, and GPM.
[0104] Extended merge prediction
[0105] With the ever improving video data capturing technology and more refined video block size for preserving details in the video data, an amount of data required for representing motion vectors for a current picture also increases substantially. One way of overcoming this challenge is to use motion information (e.g., a motion vector) of a spatially neighboring CU, a temporally collocated CU etc. of a current CU as an approximation (e.g., prediction) of motion information of the current CU, which is also referred to as “Motion Vector Predictor (MVP) ” of the current CU. The “motion vectors” used throughout the present disclosure comprise not only the motion vectors between CUs from different frames (e.g., between temporally collocated CUs in inter prediction) but also the block vectors between CUs in the same frame (e.g., between spatially neighboring CUs in intra prediction) .
[0106] Like a process of choosing a predictive block in a reference picture during inter-prediction of a coding block, a set of rules need to be adopted by both the video encoder 20 and the video decoder 30 for constructing an MVP candidate list for a current CU and then selecting one MVP candidate from the MVP candidate list as an MVP for the current CU. By doing so, there is no need to transmit the MVP candidate list itself between the video encoder 20 and the video decoder 30, and an index of the MVP candidate selected from the MVP candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same MVP candidate selected from the MVP candidate list for encoding and decoding the current CU.
[0107] In VVC, the MVP candidate list is constructed by including the following five types of MVPs in order:
[0108] -Spatial MVP from spatially neighboring CUs (i.e., spatial candidates) ;
[0109] -Temporal MVP from temporally collocated CUs (i.e., temporal candidates) ;
[0110] -History-based MVP (HMVP) from a First-In-First-Out (FIFO) table;
[0111] -Pairwise average MVP; and
[0112] -Zero MVPs.
[0113] A size of the MVP candidate list is signalled in a sequence parameter set header and a maximum allowed size of the MVP candidate list is 6. For each CU coded in merge mode, an index of the best MVP candidate is encoded using truncated unary binarization. A first bin of the index is coded with contexts and bypass coding is used for other bins of the index.
[0114] A derivation process of each type of MVPs is provided as follows. As in HEVC, VVC also supports parallel derivation of MVP candidate lists for all CUs within a certain size of area.
[0115] Derivation of MVPs from spatial candidates
[0116] The derivation of MVPs from spatial candidates (for example, CUs neighboring a current CU 101 in Figure 5) in VVC is the same as that in HEVC except that positions of first two spatial candidates are swapped. A maximum of four spatial candidates are selected from spatial candidates located at positions depicted in Figure 5, that is, a top position B0, a left position A0, a top-right position B1, a bottom-left position A1 and a top-left position B2. The derivation is performed in an order of CUs at the positions B0, A0, B1, A1 and B2. A CU at the position B2 is considered only when one or more CUs at the positions B0, A0, B1 and A1 are not available (for example, because said one or more CUs belong to other slices or tiles) or is intra coded.
[0117] After a CU at the position B0 is added as a candidate to a merge candidate list, the addition of the remaining candidates to the merge candidate list is subject to redundancy check, which ensures that candidates with the same motion information are excluded from the merge candidate list, so that coding efficiency is improved. To reduce computational complexity, not all possible candidate pairs are considered in the redundancy check. Instead, only pairs linked using a line with an arrow in Figure 6 are considered and a candidate is added to the merge candidate list only if a candidate in a corresponding pair used for the redundancy check has not the same motion information as that of the candidate to be added. Spatial MVPs derived from the candidates in the merge candidate list are added to the MVP candidate list.
[0118] Derivation of MVPs from temporal candidates
[0119] During the derivation of MVPs from temporal candidates, only one temporal candidate is added to the merge candidate list. Particularly, in the derivation of an MVP from this temporal candidate, a scaled motion vector is derived based on a collocated CU (for example, col_CU 301 in Figure 7) as the temporal candidate belonging to a collocated picture (for example, col_pic 302 in Figure 7) for a current CU (for example, curr_CU 303 in Figure 7) , and is added as a temporal MVP candidate to the MVP candidate list. A reference picture list and a reference picture index to be used for derivation of the collocated CU are explicitly signalled in a slice header. The scaled motion vector is obtained (i.e., scaled) from a motion vector of the collocated CU using Picture Order Count (POC) distances, i.e., tb and td, as illustrated in Figure 7, where tb is defined to be a POC difference between a reference picture (for example, curr_ref 305 in Figure 7) of the current picture (for example, curr_pic 304 in Figure 7) and the current picture and td is defined to be a POC difference between a reference picture (for example, col_ref 306 in Figure 7) of the collocated picture and the collocated picture. A reference picture index of the temporal candidate is set equal to zero.
[0120] A position for the temporal candidate (i.e., the collocated CU) in the current CU 401 is selected between positions C0 and C1, as depicted in Figure 8. If a CU at position C0 in the collocated picture is not available, is intra coded, or is outside of a current row of CTUs, a CU at position C1 is used as the collocated CU for the derivation of the temporal MVP candidate. Otherwise, a CU at position C0 is used as the collocated CU for the derivation of the temporal MVP candidate.
[0121] Derivation of HMVP candidates
[0122] HMVP candidates are added to the MVP candidate list after the spatial MVPs and the temporal MVP. Motion information of a previously coded block is stored in an HMVP table and used as an MVP for the current CU. The table with multiple HMVP candidates is maintained during the encoding / decoding process. The table is reset (emptied) when a new row of CTUs is encountered. Whenever there is a non-subblock inter-coded CU, associated motion information is added to a last entry of the HMVP table as a new HMVP candidate.
[0123] A size of the HMVP table is set to 6. When a new HMVP candidate is inserted into the HMVP table, a constrained FIFO rule is utilized, wherein redundancy check is firstly applied to find whether there is an identical HMVP in the HMVP table. If found, the identical HMVP is removed from the HMVP table and all the HMVP candidates afterwards are moved forward, and the identical HMVP is added to the last entry of the HMVP table.
[0124] HMVP candidates may be used in the MVP candidate list construction process. The latest several HMVP candidates in the HMVP table are checked in order and inserted into the MVP candidate list after the temporal MVP candidate. Redundancy check is applied on the HMVP candidates relative to the spatial candidates and / or temporal MVP candidate.
[0125] To reduce a number of redundancy check operations, the following simplifications are introduced:
[0126] -Last two entries in the HMVP table are redundancy checked relative to spatial MVP candidates derived from the spatial candidates at the positions A1 and B1, respectively; and
[0127] -Once a total number of available MVP candidates reaches the maximum allowed size of the MVP candidate list minus 1, the MVP candidate list construction process from HMVP candidates is terminated.
[0128] Derivation of pairwise average MVP candidates
[0129] Pairwise average MVP candidates are generated by averaging MVPs derived using a predefined pair of first two merge candidates in the existing merge candidate list. A first merge candidate in the predefined pair may be defined as p0Cand and a second merge candidate in the predefined pair may be defined as p1Cand. Averaged motion vectors are calculated according to availability of motion vectors of p0Cand and p1Cand separately for each reference picture list. If both motion vectors are available for one reference picture list, these two motion vectors are averaged even when they point to different reference pictures, and a reference picture of the averaged motion vector is set to a reference picture of p0Cand; if only one motion vector is available for one reference picture list, the motion vector is used directly; if no motion vector is available for one reference picture list, the motion vector and the reference picture index for this reference picture list are kept invalid.
[0130] Zero MVPs
[0131] When the MVP candidate list is not full after the pairwise average MVP candidates are added, zero MVPs are inserted at the end of the MVP candidate list until the maximum allowed size of the MVP candidate list is reached.
[0132] MMVD
[0133] As described above, in the merge mode, motion information (i.e., an MVP candidate) is implicitly derived from an MVP candidate list constructed for a current CU and is directly used as an MV of the current CU for generation of prediction samples of the current CU, which may result in a certain error between an actual MV of the current CU and the implicitly derived MVP. In order to increase the accuracy of an MV of the current CU, MMVD is introduced in VVC where a Motion Vector Difference (MVD) of the current CU is added to the implicitly derived MVP to obtain the MV of the current CU. An MMVD flag is signalled after a regular merge flag is transmitted to specify whether an MMVD mode is used for the current CU.
[0134] In the MMVD mode, after an MVP candidate is selected from first two MVP candidates in the MVP candidate list, MMVD information is signalled, wherein the MMVD information includes an MMVD candidate flag which is used to specify which one of the first two MVP candidates is selected to be used as an MV basis, a distance index for indication of motion magnitude information of the MVD, and a direction index for indication of motion direction information of the MVD.
[0135] The distance index, which specifies the motion magnitude information of the MVD, indicates a pre-defined offset from a starting point (represented by, for example, a dotted circle in Figure 9) in a reference picture (for example, L0 reference picture 501 or L1 reference picture 503 in Figure 9) of the current CU to which the selected MVP candidate points, and the MVD may be derived from the offset and may be added to the selected MVP candidate. A relation between distance indexes and pre-defined offsets is specified in Table 1 below. Table 1
[0136] The direction index specifies a sign of the MVD, which represents a direction of the MVD relative to the starting point. Table 2 specifies a relation between direction indexes and pre-defined signs. It should be illustrated that the meaning of a sign of the MVD may be variant according to information of the selected MVP candidate. When the selected MVP candidate is an un-prediction MV or bi-prediction MVs with both MVs pointing to the same side of the current picture (i.e., POCs of two reference pictures (for example, reference pictures of list 0 and list 1, which are also referred to as L0 reference picture and L1 reference picture respectively) of the current picture are both greater than a POC of the current picture, or are both less than the POC of the current picture) , the sign in Table 2 specifies the sign of the MVD added to the selected MVP candidate. When the selected MVP candidate is bi-prediction MVs with both MVs pointing to different sides of the current picture (i.e. a POC of one reference picture of the current picture is greater than the POC of the current picture, and a POC of the other reference picture of the current picture is less than the POC of the current picture) , if a POC distance for L0 reference picture (i.e., a POC distance between the L0 reference picture and the current picture) is greater than a POC distance for L1 reference picture (i.e., a POC distance between the L1 reference picture and the current picture) , the sign in Table 2 specifies a sign of an MVD for list 0 MVD0 added to an MVP for list 0 MVP0 of the selected MVP candidate and a sign of an MVD for list 1 MVD1 added to an MVP for list 1 MVP1 of the selected MVP candidate is opposite to the sign in Table 2; otherwise, if the POC distance for L1 reference picture is greater than the POC distance for L0 reference picture, the sign in Table 2 specifies the sign of MVD1 added to MVP1 and the sign of MVD0 added to MVP0 is opposite to the sign in Table 2. Table 2
[0137] The MVD is scaled according to the POC distances. If the POC distances for both L0 reference picture and L1 reference picture are the same, no scaling is needed for the MVD. Otherwise, if the POC distance for L0 reference picture is greater than the POC distance for L1 reference picture, MVD1 is scaled. If the POC distance for L1 reference picture is greater than the POC distance for L0 reference picture, MVD0 is scaled.
[0138] GPM
[0139] 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 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.
[0140] 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.
[0141] 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.
[0142] An uni-prediction candidate list is derived directly from a merge candidate list constructed according to the extended merge prediction process described above. Denote n as an index of a uni-prediction motion vector in the uni-prediction candidate list. An LX motion vector of an nth merge candidate in the merge candidate list, with X equal to a parity of n, is used as the nth uni-prediction motion vector for the GPM. These motion vectors are marked with “x” in Figure 10. In a case that a corresponding LX motion vector of the nth merge candidate in the merge candidate list does not exist, an L (1 -X) motion vector of the same merge candidate is used instead as the uni-prediction motion vector for the GPM.
[0143] CIIP
[0144] 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 11) as follows:
[0145] -If the top neighboring block is available and is intra coded, then isIntraTop is set to 1, otherwise isIntraTop is set to 0;
[0146] -If the left neighboring block is available and is intra coded, then isIntraLeft is set to 1, otherwise isIntraLeft is set to 0;
[0147] -If (isIntraLeft + isIntraTop) is equal to 2, then the weight value is set to 3;
[0148] -Otherwise, if (isIntraLeft + isIntraTop) is equal to 1, then the weight value is set to 2;
[0149] -Otherwise, the weight value is set to 1.
[0150] -The prediction signal PCIIP in the CIIP mode is derived as follows: PCIIP= ( (4-wt) *Pinter+wt*Pintra+2) >>2 (1)
[0151] 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, and >> represents a right shift operation.
[0152] Intra block copy in Versatile Video Coding (VVC)
[0153] 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.
[0154] 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.
[0155] 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.
[0156] In block matching search, the search range is set to cover both the previous and current CTUs.
[0157] At CU level, IBC mode is signaled with a flag and it can be signaled as IBC Advanced Motion Vector Prediction (AMVP) mode or IBC skip / merge mode as follows:
[0158] 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.
[0159] 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.
[0160] IBC reference region
[0161] To reduce memory consumption and decoder complexity, the IBC in VVC allows only the reconstructed portion of the predefined area including the region of current CTU and some region of the left CTU. Figure 12 illustrates the reference region of IBC Mode, where each block represents 64x64 luma sample unit.
[0162] Depending on the location of the current coding CU location within the current CTU, the following applies:
[0163] If current block falls into the top-left 64x64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, it can also refer to the reference samples in the bottom-right 64x64 blocks of the left CTU, using CPR mode. The current block can also refer to the reference samples in the bottom-left 64x64 block of the left CTU and the reference samples in the top-right 64x64 block of the left CTU, using CPR mode.
[0164] If current block falls into the top-right 64x64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, if luma location (0, 64) relative to the current CTU has not yet been reconstructed, the current block can also refer to the reference samples in the bottom-left 64x64 block and bottom-right 64x64 block of the left CTU, using CPR mode; otherwise, the current block can also refer to reference samples in bottom-right 64x64 block of the left CTU.
[0165] If current block falls into the bottom-left 64x64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, if luma location (64, 0) relative to the current CTU has not yet been reconstructed, the current block can also refer to the reference samples in the top-right 64x64 block and bottom-right 64x64 block of the left CTU, using CPR mode. Otherwise, the current block can also refer to the reference samples in the bottom-right 64x64 block of the left CTU, using CPR mode.
[0166] If current block falls into the bottom-right 64x64 block of the current CTU, it can only refer to the already reconstructed samples in the current CTU, using CPR mode.
[0167] This restriction allows the IBC mode to be implemented using local on-chip memory for hardware implementations.
[0168] IBC interaction with other coding tools
[0169] The interaction between IBC mode and other inter coding tools in VVC, such as pairwise merge candidate, history based motion vector predictor (HMVP) , combined intra / inter prediction mode (CIIP) , merge mode with motion vector difference (MMVD) , and geometric partitioning mode (GPM) are as follows:
[0170] IBC can be used with pairwise merge candidate and HMVP. A new pairwise IBC merge candidate can be generated by averaging two IBC merge candidates. For HMVP, IBC motion is inserted into history buffer for future referencing.
[0171] IBC cannot be used in combination with the following inter tools: affine motion, CIIP, MMVD, and GPM.
[0172] IBC is not allowed for the chroma coding blocks when DUAL_TREE partition is used.
[0173] Unlike in the HEVC screen content coding extension, the current picture is no longer included as one of the reference pictures in the reference picture list 0 for IBC prediction. The derivation process of motion vectors for IBC mode excludes all neighboring blocks in inter mode and vice versa. The following IBC design aspects are applied:
[0174] IBC shares the same process as in regular MV merge including with pairwise merge candidate and history-based motion predictor, but disallows TMVP and zero vector because they are invalid for IBC mode.
[0175] Separate HMVP buffer (5 candidates each) is used for conventional MV and IBC.
[0176] Block vector constraints are implemented in the form of bitstream conformance constraint, the encoder needs to ensure that no invalid vectors are present in the bitstream, and merge shall not be used if the merge candidate is invalid (out of range or 0) . Such bitstream conformance constraint is expressed in terms of a virtual buffer as described below.
[0177] For deblocking, IBC is handled as inter mode.
[0178] If the current block is coded using IBC prediction mode, AMVR does not use quarter-pel; instead, AMVR is signaled to only indicate whether MV is inter-pel or 4 integer-pel.
[0179] The number of IBC merge candidates can be signalled in the slice header separately from the numbers of regular, subblock, and geometric merge candidates.
[0180] A virtual buffer concept is used to describe the allowable reference region for IBC prediction mode and valid block vectors. Denote CTU size as ctbSize, the virtual buffer, ibcBuf, has width being wIbcBuf = 128x128 / ctbSize and height hIbcBuf = ctbSize. For example, for a CTU size of 128x128, the size of ibcBuf is also 128x128; for a CTU size of 64x64, the size of ibcBuf is 256x64; and a CTU size of 32x32, the size of ibcBuf is 512x32.
[0181] The size of a VPDU is min (ctbSize, 64) in each dimension, Wv = min (ctbSize, 64) .
[0182] The virtual IBC buffer, ibcBuf is maintained as follows.
[0183] At the beginning of decoding each CTU row, refresh the whole ibcBuf with an invalid value -1.
[0184] At the beginning of decoding a VPDU (xVPDU, yVPDU) relative to the top-left corner of the picture, set the ibcBuf [x ] [y ] = -1, with x = xVPDU%wIbcBuf, …, xVPDU%wIbcBuf + Wv -1; y = yVPDU%ctbSize, …, yVPDU%ctbSize + Wv -1.
[0185] After decoding a CU contains (x, y) relative to the top-left corner of the picture, set
[0186] ibcBuf [x %wIbcBuf] [y %ctbSize] = recSample [x] [y]
[0187] For a block covering the coordinates (x, y) , if the following is true for a block vector bv = (bv [0] , bv [1] ) , then it is valid; otherwise, it is not valid:
[0188] ibcBuf [ (x + bv [0] ) %wIbcBuf] [ (y + bv [1] ) %ctbSize] shall not be equal to -1.
[0189] Intra block copy in Enhanced Compression Model (ECM)
[0190] In ECM, IBC is improved from below aspects.
[0191] IBC merge / AMVP list construction
[0192] The IBC merge / AMVP list construction is modified as follows:
[0193] Only if an IBC merge / AMVP candidate is valid, it can be inserted into the IBC merge / AMVP candidate list.
[0194] Above-right, bottom-left, and above-left spatial candidates and one pairwise average candidate can be added into the IBC merge / AMVP candidate list.
[0195] Template based adaptive reordering (ARMC-TM) is applied to IBC merge list.
[0196] The HMVP table size for IBC is increased to 25. After up to 20 IBC merge candidates are derived with full pruning, they are reordered together. After reordering, the first 6 candidates with the lowest template matching costs are selected as the final candidates in the IBC merge list.
[0197] The zero vectors’ candidates to pad the IBC Merge / AMVP list are replaced with a set of BVP candidates located in the IBC reference region. A zero vector is invalid as a block vector in IBC merge mode, and consequently, it is discarded as BVP in the IBC candidate list.
[0198] Three candidates are located on the nearest corners of the reference region, and three additional candidates are determined in the middle of the three sub-regions (A, B, and C) , whose coordinates are determined by the width, and height of the current block and the ΔX and ΔY parameters, as is depicted in Figure 13.
[0199] IBC with Template Matching
[0200] Template Matching is used in IBC for both IBC merge mode and IBC AMVP mode.
[0201] The IBC-TM merge list is modified compared to the one used by regular IBC merge mode such that the candidates are selected according to a pruning method with a motion distance between the candidates as in the regular TM merge mode. The ending zero motion fulfillment is replaced by motion vectors to the left (-W, 0) , top (0, -H) and top-left (-W, -H) , where W is the width and H the height of the current CU.
[0202] In the IBC-TM merge mode, the selected candidates are refined with the Template Matching method prior to the RDO or decoding process. The IBC-TM merge mode has been put in competition with the regular IBC merge mode and a TM-merge flag is signaled.
[0203] In the IBC-TM AMVP mode, up to 3 candidates are selected from the IBC-TM merge list. Each of those 3 selected candidates are refined using the Template Matching method and sorted according to their resulting Template Matching cost. Only the 2 first ones are then considered in the motion estimation process as usual.
[0204] The Template Matching refinement for both IBC-TM merge and AMVP modes is quite simple since IBC motion vectors are constrained (i) to be integer and (ii) within a reference region as shown in Figure 12. So, in IBC-TM merge mode, all refinements are performed at integer precision, and in IBC-TM AMVP mode, they are performed either at integer or 4-pel precision depending on the AMVR value. Such a refinement accesses only to samples without interpolation. In both cases, the refined motion vectors and the used template in each refinement step must respect the constraint of the reference region.
[0205] IBC reference area
[0206] The reference area for IBC is extended to two CTU rows above. Figure 14 illustrates the reference area for coding CTU (m, n) . Specifically, for CTU (m, n) to be coded, the reference area includes CTUs with index (m–2, n–2) … (W, n–2) , (0, n–1) … (W, n–1) , (0, n) … (m, n) , where W denotes the maximum horizontal index within the current tile, slice or picture. This setting ensures that for CTU size being 128, IBC does not require extra memory in the current ETM platform. The per-sample block vector search (or called local search) range is limited to [– (C << 1) , C >> 2] horizontally and [–C, C >> 2] vertically to adapt to the reference area extension, where C denotes the CTU size.
[0207] IBC merge mode with block vector differences
[0208] IBC merge mode with block vector differences is adopted in ECM. The distance set is {1-pel, 2-pel, 4-pel, 8-pel, 12-pel, 16-pel, 24-pel, 32-pel, 40-pel, 48-pel, 56-pel, 64-pel, 72-pel, 80-pel, 88-pel, 96-pel, 104-pel, 112-pel, 120-pel, 128-pel} , and the BVD directions are two horizontal and two vertical directions.
[0209] The base candidates are selected from the first five candidates in the reordered IBC merge list. And based on the SAD cost between the template (one row above and one column left to the current block) and its reference for each refinement position, all the possible MBVD refinement positions (20×4) for each base candidate are reordered. Finally, the top 8 refinement positions with the lowest template SAD costs are kept as available positions, consequently for MBVD index coding.
[0210] IBC adaptation for camera-captured content
[0211] When adapt IBC for camera-captured content, IBC reference range is reduced from 2 CTU rows to 2x128 rows as shown in Figure 15. At encoder side to reduce the complexity, the local search range is set to [–8, 8] horizontally and [–8, 8] vertically centered at the first block vector predictor of the current CU. This encoder modification is not applied to SCC sequences.
[0212] Combination of CIIP with TIMD and TM merge
[0213] In CIIP mode, the prediction samples are generated by weighting an inter prediction signal predicted using CIIP-TM merge candidate and an intra prediction signal predicted using TIMD derived intra prediction mode. The method is only applied to coding blocks with an area less than or equal to 1024.
[0214] The TIMD derivation method is used to derive the intra prediction mode in CIIP. Specifically, the intra prediction mode with the smallest SATD values in the TIMD mode list is selected and mapped to one of the 67 regular intra prediction modes.
[0215] In addition, it is also proposed to modify the weights (wIntra, wInter) for the two tests if the derived intra prediction mode is an angular mode. For near-horizontal modes (2 <=angular mode index < 34) , the current block is vertically divided as shown in Figure 16A; for near-vertical modes (34 <= angular mode index <= 66) , the current block is horizontally divided as shown in Figure 16B.
[0216] The (wIntra, wInter) for different sub-blocks are shown in Table 3. Table 3. The modified weights used for angular modes.
[0217] With CIIP-TM, a CIIP-TM merge candidate list is built for the CIIP-TM mode. The merge candidates are refined by template matching. The CIIP-TM merge candidates are also reordered by the ARMC method as regular merge candidates. The maximum number of CIIP-TM merge candidates is equal to two.
[0218] Multi-hypothesis prediction (MHP)
[0219] In the multi-hypothesis inter prediction mode, one or more additional motion-compensated prediction signals are signaled, in addition to the conventional bi prediction signal. The resulting overall prediction signal is obtained by sample-wise weighted superposition. With the bi prediction signal pbi and the first additional inter prediction signal / hypothesis h3, the resulting prediction signal p3 is obtained as follows: p3= (1-α) pbi+αh3 (2)
[0220] The weighting factor α is specified by the new syntax element add_hyp_weight_idx, according to the mapping presented in Table 4: Table 4. The mapping between add_hyp_weight_idx and α.
[0221] Analogously to above, more than one additional prediction signal can be used. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal. pn+1= (1-αn+1) pn+αn+1hn+1 (3)
[0222] The resulting overall prediction signal is obtained as the last pn (i.e., the pn having the largest index n) . Within this mode, up to two additional prediction signals can be used (i.e., n is limited to 2) .
[0223] The motion parameters of each additional prediction hypothesis can be signaled either explicitly by specifying the reference index, the motion vector predictor index, and the motion vector difference, or implicitly by specifying a merge index. A separate multi-hypothesis merge flag distinguishes between these two signalling modes.
[0224] For inter AMVP mode, MHP is only applied if non-equal weight in BCW is selected in bi-prediction mode.
[0225] Combination of MHP and BDOF is possible, however the BDOF is only applied to the bi-prediction signal part of the prediction signal (i.e., the ordinary first two hypotheses) .
[0226] Geometric Partitioning Mode (GPM) in ECM
[0227] GPM with merge motion vector differences (MMVD)
[0228] GPM in VVC is extended by applying motion vector refinement on top of the existing GPM uni-directional MVs. A flag is first signalled for a GPM CU, to specify whether this mode is used. If the mode is used, each geometric partition of a GPM CU can further decide whether to signal MVD or not. If MVD is signalled for a geometric partition, after a GPM merge candidate is selected, the motion of the partition is further refined by the signalled MVDs information. All other procedures are kept the same as in GPM.
[0229] The MVD is signaled as a pair of distance and direction, similar as in MMVD. There are nine candidate distances (1 / 4-pel, 1 / 2-pel, 1-pel, 2-pel, 3-pel, 4-pel, 6-pel, 8-pel, 16-pel) , and eight candidate directions (four horizontal / vertical directions and four diagonal directions) involved in GPM with MMVD (GPM-MMVD) . In addition, when pic_fpel_mmvd_enabled_flag is equal to 1, the MVD is left shifted by 2 as in MMVD.
[0230] GPM with template matching (TM)
[0231] Template matching is applied to GPM. When GPM mode is enabled for a CU, a CU-level flag is signaled to indicate whether TM is applied to both geometric partitions. Motion information for each geometric partition is refined using TM. When TM is chosen, a template is constructed using left, above or left and above neighboring samples according to partition angle, as shown in Table 5. The motion is then refined by minimizing the difference between the current template and the template in the reference picture using the same search pattern of merge mode with half-pel interpolation filter disabled. Table 5
[0232] Table 5 shows template for the 1st and 2nd geometric partitions, where A represents using above samples, L represents using left samples, and L+A represents using both left and above samples.
[0233] A GPM candidate list is constructed as follows:
[0234] 1. Interleaved List-0 MV candidates and List-1 MV candidates are derived directly from the regular merge candidate list, where List-0 MV candidates are higher priority than List-1 MV candidates. A pruning method with an adaptive threshold based on the current CU size is applied to remove redundant MV candidates.
[0235] 2. Interleaved List-1 MV candidates and List-0 MV candidates are further derived directly from the regular merge candidate list, where List-1 MV candidates are higher priority than List-0 MV candidates. The same pruning method with the adaptive threshold is also applied to remove redundant MV candidates.
[0236] 3. Zero MV candidates are padded until the GPM candidate list is full.
[0237] The GPM-MMVD and GPM-TM are exclusively enabled to one GPM CU. This is done by firstly signaling the GPM-MMVD syntax. When both two GPM-MMVD control flags are equal to false (i.e., the GPM-MMVD are disabled for two GPM partitions) , the GPM-TM flag is signaled to indicate whether the template matching is applied to the two GPM partitions. Otherwise (at least one GPM-MMVD flag is equal to true) , the value of the GPM-TM flag is inferred to be false.
[0238] GPM with inter and intra prediction
[0239] In GPM with inter and intra prediction, the final prediction samples are generated by weighting inter predicted samples and intra predicted samples for each GPM-separated region. The inter predicted samples are derived by inter GPM whereas the intra predicted samples are derived by an intra prediction mode (IPM) candidate list and an index signaled from the encoder. The IPM candidate list size is pre-defined as 3. The available IPM candidates are the parallel angular mode against the GPM block boundary (Parallel mode) , the perpendicular angular mode against the GPM block boundary (Perpendicular mode) , and the Planar mode as shown in Figures 17A to 17C, respectively. Furthermore, GPM with intra and intra prediction as shown in Figure 17D is restricted to reduce the signalling overhead for IPMs and avoid an increase in the size of the intra prediction circuit on the hardware decoder. In addition, a direct motion vector and IPM storage on the GPM-blending area is introduced to further improve the coding performance.
[0240] In DIMD and neighboring mode based IPM derivation Parallel mode is registered first. Therefore, max two IPM candidates derived from the decoder-side intra mode derivation (DIMD) method and / or the neighboring blocks can be registered if there is not the same IPM candidate in the list. As for the neighboring mode derivation, there are five positions for available neighboring blocks at most, but they are restricted by the angle of GPM block boundary as shown in Table 6, which are already used for GPM with template matching (GPM-TM) . Table 6
[0241] Table 6 shows the position of available neighboring blocks for IPM candidate derivation based on the angle of GPM block boundary. A and L denotes the above and left side of the prediction block.
[0242] GPM-intra can be combined with GPM with merge with motion vector difference (GPM-MMVD) . TIMD is used for on IPM candidates of GPM-intra to further improve the coding performance. The Parallel mode can be registered first, then IPM candidates of TIMD, DIMD, and neighboring blocks.
[0243] Template matching based reordering for GPM split modes
[0244] In template matching based reordering for GPM split modes, given the motion information of the current GPM block, the respective TM cost values of GPM split modes are computed. Then, all GPM split modes are reordered in ascending ordering based on the TM cost values. Instead of sending GPM split mode, an index using Golomb-Rice code to indicate where the exact GPM split mode is located in the reordering list is signaled.
[0245] The reordering method for GPM split modes is a two-step process performed after the respective reference templates of the two GPM partitions in a coding unit are generated, as follows:
[0246] · extending GPM partition edge into the reference templates of the two GPM partitions, resulting in 64 reference templates and computing the respective TM cost for each of the 64 reference templates;
[0247] · reordering GPM split modes based on their TM cost values in ascending order and marking the best 32 as available split modes.
[0248] The edge on the template is extended from that of the current CU, as Figure 18 illustrates, but GPM blending process is not used in the template area across the edge.
[0249] After ascending reordering using TM cost, an index is signaled.
[0250] Intra template matching
[0251] 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 usage of this mode, and the same prediction operation is performed at the decoder side.
[0252] The prediction signal is generated by matching the L-shaped causal neighbor of the current block with another block in a predefined search area in Figure 19 consisting of:
[0253] R1: current CTU
[0254] R2: top-left CTU
[0255] R3: above CTU
[0256] R4: left CTU
[0257] Sum of absolute differences (SAD) is used as a cost function.
[0258] Within each region, the decoder searches for the template that has least SAD with respect to the current one and uses its corresponding block as a prediction block.
[0259] 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:
[0260] SearchRange_w = a *BlkW
[0261] SearchRange_h = a *BlkH
[0262] Where ‘a’ is a constant that controls the gain / complexity trade-off. In practice, ‘a’ is equal to 5.
[0263] 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.
[0264] The Intra template matching prediction mode is signaled at CU level through a dedicated flag when DIMD is not used for current CU.
[0265] Fusion for template-based intra mode derivation (TIMD)
[0266] For each intra prediction mode in MPMs, The SATD between the prediction and reconstruction samples of the template is calculated. First two intra prediction modes with the minimum SATD are selected as the TIMD modes. These two TIMD modes are fused with the weights after applying PDPC process, and such weighted intra prediction is used to code the current CU. Position dependent intra prediction combination (PDPC) is included in the derivation of the TIMD modes.
[0267] The costs of the two selected modes are compared with a threshold, in the test the cost factor of 2 is applied as follows:
[0268] costMode2 < 2*costMode1.
[0269] If this condition is true, the fusion is applied, otherwise the only mode1 is used.
[0270] Weights of the modes are computed from their SATD costs as follows:
[0271] weight1 = costMode2 / (costMode1+ costMode2)
[0272] weight2 = 1 -weight1
[0273] The division operations are conducted using the same lookup table (LUT) based integerization scheme used by the CCLM.
[0274] Local illumination compensation (LIC)
[0275] LIC is an inter prediction technique to model local illumination variation between current block and its prediction block as a function of that between current block template and reference block template. The parameters of the function can be denoted by a scale α and an offset β, which forms a linear equation, that is, α*p [x] +β to compensate illumination changes, where p [x] is a reference sample pointed to by MV at a location x on reference picture. When wrap around motion compensation is enabled, the MV shall be clipped with wrap around offset taken into consideration. Since α and β can be derived based on current block template and reference block template, no signaling overhead is required for them, except that an LIC flag is signaled for AMVP mode to indicate the use of LIC.
[0276] The local illumination compensation proposed in JVET-O0066 is used for uni-prediction inter CUs with the following modifications:
[0277] intra neighbor samples can be used in LIC parameter derivation;
[0278] LIC is disabled for blocks with less than 32 luma samples;
[0279] for both non-subblock and affine modes, LIC parameter derivation is performed based on the template block samples corresponding to the current CU, instead of partial template block samples corresponding to first top-left 16x16 unit; and
[0280] samples of the reference block template are generated by using MC with the block MV without rounding it to integer-pel precision.
[0281] OBMC
[0282] When OBMC is applied, top and left boundary pixels of a CU are refined using neighboring block’s motion information with a weighted prediction as described in JVET-L0101.
[0283] Conditions of not applying OBMC are as follows:
[0284] when OBMC is disabled at SPS level;
[0285] when current block has intra mode or IBC mode;
[0286] when current block applies LIC; and
[0287] when current luma block area is smaller or equal to 32.
[0288] A subblock-boundary OBMC is performed by applying the same blending to the top, left, bottom, and right subblock boundary pixels using neighboring subblocks’ motion information. It is enabled for the subblock based coding tools:
[0289] affine AMVP modes;
[0290] affine merge modes and subblock-based temporal motion vector prediction (SbTMVP) ; and
[0291] subblock-based bilateral matching.
[0292] When OBMC mode is used in CIIP mode with LMCS, inter blending is performed prior to LMCS mapping of inter samples. LMCS is applied to blended inter samples which are combined with LMCS applied intra samples in CIIP mode,
[0293] where InterpredY represents the samples predicted by the motion of current block in the original domain, IntrapredY represents the samples predicted in the mapped domain, OBMCpredY represents the samples predicted by the motion of neighboring blocks in the original domain, and w0 and w1 are the weights.
[0294] Template matching based OBMC
[0295] In template matching based OBMC scheme, instead of directly using the weighted prediction, the prediction value of CU boundary samples derivation approach is decided according to the template matching costs, including using current block’s motion information only, or using neighboring block’s motion information as well with one of the blending modes.
[0296] In this scheme for each block with a size of 4×4 at the top CU boundary, the above template size equals to 4×1. If N adjacent blocks have the same motion information, then the above template size is enlarged to 4N×1 since the MC operation can be processed at one time. For each left block with a size of 4×4 at the left CU boundary, the left template size equals to 1×4 or 1×4N (Figure 20) .
[0297] For each 4×4 top block (or N 4×4 blocks group) , the prediction value of boundary samples is derived following the below steps.
[0298] Take block A as the current block and its above neighboring block AboveNeighbor_Afor example. The operation for left blocks is conducted in the same manner.
[0299] First, three template matching costs (Cost1, Cost2, Cost3) are measured by SAD between the reconstructed samples of a template and its corresponding reference samples derived by MC process according to the following three types of motion information:
[0300] Cost1 is calculated according to A’s motion information.
[0301] Cost2 is calculated according to AboveNeighbor_A’s motion information.
[0302] Cost3 is calculated according to weighted prediction of A’s and AboveNeighbor_A’s motion information with weighting factors as 3 / 4 and 1 / 4 respectively.
[0303] Second, choose one approach to calculate the final prediction results of boundary samples by comparing Cost1, Cost2 and Cost 3.
[0304] The original MC result using current block’s motion information is denoted as Pixel1, and the MC result using neighboring block’s motion information is denoted as Pixel2. The final prediction result is denoted as NewPixel.
[0305] If Cost1 is minimum, then NewPixel (i, j) = Pixel1 (i, j) .
[0306] If (Cost2 + (Cost2 >> 2) + (Cost2 >> 3) ) <= Cost1, then blending mode 1 is used.
[0307] For luma blocks, the number of blending pixel rows is 4.
[0308] NewPixel (i, 0) = (26×Pixel1 (i, 0) +6×Pixel2 (i, 0) +16) >>5
[0309] NewPixel (i, 1) = (7×Pixel1 (i, 1) +Pixel2 (i, 1) +4) >>3
[0310] NewPixel (i, 2) = (15×Pixel1 (i, 2) +Pixel2 (i, 2) +8) >>4
[0311] NewPixel (i, 3) = (31×Pixel1 (i, 3) +Pixel2 (i, 3) +16) >>5
[0312] For chroma blocks, the number of blending pixel rows is 1.
[0313] NewPixel (i, 0) = (26×Pixel1 (i, 0) +6×Pixel2 (i, 0) +16) >>5
[0314] If Cost1 <= Cost2, then blending mode 2 is used.
[0315] For luma blocks, the number of blending pixel rows is 2.
[0316] NewPixel (i, 0) = (15×Pixel1 (i, 0) +Pixel2 (i, 0) +8) >>4
[0317] NewPixel (i, 1) = (31×Pixel1 (i, 1) +Pixel2 (i, 1) +16) >>5
[0318] For chroma blocks, the number of blending pixel rows / columns is 1.
[0319] NewPixel (i, 0) = (15×Pixel1 (i, 0) +Pixel2 (i, 0) +8) >>4
[0320] Otherwise, blending mode 3 is used.
[0321] For luma blocks, the number of blending pixel rows is 4.
[0322] NewPixel (i, 1) = (7×Pixel1 (i, 1) +Pixel2 (i, 1) +4) >>3
[0323] NewPixel (i, 2) = (15×Pixel1 (i, 2) +Pixel2 (i, 2) +8) >>4
[0324] NewPixel (i, 3) = (31×Pixel1 (i, 3) +Pixel2 (i, 3) +16) >>5
[0325] For chroma blocks, the number of blending pixel rows is 1.
[0326] NewPixel (i, 0) = (7×Pixel1 (i, 0) +Pixel2 (i, 0) +4) >>3
[0327] Adaptive Reordering of Merge Candidates with Template Matching (ARMC-TM)
[0328] The reordering method is applied to regular merge mode, template matching (TM) merge mode, and affine merge mode (excluding the SbTMVP candidate) . For the TM merge mode, merge candidates are reordered before the refinement process.
[0329] After a merge candidate list is constructed, merge candidates are divided into several subgroups. The subgroup size is set to 5 for regular merge mode and TM merge mode. The subgroup size is set to 3 for affine merge mode. Merge candidates in each subgroup are reordered ascendingly according to cost values based on template matching. For simplification, merge candidates in the last but not the first subgroup are not reordered.
[0330] The template matching cost of a merge candidate is measured by the sum of absolute differences (SAD) between samples of a template of the current block and their corresponding reference samples. The template comprises a set of reconstructed samples neighboring to the current block. Reference samples of the template are located by the motion information of the merge candidate.
[0331] When a merge candidate utilizes bi-directional prediction, the reference samples of the template of the merge candidate are also generated by bi-prediction as shown in Figure 21.
[0332] For subblock-based merge candidates with subblock size equal to Wsub × Hsub, the above template comprises several sub-templates with the size of Wsub × 1, and the left template comprises several sub-templates with the size of 1 × Hsub. As shown in Figure 22, the motion information of the subblocks in the first row and the first column of current block is used to derive the reference samples of each sub-template.
[0333] Direct block vector for chroma block
[0334] The direct block vector is used for chroma block in dual tree slices. When chroma dual tree is activated, a flag is signaled to indicate whether a chroma block is coded using IBC mode. If one of the luma blocks in five locations shown in Figure 23 is coded with IBC or intra TMP mode, its block vector is scaled and is used as block vector for the chroma block. Template matching is used to perform block vector scaling.
[0335] Auto-Relocated Block Vector Prediction (AR-BVP)
[0336] AR-BVP is introduced into IBC merge / AMVP candidate list construction.
[0337] As shown in Figure 24, an AR-BVP trace path is illustrated as from an initial guiding reference block B1 to a final guiding reference block Bn+1. An initial guiding block vector BV0, 1 associated with the current block B0 points to the initial guiding reference block B1. If B1 has a guiding block vector denoted as BV1, 2 pointing to a guiding reference block B2, then an auto-relocated block vector BV0, 2, given by BV0, 2 = BV0, 1 +BV1, 2, is defined as the AR-BVP of the current block B0, guided by BV0, 1. Similarly, an auto-relocated block vector BV0, n+1 can be derived by
[0338] BV0, n+1 =BV0, n+BVn, n+1 = BV0, 1+BV1, 2 +…+BVn-1, n +BVn, n+1.
[0339] Three constraints may be conducted. First, the length of the AR-BVP trace path is 1 (i.e, n=1) . Second, the length of the AR-BVP trace path is 2 (i.e, n=2) . Third, there is no constraint for the length of the AR-BVP trace path, specifically, the length of the AR-BVP trace path may depend on guiding reference blocks having respective guiding block vectors in the AR-BVP trace path. The exemplary magnitudes and directions of the guiding block vectors in Figure 24 are shown for purposes of explanation and are not limiting on the techniques as broadly exemplified and described in this disclosure.
[0340] When deriving a guiding block vector BVn, n+1 guided by an auto-relocated block vector BV0, n, candidate block vectors for coding units associated with all five positions including top-left (e.g., LT in Figure 25) , top-right (e.g., RT in Figure 25) , center (e.g., Ctr in Figure 25) , bottom-left (e.g., LB in Figure 25) , and bottom-right (e.g., RB in Figure 25) positions of a guiding reference block Bn are checked to find BVn, n+1, for example, template costs of coding units associated with all five positions are compared and a candidate block vector corresponding to the lowest template cost of the template costs may be determined as the guiding block vector BVn, n+1.
[0341] The initial guiding block vector BV0, 1 is set to be an existing BVP already in the IBC merge / AMVP candidate list. In one example, setting the initial guiding block vector BV0, 1 may be based on criteria as described above.
[0342] The finally determined AR-BVP candidate (i.e., BV0, n+1) is inserted after the HBVP candidates. The IBC merge / AMVP candidate list size are kept unchanged, for example, the template matching cost may be used to compare new candidates to preset candidates, and the candidate with the larger cost may be replaced. As another example, if the list is not full, new candidates can be inserted after the HBVP candidates until the list is full.
[0343] Although the existing IBC scheme can provide significant improvement of intra coding in the ECM, there is room to further improve its performance. Meanwhile, some parts of the existing convolutional cross-component model (CCCM) mode also need to be simplified for efficient codec hardware implementations or improved for better coding efficiency. Furthermore, the trade-off between its implementation complexity and its coding efficiency benefit needs to be further improved.
[0344] In this disclosure, to address the issues as pointed out above, methods are provided to further improve the existing design of the IBC. In general, the main features of the proposed technologies in this disclosure are summarized as follows.
[0345] The IBC prediction is filtered with CCCM tool. Filtered intra block copy (FIBC) is a special intra prediction mode that applies a filter on the IBC-based prediction block to increase prediction accuracy and adapt the characteristics of the copied block to the local neighbourhood.
[0346] In FIBC, training samples may be adjacent to the current block. It is known that reference from local regions can improve the accuracy of prediction in prediction.
[0347] In FIBC, training samples may be not adjacent to the current block. It is known that reference from non-local regions can also improve the accuracy of prediction in prediction.
[0348] In FIBC, only one hypothesis may be utilized, i.e., the best matching block which leads to the minimum matching cost is selected as the final prediction.
[0349] In FIBC, multiple hypothesis may also be utilized.
[0350] In FIBC, multiple models may be utilized.
[0351] In FIBC, template-based FIBC index reordering may be utilized.
[0352] It should be understood that the figures in this disclosure may be combined with all examples mentioned in this disclosure and the disclosed methods may be applied independently or jointly.
[0353] Filtered Intra Block Copy (FIBC)
[0354] According to one or more embodiments of the disclosure, IBC prediction is filtered with CCCM tool. Different methods may be used to achieve this goal. The existing CCCM mode applies a variety of filters for predicting the chroma sample value based on corresponding luma sample values. Unlike CCCM, FIBC is a special intra prediction mode that applies a filter on the IBC-based prediction block to predict the target luma or chroma sample of the current block based on the corresponding luma or chroma samples of the reference block respectively, in order to increase prediction accuracy and adapt the characteristics of the copied block to the local neighbourhood.
[0355] According to one or more embodiments of the disclosure, IBC prediction is further filtered. Different methods may be used to achieve this goal. FIBC is a special intra prediction mode that applies a filter on the IBC-based prediction block to increase prediction accuracy and adapt the characteristics of the copied block to the local neighbourhood.
[0356] According to one or more embodiments of the disclosure, reconstructed luma / chroma samples over the template area of the reference block are used as inputs to the filter during training phase and corresponding reconstructed luma / chroma sample in the template area of the current block is the target. In one example, Figure 26 illustrates one filter shape (cross-shaped) and the training area for the reference block. It should be understood that for this filter shape, both the template area and the boundary region of the template area can be part of the training area for the reference block. Reconstructed samples in the boundary region may be used in training when available and they are padded with closest available sample when unavailable. On the other hand, a training area for the current block can be determined as the template area of the current block. In the filtering phase where the filter coefficients of the filter have been trained / determined through the training phase, the filter may be applied to the corresponding sample values of reference block and the boundary region of the reference block to predict each of the sample values for the current block.
[0357] According to one or more embodiments of the disclosure, predicted samples may be used as inputs to the filter during generating prediction process. In one example, Figure 27 illustrates the used predicted samples for generating prediction process, where gray area (as shown by the pattern with sparse dots) are predicted samples, the small blocks without a pattern represent reconstructed samples, and the pattern with dense dots represents the location to be predicted which will become a predicted sample after being predicted.
[0358] According to one or more embodiments of the disclosure, the filter coefficients (i.e., parameters) are derived using the regression based MSE minimization technique (i.e., LDL decomposition) existing in ECM and being utilized by other tools such as CCCM.
[0359] 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 sample values, such as luma samples (i.e., L0, L1, …, L8) , from the reconstructed reference block as illustrated in Figure 28. In this example, the formula for each new prediction luma sample is as follows:
[0360] Where αi is the coefficient associated with Li and β is the offset (i.e., 1 <<(bitDepth -1) ) . Reference luma sample value for the top-left sample adjacent to the current block can be used as the offsetLuma value. The position and number of spatial term and nonlinear term may be different. Examples of different shape / number of filter taps as illustrated in Figure 29. For another examples, using different position and number as shown in following table.
[0361] According to one or more embodiments of the disclosure, the filter shape may be rectangle, N*M (N and M are integers and larger than 1) . Examples of different shape / number of filter taps are illustrated in Figure 30. According to one or more embodiments of the disclosure, the corresponding center point (C) position can be different. The corresponding center point (C) may also be called as the location to be predicted. Examples of different position of center point (C) are illustrated in Figure 30.
[0362] As shown in Figure 30, the locations to be predicted in each of filter shapes 0-11 are identified by the letter “C” . For example, both shape 0 and shape 1 are rectangles with a width of 3 lines and a height of 3 lines, while shape 0 is identified with a location to be predicted at the bottom right of the rectangle (i.e., the 3rd row and 3rd column) and shape 1 is identified with a different location to be predicted at the center of the rectangle (i.e., the 2nd row and 2nd column) . Similarly, shape 2 is a rectangle with a width of 3 lines and a height of 4 lines, and is identified with a location to be predicted at the 3rd row and 2nd column. Both shape 3 and shape 4 are rectangles with a width of 4 lines and a height of 4 lines, while shape 3 is identified with a location to be predicted at the 3rd row and 3rd column and shape 4 is identified with a different location to be predicted at the bottom right of the rectangle (i.e., the 4th row and 4th column) . Both shape 5 and shape 6 are rectangles with a width of 2 lines and a height of 8 lines, while shape 5 is identified with a location to be predicted at the bottom right of the rectangle (i.e., the 8th row and 2nd column) and shape 6 is identified with a different location to be predicted at the 5th row and 2nd column. Both shape 7 and shape 8 are rectangles with a width of 8 lines and a height of 2 lines, while shape 7 is identified with a location to be predicted at the bottom right of the rectangle (i.e., the 2nd row and 8th column) and shape 8 is identified with a different location to be predicted at the 2nd row and 5th column. Shape 9 is a rectangle with a width of 6 lines and a height of 2 lines, and is identified with a location to be predicted at the bottom right of the rectangle (i.e., the 2nd row and 6th column) . Both shape 10 and shape 11 are rectangles with a width of 2 lines and a height of 6 lines, while shape 10 is identified with a location to be predicted at the 4th row and 2nd column and shape 11 is identified with a different location to be predicted at the bottom right of the rectangle (i.e., the 6th row and 2nd column) .
[0363] The width / height and the location to be predicted of the filter shapes in this disclosure are not limited to the shapes shown in Figure 30. The FIBC may be performed with a proper filter shape of the different filter shapes in this disclosure to further increase prediction accuracy.
[0364] According to one or more embodiments of the disclosure, the filter shape may be rectangle and does not include the bottom right sample, the numbers 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 31, where C is the location to be predicted.
[0365] As shown in Figure 31, the filter shapes 0-12 are rectangles with different widths and / or different height, and without the bottom right sample / location which is the location to be predicted and identified by the letter “C” (see the small blocks without a pattern) . For example, the width and height of shape 0 are both 3 lines; the width and height of shape 1 are 3 lines and 2 lines; the width and height of shape 2 are 3 lines and 4 lines; the width and height of shape 3 are 4 lines and 3 lines; the width and height of shape 4 are both 4 lines; the width and height of shape 5 are 2 lines and 8 lines; the width and height of shape 6 are 2 lines and 3 lines; the width and height of shape 7 are 2 lines and 4 lines; the width and height of shape 8 are 8 lines and 2 lines; the width and height of shape 9 are 6 lines and 2 lines; the width and height of shape 10 are 4 lines and 2 lines; the width and height of shape 11 are 2 lines and 5 lines; the width and height of shape 12 are 2 lines and 6 lines. The width and height of the rectangles without the bottom right sample of the filter shapes in this disclosure are not limited to the shapes shown in Figure 31.
[0366] The methods of FIBC may use the filter shapes as shown in Figures 30-31 for video decoding / encoding.
[0367] According to one or more embodiments of the disclosure, the number of filter taps may be predefined or signaled / switched in SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.
[0368] According to one or more embodiments of the disclosure, template size and shapes may be same as in intra TMP, the template size used for training is 4 lines above and to the left of the current block depending on their availability.
[0369] According to one or more embodiments of the disclosure, the template size used for training is up to 5 lines above and to the left of the current block depending on their availability.
[0370] According to one or more embodiments of the disclosure, template size and shapes may be same as in CCCM, the template size used for training is 6 lines above and to the left of the current block depending on their availability.
[0371] According to one or more embodiments of the disclosure, the template size used for training may be N lines above and to the left of the current block depending on their availability, N is an integer.
[0372] According to one or more embodiments of the disclosure, the template size used for training may be N lines above of the current block depending on their availability, N is an integer.
[0373] According to one or more embodiments of the disclosure, the template size used for training may be N lines left of the current block depending on their availability, N is an integer.
[0374] According to one or more embodiments of the disclosure, the template size used for training may depend on filter shape. In one example, if the height of filter shape is greater than its width, the template size used for training may be N lines above of the current block depending on their availability, N is an integer. Similarly, in another example, if the width of filter shape is greater than its height, the template size used for training may be N lines on left of the current block depending on their availability, N is an integer. That is, instead of a L-shape, the template for training a filter may be in a shape of rectangle, and the width of the template (in case of above the current block) or the height of the template (in case of on left of the current block) may depend on the width or height of the current block. The corresponding template associated with the reference block will be above or on left of the reference block with the same size and shape accordingly. Such templates for training may be used in the methods of FIBC.
[0375] According to one or more embodiments of the disclosure, the reference samples / template area of the reference block / template area of the current block 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.
[0376] According to one or more embodiments of the disclosure, location information may be used to calculate model parameters, 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.
[0377] According to one or more embodiments of the disclosure, one enablement flag can be signaled in the bitstream to indicate the FIBC mode used. The enablement flag can be signaled in different coding levels, such as SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.
[0378] 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.
[0379] According to one or more embodiments of the disclosure, no additional control flag is required and the FIBC mode will be derived under some predefined condition (e.g., specific modes, specific block sizes, specific partitions) . When the predefined condition is matched, the FIBC mode will be derived based on previous decoded information.
[0380] 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 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 32 show some possible positions of candidate regions.
[0381] According to one or more embodiments of the disclosure, one non-adjacent neighboring candidates 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 33 shows some possible positions of candidates.
[0382] According to one or more embodiments of the disclosure, inherited parameters of FIBC from previously decoded 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 TB / CB / slice / picture / sequence level to indicate whether the signaling of inherited FIBC is enabled or disabled. When the control flag is signaled as enabled, a flag of inherited FIBC is further signaled to decoder to indicate whether the inherited FIBC is used or not at signaled level.
[0383] According to one or more embodiments of the disclosure, the derived parameters of FIBC from previous decoded TB / CB / slice / picture / sequence level can be stored and used as current FIBC (which is called inherited FIBC) . In one embodiment, a history-based FIBC (H-FIBC) table may be maintained similar to the HMVP table. In one embodiment, one index value can be signaled in the bitstream to indicate which candidate model in the H-FIBC table is selected. In one embodiment, after decoding a FIBC coded block, the corresponding table may be updated. In one embodiment, the size of H-FIBC table is N. N is an integer (e.g. 4, 5, 6, 7) .
[0384] According to one or more embodiments of the disclosure, FIBC flag may be inherited from an IBC HMVP candidate.
[0385] According to one or more embodiments of the disclosure, FIBC flag may be inherited from an IBC spatial MVP from spatially neighboring CUs.
[0386] According to one or more embodiments of the disclosure, FIBC flag may be inherited from an IBC temporal MVP from temporally collocated CUs.
[0387] According to one or more embodiments of the disclosure, FIBC flag may be inherited from an IBC merge candidate.
[0388] According to one or more embodiments of the disclosure, the filter coefficient precision in this method may be reduced, (e.g., 8 bits or 10 bits or 12 bits) .
[0389] Multi-hypothesis FIBC
[0390] According to one or more embodiments of the disclosure, more than one prediction block candidates are used and weighted to generate the final prediction of the current block. Assume that N prediction block candidates are used.
[0391] Prediction block candidate derivation
[0392] 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) .
[0393] In one embodiment, the prediction block candidates may be selected according to the predefine mode, i.e., planar mode.
[0394] In one embodiment, the prediction block candidates may be selected according to the neighbor predefine mode, i.e., top predefine mode, left predefine mode.
[0395] Fixed multi-hypothesis FIBC
[0396] In this 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.
[0397] Adaptive multi-hypothesis intra FIBC
[0398] To adapt to the diverse characteristics of video content, adaptive multi-hypothesis intra FIBC methods are also proposed.
[0399] 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.
[0400] It should be noted that the template matching cost can be measured with (but not limited to) SAD and SSE.
[0401] 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 SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.
[0402] 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 as P1, P2, …, PN and the current block as X, then the weighting factors can be solved by the following equation:
[0403] Equation (5) 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.
[0404] 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:
[0405] Equation (6) can be solved using Wiener-Hopf equations. Then the final prediction block can be calculated as where Pi represents the i-th prediction block candidate.
[0406] FIBC 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 FIBC, which is described as follow. In the first step, N prediction block candidates are searched and identified as conducted in the FIBC. In the second step, the weighting factor is calculated as follows.
[0407] 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:
[0408] To calculate the weighting factor in equation (7) , the strength of weighting should be determined first. In this disclosure, several methods are proposed to decide the weighting strength.
[0409] 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.
[0410] 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:
[0411] 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.
[0412] To better exploit the nonlocal correlation in the FIBC, 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.
[0413] Step1. K prediction block candidates yi are searched and identified as conducted in the FIBC.
[0414] Step2. The K prediction block candidates of the current block y construct the block group G and are arranged as a matrix:
[0415] Where YG is a matrix with size of d×K by arranging every candidate in group G as a column vector.
[0416] Step3. Perform SVD decomposition on the matrix YG.
[0417] Step4. Apply soft-thresholding operation on the singular value matrix ΛG.
[0418] 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) : Dτ (k) : λk, τ (k) =max (|λk|-τ (k) , 0) (13)
[0419] ΛG, τ is the matrix composed of the shrunken singular values, λk, τ (k) at diagonal positions.
[0420] Step5. Perform inverse SVD to obtain the filtered patch group.
[0421] One of the key steps is to determine the thresholding values for each diagonal elements 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:
[0422] 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 follow.
[0423] 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 β. σn=α×σyβ (17)
[0424] Where σy is calculated as follows,
[0425] Here yk (i) represents the i-th pixel of prediction block candidate vector yk.
[0426] Multi-hypothesis FIBC signaling
[0427] In this disclosure, the proposed multi-hypothesis FIBC can be utilized as a replacement of the current FIBC mode or the encoder can adaptively select FIBC mode or multi-hypothesis FIBC mode.
[0428] In one embodiment, the proposed multi-hypothesis FIBC is used as a replacement of the current FIBC mode, i.e., always using multiple hypothesis for prediction.
[0429] In yet another embodiment, one of the multi-hypothesis FIBC methods in the above sections is used jointly with the current FIBC mode. A flag is signaled in the bitstream to indicate whether multi-hypothesis FIBC mode is applied to the CU.
[0430] In yet another embodiment, more than one multi-hypothesis FIBC methods in the above sections is used jointly with the current FIBC mode. A flag is firstly signaled in the bitstream to indicate whether multi-hypothesis FIBC mode is applied. Then an index is signaled to indicate which of the multi-hypothesis FIBC methods is applied to the CU.
[0431] Harmonization of the filter used for the FIBC mode and the FTMP mode
[0432] The TMP prediction may also be filtered with CCCM tool, which is called the filtered template matching prediction (FTMP) mode. The process of the FTMP mode is the same as that of the FIBC mode, except that the FTMP mode does not require a signaled block vector from the encoder for finding the reference block. Instead, in the FTMP mode, the reference block may be determined at the decoder side by searching for the most similar L-shaped template to the current template in a reconstructed part of the current frame and uses the corresponding block as a reference block for the current block to be predicted. In other words, the L-shaped template associated with the reference block is the most similar template to the L-shaped template associated with the current block in the reconstructed part of the frame. This operation for determining the reference block is the same as that of the Intra TMP mode. After the reference block is determined, the same filtering process as the FIBC mode is applied for predicting the target luma or chroma sample of the current block based on the corresponding luma or chroma samples of the reference block respectively. For example, as is shown in Figure 26, the cross-shaped filter may be applied to the corresponding sample values (sample values of the reference block and the boundary region of the reference block) to predict each of the sample values for the current block.
[0433] According to one or more embodiments of the disclosure, the same filter shape and / or template area may be applied to both the prediction under the FIBC mode and the FTMP mode. For example, before deciding which mode to apply, the decoder and / or encoder may try both the FIBC mode and the FTMP mode with the same filter shape and / or template area for better performance or reduced cost. Different methods may be used to achieve this goal.
[0434] In a first example, it is proposed to apply the filter operations that are used under the FTMP mode to the FIBC mode as well. In one example, a 6 taps filter (cross-shaped with 5 spatial components and a bias term) and the template area used for training (4 lines in width, in terms of samples, above and to the left of the current block depending on their availability) used for the FTMP mode can also be applied to the FIBC mode in a same CU.
[0435] In a second example, it is proposed to apply the filter operations that are used under the FIBC mode to the FTMP mode as well. In one example, a 2 taps filter (asingle-sample filter with 1 spatial component and a bias term) and the template area used for training (1 line above and to the left of the current block depending on their availability) used for the FIBC mode can also be applied to the FTMP mode in a same CU.
[0436] Harmonization of the filter used for the FIBC mode, the FTMP mode and the CCCM mode
[0437] Filters are used in the convolutional cross-component model (CCCM) mode for predicting chroma sample values based on corresponding luma sample values. In CCCM mode, a set of chroma sample values in the reconstructed area of the current block to be predicted, along with the corresponding luma sample values for the set of chroma sample values, are used for determining the filter coefficients for the CCCM filter. In one example, the chroma sample value to be predicted and its corresponding luma sample values are collocated sample values. Although the training result for the filter coefficients may be different, the same filter shape and / or template area may be reused among CCCM, FIBC and FTMP for better performance / reduced cost. In one example, the filter shape and / or the template area may be signaled by the encoder to the decoder. In another example, the filter shape and / or the template area may be derived by the encoder based on predetermined rules, e.g., from a predefined set of candidates.
[0438] According to one or more embodiments of the disclosure, the same filter shape and / or template area may be applied to at least two of the FIBC mode, the FTMP mode and the CCCM mode. Different methods may be used to achieve this goal.
[0439] In a first example, it is proposed to apply the filter operations that are used under the CCCM mode to the FIBC mode as well. In one example, a 7 taps filter (cross-shaped with 5 spatial components, a non-linear term and a bias term) and the template area used for training (6 lines above and to the left of the current block depending on their availability) used for the CCCM mode can also be applied to the FIBC mode in a same CU.
[0440] In a second example, it is proposed to apply one of the filter operations that are used under the CCCM mode to both the FIBC mode and the FTMP mode as well. In one example, a 11 taps filter (3*3 square with 9 spatial components, a non-linear term and a bias term) and the template area used for training (6 lines above and to the left of the current block depending on their availability) used for the CCCM mode can also be applied to the FIBC mode and the FTMP mode.
[0441] Reference area and padding process in FIBC
[0442] According to one or more embodiments of the disclosure, the filter coefficients are calculated by minimising MSE between predicted and reconstructed luma and / or chroma samples in the template area. In one example, Figure 34 illustrates the template area which consists of luma / chroma samples above and left of the CU (i.e., the reference block) . The extensions to the template area (i.e., the boundary region of the template area) are needed to support the “side samples” of the cross-shaped spatial filter and different methods may be used to achieve this goal.
[0443] In the first method, it is proposed to pad with closest available sample when unavailable.
[0444] In the second method, it is proposed to pad with closest available sample no matter it is unavailable or not.
[0445] According to one or more embodiments of the disclosure, the reference area may extend one CU width to the right and one CU height below the CU boundaries.
[0446] According to one or more embodiments of the disclosure, the reference area may be adjusted to include only available samples. In one example, the reference area consists of N lines of luma / chroma samples above and left of the CU. N is an integer number and / or has a maximum upper bound (e.g. 3, 4, 5, 6, 7) .
[0447] Adaptive Reordering of Merge Candidates with FIBC
[0448] According to one or more embodiments of the disclosure, in process of ARMC-TM which is extended to IBC merge list, when a merge candidate utilizes FIBC prediction, the reference samples of the template of the merge candidate are also generated by FIBC.
[0449] According to one or more embodiments of the disclosure, the filter coefficients are calculated by minimising MSE between predicted and reconstructed luma and / or chroma samples in the reference area.
[0450] According to one or more embodiments of the disclosure, template size and shapes may be not included in the reference samples of the template of the merge candidate. In one example, Figure 34 illustrates the reference area which consists of 3 lines luma samples above and left of the CU.
[0451] According to one or more embodiments of the disclosure, in process of ARMC-TM which is extended to IBC merge list, when a merge candidate utilizes FIBC prediction, the reference samples of the template of the merge candidate are generated by IBC-LIC to reduce the complexity.
[0452] According to one or more embodiments of the disclosure, in process of ARMC-TM which is extended to IBC merge list, when a merge candidate utilizes FIBC prediction, the reference samples of the template of the merge candidate are generated by IBC without filtering (i.e., non-filtered IBC) to reduce the complexity.
[0453] Merge Candidates with FIBC
[0454] According to one or more embodiments of the disclosure, sample values predicted based on IBC using merge candidates (i.e., reconstructed blocks in a same frame as a current block to be predicted) are further filtered to implement FIBC prediction for the current block. Different methods may be used to achieve this goal.
[0455] According to one or more embodiments of the disclosure, one enable flag can be signaled in the bitstream to indicate the FIBC merge mode used. The enable flag can be signaled in SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.
[0456] 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.
[0457] According to one or more embodiments of the disclosure, the current block to be predicted may utilize FIBC prediction upon determining the selected candidate of the merge candidates has utilized FIBC prediction. Different methods may be used to achieve this goal. In one example, when the reference template for FIBC parameter derivation is valid for the current block, FIBC prediction may be applied for predicting the current block based on the selected merge candidate for the current block which is predicted with FIBC.
[0458] According to one or more embodiments of the disclosure, the FIBC flag may be inherited (i.e., being the same) from a merge candidate. For example, the current block may enable FIBC prediction upon determining that the selected merge candidate (from which the block vector of the current block is inherited) has utilized FIBC.
[0459] According to one or more embodiments of the disclosure, in an FIBC model merge mode, the prediction of the current block may inherit FIBC model parameters from spatial adjacent and / or non-adjacent neighbors, history candidates, and / or default models predefined by both the encoder or decoder. Different methods may be used to achieve this goal.
[0460] In one example, an FIBC model candidate list which consists of model parameters (e.g., filter coefficients for the FIBC filters) from spatial adjacent and / or non-adjacent neighbors, history candidates, and / or default models is constructed and the size of the candidate list is N, N is an integer number. A candidate from the candidate list utilizing FIBC model may be selected and its index, along with the candidate list, is signaled in the bitstream. The filter coefficients for the FIBC filter of the current block can be determined to be the same as those for the selected candidate. This may help saving the cost for calculating the filter coefficients for the current block based on the current template and reference template of the current block. In one example, offsets can be further calculated and applied to the filter coefficients for each model candidate in order to determine the selected candidate for the current block.
[0461] According to one or more embodiments of the disclosure, a candidate list is constructed by adding block / motion vectors from neighboring blocks of the current block (such as adjacent or / and non-adjacent neighboring blocks) which are coded with IBC mode or / and Intra Template Matching Prediction (Intra TMP) mode.
[0462] According to one or more embodiments of the disclosure, precision of the block / motion vectors in the candidate list may be changed and changing the precision may be implicit or explicit. In one example, switching between integer only block / motion vectors or fractional block / motion vectors may be implicitly or explicitly performed for the candidates. In one example, the implicit switching may be based on distance between the neighboring blocks where the block / motion vectors are obtained and the current coding block. For the block / motion vectors coming from non-adjacent neighboring blocks with distance larger than a distance threshold (e.g., N pixel / samples away) , the integer only block / motion vectors (with rounding or clipping operations to change the fractional precision to integer precision) may be used. For block / motion vectors coming from neighboring blocks with distance smaller than or equal to the distance threshold (e.g., within N pixel / samples) , the fractional block / motion vectors may be used. In another example, the explicit switching may be based on explicit signaling (e.g., a switching flag may be explicitly signaled from the encoder to the decoder) .
[0463] According to one or more embodiments of the disclosure, the candidates may be removed by checking the obtained block / motion vector for validity and if it is duplicated.
[0464] According to one or more embodiments of the disclosure, the required information and memory size may be further reduced for constructing the FIBC model candidate list. Different methods may be used to achieve this goal.
[0465] In one example, a restriction can be applied to reduce the FIBC required line buffer, and / or to simplify boundary processing condition check. For example, if the current block is at the top or left boundary of a CTU, only a limited N line buffer may be used for selecting the candidates for the FIBC model candidate list, wherein N is a relatively small integer number (e.g., 1) .
[0466] According to one or more embodiments of the disclosure, the storage granularity in this method may be reduced, (e.g., 8x8 or 16x16 or 32x32) . For example, in the embodiment as shown in Figure 4C, the 16x16 CU 430 may be divided into four smaller CUs each having a block size of 8x8. If 16x16 granularity is used for FIBC prediction, a same selected FIBC model candidate may be stored for the four smaller CUs for saving memory space.
[0467] According to one or more embodiments of the disclosure, the filter coefficient precision for FIBC in this method may be reduced, (e.g., from 16 bits to 12 bits, 10 bits or 8 bits, from 12 bits to 10 bits or 8 bits, from 10 bits to 8 bits) . For example, when the current block is to be predicted with FIBC and the filter coefficients for FIBC for the current block are to be inherited from a selected candidate, these filter coefficients may be obtained by performing a rounding operation or a clipping operation on the filter coefficients for the selected candidate. Although the precision of the inherited filter coefficients is reduced compared to the selected candidate, the cost for processing the inherited filter coefficients is reduced.
[0468] According to one or more embodiments of the disclosure, the fractional precision of the block / motion vectors in this method may be reduced, (e.g., 1 / 4-pel, or 1 / 8-pel or 1 / 16-pel) .
[0469] According to one or more embodiments of the disclosure, fractional block / motion vectors or integer only block / motion vectors may be always used for FIBC mode.
[0470] According to one or more embodiments of the disclosure, a flag may be signaled to indicate whether the FIBC model merge mode is applied or not. If this flag is true, an index is further signaled to indicate which candidate model is to be used by the current block.
[0471] According to one or more embodiments of the disclosure, FIBC model merge mode may be explicitly signaled both in the IBC-AMVP and the IBC-Merge mode. In one example, in the IBC-AMVP mode, the flag is signaled when the FIBC flag is true. In the IBC-Merge mode, the flag is only signaled when the current block isn’ t coded as IBC-CIIP, IBC-GPM, TM-Merge, or skip mode. In one example, if the FIBC model merge flag is true, the filter coefficients for FIBC cannot be inherited, and the filter coefficients can only be calculated for the current block.
[0472] Direct block vector for chroma block with FIBC
[0473] According to one or more embodiments of the disclosure, direct block vector for chroma block are further filtered. Different methods may be used to achieve this goal.
[0474] According to one or more embodiments of the disclosure, one enable flag can be signaled in the bitstream to indicate the FIBC merge mode used. The enable flag can be signaled in SPS / DPS / VPS / SEI / APS / PPS / PH / SH / Region / CTU / CU / Subblock / Sample levels.
[0475] According to one or more embodiments of the disclosure, instead of explicitly signaling the selected mode flag, the mode flag can be inherited from luma blocks at decoder to save bit overhead.
[0476] Combination of FIBC and IBC with fractional block vectors
[0477] In FIBC, after an initial prediction block is generated based on the reference block by using either integer copy (i.e., copying the sample values associated with the reference block by using integer block vector or integer part of a fractional block vector) or interpolated filtering (i.e., generating interpolated sample values by using the fractional block vector) , a filtering process is further applied to the initial prediction block for refining the initial prediction block into the final prediction block. When the current block to be predicted in the FIBC mode is associated with an integer block vector to the reference block, the parameters (i.e., filter coefficients) used in the filtering process may be derived by using a reference template (such as the reference template as shown in Figure 26 and Figure 34) determined with the same integer block vector for generating the initial prediction block of the current block. In one example, as shown in Figure 34, the reference template is being determined, based on the current template, by using the same integer block vector between the reference block and the current block. In another example, when an IBC block coded with a fractional block vector is combined with the FIBC mode (i.e., when the current block to be predicted in the FIBC mode is associated with a fractional block vector to the reference block) , the reference template for filter parameters derivation may be determined in different ways. That is, if the block vector is a fractional block vector, then the same fractional block vector may be applied for determining the reference template, or a different block vector, such as an integer block vector obtained based on the fractional block vector, may be used in determining the reference template, which may lead to less interpolation operations.
[0478] In one example, the reference template used for FIBC parameter derivation is determined by using the same fractional block vector used in determining the initial prediction block of the current block. In such case, both the reference template and the initial prediction block are to be generated by interpolation. However, the interpolation filter used for generating the reference template may be the same as or different from the interpolation filter used for generation of the initial prediction block of the current block. For example, given an 1 / 4-pel block vector for the current block, a 12-tap interpolation filter may be used for generation of the initial prediction block of the current block, but when reference template is to be generated for FIBC, the same 12-tap interpolation filter or a different interpolation filter (e.g., 4-tap or 2-tap interpolation filter or 0-tap interpolation filter) may be used. An interpolation filter with fewer taps may lead to less computations and / or less padding operations if some samples are out of the valid IBC reference area. If a different interpolation filter is used for reference template generation, this interpolation filter may be predefined or signaled at different coding levels (e.g., sequence, picture, slice, CTU level, or region based) .
[0479] In another example, the reference template used for FIBC parameter derivation is determined by using an integer block vector modified from the fractional block vector used in generating the initial prediction block of the current block. This modification may be based on clipping operation (e.g., directly discarding the fractional part of the fractional block vector) or rounding operation (e.g., rounding the fractional part to the nearest integer value) .
[0480] In yet another example, the reference template used for FIBC parameter derivation is determined by using an integer block vector modified from the fractional block vector used in generating the initial prediction block of the current block, upon determining that the fractional block vector will lead to invalid reference template area. In other words, in response to determining that the reference template based on the current template associated with the current block and the fractional block vector corresponds to invalid template area, the reference template will be instead determined based on the current template and an integer block vector modified from the fractional block vector. This modification may be based on clipping operation (e.g., directly discarding the fractional part of the fractional block vector) or rounding operation (e.g., rounding the fractional part to the nearest integer value) , and need to check whether the fractional block vector will lead to invalid reference template area or not first. For example, the reference template may need to be extended to perform interpolation filtering. The extended reference template may be padded if it is not valid in the reference area.
[0481] According to one or more embodiments of the disclosure, the initial prediction block and the reference template may be generated from the reference block by interpolated filtering (by using the fractional block vector) jointly or separately. Different methods may be used to achieve this goal.
[0482] According to one or more embodiments of the disclosure, FIBC and IBC with fractional block vectors are mutually exclusive. Different methods may be used to achieve this goal.
[0483] In one example, the reference template used for FIBC parameter derivation is determined by using an integer block vector used in determining the initial prediction block of the current block.
[0484] In another example, FIBC is disabled upon determining that a fractional block vector is used in determining the initial prediction block of the current block. In such case, a traditional IBC mode may be implemented to obtain the final prediction block.
[0485] FIBC signaling
[0486] In this disclosure, the signaling for FIBC enablement is determined according to certain coded information of the current block to be predicted, e.g. the block size of the current block, the slice type of the frame containing the current block, the quantization parameter for the current block, and the position of the current block in the frame, and / or according to a flag associated with an upper coding level (for example, the levels of slices and CTUs can be considered as upper coding levels for the level of CUs) , such as a flag in the TB / CB / slice / picture / sequence level (e.g. a SPS_FIBC_flag) . Such information may be obtained from a bitstream. Some exemplar methods are listed as follows.
[0487] In one example, when the block size of the current block is greater than or equal to a predefined threshold (e.g. 16, 32, 64, 128 or 256) , the FIBC enabling flag is used (for example, to indicate that FIBC mode is enabled for the current block) , otherwise the mode of FIBC is set as default mode, i.e., mode of FIBC is set as enabled or disabled.
[0488] In yet another example, when the block size is lower than or equal to the predefined threshold (e.g. 16, 32, 64, 128 or 256) , the FIBC enabling flag is used, otherwise the mode of FIBC is set as default mode, i.e., mode of FIBC is set as enabled or disabled.
[0489] In yet another example, when the slice type of the frame containing the current block is equal to a predefined type (e.g. I, P or B) , the FIBC enabling flag is used, otherwise the mode of FIBC is set as default mode, i.e., mode of FIBC is set as enabled or disabled.
[0490] In yet another example, when x-coordinate or y-coordinate of the position of the current block in the frame is greater than or equal to a predefined threshold (e.g. 3, 4, 5, 6 or 7) , the FIBC enabling flag is used, otherwise the mode of FIBC is set as default mode, i.e., mode of FIBC is set as enabled or disabled.
[0491] In yet another example, the FIBC enabling flag at block level may be context coded. In such case, the FIBC enabling flag may be dependent on one or more IBC mode related flags or one or more merge flags for neighboring blocks.
[0492] CABAC context windows
[0493] Context Adaptive Binary Arithmetic Coding (CABAC) is usually performed on a syntax element in video coding for obtaining a binary stream that represents a value or pointer to a probability within a final coded probability interval. In CABAC, syntax elements are mapped to binary symbols (or “bins” ) . The probabilities of various bins are estimated to derive a context model based on which the bins are further compressed to bits. The context model includes an initial value and a shift index for determining the context windows representing the probability intervals. CABAC is adaptive because the probability states of a context for coding bins are updated according to signal statistics representing previously coded bins. In other words, the context model for coding the syntax elements keeps on being updated based on the signal statistics.
[0494] In the current IBC design, there may be one or more IBC mode related flags which are CABAC coded. For example, the IBC enabling flag at the block level is CABAC coded. Since the signal statistics may be different for frames of different slice types (i.e., I, B or P) , it is desirable to have a context’s probability state updated at a rate that may provide more accurate probability estimation (e.g., to more accurately predict the likelihood of one bin having the value of 1 or 0) under the given slice type.
[0495] In one example, when coding the syntax elements with CABAC, three different context models may be predefined for three different types of slices, including I, B and P slices, respectively. The syntax elements may comprise flags for FIBC or IBC etc.
[0496] In one example, when coding syntax elements with CABAC, two different context models may be predefined respectively for different slices (including an intra-predicted slice (I slice) and inter-predicted slices (B and P slices) ) . The syntax elements may comprise flags for FIBC or IBC etc.
[0497] When the context model is determined at a given coding level based on the slice type, one or more syntax elements can be signaled at the coding level with the respective context model (and the adaptively updated context models) . For example, based on the multiple context models updated under the slice type, one or more FIBC mode related flags (e.g., the FIBC enabling flag, flags for filter selection or / and template selection, etc. ) may be further signaled by using the multiple context models.
[0498] In one example, the FIBC mode related flags may be signaled separately or jointly for different slice types. For example, the FIBC enabling flag can be signaled jointly as “enabled” for all types of slices while the flags for filter selection (e.g., selection of 5-tap, 6-tap, 7-tap, 8-tap or / and 9-tap filters) are signaled separately based on the slice type. In one example, the signaled filter selection flag may depend on quantization parameter under a given slice type.
[0499] In one example, one or more FIBC mode related flags (e.g., the FIBC enabling flag, the flags for filter selection or / and template selection, etc. ) may be further signaled separately or jointly for different video component types (i.e., Y, U or V) . For example, the FIBC enabling flag can be signaled jointly as “enabled” for all types of video components while the flags for template selection (e.g., selection of 3 lines above and left to the CU) are signaled separately based on the component type. In one example, the flag for filter selection may be determined differently for luma and chroma components, and then signaled separately for the luma and chroma components.
[0500] In one example, one or more IBC mode related flags (e.g., flags for motion precision, interpolation filter selection for motion compensated block prediction and / or template selection, etc. ) may be further signaled separately or jointly by considering different slice types, different video components, and / or different video resolutions. When multiple context models are defined for different frames of different slice types, the probability intervals and initialization parameters may also be retrained separately or jointly for the different frames of different slice types.
[0501] Multi-model FIBC mode
[0502] According to one or more embodiments of the disclosure, more than one FIBC models are used and combined to generate the final prediction of the current block. In one example, samples from the reference block of the current block as well as samples from the template area of the reference block (i.e., reference template) may be classified into N classes, corresponding to N sets of model parameters (i.e., filter coefficients) for FIBC filters respectively. Different methods may be used to achieve this goal.
[0503] In one example, there is an option of using a single model or multi-model variant of FIBC mode. For example, the multi-model FIBC mode may use two FIBC models each comprising an FIBC filter, the filter coefficients for the first FIBC filter of the first model derived for samples of sample values above a threshold value in the reference block, and the filter coefficients for the second FIBC filter of the second model derived for samples of sample values equal to or below the threshold value in the reference block.
[0504] It should be understood that the first model and the second model may comprise a same filter shape or two different filter shapes, while the sets of filter coefficients for each model are derived separately. In one example, the threshold value can be the average luma sample value of the reference block.
[0505] According to one or more embodiments of the disclosure, the current block to be predicted must be large enough to enable multi-model FIBC mode. For example, multi-model FIBC mode may be enabled for the current block corresponding to a reference block which have at least M reference samples available, wherein M is an integer, e.g., 128.
[0506] According to one or more embodiments of the disclosure, the reference template must be available to enable multi-model FIBC mode. For example, multi-model FIBC mode may be enabled for the current block for which the corresponding reference template has at least top or left samples available.
[0507] Classification-based methods of FIBC mode
[0508] According to the embodiments of this disclosure, classification-based methods of FIBC is proposed to further improve the prediction accuracy of FIBC mode. The classification is not limited to the two classes defined by the threshold value as discussed above. For example, the reference block can be first determined in the reconstructed part of the same frame of the current block based on a signaled block vector or inferred at the decoder side. Then the samples of the reference block may be classified into two or more groups of samples based on a rule for classification, which is also applied to the samples of the reference template during training phase for deriving different sets of filter coefficients.
[0509] According to one or more embodiments of the disclosure, the rule for classification comprises classifying the reconstructed samples (e.g., luma samples) in the reference block into plural sample groups based on direction and / or edge strength for each of the samples in the reference block and applying different FIBC models to the reconstructed samples in different sample groups. Different methods may be used to achieve this goal.
[0510] According to one or more embodiments of the disclosure, the reference sample (Y0) may be compared with neighboring N samples (Yi) to get a score, e.g., if Y0 > Yi then score += 1, else Y0 < Yi then score -= 1. The score may be quantized to form K classes. Then the reference sample (Y0) may be classified to one of the K classes by its score. N and K are integers.
[0511] According to one or more embodiments of the disclosure, the reference sample (Y0) may be calculated with neighboring N samples to get an edge strength, e.g., one edge strength is calculated by subtracting the reference sample (Y0) and one neighbor sample (Y1) . The edge strength may be quantized to K segments by K-1 thresholds Ti. Then the reference sample (Y0) may be classified to one of the K classes by its edge strength. N and K are integers.
[0512] According to one or more embodiments of the disclosure, the reference sample (Y0) may be calculated with neighboring N samples (Yi) to get an edge strength, e.g., one edge strength is calculated by one edge detection filter. The filter shape, filter taps, and mapping table for the edge detection filter may be predefined or signaled or switched in different coding levels, such as 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 reference sample (Y0) may be classified to one of the K classes by its edge strength. N and K are integers.
[0513] Template-based FIBC index reordering
[0514] The FIBC mode may utilize an FIBC model candidate list containing the FIBC model candidates, as discussed in the section of “Merge Candidates with FIBC” . According to one or more embodiments of the disclosure, to reduce the overhead of signaling FIBC model candidates, template-based FIBC index reordering is used for the FIBC model candidates. In an example, the FIBC model candidate list may consist of one or more of FIBC model candidates from spatial adjacent neighbors, FIBC model candidates from spatial non-adjacent neighbors, history FIBC model candidates and / or default FIBC model candidates, each having different filter coefficients for the respective FIBC filter. Different methods may be used to achieve this goal.
[0515] In the first method, at the encoder side, given the derived FIBC model candidates, for example, filter coefficients for FIBC model 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 FIBC model candidate respectively are calculated, and are then used to sort (or reorder) all the FIBC model candidates. Specifically, an FIBC model candidate with a smaller template cost will be assigned to a smaller index value while another FIBC model candidate with a larger template cost will be assigned to a larger index value. In one example, to determine and signal the FIBC 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 FIBC model candidate respectively are calculated. In a preferred example, the FIBC model candidate with the minimum current block cost is determined to be a final FIBC model. Additionally, an FIBC index value for the current block is determined from the sorted FIBC model candidates based on the FIBC model candidate with the minimum current block cost. The selected FIBC index value can be coded with a context model to further reduce the signaling overhead. At the decoder side, the final FIBC model is derived by: 1) deriving the filter coefficients for FIBC model candidates; 2) calculating the corresponding template cost using each FIBC model candidate; 3) sorting the FIBC model candidates in the ascending order based on the calculated template costs; 4) selecting an FIBC model candidate as the final FIBC model from the sorted FIBC model candidates based on the FIBC index value that is received, wherein steps (1) - (3) performed at the decoder side are similar to corresponding steps performed at the encoder side.
[0516] In the second method, an initial FIBC model candidate list is firstly constructed according to the existing FIBC model candidate list generation process, wherein the FIBC model candidates in the list may originate from history-based FIBC mode and / or spatial neighboring FIBC model candidates. After that, the candidates in the list are reordered according to their template costs. An FIBC index value corresponding to a selected FIBC model candidate in the reordered candidate list is signalled from the encoder to the 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.
[0517] In the third method, an initial FIBC model candidate list is firstly constructed according to the existing FIBC model candidate list generation process, wherein the FIBC model candidates in the list may originate from history-based FIBC mode and / or spatial neighboring FIBC model candidates. After that, one or more of the candidates in the list may be replaced by respective candidates utilizing multi-model FIBC mode according to their template costs. For example, a first candidate utilizing single-model FIBC mode with a larger template cost is replaced by a second candidate utilizing a multi-model FIBC mode with a smaller template cost when template cost of the first candidate is larger than a threshold multiplied by template cost of the second candidate. The revised list containing the multi-model FIBC mode may then be reordered as discussed above. An FIBC index corresponding to a selected FIBC model 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.
[0518] 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 FIBC index reordering. In one method, it is proposed to only enable the template-based FIBC index reordering only when the number of FIBC model candidate (s) is greater than a threshold, e.g., 1. The syntax for indicating whether the template-based FIBC index reordering is enabled can be signalled to or inferred at the decoder side.
[0519] 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 FIBC index reordering and set the number of FIBC model candidate (s) in the reordered candidate list. In one method, the FIBC index value corresponding to a selected FIBC model candidate in the reordered candidate list is signalled from the encoder to the decoder only when the FIBC index value corresponding to the selected FIBC model candidate is less than a threshold, e.g., 8.
[0520] 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 FIBC index reordering. In one method, the template for deriving the filter coefficients for FIBC model candidates and the template for calculating template costs for template-based FIBC index reordering are different, e.g., the template for calculating template costs for template-based FIBC index reordering may be smaller than or part of the template for deriving the filter coefficients for FIBC model candidates, for example, the template for calculating template costs may be two rows and two columns closest to the current prediction block.
[0521] According to one or more embodiments of the disclosure, the template size used to calculate template costs may be N lines above and to the left of the current block depending on their availability, N is an integer.
[0522] According to one or more embodiments of the disclosure, the template size used to calculate template costs may be N lines above of the current block depending on their availability, N is an integer.
[0523] According to one or more embodiments of the disclosure, the template size used to calculate template costs may be N lines left of the current block depending on their availability, N is an integer.
[0524] According to one or more embodiments of the disclosure, the template size used to calculate template 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 template costs may be N lines above of the current block depending on their availability, N is an integer.
[0525] According to one or more embodiments of the disclosure, the template for calculating template costs and / or the template for deriving the filter coefficients for FIBC model 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.
[0526] According to one or more embodiments of the disclosure, template cost could be SAD or SATD or mean-removed SAD or mean-removed SATD cost metric / functions.
[0527] Combination of FIBC and AR-BVP
[0528] According to the embodiments of this disclosure, AR-BVP could be filtered by FIBC to further improve the prediction accuracy of AR-BVP.
[0529] According to the embodiments of this disclosure, AR-BVP could be further filtered if one of BV in AR-BVP trace path is coded by FIBC.
[0530] According to the embodiments of this disclosure, AR-BVP could be further filtered if the initial guiding block is coded by FIBC.
[0531] According to the embodiments of this disclosure, AR-BVP could be further filtered if the final guiding block is coded by FIBC.
[0532] According to the embodiments of this disclosure, BV of FIBC could be auto-relocated by implicit or explicit method. In one example, the implicit method may be based on template cost in template-based FIBC index reordering, for example, template cost associated with the initial guiding reference block B1 may be compared with template costs associated with the one or more guiding reference blocks (i.e., B2, B3, …, Bn+1) in the AR-BVP trace path to determine whether a combination of FIBC and AR-BVP is enabled. In another example, the explicit method may be based on explicit signaling (e.g., a flag may be explicitly signaled from the encoder to the decoder) .
[0533] Figure 35 illustrates a workflow of a method 3500 for video decoding according to one or more aspects of the present disclosure.
[0534] At step 3510, the method 3500 comprises determining guiding block vectors for a current block.
[0535] At step 3520, the method 3500 comprises determining an Auto-Relocated Block Vector Prediction (AR-BVP) based on the guiding block vectors.
[0536] At step 3530, the method 3500 comprises determining an auto-relocated reference block based on the AR-BVP, wherein the auto-relocated reference block is a reconstructed block in a same frame as the current block.
[0537] At step 3540, the method 3500 comprises predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of the auto-relocated reference block.
[0538] In one example, determining the AV-BVP based on the guiding block vectors comprises: determining the AR-BVP based on guiding reference blocks in an AR-BVP trace path having respective guiding block vectors, wherein the guiding block vectors point to the guiding reference blocks respectively which are different reconstructed blocks in the same frame as the current block.
[0539] In one example, the AR-BVP is determined when a number of the guiding reference blocks reaches a predefined threshold.
[0540] In one example, determining the AR-BVP based on the guiding reference blocks in the AR-BVP trace path having respective guiding block vectors comprises: determining a first guiding block vector for a first guiding reference block based on candidate block vectors for coding units associated with the first guiding reference block, wherein the candidate block vectors are derived based on different positions in the first guiding reference block; and determining the AR-BVP based on the first guiding block vector.
[0541] In one example, the method 3500 further comprises determining that at least one of the guiding reference blocks is predicted with FIBC mode before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.
[0542] In one example, the sample values of the current block are predicted based on the FIBC mode with the same filter shape and filter coefficients as the FIBC mode used for predicting the at least one of the guiding reference blocks.
[0543] In one example, the method 3500 further comprises determining a template cost associated with an initial guiding reference block is more than a template cost associated with the auto-relocated reference block before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.
[0544] In one example, the method 3500 further comprises receiving a flag indicating whether the AR-BVP is to be determined.
[0545] In one example, the method 3500 further comprises inserting the AR-BVP into a candidate list, wherein the candidate list is an Intra Block Copy (IBC) merge candidate list or an IBC Advanced Motion Vector Prediction (AMVP) candidate list for predicting sample values of the current block.
[0546] Figure 36 illustrates a workflow of a method 3600 for video encoding according to one or more aspects of the present disclosure.
[0547] At step 3610, the method 3600 comprises determining guiding block vectors for a current block.
[0548] At step 3620, the method 3600 comprises determining an Auto-Relocated Block Vector Prediction (AR-BVP) based on the guiding block vectors.
[0549] At step 3630, the method 3600 comprises determining an auto-relocated reference block based on the AR-BVP, wherein the auto-relocated reference block is a reconstructed block in a same frame as the current block.
[0550] At step 3640, the method 3600 comprises predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of the auto-relocated reference block.
[0551] At step 3650, the method 3600 comprises generating a bitstream based on the predicted sample values of the current block.
[0552] In one example, determining the AV-BVP based on the guiding block vectors comprises: determining the AR-BVP based on guiding reference blocks in an AR-BVP trace path having respective guiding block vectors, wherein the guiding block vectors point to the guiding reference blocks respectively which are different reconstructed blocks in the same frame as the current block.
[0553] In one example, the AR-BVP is determined when a number of the guiding reference blocks reaches a predefined threshold.
[0554] In one example, determining the AR-BVP based on the guiding reference blocks in the AR-BVP trace path having respective guiding block vectors comprises: determining a first guiding block vector for a first guiding reference block based on candidate block vectors for coding units associated with the first guiding reference block, wherein the candidate block vectors are derived based on different positions in the first guiding reference block; and determining the AR-BVP based on the first guiding block vector.
[0555] In one example, the method 3600 further comprises determining that at least one of the guiding reference blocks is predicted with FIBC mode before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.
[0556] In one example, the sample values of the current block are predicted based on the FIBC mode with the same filter shape and filter coefficients as the FIBC mode used for predicting the at least one of the guiding reference blocks.
[0557] In one example, the method 3600 further comprises determining a template cost associated with an initial guiding reference block is more than a template cost associated with the auto-relocated reference block before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.
[0558] In one example, the method 3600 further comprises signaling a flag indicating whether the AR-BVP is to be determined.
[0559] In one example, the method 3600 further comprises inserting the AR-BVP into a candidate list, wherein the candidate list is an Intra Block Copy (IBC) merge candidate list or an IBC Advanced Motion Vector Prediction (AMVP) candidate list for predicting sample values of the current block.
[0560] Figure 37 illustrates a workflow of a method 3700 for video decoding according to one or more aspects of the present disclosure.
[0561] At step 3710, the method 3700 comprises obtaining a candidate list comprising candidate block vectors including at least one block vector for at least one neighboring block of a current block, wherein the at least one neighboring block is encoded with Intra Block Copy (IBC) mode or Intra Template Matching Prediction (Intra TMP) mode.
[0562] At step 3720, the method 3700 comprises receiving an index indicating a selected block vector of the candidate block vectors.
[0563] At step 3730, the method 3700 comprises predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of a reference block associated with the selected block vector.
[0564] In one example, the method 3700 comprises changing precision of the at least one block vector before adding the at least one block vector into the candidate list.
[0565] In one example, changing precision of the at least one block vector before adding the at least one block vector into the candidate list comprises: changing fractional precision of the at least one block vector to a lower fractional precision; or changing the fractional precision of the at least one block vector to an integer precision.
[0566] In one example, the method 3700 further comprises receiving a flag indicating whether the precision of the at least one block vector is to be changed.
[0567] In one example, the precision of the at least one block vector is changed based on a distance between the at least one neighboring block and the current block.
[0568] In one example, the precision of the at least one block vector is changed from fraction to integer in response to the distance between the at least one neighboring block and the current block being larger than a distance threshold; and wherein the precision of the at least one block vector is unchanged in response to the distance between the at least one neighboring block and the current block being smaller than or equal to the distance threshold.
[0569] In one example, the method 3700 further comprises removing a candidate block vector from the candidate list in response to determining the candidate block vector is invalid or duplicated.
[0570] Figure 38 illustrates a workflow of a method 3800 for video encoding according to one or more aspects of the present disclosure.
[0571] At step 3810, the method 3800 comprises obtaining a candidate list comprising candidate block vectors including at least one block vector for at least one neighboring block of a current block, wherein the at least one neighboring block is encoded with Intra Block Copy (IBC) mode or Intra Template Matching Prediction (Intra TMP) mode.
[0572] At step 3820, the method 3800 comprises selecting a candidate block vector from the candidate list as a selected block vector.
[0573] At step 3830, the method 3800 comprises predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of a reference block associated with the selected block vector.
[0574] At step 3840, the method 3800 comprises generating a bitstream based on the predicted sample values of the current block.
[0575] In one example, the method 3800 comprises changing precision of the at least one block vector before adding the at least one block vector into the candidate list.
[0576] In one example, changing precision of the at least one block vector before adding the at least one block vector into the candidate list comprises: changing fractional precision of the at least one block vector to a lower fractional precision; or changing the fractional precision of the at least one block vector to an integer precision.
[0577] In one example, the method 3800 further comprises signaling a flag indicating whether the precision of the at least one block vector is to be changed.
[0578] In one example, the precision of the at least one block vector is changed based on a distance between the at least one neighboring block and the current block.
[0579] In one example, the precision of the at least one block vector is changed from fraction to integer in response to the distance between the at least one neighboring block and the current block being larger than a distance threshold; and wherein the precision of the at least one block vector is unchanged in response to the distance between the at least one neighboring block and the current block being smaller than or equal to the distance threshold.
[0580] In one example, the method 3800 further comprises removing a candidate block vector from the candidate list in response to determining the candidate block vector is invalid or duplicated.
[0581] Figure 39 shows a computing environment 3910 coupled with a user interface 3950. The computing environment 3910 can be part of a data processing server. The computing environment 3910 includes a processor 3920, a memory 3930, and an Input / Output (I / O) interface 3940.
[0582] The processor 3920 typically controls overall operations of the computing environment 3910, such as the operations associated with display, data acquisition, data communications, and image processing. The processor 3920 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 3920 may include one or more modules that facilitate the interaction between the processor 3920 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.
[0583] The memory 3930 is configured to store various types of data to support the operation of the computing environment 3910. The memory 3930 may include predetermined software 3932. Examples of such data includes instructions for any applications or methods operated on the computing environment 3910, video datasets, image data, etc. The memory 3930 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.
[0584] The I / O interface 3940 provides an interface between the processor 3920 and peripheral interface modules, such as a keyboard, a click wheel, buttons, and the like. The I / O interface 3940 can be coupled with an encoder and decoder.
[0585] In an embodiment, there is also provided a non-transitory computer-readable storage medium or a computer program product comprising a plurality of programs, for example, in the memory 3930, executable by the processor 3920, for performing the encoding or decoding method described above and / or storing a bitstream which is generated by the encoding method described above and / or is to be decoded by the decoding method described above. For example, the computer program product may include the non-transitory computer-readable storage medium. In one example, the plurality of programs may be executed by the processor 3920 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 3920 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 3920 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 3920 to transmit the bitstream or data stream (for example, to the video decoder 30 in Figure 3) or store the bitstream or data stream. Alternatively, the non-transitory computer-readable storage medium or the computer program product may have stored therein the bitstream or data stream.
[0586] In an embodiment, there is provided a bitstream (for example, comprising encoded video information) which is generated by the encoding method described above and / or is to be decoded by the decoding method described above.
[0587] In an embodiment, there is also provided a computing device comprising one or more processors (for example, the processor 3920) ; and the non-transitory computer-readable storage medium or the memory 3930 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. In an example, the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described encoding method to generate a bitstream, and the computing device may further comprise a transmitter, configured to transmit the bitstream. In an alternative example, the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described encoding method to generate a bitstream, and transmit or store the bitstream. In an example, the bitstream is to be decoded by the above-described decoding method.
[0588] In an embodiment, the computing environment 3910 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.
[0589] In an embodiment, there is also provided a method for storing a bitstream, comprising storing the bitstream on a non-transitory computer-readable storage medium, wherein the bitstream is generated by the encoding method described above and / or is to be decoded by the decoding method described above. In an embodiment, there is also provided a method for storing a bitstream or a method for encoding video data, comprising: performing the encoding method described above to generate a bitstream, and storing the bitstream on a non-transitory computer-readable storage medium. In an example, the bitstream is to be decoded by the decoding method described above.
[0590] In an embodiment, there is also provided a method for transmitting a bitstream which is generated by the encoding method described above and / or is to be decoded by the decoding method described above. In an embodiment, there is also provided a method for transmitting a bitstream or a method for encoding video data, comprising: performing the encoding method described above to generate a bitstream, and transmitting the bitstream to a decoder. In an example, the bitstream is to be decoded by the decoding method described above. In an embodiment, there is also provided a method for receiving a bitstream which is generated by the encoding method described above and / or is to be decoded by the decoding method described above.
[0591] 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.
[0592] 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.
[0593] 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 various implementations of the disclosure 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 guiding block vectors for a current block;determining an Auto-Relocated Block Vector Prediction (AR-BVP) based on the guiding block vectors;determining an auto-relocated reference block based on the AR-BVP, wherein the auto-relocated reference block is a reconstructed block in a same frame as the current block; andpredicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of the auto-relocated reference block.2.The method of claim 1, wherein determining the AV-BVP based on the guiding block vectors comprises:determining the AR-BVP based on guiding reference blocks in an AR-BVP trace path having respective guiding block vectors, wherein the guiding block vectors point to the guiding reference blocks respectively which are different reconstructed blocks in the same frame as the current block.3.The method of claim 2, wherein the AR-BVP is determined when a number of the guiding reference blocks reaches a predefined threshold.4.The method of claim 2, wherein determining the AR-BVP based on the guiding reference blocks in the AR-BVP trace path having respective guiding block vectors comprises:determining a first guiding block vector for a first guiding reference block based on candidate block vectors for coding units associated with the first guiding reference block, wherein the candidate block vectors are derived based on different positions in the first guiding reference block; anddetermining the AR-BVP based on the first guiding block vector.5.The method of claim 2, further comprising:determining that at least one of the guiding reference blocks is predicted with FIBC mode before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.6.The method of claim 5, wherein the sample values of the current block are predicted based on the FIBC mode with the same filter shape and filter coefficients as the FIBC mode used for predicting the at least one of the guiding reference blocks.7.The method of claim 2, further comprising:determining a template cost associated with an initial guiding reference block is more than a template cost associated with the auto-relocated reference block before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.8.The method of claim 1, further comprising:receiving a flag indicating whether the AR-BVP is to be determined.9.The method of claim 1, further comprising:inserting the AR-BVP into a candidate list, wherein the candidate list is an Intra Block Copy (IBC) merge candidate list or an IBC Advanced Motion Vector Prediction (AMVP) candidate list for predicting sample values of the current block.10.A method for video encoding, comprising:determining guiding block vectors for a current block;determining an Auto-Relocated Block Vector Prediction (AR-BVP) based on the guiding block vectors;determining an auto-relocated reference block based on the AR-BVP, wherein the auto-relocated reference block is a reconstructed block in a same frame as the current block;predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of the auto-relocated reference block; andgenerating a bitstream based on the predicted sample values of the current block.11.The method of claim 10, wherein determining the AV-BVP based on the guiding block vectors comprises:determining the AR-BVP based on guiding reference blocks in an AR-BVP trace path having respective guiding block vectors, wherein the guiding block vectors point to the guiding reference blocks respectively which are different reconstructed blocks in the same frame as the current block.12.The method of claim 11, wherein the AR-BVP is determined when a number of the guiding reference blocks reaches a predefined threshold.13.The method of claim 11, wherein determining the AR-BVP based on the guiding reference blocks in the AR-BVP trace path having respective guiding block vectors comprises:determining a first guiding block vector for a first guiding reference block based on candidate block vectors for coding units associated with the first guiding reference block, wherein the candidate block vectors are derived based on different positions in the first guiding reference block; anddetermining the AR-BVP based on the first guiding block vector.14.The method of claim 11, further comprising:determining that at least one of the guiding reference blocks is predicted with FIBC mode before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.15.The method of claim 14, wherein the sample values of the current block are predicted based on the FIBC mode with the same filter shape and filter coefficients as the FIBC mode used for predicting the at least one of the guiding reference blocks.16.The method of claim 11, further comprising:determining a template cost associated with an initial guiding reference block is more than a template cost associated with the auto-relocated reference block before predicting sample values of the current block with FIBC mode based on sample values of the auto-relocated reference block.17.The method of claim 10, further comprising:signaling a flag indicating whether the AR-BVP is to be determined.18.The method of claim 10, further comprising:inserting the AR-BVP into a candidate list, wherein the candidate list is an Intra Block Copy (IBC) merge candidate list or an IBC Advanced Motion Vector Prediction (AMVP) candidate list for predicting sample values of the current block.19.A method for video decoding, comprising:obtaining a candidate list comprising candidate block vectors including at least one block vector for at least one neighboring block of a current block, wherein the at least one neighboring block is encoded with Intra Block Copy (IBC) mode or Intra Template Matching Prediction (Intra TMP) mode;receiving an index indicating a selected block vector of the candidate block vectors; andpredicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of a reference block associated with the selected block vector.20.The method of claim 19, further comprising:changing precision of the at least one block vector before adding the at least one block vector into the candidate list.21.The method of claim 20, wherein changing precision of the at least one block vector before adding the at least one block vector into the candidate list comprises:changing fractional precision of the at least one block vector to a lower fractional precision; orchanging the fractional precision of the at least one block vector to an integer precision.22.The method of claim 20, further comprising:receiving a flag indicating whether the precision of the at least one block vector is to be changed.23.The method of claim 20, wherein the precision of the at least one block vector is changed based on a distance between the at least one neighboring block and the current block.24.The method of claim 23, wherein the precision of the at least one block vector is changed from fraction to integer in response to the distance between the at least one neighboring block and the current block being larger than a distance threshold; andwherein the precision of the at least one block vector is unchanged in response to the distance between the at least one neighboring block and the current block being smaller than or equal to the distance threshold.25.The method of claim 19, further comprising:removing a candidate block vector from the candidate list in response to determining the candidate block vector is invalid or duplicated.26.A method for video encoding, comprising:obtaining a candidate list comprising candidate block vectors including at least one block vector for at least one neighboring block of a current block, wherein the at least one neighboring block is encoded with Intra Block Copy (IBC) mode or Intra Template Matching Prediction (Intra TMP) mode;selecting a candidate block vector from the candidate list as a selected block vector;predicting sample values of the current block with filtered intra block copy (FIBC) mode based on sample values of a reference block associated with the selected block vector; andgenerating a bitstream based on the predicted sample values of the current block.27.The method of claim 26, further comprising:changing precision of the at least one block vector before adding the at least one block vector into the candidate list.28.The method of claim 27, wherein changing precision of the at least one block vector before adding the at least one block vector into the candidate list comprises:changing fractional precision of the at least one block vector to a lower fractional precision; orchanging the fractional precision of the at least one block vector to an integer precision.29.The method of claim 27, further comprising:signaling a flag indicating whether the precision of the at least one block vector is to be changed.30.The method of claim 27, wherein the precision of the at least one block vector is changed based on a distance between the at least one neighboring block and the current block.31.The method of claim 30, wherein the precision of the at least one block vector is changed from fraction to integer in response to the distance between the at least one neighboring block and the current block being larger than a distance threshold; andwherein the precision of the at least one block vector is unchanged in response to the distance between the at least one neighboring block and the current block being smaller than or equal to the distance threshold.32.The method of claim 26, further comprising:removing a candidate block vector from the candidate list in response to determining the candidate block vector is invalid or duplicated.33.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 method of any of claims 1-32.34.A computer readable storage medium storing a bitstream to be decoded by the decoding method according to any of claims 1-9 and 19-25.35.A computer readable storage medium storing a bitstream generated by the encoding method according to any of claims 10-18 and 26-32.36.A method for storing a bitstream, comprising:storing a bitstream to be decoded by the decoding method according to any of claims 1-9 and 19-25.37.A method for storing a bitstream, comprising:storing a bitstream generated by the encoding method according to any of claims 10-18 and 26-32.38.A method for transmitting a bitstream, comprising:transmitting a bitstream to be decoded by the decoding method according to any of claims 1-9 and 19-25.39.A method for transmitting a bitstream, comprising:transmitting a bitstream generated by the encoding method according to any of claims 10-18 and 26-32.
Citation Information
Patent Citations
Flexible tree structure
CN111869209A
Geometric partition mode with intra block copy
CN116671102A
Method, apparatus, and medium for video processing
WO2023046127A1
Methods and devices using intra block copy for video coding
WO2024044404A1