IBC Merging Mode With Block Vector Difference

Through the block vector difference prediction method, the initial interval size and direction are used to construct a BVD candidate list, which solves the problem of insufficient utilization of block vector difference information in intra prediction mode in the existing technology, and improves video coding efficiency and image block reconstruction accuracy.

CN118648282APending Publication Date: 2024-09-13TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480001064.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-01-10
Filing Date
2024-01-11
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Existing video coding and decoding technology is difficult to efficiently utilize block vector difference information when processing image blocks, resulting in low coding efficiency. Especially in intra prediction mode, there is a lack of effective block vector difference prediction methods.

Method used

The block vector difference (BVD) prediction method is used to construct a BVD candidate list by determining the initial interval size and direction, use template matching cost calculation to reconstruct the current block, and select the optimal BVD to improve coding efficiency.

Benefits of technology

The efficiency of video coding is improved. By effectively utilizing block vector difference information, coding errors are reduced and the reconstruction accuracy of image blocks is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118648282A_ABST
    Figure CN118648282A_ABST
Patent Text Reader

Abstract

Aspects of the present disclosure include methods and apparatus for video coding. The apparatus includes processing circuitry that receives an encoded video bitstream that includes encoded information for a current block of a current picture. The current block is predicted based on a reference block in the current picture, the reference block in the current picture is indicated by a block vector (BV), and the BV is to be determined based on a BV predictor (BVP) and a BV difference (BVD). The processing circuitry determines a BVD list based at least on the plurality of BVD offsets relative to the BVP, the BVD list comprising a plurality of BVD candidates; determining a BVD from a plurality of BVD candidates of the BVD list; and reconstructing the current block using the determined BVD. For each pair of adjacent BVD offsets, the initial interval size indicates a difference between the pair of adjacent BVD offsets. Each initial interval size is different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of priority to U.S. Patent Application No. 18 / 409,445, filed on January 10, 2024, entitled “IBC MERGE MODE WITH A BLOCKVECTOR DIFFERENCE” (which claims the benefit of priority to U.S. Provisional Application No. 63 / 438,490, filed on January 11, 2023, entitled “IBC Merge Mode with BV Difference”). The entire contents of the prior application are incorporated herein by reference in their entirety. Technical Field

[0003] The present invention describes embodiments generally related to video coding. Background Art

[0004] The background description provided herein is for the purpose of generally presenting the context of the present invention. The work of the presently designated inventors, the work described in this background section, and aspects of the description that may not qualify as prior art at the time of filing are neither explicitly nor implicitly admitted as prior art to the present invention.

[0005] Image / video compression helps to transmit image / video data between different devices, storages, and networks with minimal quality degradation. In some examples, video codec technology can compress video based on spatial and temporal redundancy. In one example, a video codec can use a technique called intra-frame prediction, which can compress images based on spatial redundancy. For example, intra-frame prediction can use reference data from the current image being reconstructed for sample prediction. In another example, a video codec can use a technique called inter-frame prediction, which can compress images based on temporal redundancy. For example, inter-frame prediction can predict samples in the current image based on a previously reconstructed image with motion compensation. Motion compensation can be represented by a motion vector (MV). Summary of the invention

[0006] Various aspects of the present invention include methods and devices for video encoding / decoding. In some examples, a device for video decoding includes a processing circuit. The processing circuit receives an encoded video bitstream, which includes encoded information of a current block of a current image. The current block is predicted based on a reference block in the current image, and the reference block in the current image is indicated by a block vector (BV), and the BV will be determined based on a BV predictor (BVP) and a BV difference (BVD). The processing circuit determines a BVD list based on at least a plurality of BVD offsets relative to the BVP, the BVD list including a plurality of BVD candidates; determines a BVD from a plurality of BVD candidates in the BVD list; and reconstructs the current block using the determined BVD. For each pair of adjacent BVD offsets, an initial interval size indicates the difference between the pair of adjacent BVD offsets. Each initial interval size is different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets.

[0007] In one example, the plurality of initial interval sizes are arranged in ascending order.

[0008] The initial interval size can be a power of 2.

[0009] In one example, the initial interval size includes K initial interval sizes, each initial interval is 2 i-1 , i is an integer ranging from 1 to K, and K is greater than 1.

[0010] In one example, a plurality of initial interval sizes are stored in a lookup table.

[0011] In one example, one of the plurality of initial interval sizes is not a power of two.

[0012] In one aspect, the processing circuit determines a plurality of initial BVD candidates based on (i) a plurality of BVD offsets and (ii) a plurality of BVD directions. Each initial BVD candidate has one of the plurality of BVD offsets and a corresponding BVD direction in the plurality of BVD directions. The processing circuit determines, for each of the plurality of initial BVD candidates, a template matching TM cost between a current template of a current block and a corresponding reference template of a candidate reference block associated with the initial BVD candidate, the candidate reference block being indicated by an initial BV candidate, the initial BV candidate being the sum of a BVP and the corresponding initial BVD candidate. The processing circuit determines a BVD list based on the plurality of TM costs.

[0013] In one example, the processing circuit selects K initial BVD candidates from the plurality of initial BVD candidates as the plurality of BVD candidates in the BVD list, the K initial BVD candidates corresponding to a plurality of lowest TM costs from the plurality of TM costs.

[0014] In an example, a processing circuit selects K initial BVD candidates from a plurality of initial BVD candidates. The K initial BVD candidates correspond to a plurality of lowest TM costs among a plurality of TM costs. For each of the K initial BVD candidates having a corresponding BVD offset and a BVD direction, when the BVD offset is a unique BVD offset that is greater than a first BVD offset among a plurality of BVD offsets and less than a second BVD offset among a plurality of BVD offsets, a first candidate and a second candidate associated with the corresponding initial BVD candidate among the K initial BVD candidates are determined. The first candidate and the second candidate have the same BVD direction as the initial BVD candidate. The BVD offset of the first candidate is an average of the BVD offset and the first BVD offset, and the BVD offset of the second candidate is an average of the BVD offset and the second BVD offset. The processing circuit determines a plurality of new TM costs associated with the first candidate and the second candidate, respectively. The processing circuit determines a BVD list based on a plurality of updated TM costs, the plurality of updated TM costs comprising: (i) a plurality of lowest TM costs among a plurality of TM costs corresponding to the K initial BVD candidates, and (ii) a plurality of new TM costs.

[0015] In one example, the processing circuit determines the BVP. The processing circuit determines the BV as the sum of the BVP and the determined BVD, and reconstructs the current block using the determined BV.

[0016] Aspects of the present invention also provide a non-transitory computer-readable storage medium storing instructions, which, when executed by a computer, cause the computer to perform any of the methods described for video decoding / encoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Further features, properties and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:

[0018] Figure 1 is a schematic diagram of an exemplary block diagram of a communication system (100).

[0019] Figure 2 is a schematic diagram of an exemplary block diagram of a decoder.

[0020] Figure 3 is a schematic diagram of an exemplary block diagram of an encoder.

[0021] Figure 4A An example of an Intra Block Copy (IBC) mode according to an example of the present invention is shown.

[0022] Figure 4BAn example of an intra template matching prediction (IntraTMP) mode according to an aspect of the present invention is shown.

[0023] Figure 5A An example of a template matching process according to an aspect of the present invention is shown.

[0024] Figure 5B A template in a reference image and a reference sample of the template according to one aspect of the present invention are shown.

[0025] Figure 6 A current template of a current block in a current image and a reference template in a reference image corresponding to the current template are shown according to an embodiment of the present invention.

[0026] Figure 7 An example of refinement locations along a k×π / 8 diagonal angle is shown according to one aspect of the present invention.

[0027] Figure 8 An exemplary process of deriving an IBC merge mode with a block vector difference (MBVD) list according to one aspect of the present invention is shown.

[0028] Fig. 9 An example of a constant offset for every Mth position in MBVD list construction using TM according to an aspect of the present invention is shown.

[0029] Fig.10 An example of an offset set according to an aspect of the present invention is shown.

[0030] Fig.11 An example of an offset set according to an aspect of the present invention is shown.

[0031] Fig.12 An example of an offset set according to an aspect of the present invention is shown.

[0032] Fig.13 Examples of multiple BVD offsets according to embodiments of the present invention are shown.

[0033] Fig.14 A flow chart outlining a decoding process according to some embodiments of the present invention is shown.

[0034] Fig.15 A flow chart outlining an encoding process according to some embodiments of the present invention is shown.

[0035] Fig.16is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION

[0036] Figure 1 A block diagram of a video processing system (100) in some examples is shown. As an example of an application of the disclosed subject matter, the video processing system (100) is a video encoder and a video decoder in a streaming environment. The disclosed subject matter is equally applicable to other video-enabled applications including, for example, video conferencing, digital TV, streaming services, storing compressed video on digital media including CDs, DVDs, memory sticks, etc., and the like.

[0037] The video processing system (100) includes an acquisition subsystem (113), which may include a video source (101) such as a digital camera, which creates an uncompressed video image stream (102). In an example, the video image stream (102) includes samples captured by the digital camera. The video image stream (102) is depicted with thick lines to emphasize the high amount of data compared to the encoded video data (104) (or the encoded video bitstream), and the video image stream (102) can be processed by an electronic device (120), which includes a video encoder (103) coupled to the video source (101). The video encoder (103) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video image stream (102), the encoded video data (104) (or the encoded video bitstream) is depicted with thin lines to emphasize the lower amount of data, and the encoded video data can be stored on a streaming server (105) for future use. One or more streaming client subsystems, such as Figure 1 A client subsystem (106) and a client subsystem (108) in a streaming server (105) may access a copy (107) and a copy (109) of the encoded video data (104). The client subsystem (106) may include, for example, a video decoder (110) in an electronic device (130). The video decoder (110) decodes the incoming copy (107) of the encoded video data and creates an output video image stream (111) that can be presented on a display (112) (e.g., a display screen) or another presentation device (not depicted). In some streaming systems, the encoded video data (104), the video data (107), and the video data (109) (e.g., a video bitstream) may be encoded according to certain video encoding / compression standards. Examples of these standards include ITU-T Recommendation H.265. In the example, the video coding standard under development is informally referred to as Versatile Video Coding (VVC). The disclosed subject matter may be used in the context of the VVC standard.

[0038] It should be noted that the electronic device (120) and the electronic device (130) may include other components (not shown). For example, the electronic device (120) may include a video decoder (not shown), and the electronic device (130) may also include a video encoder (not shown).

[0039] Figure 2 An exemplary block diagram of a video decoder (210) is shown. The video decoder (210) may be disposed in an electronic device (230). The electronic device (230) may include a receiver (231) (e.g., a receiving circuit). The video decoder (210) may be used to replace Figure 1 A video decoder (110) is shown in an example.

[0040] The receiver (231) may receive one or more encoded video sequences (e.g., contained in a bitstream) to be decoded by the video decoder (210). In one embodiment, the encoded video sequences are received one at a time, wherein the decoding of each encoded video sequence is independent of the decoding of the other encoded video sequences. The encoded video sequences may be received from a channel (201), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (231) may receive the encoded video data as well as other data, such as encoded audio data and / or auxiliary data streams that may be forwarded to their respective consuming entities (not shown). The receiver (231) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (215) may be coupled between the receiver (231) and the entropy decoder / parser (220) (hereinafter referred to as "parser (220)"). In some applications, the buffer memory (215) is part of the video decoder (210). In other cases, the buffer memory (215) may be provided outside the video decoder (210) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (210) to, for example, prevent network jitter, and another buffer memory (215) may be configured inside the video decoder (210) to, for example, handle playback timing. When the receiver (231) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, the buffer memory (215) may not be required, or the buffer memory may be made smaller. Of course, in order to maximize use on a traffic packet network such as the Internet, a buffer memory (215) may be required, which may be relatively large and advantageously have an adaptive size, and may be at least partially implemented on an operating system or in a similar element (not shown) outside the video decoder (210).

[0041] The video decoder (210) may include a parser (220) to reconstruct symbols (221) from the encoded video sequence. The categories of these symbols include information for managing the operation of the video decoder (210) and potential information for controlling a presentation device such as a presentation device (212) (e.g., a display screen) that is not part of the electronic device (230) but can be coupled to the electronic device (230), such as Figure 2 . The control information for the rendering device may be in the form of a parameter set fragment (not shown) of Supplemental Enhancement Information (SEI message) or Video Usability Information (VUI). The parser (220) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be performed according to a video coding technique or standard and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, and the like. The parser (220) may extract a subgroup parameter set for at least one subgroup of pixels in a video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include a Group of Pictures (GOP), a picture, a tile, a slice, a macroblock, a Coding Unit (CU), a block, a Transform Unit (TU), a Prediction Unit (PU), and the like. The parser (220) may also extract information such as transform coefficients, quantization parameter values, motion vectors, and the like from the coded video sequence.

[0042] The parser (220) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (215), thereby creating symbols (221).

[0043] Depending on the type of coded video picture or part of coded video picture (e.g., inter-frame and intra-frame pictures, inter-frame blocks and intra-frame blocks) and other factors, the reconstruction of the symbol (221) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by the parser (220) from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (220) and the multiple units below is not described.

[0044] In addition to the functional blocks already mentioned, the video decoder (210) can be conceptually subdivided into several functional units as described below. In a practical implementation operating under commercial constraints, many of these units interact closely with each other and may be at least partially integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.

[0045] The first unit is a sealer / inverse transform unit (251). The sealer / inverse transform unit (251) receives quantized transform coefficients as symbols (221) and control information from the parser (220), including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (251) can output a block including sample values, which can be input into the aggregator (255).

[0046] In some cases, the output samples of the scaler / inverse transform unit (251) may belong to an intra-coded block. The intra-coded block is a block that does not use predictive information from a previously reconstructed image, but instead uses predictive information from a previously reconstructed portion of a current image. Such predictive information may be provided by an intra-image prediction unit (252). In some cases, the intra-image prediction unit (252) uses surrounding reconstructed information extracted from a current image buffer (258) to generate a block of the same size and shape as the block being reconstructed. For example, the current image buffer (258) buffers a partially reconstructed current image and / or a fully reconstructed current image. In some cases, the aggregator (255) adds the prediction information generated by the intra-frame prediction unit (252) to the output sample information provided by the scaler / inverse transform unit (251) on a per-sample basis.

[0047] In other cases, the output samples of the scaler / inverse transform unit (251) may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (253) may access the reference image memory (257) to extract samples for prediction. After the extracted samples are motion compensated according to the symbol (221) belonging to the block, these samples may be added to the output of the scaler / inverse transform unit (251) (in this case referred to as residual samples or residual signal) by the aggregator (255) to generate output sample information. The retrieval of the prediction samples by the motion compensated prediction unit (253) from the address in the reference image memory (257) may be controlled by a motion vector, and the motion vector is provided to the motion compensated prediction unit (253) in the form of the symbol (221), which symbol (221) includes, for example, X, Y and reference image components. Motion compensation may also include: interpolation of sample values ​​extracted from the reference image memory (257) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, etc.

[0048] The output samples of the aggregator (255) may be used by various loop filtering techniques in a loop filter unit (256). The video compression techniques may include in-loop filter techniques controlled by parameters included in the encoded video sequence (also referred to as the encoded video bitstream) and available to the loop filter unit (256) as symbols (221) from the parser (220). The video compression may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of an encoded image or encoded video sequence, and to previously reconstructed and loop filtered sample values.

[0049] The output of the loop filter unit (256) may be a sample stream that may be output to a rendering device (212) and stored in a reference picture memory (257) for subsequent inter-picture prediction.

[0050] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified (e.g., by the parser (220)) as a reference picture, the current picture buffer (258) may become part of the reference picture memory (257), and a new current picture buffer may be reallocated before starting reconstruction of a subsequent coded picture.

[0051] The video decoder (210) may perform decoding operations according to a predetermined video compression technology or standard, such as ITU-T Rec H.265. The encoded video sequence may conform to the syntax specified by the video compression technology or standard used in the sense that the encoded video sequence follows the syntax of the video compression technology or standard and the profile recorded in the video compression technology or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technology or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence may also be required to be within the range defined by the hierarchy of the video compression technology or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.

[0052] In an embodiment, the receiver (231) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence. The additional data may be used by the video decoder (210) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant images, forward error correction codes, etc.

[0053] Figure 3 is an exemplary block diagram showing a video encoder (303). The video encoder (303) is provided in an electronic device (320). The electronic device (320) includes a transmitter (340) (eg, a transmission circuit). The video encoder (303) may be used to replace Figure 1 A video encoder (103) in an example.

[0054] The video encoder (303) can be used to obtain the video source (301) (not Figure 3 In another example, the video source (301) is a part of the electronic device (320) to receive video samples, and the video source can collect video images to be encoded by the video encoder (303). In another example, the video source (301) is a part of the electronic device (320).

[0055] The video source (301) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (303), which may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., Y CrCb 4:2:0, YCrCb 4:4:4). In a media service system, the video source (301) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (301) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate images that are given motion when viewed sequentially. The images themselves may be constructed as a spatial array of pixels, where each pixel may include one or more samples, depending on the sampling structure, color space, etc. used. The following description focuses on the samples.

[0056] According to an embodiment, the video encoder (303) may encode and compress the images of the source video sequence into an encoded video sequence (343) in real time or under any other time constraints as required. Implementing the appropriate encoding speed is a function of the controller (350). In some embodiments, the controller (350) controls other functional units as described below and is functionally coupled to these units. For the sake of simplicity, the coupling is not shown in the figure. The parameters set by the controller may include rate control related parameters (image skipping, quantizer, lambda value of rate distortion optimization technology, etc.), image size, image group (Group of Pictures, GOP) layout, maximum motion vector search range, etc. The controller (350) may be configured to have other suitable functions that are related to the video encoder (303) optimized for a certain system design.

[0057] In some embodiments, the video encoder (303) is configured to operate in an encoding loop. As a simple description, in an example, the encoding loop may include a source encoder (330) (e.g., responsible for creating symbols, such as a symbol stream, based on an input image to be encoded and a reference image) and a (local) decoder (333) embedded in the video encoder (303). The decoder (333) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder creates sample data. The reconstructed sample stream (sample data) is input to a reference image memory (334). Since the decoding of the symbol stream results in a bit-accurate result that is independent of the decoder location (local or remote), the contents of the reference image memory (334) are also bit-accurately corresponding between the local encoder and the remote encoder. In other words, the reference image samples "seen" by the prediction part of the encoder are exactly the same as the sample values ​​that the decoder will "see" when using the prediction during decoding. This basic principle of reference image synchronization (and the drift that occurs when synchronization cannot be maintained, such as due to channel errors) is also used in some related technologies.

[0058] The operation of the "local" decoder (333) may be combined with, for example, Figure 2 The "remote" decoder described in detail for the video decoder (210) is identical. However, additional brief reference is made to Figure 2 , when symbols are available and the entropy encoder (345) and parser (220) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (210), including the buffer memory (215) and the parser (220), may not be fully implemented in the local decoder (333).

[0059] In an embodiment, any decoder techniques other than parsing / entropy decoding present in a decoder are also present in the corresponding encoder in the same or substantially the same functional form. For this reason, the disclosed subject matter focuses on decoder operation. The description of encoder techniques can be simplified because encoder techniques are mutually inverse to the decoder techniques described comprehensively. A more detailed description is only required in certain areas and is provided below.

[0060] During operation, in some examples, the source encoder (330) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input image with reference to one or more previously encoded images from a video sequence designated as "reference images." In this manner, the encoding engine (332) encodes the difference between a pixel block of the input image and a pixel block of a reference image that may be selected as a prediction reference for the input image.

[0061] The local video decoder (333) may decode the encoded video data of a picture that may be designated as a reference picture based on the symbols created by the source encoder (330). The operation of the encoding engine (332) may advantageously be a lossy process. When the encoded video data is available at the video decoder ( Figure 3 When the video sequence is decoded at a remote video decoder (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (333) replicates the decoding process that may be performed by the video decoder on the reference picture and may cause the reconstructed reference picture to be stored in the reference picture memory (334). In this way, the video encoder (303) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture to be obtained by the remote video decoder.

[0062] The predictor (335) may perform a prediction search for the encoding engine (332). That is, for a new image to be encoded, the predictor (335) may search the reference image memory (334) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference image motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new image. The predictor (335) may operate on a pixel block-by-pixel block basis to find a suitable prediction reference. In some cases, based on the search results obtained by the predictor (335), it may be determined that the input image may have prediction references taken from a plurality of reference images stored in the reference image memory (334).

[0063] The controller (350) may manage encoding operations of the source encoder (330), including, for example, setting parameters and subgroup parameters for encoding video data.

[0064] The outputs of all the above functional units may be entropy encoded in an entropy encoder (345). The entropy encoder (345) converts the symbols generated by the various functional units into a coded video sequence by applying lossless compression to the symbols according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc.

[0065] The transmitter (340) may buffer the encoded video sequence created by the entropy encoder (345) in preparation for transmission over a communication channel (360), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (340) may combine the encoded video data from the video encoder (303) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).

[0066] The controller (350) may manage the operation of the video encoder (303). During encoding, the controller (350) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to each picture. For example, a picture may generally be assigned any of the following picture types:

[0067] An Intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of Intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures.

[0068] A predictive picture (P picture) may be a picture that may be encoded and decoded using intra prediction or inter prediction that uses a motion vector and a reference index to predict sample values ​​for each block.

[0069] Bi-directional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses two motion vectors and reference indices to predict the sample values ​​of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstruction of a single block.

[0070] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8 or 16×16 samples) and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined according to the coding allocation of the respective pictures applied to the blocks. For example, a block of an I picture may be non-predictively coded, or the block may be predictively coded (spatial prediction or intra prediction) with reference to already coded blocks of the same picture. A block of pixels of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. A block of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.

[0071] The video encoder (303) may perform encoding operations according to a predetermined video encoding technique or standard such as ITU-T Rec. H.265. In operation, the video encoder (303) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.

[0072] In an embodiment, the transmitter (340) may transmit additional data when transmitting the encoded video. The source encoder (330) may include such data as part of the encoded video sequence. The additional data may include time / spatial / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.

[0073] The captured video may be taken as a plurality of source images (video images) in a temporal sequence. Intra-image prediction (often simplified to intra-frame prediction) exploits spatial correlations in a given image, while inter-image prediction exploits (temporal or other) correlations between images. In an example, a particular image being encoded / decoded is divided into blocks, and the particular image being encoded / decoded is referred to as the current image. When a block in the current image is similar to a reference block in a reference image that was previously encoded in the video and is still buffered, the block in the current image may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference image, and in the case where multiple reference images are used, the motion vector may have a third dimension that identifies the reference image.

[0074] In some embodiments, bidirectional prediction techniques may be used in inter-frame image prediction. According to the bidirectional prediction technique, two reference images are used, such as a first reference image and a second reference image that are both before the current image in the video in decoding order (but may be in the past and future respectively in display order). A block in the current image may be encoded by a first motion vector pointing to a first reference block in the first reference image and a second motion vector pointing to a second reference block in the second reference image. The block may be predicted by a combination of the first reference block and the second reference block.

[0075] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.

[0076] According to some embodiments of the present invention, predictions such as inter-image prediction and intra-image prediction are performed in units of blocks. For example, according to the HEVC standard, an image in a video image sequence is divided into coding tree units (Coding Tree Unit, CTU) for compression, and the CTUs in the image have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. Typically, a CTU includes three coding tree blocks (Coding Tree Block, CTB), which are a luminance CTB and two chrominance CTBs. Each CTU can also be split into one or more coding units (Coding Unit, CU) in a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In the example, each CU is analyzed to determine the prediction type for the CU, such as an inter-frame prediction type or an intra-frame prediction type. Depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PredictionUnit, PU). Typically, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, the prediction operation in the codec (encoding / decoding) is performed in units of prediction blocks. Taking the luma prediction block as an example, the prediction block includes a matrix of pixel values ​​(e.g., luma values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, and the like.

[0077] It should be noted that the video encoder (103) and the video encoder (303), and the video decoder (110) and the video decoder (210) may be implemented using any suitable technology. In an embodiment, the video encoder (103) and the video encoder (303), and the video decoder (110) and the video decoder (210) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (103) and the video encoder (303), and the video decoder (110) and the video decoder (210) may be implemented using one or more processors that execute software instructions.

[0078] End (END) template file

[0079] An example of an intra block copy mode (also referred to as IBC mode or intra BC mode) such as used in HEVC and VVC is described below.

[0080] Figure 4A An example of an IBC mode according to an example of the present invention is shown. A reference block for predicting a current CU (401) may be indicated by a block vector (BV) associated with the current CU (401). Each block (400) may represent a CTU. The gray shaded area represents an encoded area or an encoded area, and the white non-shaded area represents an area to be encoded or an area to be encoded. The current CTU (400 (4)) being reconstructed includes a current CU (401), an encoded area (402), and an area to be encoded (403). In one example, after encoding the current CU (401), the area (403) will be encoded.

[0081] In an example such as in HEVC, the gray shaded area except the two CTUs (400(1) to 400(2)) to the upper right of the current CTU (400(4)) can be used as a reference area in the IBC mode to enable wavefront parallel processing (WPP). The BV allowed in HEVC can point to a block within the reference area (e.g., the gray shaded area excluding the two CTUs (400(1) to 400(2))). For example, the BV (405) allowed in HEVC can point to a reference block (411).

[0082] In an example such as VVC, in addition to the current CTU (400(4)), only the left adjacent CTU (400(3)) to the left of the current CTU (400(4)) is allowed as a reference area in the IBC mode. In one example, the reference area used in the IBC mode of VVC is located within the dotted area (415) and includes coded samples. For example, the BV (406) allowed in VVC can point to the reference block (412).

[0083] In one aspect, IBC is a tool adopted in the HEVC extension on screen content coding (Screen Content Coding, SCC). IBC can significantly improve the coding efficiency of screen content materials. Since the IBC mode can be implemented as a block-level coding mode, block matching (Block Matching, BM) can be performed at the encoder to find the best block vector (or motion vector) for each CU. Here, the block vector (Block Vector, BV) can be used to indicate the displacement from the current block to the reference block, where the reference block has been reconstructed within the current image. The luminance block vector of the IBC-encoded CU can have integer precision. The chrominance block vector can also be rounded to integer precision. When combined with adaptive motion vector resolution AMVR, the IBC mode can switch between 1 pixel motion vector precision and 4 pixel motion vector precision. The IBC-encoded CU can be regarded as a third prediction mode in addition to the intra prediction mode or the inter prediction mode. The IBC mode can be used as a third prediction mode, which is different from the intra prediction mode or the inter prediction mode. The IBC mode can be applied to CUs with width and height less than or equal to 64 luminance samples.

[0084] On the encoder side, hash-based motion estimation can be performed for IBC mode. The encoder can perform rate-distortion RD checks on blocks with a width or height no greater than 16 luma samples. For non-merge mode, a block vector search can be performed first using a hash-based search. If the hash search does not return a valid candidate, a local search based on block matching can be performed.

[0085] In a hash-based search, the hash key match (32-bit CRC) between the current block and the reference block can be extended to the allowed block sizes (e.g., all allowed block sizes). The hash key calculation for each position in the current image can be based on sub-blocks (e.g., 4×4 sub-blocks). For a larger current block, when the hash key of the sub-block (e.g., all hash keys of all 4×4 sub-blocks) matches the hash key of the corresponding reference position, it can be determined that the hash key will match the hash key of the reference block. If the hash keys of multiple reference blocks are found to match the hash key of the current block, the block vector cost of each matching reference block can be calculated, and the matching reference block with the smallest cost can be selected.

[0086] In the block matching search, in one example, the search range is set to cover the previous CTU and the current CTU.

[0087] At the CU level, a flag is used to signal the IBC mode, and the IBC mode can be signaled as IBC Advanced Motion Vector Prediction AMVP mode or IBC Skip / Merge mode as shown below:

[0088] - IBC skip / merge mode: The merge candidate index is used to indicate which block vector from a list of neighboring candidate IBC coded blocks (eg, a merge list) is used to predict the current block. The merge list may include spatial, HMVP, and pairwise candidates.

[0089] -IBC AMVP mode: Block vector differences are encoded in the same way as motion vector differences. The block vector prediction method uses two candidates as predictors, one from the left neighbor and one from the top neighbor (if IBC coded, for example if both the left and top neighbor are IBC coded). When the left or top neighbor is not available, the default block vector is used as the predictor. A flag is signaled to indicate the block vector predictor index.

[0090] exist Figure 4B An example of Intra Template Matching Prediction (IntraTMP) according to an aspect of the present invention is shown in FIG. In one aspect, for example in Enhanced Compression Model (ECM) software, IntraTMP can copy the best prediction block (e.g., matching block 421) from a reconstructed portion of a current frame (or current image), where a template (e.g., an L-shaped template) (420) of the best prediction block can be matched with a current template (430) of a current block (431) (e.g., a current PU or a current CU). For a predefined search range, the encoder can search for a template that is most similar to the current template in the reconstructed portion of the current frame, and can use the corresponding block as a prediction block. The encoder can signal the use of the IntraTMP mode, and can perform the same prediction operation on the decoder side.

[0091] The prediction signal may be generated by matching a current template (430) (eg, an L-shaped causal neighbor) of the current block (431) with a template of another block in a predefined search area. Figure 4B The exemplary search area shown in FIG. 1 may include multiple CTUs (or super blocks). Figure 4B, the search area may include the current CTU R1 (eg, a portion of the current CTU R1), the top left CTU R2, the upper side CTU R3, and the left side CTU R4. The cost function may include any suitable cost function, such as Sum of Absolute Difference (SAD).

[0092] Within each region, the decoder may search for a template with a minimum cost (eg, minimum SAD) relative to the current template, and may use the block associated with the template with the minimum cost as the prediction block.

[0093] The dimensions of the area indicated by (search_range_w, search_range_h) can be set proportional to the block dimensions (e.g., BlkW, BlkH) to have a fixed number of SAD comparisons per pixel.

[0094] Search range_w=a×BlkW Equation (1)

[0095] Search range_h = a × BlkH Equation (2)

[0096] The parameter "a" can be a constant that controls the trade-off between benefit and complexity. In one example, "a" is 5.

[0097] In one example, to speed up the template matching process, the search range (e.g., the search range of all search areas) is subsampled by a factor of 2, which reduces the template matching search by a factor of 4. After finding the best match (or initial best match), a refinement process can be performed. Refinement is accomplished by a second template matching search around the best match (or initial best match) with a reduced range. The reduced range is defined as a minimum of (BlkW, BlkH) / 2.

[0098] The intra template matching tool can be enabled for CUs with width and height less than or equal to 64. The maximum CU size (e.g., 64) for intra template matching is configurable.

[0099] In the present invention, the term "IBC" may refer to Figure 4A The IBC model or variant described in Figure 4B The IntraTMP mode or a variant described in .

[0100] In the example, in order to further improve the compression efficiency of certain video coding techniques used in the VVC standard, tools beyond the capabilities of VVC can be used. Template Matching (TM) can refine motion on the decoder side. In TM mode, motion can be refined by building a template based on the left-adjacent and top-adjacent reconstructed samples and finding the closest match between the template in the current image and the reference frame.

[0101] exist Figure 5A An example of a template matching process according to an aspect of the present invention is shown in FIG. Figure 5A In the embodiment, the current template (521) of the current block (501) in the current image (510) may have any suitable shape and any suitable size. In an embodiment, the current template (521) of the current block (501) includes a top template (522) and a left template (523). Each of the top template (522) and the left template (523) may have any suitable shape and any suitable size. The top template (522) may include samples in one or more top adjacent blocks of the current block (501). In the example, the top template (522) includes N1 (e.g., 1 or 4) rows of samples in one or more top adjacent blocks of the current block (501). The left template (523) may include samples in one or more left adjacent blocks of the current block (501). In the example, the left template (523) includes N2 (e.g., 1 or 4) columns of samples in one or more left adjacent blocks of the current block (501).

[0102] In an embodiment, an initial MV such as MV (502) points from the current block (501) to a reference block (503) in the reference image (511). The shape and size of the reference template may match the shape and size of the current template (521), respectively. Figure 5A In the example, the reference template (525) of the reference block (503) in the reference image (511) may have the same shape and size as the current template (521) in the current image (510). For example, the reference template (525) of the reference block (503) includes a top template (526) in the reference image (511) and a left template (527) in the reference image (511). The top template (526) may include samples in one or more top neighboring blocks of the reference block (503). The left template (527) may include samples in one or more left neighboring blocks of the reference block (503).

[0103] refer to Figure 5A, within a search range (e.g., [-8, +8]-pixel search range) (540), a better MV is searched around an initial motion vector (e.g., MV (502)) of a current CU (e.g., current block (501)). For example, a TM cost corresponding to an MV candidate (e.g., a difference between the MV candidate and MV (502) is within the search range (540)) is determined based on a corresponding template pair. For example, a pair of templates includes a current template (521) and a reference template associated with the MV candidate. When the MV candidate is MV (502), the reference template is a reference template (525). In the example, the TM cost corresponding to the MV candidate is determined based on the sum of absolute differences (SAD) between the current template (521) and the reference template. Other functions such as the sum of squared errors (SSE), variance, partial SAD, etc. can also be used to determine the TM cost. The TM cost can indicate a match between the current template (521) and the reference template. In the example, a final MV is determined based on the TM cost. For example, the final MV is determined as the MV candidate corresponding to the lowest TM cost.

[0104] In one example, template matching is modified as follows: the search step size is determined by the AMVR mode, and the TM can be cascaded with the bilateral matching process.

[0105] An example of candidate merging using Adaptive Reordering of Merge Candidateswith Template Matching (ARMC-TM) is described below. The merge candidates can be adaptively reordered by Template Matching (TM). The reordering method can be applied to the regular merge mode, TM merge mode, and affine merge mode (excluding SbTMVP candidates). In the example, for the TM merge mode, the merge candidates are reordered before the refinement process.

[0106] In one example, an initial merge candidate list is first constructed according to a given inspection order, such as: spatial merge candidate, TMVP, non-adjacent merge candidate, HMVP, paired merge candidate, virtual merge candidate. Then, the candidates in the initial list (e.g., the initial merge candidate list) are divided into subgroups (e.g., multiple subgroups). In one example, for TM merge mode (adaptive DMVR mode), each merge candidate in the initial list is first refined by using TM / multi-channel DMVR (e.g., TM and / or multi-channel DMVR). The merge candidates in each subgroup can be reordered to generate a reordered merge candidate list, and the reordering can be performed based on a cost value (e.g., TM cost) based on template matching. The index of the merge candidate selected in the reordered merge candidate list is signaled to the decoder. In one example, for simplicity, the merge candidates in the last subgroup but not the first subgroup will not be reordered. In one example, during the construction of the merge motion vector candidate list, all zero candidates from the ARMC reordering process will be excluded. For the conventional merge mode and the TM merge mode, the size of the subgroup can be set to 5. For affine merge mode, the subgroup size can be set to 3.

[0107] The template matching cost (TM cost) of the merge candidate in the reordering process can be measured by the SAD between the samples of the template (e.g., the current template) of the current block and the corresponding reference samples. The template (e.g., the current template) may include a set of reconstructed samples adjacent to the current block. The reference sample of the template is located by the motion information of the merge candidate.

[0108] Figure 5B 1 shows a template in a reference image and a reference sample of the template according to one aspect of the present invention. When the merge candidate utilizes bidirectional prediction, such as Figure 5B As shown in FIG. 1 , reference samples of the template of the merge candidate can be generated by bidirectional prediction. For example, when the merge candidate includes two MVs pointing to reference templates in two reference images, the merge candidate can be generated as follows: Figure 5B Determine the TM cost as shown. Figure 5B, the merge candidate in the merge candidate list includes two MVs, for example, MV (504) pointing to the reference block (507) in the reference image (512) and MV (506) pointing to the reference block (508) in the reference image (513). The reference template (531) is associated with the reference block (507) in the reference image (512). The reference template (532) is associated with the reference block (508) in the reference image (513). The reference templates (531) to (532) may have the same shape and size as the current template (521). The TM cost may be determined based on the current template (521) and the reference templates (531) to (532). In one example, a prediction value template of the merge candidate is determined based on the reference templates (531) to (532), for example, the prediction value template is an average value (e.g., a weighted average value) of the reference templates (531) to (532). The TM cost may be determined based on the current template (521) and the prediction value template.

[0109] For a sub-block based merge candidate (the size of the sub-block is equal to Wsub×Hsub), the upper template contains multiple sub-templates of size Wsub×M1 (e.g., Wsub×1), and the left template contains multiple sub-templates of size M2×Hsub (e.g., 1×Hsub). M1 and M2 are positive integers. Figure 6 As shown, the reference samples of each sub-template are derived using the motion information of the sub-blocks in the first row (eg, A to D) and the sub-blocks in the first column (eg, A, E, F, and G) of the current block (601).

[0110] When the merge candidate is a sub-block based merge candidate, it can be as follows Figure 6 The reference template is determined as shown. Figure 6 A current template (602) of a current block (601) in a current image (611) and a reference template (603) in a reference image (612) according to an embodiment of the present invention are shown, and the reference template (603) corresponds to the current template (602). The current block (601) has sub-block-based motion information, and the reference template (603) can be determined based on the motion information, which is indicated by arrows associated with the respective sub-blocks A to G of the current block (601). The size of each sub-block of sub-blocks A to G is Wsub×Hsub. In an example, the current template (602) includes an upper template (605) and a left template (606). The upper template (605) may include a sub-template (e.g., Wsub×1) of size Wsub×M1 (e.g., Wsub×1). Figure 6 The left template (606) may include a sub-template (e.g., M2×Hsub) of size M2×Hsub (e.g., 1×Hsub). Figure 6The motion information indicated by the arrows associated with the sub-blocks A to G in the first row and first column of the current block (601) can be used to derive the sub-templates (or reference sub-block templates) (631 to 638) in the reference template (603).

[0111] The motion information of each sub-block A to G in the current block (601) (indicated by arrows associated with A to G) may point to the reference sub-blocks AA to GG in the reference image (612). The reference template (603) may include a plurality of reference sub-block templates (631) to (638) associated with the reference sub-blocks AA to GG. For example, the reference sub-block templates (631) to (634) are located on the upper side of the reference sub-blocks AA to DD, and the reference sub-block templates (635) to (638) are located on the left side of the reference sub-blocks AA and EE to GG. The reference template (603) may include an upper reference template (622) and a left reference template (623). The upper reference template (622) may include reference sub-block templates (631) to (634). The left reference template (623) may include reference sub-block templates (635) to (638). For a sub-block based merge candidate with a sub-block size equal to Wsub×Hsub, the upper template (e.g., the upper reference template (622)) may include a plurality of sub-templates of size Wsub×M1, and the left template (e.g., the left reference template (623)) may include a plurality of sub-templates of size M2×Hsub. In one example, M1 is 1. In one example, M2 is 1.

[0112] The samples in the reference template (603) may also be referred to as reference samples of the current template (602). In one example, the samples in the reference template (603) have been reconstructed.

[0113] In one example, the reference sub-blocks AA to GG may be determined as follows: A collocated block (613) in a reference image (612) may be determined based on the current block (601). Figure 6 As shown, collocated sub-blocks A' to G' in the collocated block (613) may respectively correspond to sub-blocks A to G. Reference sub-blocks AA to GG may be determined based on the collated sub-blocks A' to G' and motion information of each sub-block A to G in the current block (601) (indicated by arrows associated with A' to G').

[0114] During the reordering process, if the cost difference between a candidate and its previous candidate is less than a λ value (e.g., λ), such as |D1-D2|<λ, then the candidate can be considered redundant, where D1 and D2 are the costs obtained during the first ARMC sorting, and λ is the Lagrangian parameter used in the RD criterion on the encoder side. In one example, the algorithm is defined as follows:

[0115] - Among all candidates in the list, determine the minimum cost difference between a candidate and its previous candidate.

[0116] o If the minimum cost difference is greater than or equal to λ (eg, minimum cost difference ≥ λ), then the list is considered diverse (eg, sufficiently diverse) and re-ranking will stop.

[0117] o If the minimum cost difference is less than λ (eg, minimum cost difference < λ), the candidate is considered redundant and the candidate is moved to another position in the list. The other position is the first position where the candidate is sufficiently diverse compared to the candidate before it.

[0118] - The algorithm stops after a finite number of iterations (if the minimum cost difference is not less than λ, ie, minimum cost difference ≥ λ).

[0119] The algorithm can be applied to the normal mode, TM mode, BM mode and affine merge mode. A similar algorithm can be applied to the merged MMVD and symbolic MVD prediction methods, which also use ARMC for reordering.

[0120] The value of λ in the above algorithm can be set to the λ of the rate-distortion criterion for selecting the best merging candidate at the encoder side for low-delay configuration; and the value of λ can be set to the value λ corresponding to another QP for random access configuration. A set of λ values ​​corresponding to the QP offset for each signal representation can be provided in a sequence parameter set (SPS), or, for a QP offset not present in the SPS, a set of λ values ​​corresponding to the QP offset for each signal representation can be provided in a slice header.

[0121] The ARMC design is also applicable to the AMVP mode, where the AMVP candidates are reordered according to the TM cost (e.g., the TM cost associated with the corresponding AMVP candidate). For Template Matching for Advanced Motion Vector Prediction (TM-AMVP) mode, an initial AMVP candidate list is constructed and then refined from the TM to construct a refined AMVP candidate list. In addition, MVP candidates with a TM cost greater than a threshold value, which is equal to five times the cost of the first MVP candidate, can be skipped.

[0122] In one example, when surround motion compensation is enabled, surround offsets are considered to truncate MV candidates.

[0123] The TM-based reordering for the MMVD mode and the affine MMVD mode is described as follows. For the MMVD mode and the affine MMVD mode, the MMVD offset can be extended. Figure 7 An example of additional refinement locations along the k×π / 8 diagonal angles according to one aspect of the present invention is shown. Figure 7 In the example shown, a direction can point from position (701) to another position indicated by a circle, for example, directions (721) to (724) point from position (701) to positions (711) to (714), respectively. In one example, the number of directions increases from 4 directions (721) to (724) to 16 directions indicated by circles. In one example, directions (721) to (724) correspond to angles of 0, π / 2, π, and 3π / 2, and the 16 directions correspond to angles of 0 to 15π / 8, with an increment of π / 8 between adjacent directions.

[0124] In addition, possible MMVD refinement positions (e.g., 16×6 MMVD refinement positions) of each base candidate (e.g., all possible MMVD refinement positions (16×6) of each base candidate) may be reordered based on the SAD cost between the template (e.g., the current template including a row above and a column to the left of the current block) and the reference of the template at each refinement position. The reference of the template may be referred to as a reference template. In one example, the 16×6 MMVD refinement positions include Figure 7 16 combinations of MMVD directions and 6 MMVD magnitudes (also called MMVD offsets) are shown. Each MMVD refinement position indicates a corresponding MMVD candidate.

[0125] In addition, the top 1 / 8 refinement bit with the minimum template SAD cost

[0126] MVD index encoding. The MMVD index may be binarized by rice encoding with parameter equal to 2. The MMVD index may indicate which MMVD or MMVD refinement position in the top 1 / 8 refinement positions is selected.

[0127] The affine MMVD reordering can be extended, where additional refinement positions can be added along the k×π / 4 diagonal angles. After reordering, the top 1 / 2 refinement positions with the smallest template SAD cost can be retained. Figure 7 , in the affine MMVD reordering, the 4 directions (721) to (724) can be expanded to the 8 directions indicated by the circles (711) to (718). In one example, the 8 directions indicated by the circles (711) to (718) correspond to angles from 0 to 7π / 4, with an increment of π / 4 between adjacent directions. For example, the angle between directions (721) and (725) is 2π / 8.

[0128] Before being reordered, the first L motion candidates in the candidate list are used as the basic candidates for MMVD mode and affine MMVD mode. In one example, for MMVD mode, L is equal to 3, and depending on the neighbor block affine flag of the affine MMVD mode, L is one of [1, 3]. Two ways of adding MMVD offsets can be allowed, including "double-sided" and "single-sided", depending on whether the offset of the other reference image list is mirrored or directly set to zero. Which way is applied to a block will depend on the TM cost.

[0129] In such Figure 4A Or in the IBC mode shown in 4B, BV may indicate a reference block of a current block to be encoded. The reference block and the current block may be in the current image. BV may be encoded using any suitable method. In one aspect, BV may be encoded using a BV predictor (BV Predictor, BVP) and a BV difference (BV Difference, BVD). In one example, BV is the sum (vector sum) of BVP and BVD. BVD may be encoded using any suitable method. In one example, BVD is determined (e.g., selected) from a BVD candidate list. In one example, the BVD candidates in the BVD candidate list are predefined. In one example, a BVD candidate is determined based on an initial BVD candidate, such as in an IBC merge mode (referred to as IBC-MBVD mode) with a block vector difference (Mode with Block Vector Difference, MBVD) described below.

[0130] In the example of IBC-MBVD mode, BVD may be referred to as MBVD, and BVD candidate may be referred to as MBVD candidate. MBVD or MBVD candidate may be a vector indicated by MBVD magnitude or MBVD magnitude (also referred to as offset or MBVD offset) and direction (also referred to as MBVD direction). BV candidate may be the sum (e.g., vector sum) of BVP and MBVD candidate.

[0131] BVs may be encoded using BVPs and MBVDs. MBVDs may be determined (e.g., selected) from MBVD candidates in an MBVD list or MBVD candidate list (e.g., an IBC-MBVD list or an IBC-MBVD candidate list). The IBC-MBVD list may be determined using any suitable method. In one example, based on an offset set (also referred to as a distance set) and a direction set (e.g., Figure 7 Multiple directions as shown) determine the IBC-MBVD list.

[0132] The term "template matching" or "TM" may refer to the TM described above, for example in Figure 5A , Figure 5B , Figure 6 and Figure 7 or variations thereof.

[0133] The IBC-MBVD list can be derived from the sample positions along the MBVD direction. Figure 8 , MBVD direction includes Figure 7 The sample positions include positions indicated by "x". Each position indicated by "x" may indicate a BVD candidate (eg, an MBVD candidate). Figure 8 , the MBVD candidate (812) associated with position 40 (40-pixels or 40 samples) along direction (721) has a magnitude of 40-pixels and a direction along direction (721). The MBVD candidate (812) may indicate that the BV candidate (813) is offset from the BVP (811) by 40-pixels along direction (721). For example, the BV candidate (813) is the vector sum of the BVP (811) and the MBVD candidate (812). Figure 8 , BVP (811) is indicated by position (801), for example, BVP (811) points to position (801).

[0134] The MBVD candidate search may begin by checking the template cost (also referred to as TM cost, e.g., template SAD cost) of an offset (e.g., including an offset of 40-pixels) added to the BVP (811) in each direction at intervals of M-pixels. M may be a positive integer, e.g., 8. The search process is repeated around the K candidates with the lowest TM cost at half intervals (e.g., M / 2). K is a positive integer, e.g., 8. When the interval reaches 1-pixel, an MBVD list (or IBC-MBVD list) may be derived, and the final list (e.g., the final IBC-MBVD list) includes the K candidates with the lowest TM cost.

[0135] Adaptive BVD offset along the MBVD direction can be tolerated. In one example, an MBVD list (or IBC-MBVD list) of K candidates (eg, K MBVD candidates) with the lowest TM cost (eg, template SAD cost) is derived by the following steps: Figure 8 shown.

[0136] Step 1: Express the maximum offset as N-pixels, for example, N=128, and the number of directions is N D , for example N D =4 (for example, Figures 7 to 8The left direction, right direction, upper direction, and lower direction indicated by (721), (723), (722), and (724) in the figure, the starting search interval is M-pixels, for example, M=8, and the number of candidates in the MBVD list is K, for example, K=8.

[0137] Step 2: In each direction, Figure 8 As shown, the TM cost (e.g., TM SAD cost calculated using SAD) is checked for offsets relative to every Mth position not exceeding N. The K lowest TM cost (TM SAD cost) candidates are retained in a list. Figure 8 , 8 candidates (e.g., 8 MBVD candidates marked with circles) associated with positions (or offsets) 32, 40, and 48 along direction (721), positions -8 and -48 along direction (722), position -56 along direction (723), and positions 8 and 16 along direction (724) have the lowest TM costs among the MBVD candidates.

[0138] Step 3: For each candidate in the list, check the TM cost (e.g., TM SAD cost) of two candidates whose offsets along the direction are equal to + / -M / 2 (+M / 2 and -M / 2). For example, M / 2 is 4, and the offsets are +4 and -4. The two candidates include a first candidate corresponding to +4 and a second candidate corresponding to -4. For the candidate at position 32 along the direction (721), the first candidate corresponds to an offset of +4, so the first candidate corresponds to position (32+4) or 36 along the direction (721), and the second candidate corresponds to an offset of -4, so the second candidate corresponds to position (32-4) or 28 along the direction (721). Figure 8 ). Keep the K minimum TM SAD cost candidates in the list. Figure 8 In step 3, 8 candidates indicated by circles (updated 8 candidates) are retained in the list. The 8 candidates include MBVD candidates corresponding to positions 28, 32, 36 along direction (721), positions -4, -8, -12 along direction (722), and positions 4 and 8 along direction (724).

[0139] Step 4: Repeat step 3 while halving the previous interval until the interval reaches 1-pixel.

[0140] In one example, M is 8 and K is 8. Figure 8In step 1, the MBVD candidates associated with the positions along each of the MBVD directions (721) to (724) indicated by "x" (also referred to as initial MBVD candidates, because the MBVD candidates in step 1 are obtained before the MBVD candidates are updated) have amplitudes along each of the MBVD directions (721) to (724): 8-pixels, 16-pixels, 24-pixels, 32-pixels, 40-pixels, 48-pixels, 56-pixels, 64-pixels, ..., N-pixels. N may be a positive integer, such as 128, 256, etc. N may be predefined. In some examples, N is less than 128, such as 16, 32, 64, etc. The first offset set (also referred to as the first distance set) may include {8 pixels, 16 pixels, 24 pixels, 32 pixels, 40 pixels, 48 ​​pixels, 56 pixels, 64 pixels, ..., N pixels}. Each offset in the first distance set may be an MBVD amplitude of the initial MBVD candidate. The initial MBVD candidate can have any suitable orientation. In one example, the initial MBVD candidate has Figure 8 A direction is one of the directions (721) to (724) shown.

[0141] In one aspect, the offset set {O1, O2, O3, ..., O J1} (e.g., a first distance set) and a direction set {{D1, D2, D3, ..., D J2}(e.g., direction (721) to (724), Figure 7 Multiple directions in the direction shown in the figure) to obtain initial MBVD candidates. Each initial MBVD candidate may have an offset from the offset set {O1, O2, O3, ..., O J1} and from the direction set {D1, D2, D3, …, D J2 In one example, the number of initial MBVD candidates is J1×J2.

[0142] In step 2, the TM cost of the corresponding initial MBVD candidate is determined. The TM cost of the initial MBVD candidate can be determined based on the current template of the current block and the reference template. In one example, the candidate reference block is indicated by a BV candidate (e.g., the sum of BVP (811) and the initial MBVD candidate). The reference template may include neighboring samples of the candidate reference block, such as a row above the candidate reference block and a column to the left of the candidate reference block. K (e.g., 8) MBVD candidates associated with the lowest TM cost are retained in a list. Reference Figure 8, 8 MBVD candidates are indicated by circles (e.g., 8 MBVD candidates at positions 32, 40, and 48 along direction (721), positions -8 and -48 along direction (722), position -56 along direction (723), and positions 8 and 16 along direction (724)).

[0143] In step 3, a search for updated MBVD candidates (e.g., a refined search for updated MBVD candidates) is performed around the MBVD candidates in the list (e.g., the MBVD candidates obtained in step 2). In one example, the interval (or search interval) is reduced by half, thus becoming 4. As described above, for each MBVD candidate in the list (e.g., the list obtained in step 2), the TM costs of two candidates offset by + / -M / 2 (+4 and -4) along the corresponding MBVD candidate direction are obtained. Figure 8 In step 3 of , the TM costs obtained from steps 2 and 3 correspond to positions marked with "x" and circles, which include positions 28, 32, 36, 40, 44, 48, and 52 along direction (721), positions -4, -8, -12, -44, -48, and -52 along direction (722), positions -52, -56, and -60 along direction (723), and positions 4, 8, 12, 16, and 20 along direction (724). In one example, updated MBVD candidates (e.g., 8 updated MBVD candidates) are determined based on the TM costs obtained from steps 2 and 3. Reference Figure 8 , the 8 updated MBVD candidates correspond to positions 28, 32, and 36 along direction (721), positions -4, -8, and -12 along direction (722), and positions 4 and 8 along direction (724).

[0144] In one example, step 3 is repeated at interval 2 and then at interval 1, respectively. In one example, 8 final MBVD candidates are selected based on the TM cost. In one example, an index (e.g., MBVD index) is signaled to indicate which of the 8 final MBVD candidates is selected to be used with the BVP to determine the MBVD of the BV.

[0145] In one example, the number of MBVD candidates and MBVD index signaling is the same as ECM-7.0.

[0146] In such Figure 8In some examples of the examples described in step 1 above, the MBVD offsets of the respective initial MBVD candidates are equally spaced at every Mth position (e.g., every 8th position) along the corresponding MBVD direction. The interval may indicate the difference between a pair of adjacent offsets in the offset set. For example, the interval refers to the number of samples or pixels (pel) between two adjacent offsets, such as the interval between 40 and 48 samples offset along the direction (721) is 8 samples. In the present invention, the terms "interval" and "interval size" may be used interchangeably. Figure 8 The first distance set uses the interval between a pair of adjacent offsets.

[0147] In one example, the interval is M-pixels (eg, 8-pixels), as Fig. 9 shown. Fig. 9 An example of a constant offset for each Mth position in the MBVD list construction using TM is shown. Fig. 9 , the set of offsets relative to position (901) includes {M, 2M, 3M, 4M, 5M, ...} corresponding to offsets (902) to (906), etc. The interval size between two adjacent offsets is M. The parameter M can be predefined and thus a constant. Therefore, the offsets (902) to (906) can be considered constant. The offsets (902) to (906) relative to position (901) are equidistant at every Mth position along the MBVD direction (911). In Fig. 9 In FIG. 1 , BVP (921) is indicated by position (901), for example, BVP (921) points to position (901). BV candidate (913) may be the vector sum of BVP (921) and MBVD candidate (e.g., (912)). MBVD candidate (912) has a magnitude (e.g., M) of offset (902) along direction (911). MBVD direction (911) may represent Figure 7 Any direction shown.

[0148] The term "MBVD" may refer to an MBVD as described above, e.g. Figures 8 to 9 or MBVD in a variant. In one example, the term "MBVD" is referred to as IBC-MBVD.

[0149] As above Figures 8 to 9The interval or interval size between two adjacent offsets is a constant (e.g., 8) indicated by M. If M is 8, the offset set can be a first distance set. In one example, the first interval between the first pair of adjacent offsets in the offset set is different, and the second interval between the second pair of adjacent offsets in the offset set is the same. In one example, the second distance set includes {1-pixel, 2-pixel, 4-pixel, 8-pixel, 12-pixel, 16-pixel, 24-pixel, 32-pixel, 40-pixel, 48-pixel, 56-pixel, 64-pixel, 72-pixel, 80-pixel, 88-pixel, 96-pixel, 104-pixel, 112-pixel, 120-pixel, 128-pixel}. The first interval between a pair of adjacent offsets in {1-pixel, 2-pixel, 4-pixel} includes 1-pixel and 2-pixel, and is therefore different. The second interval between a pair of adjacent offsets in {16-pixel, 24-pixel, 32-pixel} includes 8-pixel and 8-pixel, and is therefore the same.

[0150] In various examples, the difference between BVP and BV is relatively small, and thus BVD is relatively small (e.g., close to zero). Therefore, the probability of a BVD having a larger offset may be less than the probability of a BVD having a smaller offset. Therefore, in some examples, such as in ECM, the MBVD list reconstruction described above uses, for example, Figure 8 and Fig. 9 For the multiple initial MBVD candidates shown, the MBVD list reconstruction described above may not be the best choice for obtaining applicable candidates in the MBVD list. For example, in the first distance set and the second distance set, the interval between a pair of adjacent offsets may be the same (for example, multiple intervals are all 8-pixels), and thus may not be the best choice for obtaining applicable candidates in the MBVD list.

[0151] According to one aspect of the present invention, the offset set {O1, O2, O3, ..., O J1 The interval (or interval size) between a pair of adjacent offsets in {I1, I2, ..., I J1} can be different. Interval I i It can be O i to i-1 For example, I2 = O2 - O1. In one example, the offset set {O1, O2, O3, ..., O J1} The offset relative to the position (or reference position) is 0. Interval I1 can be the interval between offset O1 and 0, for example, I1=O1. J1 is a positive integer. In one example, J1 is predefined. The offsets in the offset set (e.g., BVD offsets or MBVD offsets) can be arranged in order (e.g., ascending or descending order). Each interval size is different from other interval sizes corresponding to other pairs of adjacent offsets in the offset set. The offset set {O1, O2, O3, ..., O J1} and a set of MBVD directions to obtain a plurality of initial MBVD candidates. In one example, a BVD (e.g., an MBVD) is determined from the initial MBVD candidates. In one aspect, the TM process may be used to update the initial MBVD candidates and determine a plurality of final MBVD candidates in an MBVD list (e.g., an IBC-MBVD list). A BVD or an MBVD may be selected from the final MBVD candidates. In one example, the TM process may be performed iteratively, such as Figure 8 shown.

[0152] Fig.10 An offset set (eg, a BVD offset set or an MBVD offset set) {O1, O2, O3, ..., O J1}. Fig.10 In the middle, offset O1, O2, O3, ..., O J1 The set is relative to the position (1001) (for example, the offset of the position (1001) is 0) along the direction (1011). The MBVD candidate (1012) is determined based on the offset O4 and the direction (1011), wherein the MBVD candidate (1012) has a magnitude of the offset O4 and a direction of the direction (1011). The BVP (1021) can be indicated by the position (1001), for example, the BVP (1021) points to the position (1001). The BV candidate (1013) can be the vector sum of the BVP (1021) and the MBVD candidate (1012). The MBVD direction (1011) can represent any suitable direction, for example Figure 7 One of the directions shown.

[0153] Interval size or interval I i Multiple BVD offsets {O1, O2, O3, ..., O J1} a pair of adjacent BVD offsets (e.g., O i-1 and O i ) The parameter i can be 1, 2, ... or J1. Interval I i It can be O i to i-1For example, I2=O2-O1. I1 is the difference between O1 and the position (1001) as a reference position (eg, offset 0). I1 may be the interval between the offset O1 and 0, for example, I1=O1. Fig.10 Shows the interval size or interval {I1, I2, ..., I J1 Each interval size may be different from other interval sizes corresponding to other pairs of adjacent BVD offsets in the offset set, for example, i Different from I1, I2, ..., I i-1 ,I i+1 ,…,I J1 For example, I1 is different from I2 to I J1 .

[0154] Multiple interval sizes or intervals {I1, I2, ..., I J1} may also be referred to as multiple initial interval sizes or initial intervals, for example because the multiple initial interval sizes indicate the number of initial BVD candidates to be determined (e.g., in Figure 8 In one aspect, the multiple intervals or initial intervals {I1, I2, ..., I J1} is the starting point for constructing a BVD list, for example, using template matching to construct a BVD list.

[0155] A BVD list (e.g., an MBVD list or an IBC-MBVD list) may be determined (e.g., constructed) based at least on a plurality of BVD offsets relative to a BVP, the BVD list including a plurality of BVD candidates (e.g., a plurality of MBVD candidates). A BVD may be determined from the plurality of BVD candidates in the BVD list, and a current block may be reconstructed using the determined BVD. According to one aspect of the present invention, for each pair of adjacent BVD offsets, an initial interval size indicates a difference between the pair of adjacent BVD offsets, each initial interval size being different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets. Different initial interval sizes may be used to construct an MBVD list with or without template matching.

[0156] A non-constant initial interval size (also called non-constant interval size) can be used for each interval as a starting point for MBVD list construction using template matching. Figure 8 The search steps described in the above may be applied to non-constant size intervals (or non-constant interval sizes). The non-constant interval size may indicate the interval size {I1, I2, ..., I2} between corresponding pairs of adjacent offsets of a plurality of offsets (or a plurality of BVD offsets, a plurality of MBVD offsets). J1} can be different, such as Fig.10 shown.

[0157] In one example, the multiple interval sizes (or initial interval sizes) are arranged in ascending order. The initial interval size may be a power of 2. In one example, the initial interval size includes J1 initial interval sizes. Each initial interval size (eg, I i ) is 2 i-1 . i can be an integer ranging from 1 to J1. J1 is greater than 1.

[0158] In one aspect, the initial interval size is a power of 2. For example, the multiple initial interval sizes used in each direction are 1, 2, 4, 8, 16, 32, and 64. For example, the multiple interval sizes I1, I2, I3, I4, I5, I6, and I7 are 1, 2, 4, 8, 16, 32, and 64, respectively. Fig.10 and Fig.11 , the multiple interval sizes I1, I2, I3, I4 and I5 are 1, 2, 4, 8 and 16 respectively. Fig.11 The position (1001) and direction (1011) in Fig.10 Described in.

[0159] In the present invention, high-level syntax may refer to any one of the following syntaxes: Video Parameter Set (VPS), SPS, Picture Parameter Set (PPS), Adaptation Parameter Set (APS), slice header, picture header, tile header, CTU header, etc. In one example, high-level syntax refers to syntax higher than block level or CU level.

[0160] In one aspect, the plurality of initial interval sizes are stored in a lookup table. In one example, one of the plurality of initial interval sizes is not a power of two.

[0161] In one aspect, the initial interval size for each interval is derived by using a lookup table. Each initial interval size is stored in an associated element of the lookup table and can be searched in the lookup table by using an interval index. In one example, the interval index is the MBVD index described above. The table (e.g., the lookup table) can be a predefined table or can be signaled in a high-level syntax, such as the syntax in the VPS, SPS, PPS, APS, etc. described in the present invention.

[0162] Fig.12An example of multiple initial interval sizes stored in a lookup table (1201) according to one aspect of the present invention is shown. Multiple initial intervals I2, I3, I4, I5, and I6, etc. are intervals between pairs of adjacent offsets of offsets O1 to O6, etc. The initial interval I1 is O1. Fig.12 The position (1001) and direction (1011) in Fig.10 Described in . Reference Fig.12 , the initial intervals I1, I2, I3, I4, I5, and I6 are 1, 2, 4, 8, 16, and 17, respectively. One of the initial interval sizes, I6, is not a power of 2, for example, I6=17. The initial intervals I1, I2, I3, I4, I5, I6, etc. may be stored in a lookup table (1201). The initial interval size may be searched in the lookup table (1201) by using an interval index (1202).

[0163] In one aspect, the BVD list may be determined as follows. A plurality of initial BVD candidates may be determined based on (i) a plurality of BVD offsets and (ii) a plurality of BVD directions. The plurality of BVD offsets may include an offset set {O1, O2, O3, ..., O J1},For example Figures 10 to 12 The multiple BVD directions may include any suitable directions, such as Figure 7 In one example, the multiple BVD directions include directions (721) to (724). The multiple BVD directions may include any appropriate number of directions, such as 4 directions, 8 directions, etc. Each initial BVD candidate may have one of the multiple BVD offsets and a corresponding BVD direction in the multiple BVD directions, such as Figure 8 and Fig.13 as described in step 1.

[0164] Fig.13 shows a plurality of BVD offsets {O1, O2, O3, ..., O J1} example. The multiple BVD offsets may include O1, O2, O3, O4, etc. The multiple BVD offsets O1, O2, O3, O4, etc. may be relative to the position (1001), such as Fig.10 The position (1001) may indicate Fig.10 The BVP (1021) described above. Multiple initial intervals I2, I3, I4, etc. may be between adjacent offsets of multiple BVD offsets (e.g., O1, O2, O3, O4, etc.). The initial interval I1 may be O1. The multiple initial intervals I1, I2, I3, I4, etc. may be different. In one example, each of the multiple initial intervals I1, I2, I3, I4, etc. is different from the other initial intervals. Fig.13In the example of , the multiple BVD directions include directions (721) to (724). Multiple initial BVD candidates (indicated by "x") are obtained based on the multiple BVD offsets and the multiple BVD directions. For example, the initial BVD candidate (1301) has a magnitude of offset O4 and a direction of direction (721).

[0165] For each of the multiple initial BVD candidates, a TM cost associated with the initial BVD candidate can be determined. The TM cost can be between the current template of the current block and the corresponding reference template of the candidate reference block. In one example, the initial BV candidate is determined based on the sum of BVP (1021) and the corresponding initial BVD candidate (e.g., the initial BV candidate (such as (1313)) is the sum of BVP (1021) and the corresponding initial BVD candidate (such as (1301))), and the candidate reference block is indicated by the initial BV candidate (e.g., the initial BV candidate points from the current block to the candidate reference block). The BVD list can be determined based on multiple TM costs. In one example, based on Figure 8 The TM cost described in steps 2 to 4 in iteratively determines the BVD list.

[0166] In one example, K (e.g., 8 or any suitable positive number) initial BVD candidates (e.g., indicated by circles) are selected from the multiple initial BVD candidates as the multiple BVD candidates in the BVD list. The K initial BVD candidates correspond to multiple lowest TM costs among the multiple TM costs, for example, Figure 8 as described in step 2.

[0167] In one example, K initial BVD candidates (e.g., indicated by circles) are selected from a plurality of initial BVD candidates, wherein the K initial BVD candidates correspond to a plurality of lowest TM costs among a plurality of TM costs. For each initial BVD candidate among the K initial BVD candidates (e.g., initial BVD candidate (1302)) having a corresponding BVD offset and BVD direction, if the BVD offset (e.g., offset O3) is a unique BVD offset that is greater than a first BVD offset (e.g., offset O2) among the plurality of BVD offsets and less than a second BVD offset (e.g., offset O4) among the plurality of BVD offsets, a first candidate (e.g., (1303)) and a second candidate (e.g., (1304)) associated with the corresponding initial BVD candidate among the K initial BVD candidates (e.g., initial BVD candidate (1302) having offset O3) are determined. The first candidate and the second candidate may have the same BVD direction (e.g., direction (721)) as the initial BVD candidate (e.g., initial BVD candidate (1302)), the BVD offset of the first candidate may be an average of the BVD offset (e.g., offset O3) and the first BVD offset (e.g., offset O2), and the BVD offset of the second candidate may be an average of the BVD offset (e.g., offset O3) and the second BVD offset (e.g., offset O4). A plurality of new TM costs associated with the first candidate and the second candidate corresponding to each of the K initial BVD candidates may be determined, respectively. A BVD list may be determined based on a plurality of updated TM costs, the updated TM costs including: (i) a plurality of minimum TM costs corresponding to the K initial BVD candidates among the plurality of TM costs, and (ii) a plurality of new TM costs. The plurality of updated BVD candidates in the BVD list may include K candidates among the K initial BVD candidates (corresponding to the plurality of minimum new TM costs) and / or candidates among the first candidate and the second candidate.

[0168] Fig.14 A flow chart outlining a method (1400) according to an embodiment of the present invention is shown. The method (1400) may be used in a video decoder. In various embodiments, the method (1400) is performed by a processing circuit, such as a processing circuit that performs the functions of a video decoder (110), a processing circuit that performs the functions of a video decoder (210), etc. In some embodiments, the method (1400) may be implemented in software instructions, so that when the processing circuit executes the software instructions, the processing circuit may perform the method (1400). The method starts at (S1401) and proceeds to step (S1410).

[0169] At (S1410), a coded video bitstream is received, the coded video bitstream including coded information of a current block of a current image. The current block can be predicted based on a reference block in the current image, the reference block in the current image is indicated by a block vector (BV). The BV will be determined based on a BV predictor (BV Predictor, BVP) and a BV difference (BVDifference, BVD), and the BVD is the difference between the BV and the BVP. In one example, the current block is predicted using an IBC mode. In one example, the current block is predicted using an IntraTMP mode.

[0170] At (S1420), a BVD list may be determined based at least on a plurality of BVD offsets relative to the BVP, the BVD list including a plurality of BVD candidates, e.g. Fig.13 Described in .

[0171] In one aspect, for each pair of adjacent BVD offsets, the initial interval size indicates a difference between the pair of adjacent BVD offsets, each initial interval size being different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets. Figures 10 to 12 Several examples of BVD offsets are described.

[0172] In one example, the plurality of initial interval sizes are arranged in ascending order.

[0173] In one example, the initial interval size is a power of 2, such as Fig.11 In one example, the initial interval size includes J1 initial interval sizes, each of which is 2 i-1 , i is an integer ranging from 1 to J1, and J1 is greater than 1.

[0174] In one example, multiple initial interval sizes are stored in a lookup table, such as Fig.12 shown.

[0175] In one example, one of the multiple initial interval sizes is not a power of 2, such as Fig.12 shown.

[0176] In one example, multiple initial BVD candidates are determined based on (i) multiple BVD offsets and (ii) multiple BVD directions. Each initial BVD candidate may have one of the multiple BVD offsets and a corresponding BVD direction of the multiple BVD directions, such as Fig.13As shown. For each of the multiple initial BVD candidates, a TM cost between a current template of a current block and a corresponding reference template of a candidate reference block associated with the initial BVD candidate may be determined. A candidate reference block may be indicated by an initial BV candidate, which is the sum of a BVP and a corresponding initial BVD candidate. A BVD list may be determined based on multiple TM costs.

[0177] In one example, K initial BVD candidates are selected from the plurality of initial BVD candidates as the plurality of BVD candidates in the BVD list. The K initial BVD candidates correspond to a plurality of lowest TM costs among the plurality of TM costs.

[0178] In one example, K initial BVD candidates are selected from a plurality of initial BVD candidates. The K initial BVD candidates correspond to a plurality of lowest TM costs among a plurality of TM costs. For each initial BVD candidate among the K initial BVD candidates having a corresponding BVD offset and a BVD direction, when the BVD offset is a unique BVD offset that is greater than a first BVD offset among the plurality of BVD offsets and less than a second BVD offset among the plurality of BVD offsets, a first candidate and a second candidate associated with the corresponding initial BVD candidate among the K initial BVD candidates may be determined, for example, Fig.13 as described in . The first candidate and the second candidate have the same BVD direction as the initial BVD candidate. The BVD offset of the first candidate is an average of the BVD offset and the first BVD offset, and the BVD offset of the second candidate is an average of the BVD offset and the second BVD offset. A new TM cost associated with the first candidate and a new TM cost associated with the second candidate may be determined, respectively. A BVD list may be determined based on an updated TM cost, the updated TM cost comprising: (i) a plurality of lowest TM costs among a plurality of TM costs corresponding to the K initial BVD candidates, and (ii) a new TM cost.

[0179] At (S1430), a BVD may be determined from among a plurality of BVD candidates in the BVD list.

[0180] At (S1440), the current block may be reconstructed using the determined BVD.

[0181] In one example, a BVP is determined. The BV is determined to be the sum of the BVP and the determined BVD. The current block may be reconstructed using the determined BV.

[0182] Then, the method proceeds to (S1499) and terminates.

[0183] The method (1400) may be adapted as appropriate. Steps in the method (1400) may be modified and / or omitted. One or more additional steps may be added. Any suitable order may be used for implementation.

[0184] Fig.15 A flow chart outlining a method (1500) according to an embodiment of the present invention is shown. The method (1500) may be used in a video encoder. In various embodiments, the method (1500) is performed by a processing circuit, such as a processing circuit that performs the functions of a video encoder (103), a processing circuit that performs the functions of a video encoder (303), etc. In some embodiments, the method (1500) may be implemented in software instructions, so that when the processing circuit executes the software instructions, the processing circuit may perform the method (1500). The method starts at (S1501) and proceeds to step (S1510).

[0185] At (S1510), a block vector (BV) difference (BV Difference, BVD) list may be determined based at least on a plurality of BVD offsets from a BV prediction value (BV Predictor, BVP) of a current block in a current image, the BVD list including a plurality of BVD candidates, such as Fig.14 The current block may be encoded based on a reference block in the current image, the reference block in the current image being indicated by a BV determined based on the BVP and the BVD. The current block may be encoded using an IBC mode or an IntraTMP mode.

[0186] For each pair of adjacent BVD offsets, the initial interval size indicates the difference between the pair of adjacent BVD offsets. Each initial interval size may be different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets, such as in Figures 10 to 12 Described in .

[0187] At (S1520), a BVD may be determined from among a plurality of BVD candidates in the BVD list.

[0188] At (S1530), the current block may be encoded using the determined BVD.

[0189] The method then proceeds to (S1599) and terminates.

[0190] The method (1500) may be adapted as appropriate. Steps in the method (1500) may be modified and / or omitted. One or more additional steps may be added. Any suitable order may be used for implementation.

[0191] The above techniques may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. For example, Fig.16 A computer system (1600) suitable for implementing certain embodiments of the disclosed subject matter is shown.

[0192] Computer software may be encoded using any suitable machine code or computer language, which may be subjected to assembly, compilation, linking or similar mechanisms to create code comprising instructions that may be executed directly by one or more computer central processing units (CPU), graphics processing units (GPU), etc., or through decoding, microcode, etc.

[0193] The instructions may be executed on various types of computers or components thereof, such as computers or components thereof including personal computers, tablet computers, servers, smart phones, gaming devices, Internet of Things devices, etc.

[0194] Fig.16 The components of the computer system (1600) shown are exemplary in nature and are not intended to suggest any limitation on the scope of use or functionality of computer software implementing embodiments of the invention. Neither should the configuration of components be interpreted as having any dependency or requirement relating to any one or combination of components shown in the exemplary embodiment of the computer system (1600).

[0195] The computer system (1600) may include certain human-machine interface input devices. Such human-machine interface input devices may be responsive to input from one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), olfactory input (not depicted). Human-machine interface devices may also be used to acquire certain media that are not necessarily directly related to human conscious input, such as audio (e.g., voice, music, ambient sounds), images (e.g., scanned images, photographic images acquired from a still image camera), and videos (e.g., two-dimensional video, three-dimensional video including stereoscopic video).

[0196] The input human-machine interface device may include one or more of the following (only one of each is shown): keyboard (1601), mouse (1602), touchpad (1603), touch screen (1610), data gloves (not shown), joystick (1605), microphone (1606), scanner (1607), camera (1608).

[0197] The computer system (1600) may also include certain human-machine interface output devices. Such human-machine interface output devices may stimulate one or more human user senses, for example, through tactile output, sound, light, and smell / taste. Such human-machine interface output devices may include tactile output devices (e.g., tactile feedback of a touch screen (1610), a data glove (not shown), or a joystick (1605), but may also be a tactile feedback device that is not an input device), audio output devices (e.g., speakers (1609), headphones (not depicted)), visual output devices (e.g., screens (1610) including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities, some of which are capable of outputting two-dimensional visual outputs or outputs in more than three dimensions through devices such as stereoscopic image output, virtual reality glasses (not depicted), holographic displays and smoke boxes (not depicted), and printers (not depicted).

[0198] The computer system (1600) may also include human-accessible storage devices and their associated media: for example, optical media including CD / DVD ROM / RW (1620) with CD / DVD etc. media (1621), thumb drives (1622), removable hard drives or solid-state drives (1623), traditional magnetic media such as tapes and floppy disks (not depicted), dedicated ROM / ASIC / PLD based devices such as security dongles (not depicted), etc.

[0199] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the presently disclosed subject matter does not encompass transmission media, carrier waves, or other transitory signals.

[0200] The computer system (1600) may also include an interface (1654) to one or more communication networks (1655). The network may be, for example, a wireless network, a wired network, an optical network. The network may further be a local network, a wide area network, a metropolitan area network, a vehicle and industrial network, a real-time network, a delay-tolerant network, etc. Examples of networks include local area networks such as Ethernet, wireless LANs, cellular networks including GSM, 3G, 4G, 5G, LTE, etc., television wired or wireless wide area digital networks including cable television, satellite television, and terrestrial broadcast television, vehicle and industrial networks including CANBus, etc. Some networks typically require an external network interface adapter connected to some common data port or peripheral bus (1649) (e.g., a USB port of the computer system (1600)); as described below, other network interfaces are typically integrated into the kernel of the computer system (1600) by connecting to the system bus (e.g., connecting to an Ethernet interface in a PC computer system or connecting to a cellular network interface in a smartphone computer system). The computer system (1600) can use any of these networks to communicate with other entities. Such communications may be one-way receive only (e.g., broadcast television), one-way send only (e.g., a CANbus connected to certain CANbus devices), or bidirectional, such as connecting to other computer systems using a LAN or WAN digital network. As described above, certain protocols and protocol stacks may be used on each of those networks and network interfaces.

[0201] The above-mentioned human interface device, human-accessible storage device, and network interface may be attached to the kernel (1640) of the computer system (1600).

[0202] The kernel (1640) may include one or more central processing units (CPUs) (1641), graphics processing units (GPUs) (1642), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1643), hardware accelerators (1644) for certain tasks, graphics adapters (1650), and the like. These devices, as well as read-only memory (ROM) (1645), random access memory (1646), internal mass storage (1647) such as internal non-user accessible hard drives, SSDs, and the like, may be connected via a system bus (1648). In some computer systems, the system bus (1648) may be accessed in the form of one or more physical plugs to enable expansion by additional CPUs, GPUs, and the like. Peripheral devices may be connected directly to the kernel's system bus (1648) or to the kernel's system bus (1648) via a peripheral bus (1649). In an example, a display (1610) may be connected to a graphics adapter (1650). The architecture of the peripheral bus includes PCI, USB, and the like. The architecture of the peripheral bus includes PCI, USB, and the like.

[0203] The CPU (1641), GPU (1642), FPGA (1643) and accelerator (1644) can execute certain instructions, which can be combined to form the above-mentioned computer code. The computer code can be stored in ROM (1645) or RAM (1646). Transition data can also be stored in RAM (1646), while permanent data can be stored, for example, in internal mass storage (1647). Fast storage and retrieval to any storage device can be performed by using a cache, which can be closely associated with the following: one or more CPUs (1641), GPUs (1642), mass storage (1647), ROM (1645), RAM (1646), etc.

[0204] The computer readable medium may have thereon computer code for performing various computer-implemented operations. The medium and computer code may be those specially designed and constructed for the purposes of the present invention, or the medium and computer code may be of a type well known and available to those skilled in the art of computer software.

[0205] As a non-limiting example, a computer system having an architecture (1600), particularly a kernel (1640), may provide functionality due to one or more processors (including CPUs, GPUs, FPGAs, accelerators, etc.) executing software contained in one or more tangible computer-readable media. Such computer-readable media may be media associated with a user-accessible mass storage as described above, as well as some non-temporary kernel (1640) memories, such as kernel internal mass storage (1647) or ROM (1645). Software implementing various embodiments of the present invention may be stored in such devices and executed by the kernel (1640). Software implementing various embodiments of the present invention may be stored in such devices and executed by the kernel (1640). The software may enable the kernel (1640), particularly the processors therein (including CPUs, GPUs, FPGAs, etc.), to perform specific methods or specific parts of specific methods described herein, including defining data structures stored in RAM (1646) and modifying such data structures according to methods defined by the software. Additionally or alternatively, a computer system may provide functionality due to logic hardwired or otherwise embodied in a circuit (e.g., an accelerator (1644)) that may replace software or operate in conjunction with software to perform a particular method or a particular portion of a particular method described herein. Where appropriate, references to portions of software may include logic and vice versa. Where appropriate, references to portions of a computer-readable medium may include circuits (e.g., integrated circuits (ICs)) storing software for execution, circuits embodying logic for execution, or both. The present invention includes any suitable combination of hardware and software.

[0206] The use of "at least one of" or "one of" in the present invention is intended to include any one or combination of the elements. For example, references to the following are intended to cover only A, only B, only C, or any combination thereof: at least one of A, B, or C; at least one of A, B, and C; at least one of A, B, and / or C; and at least one of A to C. References to one of A or B and one of A and B are intended to cover A or B or (A and B). Where applicable, the use of "one of" does not exclude any combination of the elements, for example when the elements are not mutually exclusive.

[0207] Although the present invention has described a number of exemplary embodiments, there are changes, permutations and various replacement equivalents that fall within the scope of the present invention. Therefore, it should be understood that those skilled in the art will be able to design many systems and methods that, although not explicitly shown or described herein, embody the principles of the present invention and therefore fall within the spirit and scope of the present invention.

Claims

1. A video decoding method, comprising: Receiving a coded video bitstream, the coded video bitstream comprising coded information of a current block of a current image, the current block being predicted based on a reference block in the current image, the reference block in the current image being indicated by a block vector BV, the BV to be determined based on a BV prediction value BVP and a BV difference BVD, the BVD being a difference between the BV and the BVP; determining a BVD list based at least on a plurality of BVD offsets relative to the BVP, the BVD list comprising a plurality of BVD candidates; determining the BVD from the plurality of BVD candidates in the BVD list; as well as The current block is reconstructed using the determined BVD, wherein, For each pair of adjacent BVD offsets, The initial interval size indicates the difference between the pair of adjacent BVD offsets, and Each initial interval size is different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets.

2. The method according to claim 1, wherein: Multiple initial interval sizes are sorted in ascending order.

3. The method according to claim 1, wherein: The initial interval size is a power of 2.

4. The method according to claim 3, wherein: The initial interval size includes J1 initial interval sizes, each of which is 2 i-1 , i is an integer ranging from 1 to J1, and J1 is greater than 1.

5. The method according to claim 1, wherein: Multiple initial interval sizes are stored in a lookup table.

6. The method according to claim 5, wherein: One of the initial interval sizes is not a power of 2.

7. The method according to claim 1, wherein: Determine the BVD list, including: determining a plurality of initial BVD candidates based on (i) the plurality of BVD offsets and (ii) a plurality of BVD directions, each initial BVD candidate having one of the plurality of BVD offsets and a corresponding BVD direction of one of the plurality of BVD directions; determining, for each initial BVD candidate of the plurality of initial BVD candidates, a template matching TM cost associated with the initial BVD candidate between a current template of the current block and a corresponding reference template of a candidate reference block, the candidate reference block being indicated by an initial BV candidate, the initial BV candidate being a sum of the BVP and the corresponding initial BVD candidate; and The BVD list is determined based on the plurality of TM costs.

8. The method according to claim 7, wherein: Determining the BVD list based on the plurality of TM costs comprises: K initial BVD candidates are selected from the plurality of initial BVD candidates as the plurality of BVD candidates in the BVD list, the K initial BVD candidates corresponding to a plurality of lowest TM costs among the plurality of TM costs.

9. The method according to claim 7, wherein: Determining the BVD list based on the plurality of TM costs comprises: selecting K initial BVD candidates from the plurality of initial BVD candidates, the K initial BVD candidates corresponding to a plurality of lowest TM costs among the plurality of TM costs; For each of the K initial BVD candidates with corresponding BVD offset and BVD direction, When the BVD offset is the only BVD offset that is greater than a first BVD offset among the multiple BVD offsets and less than a second BVD offset among the multiple BVD offsets, determining a first candidate and a second candidate associated with corresponding initial BVD candidates among the K initial BVD candidates, the first candidate and the second candidate having the same BVD direction as the initial BVD candidate, the BVD offset of the first candidate being an average of the BVD offset and the first BVD offset, and the BVD offset of the second candidate being an average of the BVD offset and the second BVD offset; determining a plurality of new TM costs associated with the first candidate and the second candidate respectively; and The BVD list is determined based on a plurality of updated TM costs, the plurality of updated TM costs comprising: (i) a plurality of lowest TM costs among the plurality of TM costs corresponding to the K initial BVD candidates, and (ii) the plurality of new TM costs.

10. The method according to claim 1, wherein: The method further includes: determining the BVP; and The reconstruction includes: determining the BV as the sum of the BVP and the determined BVD; and The current block is reconstructed using the determined BV.

11. A video decoding device, comprising: A processing circuit, the processing circuit being configured to: Receiving a coded video bitstream, the coded video bitstream comprising coded information of a current block of a current image, the current block being predicted based on a reference block in the current image, the reference block in the current image being indicated by a block vector BV, the BV to be determined based on a BV prediction value BVP and a BV difference BVD, the BVD being a difference between the BV and the BVP; determining a BVD list based at least on a plurality of BVD offsets relative to the BVP, the BVD list comprising a plurality of BVD candidates; determining the BVD from the plurality of BVD candidates in the BVD list; as well as The current block is reconstructed using the determined BVD, wherein, For each pair of adjacent BVD offsets, The initial interval size indicates the difference between the pair of adjacent BVD offsets, and Each initial interval size is different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets.

12. The device according to claim 11, wherein Multiple initial interval sizes are sorted in ascending order.

13. The device according to claim 11, wherein: The initial interval size is a power of 2.

14. The device according to claim 13, wherein: The initial interval size includes J1 initial interval sizes, each of which is 2 i-1 , i is an integer ranging from 1 to J1, and J1 is greater than 1.

15. The device according to claim 11, wherein Multiple initial interval sizes are stored in a lookup table.

16. The device according to claim 15, wherein: One of the initial interval sizes is not a power of 2.

17. The device according to claim 11, wherein: The processing circuit is configured to: determining a plurality of initial BVD candidates based on (i) the plurality of BVD offsets and (ii) a plurality of BVD directions, each initial BVD candidate having one of the plurality of BVD offsets and a corresponding BVD direction of one of the plurality of BVD directions; determining, for each initial BVD candidate of the plurality of initial BVD candidates, a template matching TM cost associated with the initial BVD candidate between a current template of the current block and a corresponding reference template of a candidate reference block, the candidate reference block being indicated by an initial BV candidate, the initial BV candidate being a sum of the BVP and the corresponding initial BVD candidate; and The BVD list is determined based on the plurality of TM costs.

18. The device according to claim 17, wherein: The processing circuit is configured to: K initial BVD candidates are selected from the plurality of initial BVD candidates as the plurality of BVD candidates in the BVD list, the K initial BVD candidates corresponding to a plurality of lowest TM costs among the plurality of TM costs.

19. The device according to claim 17, wherein: The processing circuit is configured to: selecting K initial BVD candidates from the plurality of initial BVD candidates, the K initial BVD candidates corresponding to a plurality of lowest TM costs among the plurality of TM costs; For each of the K initial BVD candidates with corresponding BVD offset and BVD direction, When the BVD offset is the only BVD offset that is greater than a first BVD offset among the multiple BVD offsets and less than a second BVD offset among the multiple BVD offsets, determining a first candidate and a second candidate associated with corresponding initial BVD candidates among the K initial BVD candidates, the first candidate and the second candidate having the same BVD direction as the initial BVD candidate, the BVD offset of the first candidate being an average of the BVD offset and the first BVD offset, and the BVD offset of the second candidate being an average of the BVD offset and the second BVD offset; determining a plurality of new TM costs associated with the first candidate and the second candidate respectively; as well as The BVD list is determined based on a plurality of updated TM costs, the plurality of updated TM costs comprising: (i) a plurality of lowest TM costs among the plurality of TM costs corresponding to the K initial BVD candidates, and (ii) the plurality of new TM costs.

20. A non-transitory computer-readable storage medium storing instructions which, when executed by at least one processor, cause the at least one processor to perform: Receiving a coded video bitstream, the coded video bitstream comprising coded information of a current block of a current image, the current block being predicted based on a reference block in the current image, the reference block in the current image being indicated by a block vector BV, the BV to be determined based on a BV prediction value BVP and a BV difference BVD, the BVD being a difference between the BV and the BVP; determining a BVD list based at least on a plurality of BVD offsets relative to the BVP, the BVD list comprising a plurality of BVD candidates; determining the BVD from the plurality of BVD candidates in the BVD list; as well as The current block is reconstructed using the determined BVD, wherein, For each pair of adjacent BVD offsets, The initial interval size indicates the difference between the pair of adjacent BVD offsets, and Each initial interval size is different from other initial interval sizes corresponding to other pairs of adjacent BVD offsets.