Extensions to block adaptive weighted prediction

By extending block adaptive weighted prediction (BAWP) technology in video encoding technology, the scaling factors and offsets in multiple motion vectors and linear formulas are used to solve the impact of local illumination changes on encoding efficiency and decoding quality, and more efficient video encoding and decoding is achieved.

CN119563321APending Publication Date: 2025-03-04TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380015320.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-11
Filing Date
2023-09-14
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Existing video encoding technology is difficult to effectively compensate for local lighting changes, resulting in poor encoding efficiency and decoding quality.

Method used

Through extended block adaptive weighted prediction (BAWP) technology, the current block is predicted using multiple motion vectors, and local illumination changes are compensated by scaling factors and offsets in the linear formula.

Benefits of technology

Improves the efficiency and decoding quality of video encoding, enables more accurate prediction of the current block, and saves signaling during the decoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119563321A_ABST
    Figure CN119563321A_ABST
Patent Text Reader

Abstract

The present disclosure relates generally to video encoding / decoding, and in particular to methods for providing extensions to block adaptive weighted prediction (BAWP) using multiple motion vectors. A method includes receiving an encoded video bitstream; identifying a first motion vector corresponding to the first reference block and a second motion vector corresponding to the second reference block from the encoded video bitstream; obtaining a first scaling factor corresponding to the first motion vector and a second scaling factor corresponding to the second motion vector phase by parsing the encoded video bitstream; generating a first prediction block based on the first scaling factor and the first reference block according to a first linear formula; generating a second prediction block based on the second reference block according to a second linear formula; and reconstructing the current block based on the first prediction block and the second prediction block.
Need to check novelty before this filing date? Find Prior Art

Description

Cross-references

[0001] This application is based on and claims the benefit of priority of U.S. Provisional Application No. 63 / 464,776, filed on May 8, 2023, which is incorporated herein by reference in its entirety. This application is also based on and claims the benefit of priority of U.S. Non-Provisional Patent Application No. 18 / 464,540, filed on September 11, 2023, which is incorporated herein by reference in its entirety. Technical Field

[0002] The present disclosure describes a set of advanced video / stream encoding / decoding techniques. More specifically, the disclosed techniques relate to extensions to Block Adaptive Weighted Prediction (BAWP) to compensate for local illumination variations. Background Art

[0003] Uncompressed digital video may include a series of pictures and may specify bitrate requirements for transmission bandwidth in storage, data processing, and streaming applications. One purpose of video encoding and decoding may be to reduce redundancy in the uncompressed input video signal through various compression techniques. Summary of the invention

[0004] The present disclosure describes various embodiments of methods, apparatus, and computer-readable storage media for extending block adaptive weighted prediction (BAWP) with multiple motion vectors.

[0005] According to one aspect, an embodiment of the present disclosure provides a method for decoding a current block of a current frame in a coded video bitstream. The method includes receiving a coded video bitstream by a device. The device includes a memory storing instructions and a processor communicating with the memory. The method also includes the device identifying a first motion vector corresponding to a first reference block and a second motion vector corresponding to a second reference block associated with the current block of the current frame from the coded video bitstream; the device obtaining a first scaling factor corresponding to the first motion vector and a second scaling factor corresponding to the second motion vector by parsing the coded video bitstream; the device generating a first prediction block based on the first scaling factor and the first reference block according to a first linear formula, the first linear formula being associated with the first scaling factor and the first offset; the device generating a second prediction block based on the second reference block according to a second linear formula, the second linear formula being associated with the second scaling factor and the second offset; and the device reconstructing the current block based on the first prediction block and the second prediction block.

[0006] According to another aspect, an embodiment of the present disclosure provides a device for processing a current block of a current frame in a coded video bitstream. The device includes a memory storing instructions; and a processor communicating with the memory. When the processor executes the instructions, the processor is configured to cause the device to perform the above method for video decoding and / or encoding.

[0007] In another aspect, an embodiment of the present disclosure provides a non-transitory computer-readable medium storing instructions which, when executed by a computer for video decoding and / or encoding, cause the computer to perform the above method for video decoding and / or encoding.

[0008] The above aspects and other aspects and their implementations are described in more detail in the drawings, the description and the claims. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0010] Figure 1 A schematic diagram showing a simplified block diagram of a communication system (100) according to an example implementation.

[0011] Figure 2 A schematic diagram showing a simplified block diagram of a communication system (200) according to an example implementation.

[0012] Figure 3 A schematic diagram showing a simplified block diagram of a video decoder according to an example implementation.

[0013] Figure 4 A schematic diagram showing a simplified block diagram of a video encoder according to an example implementation.

[0014] Figure 5 A block diagram of a video encoder according to another example embodiment is shown.

[0015] Figure 6 shows a block diagram of a video decoder according to another example embodiment;

[0016] Figure 7 A scheme for dividing coding blocks according to an exemplary embodiment of the present disclosure is shown;

[0017] Figure 8 Another scheme of coding block partitioning according to an example implementation of the present disclosure is shown;

[0018] Fig. 9 Another scheme of coding block partitioning according to an example implementation of the present disclosure is shown;

[0019] Fig.10 Examples of templates for the current block and the reference block are shown;

[0020] Fig.11 An example of spatial neighboring motion for motion vector prediction is shown;

[0021] Fig.12 An example of a reference motion vector candidate library update process is shown;

[0022] Fig.13 shows an example of neighboring blocks used in overlapping block motion compensation processing;

[0023] Fig.14 An example logic flow for a method in the present disclosure is shown; and

[0024] Fig.15 A schematic diagram of a computer system according to an example implementation of the present disclosure is shown. DETAILED DESCRIPTION

[0025] The present invention will now be described in detail below with reference to the accompanying drawings, which form a part of the present invention and show by way of illustration specific examples of implementation. However, it is noted that the present invention may be implemented in a variety of different forms, and therefore, the subject matter covered or claimed is intended to be interpreted as not being limited to any of the implementations to be set forth below. It is also noted that the present invention may be implemented as a method, apparatus, component, or system. Thus, embodiments of the present invention may, for example, take the form of hardware, software, firmware, or any combination thereof.

[0026] Throughout the specification and claims, terms may have nuanced meanings that are suggested or implied in the context beyond the explicitly stated meaning. The phrases "in one embodiment" or "in some embodiments" used herein do not necessarily refer to the same embodiment, and the phrases "in another embodiment" or "in other embodiments" used herein do not necessarily refer to different embodiments. Similarly, the phrases "in one implementation" or "in some implementations" used herein do not necessarily refer to the same implementation, and the phrases "in another implementation" or "in other implementations" used herein do not necessarily refer to different implementations. For example, it is intended that the claimed subject matter includes a combination of the whole or part of the exemplary embodiments / implementations.

[0027] Typically, terms can be understood at least in part from usage in context. For example, terms such as "and", "or" or "and / or" used herein can include a variety of meanings depending at least in part on the context in which such terms are used. Typically, "or" (if used in an associative list, such as A, B, or C) is intended to mean: A, B, and C, used here in an inclusive sense; and A, B, or C, used here in an exclusive sense. In addition, depending at least in part on the context, the terms "one or more" or "at least one" used herein can be used to describe any feature, structure, or characteristic in a singular sense, or can be used to describe a combination of features, structures, and characteristics in a plural sense. Similarly, terms such as "one", "an", or "the" can also be understood to convey singular usage or to convey plural usage, depending at least in part on the context. In addition, the term "based on" or "determined by..." can be understood to not necessarily be intended to convey an exclusive set of factors, and can alternatively allow the presence of additional factors that are not necessarily explicitly described, which also depends at least in part on the context.

[0028] like Figure 1 As shown, the terminal device can be implemented as a server, a personal computer and a smart phone, but the applicability of the basic principles of the present disclosure may not be limited thereto. The embodiments of the present disclosure can be implemented in desktop computers, laptop computers, tablet computers, media players, wearable computers, special video conferencing equipment, etc. The network (150) represents any number or type of network that transmits encoded video data between terminal devices, including, for example, wired (wired) and / or wireless communication networks. The communication network (150) can exchange data in circuit switching channels, packet switching channels and / or other types of channels. Representative networks include telecommunication networks, local area networks, wide area networks and / or the Internet.

[0029] As examples of applications of the disclosed subject matter, Figure 2 The placement of the video encoder and the video decoder in a video streaming environment is shown. The disclosed subject matter can be equally applicable to other video applications, including, for example, video conferencing, digital TV broadcasting, gaming, virtual reality, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.

[0030] like Figure 2As shown, a video streaming system may include a video capture subsystem (213), which may include a video source (201) such as a digital camera for creating an uncompressed video picture or image stream (202). In an example, the video picture stream (202) includes samples recorded by the digital camera of the video source (201). The video picture stream (202) is depicted as a thick line to emphasize the high amount of data when compared to the encoded video data (204) (or encoded video bitstream), and the video picture stream (202) may be processed by an electronic device (220) coupled to the video source (201) including a video encoder (203). The video encoder (203) may include hardware, software, or a combination thereof to implement or implement various aspects of the disclosed subject matter as described in more detail below. The encoded video data (204) (or encoded video bitstream (204)) is depicted as a thin line to emphasize the lower data volume when compared to the uncompressed video picture stream (202), and the encoded video data (204) can be stored on the streaming server (205) for future use or directly to a downstream video device (not shown). One or more streaming client subsystems such as Figure 2 The client subsystems (206) and (208) in the streaming server (205) can access the streaming server (205) to retrieve copies (207) and (209) of the encoded video data (204). The client subsystem (206) can include, for example, a video decoder (210) in the electronic device (230). The video decoder (210) decodes the incoming copy (207) of the encoded video data and creates an outgoing video picture stream (211) that is uncompressed and can be presented on a display (212) (e.g., a display screen) or other presentation device (not shown).

[0031] Figure 3 A block diagram of a video decoder (310) of an electronic device (330) according to any embodiment of the present disclosure below is shown. The electronic device (330) may include a receiver (331) (e.g., receiving circuitry). The video decoder (310) may be used instead of Figure 2 A video decoder (210) in an example of FIG.

[0032] like Figure 3As shown, a receiver (331) can receive one or more coded video sequences from a channel (301). In order to combat network jitter and / or handle playback timing, a buffer memory (315) can be set between the receiver (331) and the entropy decoder / parser (320) (hereinafter referred to as "parser (320)"). The parser (320) can reconstruct symbols (321) based on the coded video sequence. The categories of these symbols include information for managing the operation of the video decoder (310) and potential information for controlling a rendering device such as a display (312) (e.g., a display screen). The parser (320) can parse / entropy decode the coded video sequence. The parser (320) can extract a subgroup parameter set for at least one of the subgroups of pixels in the video decoder from the coded video sequence. The subgroup can include a group of pictures (Group of Picture, GOP), a picture, a tile, a slice, a macroblock, a coding unit (Coding Unit, CU), a block, a transform unit (Transform Unit, TU), a prediction unit (Prediction Unit, PU), etc. The parser (320) may also extract information such as transform coefficients (e.g., Fourier transform coefficients), quantizer parameter values, motion vectors, etc. from the coded video sequence. The reconstruction of the symbols (321) may involve a number of different processing or functional units. The units involved and how these units are involved may be controlled by subgroup control information parsed by the parser (320) from the coded video sequence.

[0033] The first unit may include a sealer / inverse transform unit (351). The sealer / inverse transform unit (351) may receive quantized transform coefficients as (one or more) symbols (321) and control information from the parser (320), including information indicating which type of inverse transform to use, block size, quantization factors / parameters, quantization scaling matrix, etc. The sealer / inverse transform unit (351) may output blocks including sample values ​​that may be input into an aggregator (355).

[0034] In some cases, the output samples of the scaler / inverse transform (351) may belong to an intra-coded block, i.e., a block that does not use predictive information from a previously reconstructed picture but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (352). In some cases, the intra-picture prediction unit (352) may use surrounding block information that has already been reconstructed and stored in a current picture buffer (358) to generate a block of the same size and shape as the block being reconstructed. For example, the current picture buffer (358) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some implementations, the aggregator (355) may add the predictive information that has been generated by the intra-prediction unit (352) to the output sample information provided by the scaler / inverse transform unit (351) on a per-sample basis.

[0035] In other cases, the output samples of the scaler / inverse transform unit (351) may belong to an inter-coded and possibly motion-compensated block. In such a case, the motion compensated prediction unit (353) may access the reference picture memory (357) based on the motion vector to obtain samples for inter-picture prediction. After motion compensation of the obtained reference samples according to the symbols (321) belonging to the block, these samples may be added to the output of the scaler / inverse transform unit (351) by the aggregator (355) (the output of unit 351 may be referred to as residual samples or residual signal) to generate output sample information.

[0036] The output samples of the aggregator (355) may be subjected to various loop filtering techniques in a loop filter unit (356) which may include several types of loop filters. The output of the loop filter unit (356) may be a sample stream which may be output to a rendering device (312) and stored in a reference picture memory (357) for future inter-picture prediction.

[0037] Figure 4 A block diagram of a video encoder (403) according to an example implementation of the present disclosure is shown. The video encoder (403) may be included in an electronic device (420). The electronic device (420) may also include a transmitter (440) (e.g., a transmission circuit system). The video encoder (403) may be used instead of Figure 4 A video encoder (402) in an example of FIG.

[0038] The video encoder (403) may receive video samples from a video source (401). According to some example embodiments, the video encoder (403) may encode and compress pictures of a source video sequence into an encoded video sequence (443) in real time or under any other time constraints required by an application. Implementing an appropriate encoding speed constitutes a function of a controller (450). In some embodiments, the controller (450) may be functionally coupled to and control other functional units as described below. Parameters set by the controller (450) may include parameters related to rate control (picture skipping, quantizer, lambda value of rate-distortion optimization techniques, etc.), picture size, picture group (GOP) layout, maximum motion vector search range, etc.

[0039] In some example embodiments, the video encoder (403) may be configured to operate in a coding loop. The coding loop may include a source encoder (430) and a (local) decoder (433) embedded in the video encoder (403). Even if the embedded decoder 433 processes the coded video stream produced by the source encoder 430 without entropy coding, the decoder (433) reconstructs the symbols to create sample data in a manner similar to that which the (remote) decoder would create (because in the video compression techniques considered in the disclosed subject matter, any compression between the symbols in the entropy coding and the coded video bitstream can be lossless). At this point, it can be observed that any decoder technology that may only exist in the decoder, except for parsing / entropy decoding, may also necessarily need to exist in the corresponding encoder in substantially the same functional form. For this reason, the disclosed subject matter may sometimes focus on the decoder operation associated with the decoding portion of the encoder. Since the encoder technology is mutually inverse to the decoder technology that has been fully described, the description of the encoder technology can be simplified. Only in certain areas or aspects, a more detailed description of the encoder is provided below.

[0040] During operation in some example implementations, the source encoder (430) may perform motion compensated predictive encoding that predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures."

[0041] The local video decoder (433) can decode the encoded video data of the picture that can be designated as the reference picture. The local video decoder (433) replicates the decoding process that can be performed by the video decoder on the reference picture, and can cause the reconstructed reference picture to be stored in the reference picture cache (434). In this way, the video encoder (403) can store a copy of the reconstructed reference picture locally, which has common content (absent transmission errors) with the reconstructed reference picture to be obtained by the far-end (remote) video decoder.

[0042] The predictor (435) can perform prediction search for the encoding engine (432). That is, for a new picture to be encoded, the predictor (435) can search the reference picture memory (434) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that can be used as appropriate prediction references for the new picture.

[0043] The controller (450) can manage encoding operations of the source encoder (430), including, for example, setting parameters and subgroup parameters for encoding video data.

[0044] The outputs of all the above mentioned functional units may be subjected to entropy encoding in an entropy encoder (445). The transmitter (440) may buffer the encoded video sequence(s) created by the entropy encoder (445) in preparation for transmission via a communication channel (460), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (440) may combine the encoded video data from the video encoder (403) with other data to be transmitted, such as encoded audio data and / or auxiliary data streams (source not shown).

[0045] The controller (450) may manage the operation of the video encoder (403). During encoding, the controller (450) may assign a certain encoding picture type to each encoding picture, which may affect the encoding techniques that may be applied to the corresponding picture. For example, a picture may generally be assigned to one of the following picture types: intra picture (I picture), predictive picture (P picture), bidirectional predictive picture (B picture), multiple-predictive picture. As described in further detail below, a source picture may generally be spatially subdivided into multiple sample encoding blocks.

[0046] Figure 5 A diagram of a video encoder (503) according to another example implementation of the present disclosure is shown. The video encoder (503) is configured to receive a processed block (e.g., a predicted block) of sample values ​​within a current video picture in a sequence of video pictures and encode the processed block into an encoded picture that is part of an encoded video sequence. The example video encoder (503) may be used instead of Figure 4 The video encoder (403) in the example.

[0047] For example, the video encoder (503) receives a matrix of sample values ​​for a processing block. The video encoder (503) then uses, for example, rate-distortion optimization (RDO) to determine whether to best encode the processing block using intra mode, inter mode, or bi-prediction mode.

[0048] exist Figure 5 In the example of FIG. 5 , the video encoder ( 503 ) includes: Figure 5 An inter-frame encoder (530), an intra-frame encoder (522), a residual calculator (523), a switch (526), ​​a residual encoder (524), a general controller (521) and an entropy encoder (525) coupled together are shown in the example arrangement.

[0049] The inter-frame encoder (530) is configured to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture in display order), generate inter-frame prediction information (e.g., redundant information description, motion vector, merge mode information according to an inter-frame coding technique), and calculate an inter-frame prediction result (e.g., a prediction block) based on the inter-frame prediction information using any suitable technique.

[0050] The intra encoder (522) is configured to receive samples of a current block (e.g., a processing block), compare the block to already encoded blocks in the same picture, and generate transformed quantized coefficients and, in some cases, intra predictive information (e.g., intra prediction direction information according to one or more intra coding techniques).

[0051] The general controller (521) may be configured to determine general control data and control other components of the video encoder (503) based on the general control data, for example to determine a prediction mode for a block and provide a control signal to the switch (526) based on the prediction mode.

[0052] The residual calculator (523) may be configured to calculate the difference (residual data) between the received block and the prediction result of the block selected from the intra encoder (522) or the inter encoder (530). The residual encoder (524) may be configured to encode the residual data to generate a transform coefficient. The transform coefficient is then subjected to a quantization process to obtain a quantized transform coefficient. In various example embodiments, the video encoder (503) further includes a residual decoder (528). The residual decoder (528) is configured to perform an inverse transform and generate decoded residual data. The entropy encoder (525) may be configured to format the bitstream to include the coded block and perform entropy coding.

[0053] Figure 6A diagram of an example video decoder (610) according to another embodiment of the present disclosure is shown. The video decoder (610) is configured to receive an encoded picture as part of an encoded video sequence and decode the encoded picture to generate a reconstructed picture. In an example, the video decoder (610) may be used instead of Figure 4 A video decoder (410) in an example of FIG.

[0054] exist Figure 6 In the example of FIG. 6 , the video decoder ( 610 ) includes Figure 6 An entropy decoder (671), an inter-frame decoder (680), a residual decoder (673), a reconstruction module (674), and an intra-frame decoder (672) coupled together are shown in the example arrangement of.

[0055] The entropy decoder (671) may be configured to reconstruct certain symbols representing the syntax elements constituting the coded picture from the coded picture. The inter-frame decoder (680) may be configured to receive inter-frame prediction information and generate an inter-frame prediction result based on the inter-frame prediction information. The intra-frame decoder (672) may be configured to receive intra-frame prediction information and generate a prediction result based on the intra-frame prediction information. The residual decoder (673) may be configured to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The reconstruction module (674) may be configured to combine the residual output by the residual decoder (673) with the prediction result (output by the inter-frame prediction module or the intra-frame prediction module, as the case may be) in the spatial domain to form a reconstructed block, which forms a part of a reconstructed picture as part of the reconstructed video.

[0056] Note that the video encoders (203), (403) and (503) and the video decoders (210), (310) and (610) may be implemented using any suitable technology. In some example embodiments, the video encoders (203), (403) and (503) and the video decoders (210), (310) and (610) may be implemented using one or more integrated circuits. In another embodiment, the video encoders (203), (403) and (503) and the video decoders (210), (310) and (610) may be implemented using one or more processors that execute software instructions.

[0057] Turning to the block partitioning for encoding and decoding, the general partitioning can start from the base block and can follow a predefined set of rules, a specific pattern, a partition tree, or any partition structure or scheme. The partitioning can be hierarchical and recursive. After following any example partitioning process or other processes described below or a combination thereof to split or divide the base block, a final set of partitions or coding blocks can be obtained. Each of these partitions can be in one of the various partitioning levels in the partitioning hierarchy and can have various shapes. Each of these partitions can be referred to as a coding block (CB). For various example partitioning implementations further described below, each resulting CB can have any allowed size and partitioning level. Such partitions are called coding blocks because they can form the following units, some basic encoding / decoding decisions can be made for the units, and the encoding / decoding parameters can be optimized, determined, and signaled in the encoded video bitstream. The highest or deepest level in the final partition represents the depth of the coding block partitioning structure of the tree. The coding block can be a luminance coding block or a chrominance coding block. The CB tree structure for each color can be referred to as a coding block tree (CBT). The coding blocks of all color channels may be collectively referred to as coding units (CUs). The hierarchical structures of all color channels may be collectively referred to as coding tree units (CTUs). The division modes or structures of various color channels in a CTU may be the same or different.

[0058] In some implementations, the partition tree schemes or structures for the luma channel and the chroma channel may not necessarily be the same. In other words, the luma channel and the chroma channel may have respective coding tree structures or patterns. In addition, whether the luma channel and the chroma channel use the same or different coding partition tree structures and the actual coding partition tree structure to be used may depend on whether the slice being encoded is a P slice, a B slice, or an I slice. For example, for an I slice, the chroma channel and the luma channel may have respective coding partition tree structures or coding partition tree structure patterns, while for a P slice or a B slice, the luma channel and the chroma channel may share the same coding partition tree scheme. When respective coding partition tree structures or patterns are applied, the luma channel may be divided into CBs by one coding partition tree structure, and the chroma channel may be divided into chroma CBs by another coding partition tree structure.

[0059] Figure 7 An example predefined 10-way partitioning structure / pattern is shown that allows recursive partitioning to form a partitioning tree. A root block may start at a predefined level (eg, starting from a base block at a 128x128 level or a 64x64 level). Figure 7Example partition structures include various 2:1 / 1:2 and 4:1 / 1:4 rectangular partitions. In some example implementations, Figure 7 Any of the rectangular partitions of is not allowed to be further subdivided. The coding tree depth can be further defined to indicate the partition depth from the root node or root block. For example, the coding tree depth of the root node or root block can be set to 0, and the root block follows Figure 7 After being further split once, the coding tree depth increases by 1. In some implementations, only full square partitions in 710 may be allowed to follow Figure 7 The pattern is partitioned recursively to the next level of the partitioning tree.

[0060] In some other example implementations for coding block partitioning, a quadtree structure may be used. Such quadtree segmentation may be applied hierarchically and recursively to any square-shaped partition. Whether a base block or an intermediate block or partition is further quadtree segmented may be adapted to various local characteristics of the base block or intermediate block / partition.

[0061] In some other examples, such as Figure 8 As shown, the ternary partitioning scheme can be used to partition the base block or any intermediate block. The ternary pattern can be implemented vertically as shown in 802 or horizontally as shown in 804. Figure 8 The example split ratio in is shown as 1:2:1, but other ratios may be predefined. In some implementations, two or more different ratios may be predefined. In some implementations, the width and height of the partitions of the example ternary tree are always powers of 2 to avoid additional transformations.

[0062] The above partitioning schemes can be combined in any way at different partitioning levels. As an example, the above quadtree partitioning scheme and binary partitioning scheme can be combined to partition the base block into a quadtree-binary tree (QTBT) structure. In such a scheme, the base block or intermediate block / partition can be a quadtree partition or a binary partition, if specified, subject to a set of predefined conditions. Fig. 9 A specific example is shown in Fig. 9In the example of , the base block is first quadtree-partitioned into four partitions, as shown by 902, 904, 906, and 908. Thereafter, each of the resulting partitions is quadtree-partitioned into four further partitions (e.g., 908), or is binary-partitioned into two additional partitions (horizontally or vertically, such as 902 or 906, for example, both are symmetrical) at the next level, or is not partitioned (e.g., 904). Binary or quadtree partitioning can be allowed to be recursively used for square-shaped partitions, as shown by the overall example partitioning pattern of 910 and the corresponding tree structure / representation in 920, where solid lines represent quadtree partitioning and dashed lines represent binary partitioning. A flag can be used for each binary partition node (non-leaf binary partition) to indicate whether the binary partition is horizontal or vertical. For example, as shown in 920, consistent with the partitioning structure of 910, flag "0" can represent horizontal binary partitioning and flag "1" can represent vertical binary partitioning. For quadtree partitioning, there is no need to indicate the partition type, because quadtree partitioning always partitions a block or partition horizontally and vertically to produce 4 sub-blocks / partitions of equal size. In some implementations, a flag "1" may represent a horizontal binary partition, and a flag "0" may represent a vertical binary partition.

[0063] In some example implementations of QTBT, the quadtree and binary segmentation rule set may be represented by the following predefined parameters and corresponding functions associated therewith: –CTU size: The root node size of the quadtree (the size of the base block) –MinQTSize: Minimum allowed quadtree leaf node size –MaxBTSize: Maximum allowed binary tree root node size –MaxBTDepth: Maximum allowed binary tree depth –MinBTSize: The minimum allowed binary tree leaf node size

[0064] In some example implementations of the QTBT partitioning structure, the CTU size can be set to 128×128 luma samples with two corresponding 64×64 chroma sample blocks (when example chroma subsampling is considered and used), MinQTSize can be set to 16×16, MaxBTSize can be set to 64×64, MinBTSize (for both width and height) can be set to 4×4, and MaxBTDepth can be set to 4. Quadtree partitioning can be first applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes can have sizes from their minimum allowed size of 16×16 (i.e., MinQTSize) to 128×128 (i.e., the CTU size). If the node is 128×128, the node will not be split by the binary tree first because the size exceeds MaxBTSize (i.e., 64×64). Otherwise, nodes that do not exceed MaxBTSize can be split by the binary tree. Fig. 9 In the example of , the base block is 128×128. According to a predefined set of rules, the base block can only be quadtree split. The base block has a partition depth of 0. Each of the four resulting partitions is 64×64 - not exceeding MaxBTSize and can be further quadtree or binary tree split at level 1. The process continues. When the binary tree depth reaches MaxBTDepth (i.e., 4), further splitting can be disregarded. When the width of the binary tree node is equal to MinBTSize (i.e., 4), further horizontal splitting can be disregarded. Similarly, when the height of the binary tree node is equal to MinBTSize, further vertical splitting is disregarded.

[0065] In some example implementations, the above QTBT scheme can be configured to support the flexibility of having the same QTBT structure or separate QTBT structures for luma and chroma. For example, for P slices and B slices, the luma CTB and chroma CTB in one CTU can share the same QTBT structure. However, for I slices, the luma CTB can be divided into CBs by the QTBT structure, and the chroma CTB can be divided into chroma CBs by another QTBT structure. This means that a CU can be used to refer to different color channels in an I slice, for example, an I slice can consist of coding blocks of a luma component or coding blocks of two chroma components, and a CU in a P slice or a B slice can consist of coding blocks of all three color components.

[0066] The above various CB partitioning schemes and further partitioning of CB into PBs may be combined in any manner. The following specific implementations are provided as non-limiting examples.

[0067] Inter prediction may be implemented, for example, in a single reference mode or a composite reference mode. In some implementations, a skip flag may first be included in the bitstream of the current block (or at a higher level) to indicate whether the current block is inter-coded and not skipped. If the current block is inter-coded, another flag may be further included in the bitstream as a signal indicating whether a single reference mode or a composite reference mode is used for prediction of the current block. For a single reference mode, a reference block may be used to generate a prediction block for the current block. For a composite reference mode, two or more reference blocks may be used to generate a prediction block by, for example, weighted averaging. A reference block or multiple reference blocks may be identified using a reference frame index or multiple reference frame indexes and additionally using a corresponding motion vector or multiple motion vectors indicating a displacement between a reference block or multiple reference blocks and the current block relative to the frame (e.g., horizontal pixels and vertical pixels). For example, an inter-frame prediction block of a current block may be generated from a single reference block identified by a motion vector in a reference frame as a prediction block in a single reference mode, while for a composite reference mode, a prediction block may be generated by a weighted average of two reference blocks indicated by two reference frame indices and two corresponding motion vectors in two reference frames. Motion vectors may be encoded and included in the bitstream in various ways.

[0068] In some example implementations, one or more reference picture lists containing identifications of short-term reference frames and long-term reference frames for inter prediction may be formed based on information in a reference picture set (RPS). For example, a single picture reference list may be formed for unidirectional inter prediction, the single picture reference list being denoted as L0 reference (or reference list 0), while two picture reference lists may be formed for bidirectional inter prediction, the two picture reference lists being denoted as L0 (or reference list 0) and L1 (or reference list 1) for each of the two prediction directions. The reference frames included in the L0 list and the L1 list may be ordered in various predetermined ways. The length of the L0 list and the length of the L1 list may be signaled in the video bitstream. Unidirectional inter prediction may be in a single reference mode, or in a composite reference mode when multiple references used to generate a prediction block by weighted averaging in a composite prediction mode are on the same side of the frame where the block to be predicted is located. Bidirectional inter prediction may be the only composite mode because bidirectional inter prediction involves at least two reference blocks.

[0069] In some implementations, a merge mode (MM) for inter-frame prediction may be implemented. Typically, for merge mode, one or more of the motion vectors in the motion vector in the single reference prediction of the current PB or the motion vector in the composite reference prediction may be derived from (one or more) other motion vectors, rather than being independently calculated and represented by a signal. For example, in an encoding system, the (one or more) current motion vectors of the current PB may be represented by the difference between the (one or more) current motion vectors and one or more other already encoded motion vectors (referred to as reference motion vectors). Such a difference of (one or more) motion vectors rather than the entirety of (one or more) current motion vectors may be encoded and included in the bitstream, and may be linked to (one or more) reference motion vectors. Accordingly, in a decoding system, the (one or more) motion vectors corresponding to the current PB may be derived based on (one or more) decoded motion vector differences and (one or more) decoded reference motion vectors linked thereto. As a specific form of general merge mode (MM) inter-frame prediction, such inter-frame prediction based on (one or more) motion vector differences may be referred to as a merge mode with motion vector difference (MMVD). Therefore, MM in general or MMVD in particular can be implemented to exploit the correlation between motion vectors associated with different PBs to improve coding efficiency. For example, adjacent PBs may have similar motion vectors, so the MVD may be small and can be efficiently encoded. For another example, for blocks that are similarly positioned / placed in space, the motion vectors may be correlated in time (between frames).

[0070] In some example implementations of MMVD, a list of reference motion vectors (RMV) or MV predictor candidates for motion vector prediction may be formed for a block being predicted. The list of RMV candidates may contain a predetermined number (e.g., 2) of MV predictor candidate blocks whose motion vectors may be used to predict the current motion vector. The RMV candidate blocks may include blocks selected from neighboring blocks and / or temporal blocks in the same frame (e.g., blocks at the same position in a previous frame or subsequent frame of the current frame). These options represent blocks at spatial or temporal positions relative to the current block that may have motion vectors similar to or identical to the current block. The size of the list of MV predictor candidates may be predetermined. For example, the list may contain two or more candidates. In order to be on the list of RMV candidates, for example, the candidate block may be required to have the same reference frame (or multiple reference frames) as the current block, must exist (e.g., when the current block is close to the edge of the frame, a boundary check needs to be performed), and must have been encoded during the encoding process and / or decoded during the decoding process. In some implementations, if available and the above conditions are met, the list of merge candidates can be first populated with spatially adjacent blocks (scanned in a specific predefined order), and then the list of merge candidates can be populated with temporal blocks if space is still available in the list. For example, adjacent RMV candidate blocks can be selected from the left block and the top block of the current block. The list of RMV predictor candidates can be dynamically formed as a dynamic reference list (DRL) at various levels (sequence, picture, frame, slice, super block, etc.). The DRL can be signaled in the bitstream.

[0071] In some implementations, the actual MV predictor candidate used as a reference motion vector for predicting the motion vector of the current block can be signaled. In the case where the RMV candidate list contains two candidates, a one-bit flag called a merge candidate flag can be used to indicate the selection of the reference merge candidate. For the current block being predicted in composite mode, each of the multiple motion vectors predicted using the MV predictor can be associated with a reference motion vector from the merge candidate list. The encoder can determine which of the RMV candidates more closely predicts the MV of the current coding block and signal the selection as an index into the DRL.

[0072] In some example implementations of MMVD, after an RMV candidate is selected and used as a base motion vector predictor for a motion vector to be predicted, a motion vector difference (MVD or ΔMV, representing the difference between the motion vector to be predicted and a reference candidate motion vector) may be calculated in the encoding system. Such an MVD may include information representing the magnitude of the MV difference and the direction of the MV difference, both of which may be signaled in the bitstream in various ways.

[0073] In some example implementations of MMVD, a distance index may be used to specify the magnitude information of a motion vector difference, and the distance index may be used to indicate one of a set of predefined offsets representing a predefined motion vector difference from a starting point (reference motion vector). The MV offset according to the signaled index may then be added to the horizontal component or the vertical component of the starting (reference) motion vector. An example predefined relationship between the distance index and the predefined offset is specified in Table 1. Table 1 - Example relationship between distance index and predefined MV offset

[0074] In some example implementations of MMVD, a direction index may be further represented by a signal, and the direction index may be used to represent the direction of the MVD relative to a reference motion vector. In some implementations, the direction may be limited to either a horizontal direction or a vertical direction. An exemplary 2-bit direction index is shown in Table 2. In the example of Table 2, the description of the MVD may vary according to the information of the start / reference MV. For example, when the start / reference MV corresponds to a unidirectional prediction block or corresponds to a bidirectional prediction block, where both reference frame lists point to the same side of the current picture (i.e., the POCs of both reference pictures are greater than the POC of the current picture or are less than the POC of the current picture), the symbol in Table 2 may specify the symbol (direction) of the MV offset added to the start / reference MV. When the start / reference MV corresponds to a bidirectional prediction block having two reference pictures at different sides of the current picture (i.e., the POC of one reference picture is greater than the POC of the current picture, and the POC of the other reference picture is less than the POC of the current picture), and the difference between the reference POC in picture reference list 0 and the current frame is greater than the difference between the reference POC in picture reference list 1 and the current frame, the symbols in Table 2 may specify the sign of the MV offset added to the reference MV corresponding to the reference picture in picture reference list 0, and the sign of the offset of the MV corresponding to the reference picture in picture reference list 1 may have an opposite value (opposite sign of the offset). Otherwise, if the difference between the reference POC in picture reference list 1 and the current frame is greater than the difference between the reference POC in picture reference list 0 and the current frame, the symbols in Table 2 may specify the sign of the MV offset added to the reference MV associated with picture reference list 1, and the sign of the offset of the reference MV associated with picture reference list 0 has an opposite value. Table 2 - Example implementation of the sign of the MV offset specified by the direction index Direction Index 00 01 10 11 x-axis (horizontal) + – N / A N / A y-axis (vertical) N / A N / A + –

[0075] In some example implementations, the MVD may be scaled according to the difference in the POC in each direction. If the difference in the POC in both lists is the same, no scaling is required. Otherwise, if the difference in the POC in reference list 0 is greater than the difference in the POC of reference list 1, the MVD of reference list 1 is scaled. If the POC difference of reference list 1 is greater than list 0, the MVD of list 0 may be scaled in the same manner. If the starting MV is unidirectionally predicted, then the MVD is added to the available or reference MVs.

[0076] In some example implementations of MVD encoding and signaling for bidirectional composite prediction, in addition to or as an alternative to separately encoding and signaling two MVDs, symmetric MVD encoding can be implemented so that only one MVD needs to be signaled and the other MVD can be derived from the signaled MVD. In such an implementation, motion information including reference picture indices of list 0 and list 1 is not all signaled. Specifically, at the slice level, a flag called "mvd_l1_zero_flag" can be included in the bitstream, which is used to indicate whether reference list 1 is not signaled in the bitstream. If the flag is 1, indicating that reference list 1 is equal to zero (and therefore not signaled), then a bidirectional prediction flag called "BiDirPredFlag" can be set to 0, which means that there is no bidirectional prediction. Otherwise, if mvd_l1_zero_flag is zero, BiDirPredFlag may be set to 1 if the nearest reference picture in list 0 and the nearest reference picture in list 1 form a forward and backward pair of reference pictures or a backward and forward pair of reference pictures, and both the list 0 reference picture and the list 1 reference picture are short-term reference pictures. Otherwise, BiDirPredFlag is set to 0. BiDirPredFlag of 1 may indicate that a symmetry mode flag is additionally signaled in the bitstream. When BiDirPredFlag is 1, the decoder may extract the symmetry mode flag from the bitstream. For example, the symmetry mode flag may be signaled at the CU level (if necessary), and the symmetry mode flag may indicate whether a symmetric MVD coding mode is being used for the corresponding CU. When the symmetric mode flag is 1, it indicates that the symmetric MVD coding mode is used, and only the reference picture indexes of both list 0 and list 1 (referred to as "mvp_l0_flag" and "mvp_l1_flag") and the MVD associated with list 0 (referred to as "MVD0") are signaled, and instead of signaling another motion vector difference "MVD1", MVD1 can be derived as -MVD0. Thus, in the example symmetric MVD mode, only one MVD is signaled.

[0077] In some other example implementations of MV prediction, for both single reference mode and composite reference mode MV prediction, a coordination scheme can be used to implement general merge mode MMVD and some other types of MV prediction. Various syntax elements can be used to signal the way to predict the MV of the current block. For example, for a single reference mode, the following MV prediction modes can be signaled: NEARMV - directly use one of the motion vector predictors (MVPs) indicated by the DRL (Dynamic Reference List) index in the list without any MVD; NEWMV - use one of the motion vector predictors (MVPs) signaled by the DRL index in the list as a reference, and apply an increment to the MVP (e.g., using MVD); and GLOBALMV - use motion vectors based on frame-level global motion parameters.

[0078] Similarly, for a composite reference inter prediction mode using two reference frames corresponding to two MVs to be predicted, the following MV prediction modes may be signaled: NEAR_NEARMV – For each of the two MVs to be predicted, one of the motion vector predictors (MVPs) in the list signaled by the DRL index is used without the MVD. NEAR_NEWMV – For predicting the first of the two motion vectors, one of the motion vector predictors (MVPs) in the list signaled by the DRL index is used as the reference MV without the MVD; for predicting the second of the two motion vectors, one of the motion vector predictors (MVPs) in the list signaled by the DRL index is used as the reference MV in combination with a ΔMV (MVD) that is additionally signaled. NEW_NEARMV – For predicting the second of the two motion vectors, use one of the motion vector predictors (MVPs) in the list signaled by the DRL index as the reference MV without MVD; for predicting the first of the two motion vectors, use one of the motion vector predictors (MVPs) in the list signaled by the DRL index as the reference MV in combination with a ΔMV (MVD) signaled otherwise. NEW_NEWMV – Use one of the motion vector predictors (MVPs) in the list signaled by the DRL index as the reference MV, and use the reference MV in combination with a ΔMV signaled otherwise to predict each of the two MVs. GLOBAL_GLOBALMV – Use MVs from each reference based on frame level global motion parameters.

[0079] Thus, the term "NEAR" above refers to MV prediction using a reference MV as a general merge mode without any MVD, whereas the term "NEW" refers to MV prediction involving using a reference MV as in MMVD mode and offsetting the reference MV using a signaled or derived MVD. For composite inter-frame prediction, both the reference base motion vector and the motion vector increment mentioned above may generally be different between two references or two MVDs or may generally be independent, even though, for example, the two MVDs may be correlated and such correlation may be exploited to reduce the amount of information required to signal the two motion vector increments. In order to exploit such correlation, a joint representation of the two MVDs may be implemented and indicated in the bitstream, as described in further detail below.

[0080] In some example implementations of the MVD, a predefined pixel resolution of the MVD may be allowed. For example, a motion vector accuracy (or precision) of 1 / 8 pixel may be allowed. The MVD described above in various MV prediction modes may be constructed and signaled in various ways. In some implementations, various syntax elements may be used to signal the above-mentioned (one or more) motion vector differences in reference frame list 0 or list 1.

[0081] For example, a syntax element called "mv_joint" may specify which components of the motion vector difference associated therewith are non-zero. For example, mv_joint may have the following values: 0 may indicate that there is no non-zero MVD in the horizontal or vertical direction; 1 may indicate that there is a non-zero MVD only in the horizontal direction; 2 may indicate that there is a non-zero MVD only in the vertical direction; and / or 3 may indicate that there is a non-zero MVD in both the horizontal and vertical directions.

[0082] When the "mv_joint" syntax element of the MVD signals the absence of non-zero MVD components, no further MVD information may be signaled. However, if the "mv_joint" syntax signals the presence of one or two non-zero components, additional syntax elements may be further signaled for each of the non-zero MVD components as described below.

[0083] For example, a syntax element called "mv_sign" may be used to additionally specify whether the corresponding motion vector difference amount is positive or negative.

[0084] For another example, a syntax element called "mv_class" can be used to specify the class of motion vector differences in a predefined set of classes for the corresponding non-zero MVD component. For example, the predefined classes of motion vector differences can be used to divide the continuous amplitude space of motion vector differences into non-overlapping ranges of classes. Thus, the MVD class represented by the signal indicates the amplitude range of the corresponding MVD component. In the example implementation shown in Table 3 below, a higher class corresponds to a motion vector difference with a larger amplitude range. The symbol (n, m] is used to represent a range of motion vector differences greater than n pixels and less than or equal to m pixels. Table 3: Motion vector difference magnitude categories

[0085] In some other examples, a syntax element called "mv_bit" may also be used to specify the integer part of the offset between the non-zero motion vector difference component and the starting amplitude of the MV category amplitude range represented by the corresponding signal. In some other examples, a syntax element called "mv_fr" may also be used to specify the first 2 fractional bits of the motion vector difference of the corresponding non-zero MVD component, and a syntax element called "mv_hp" may be used to specify the third fractional bit (high resolution bit) of the motion vector difference of the corresponding non-zero MVD component. The two-bit "mv_fr" essentially provides a 1 / 4 pixel MVD resolution, while the "mv_hp" bit may further provide a 1 / 8 pixel resolution. In some other implementations, more than one "mv_hp" bit may be used to provide a finer MVD pixel resolution than 1 / 8 pixel. In some example implementations, additional flags may be signaled at one or more of the various levels to indicate whether 1 / 8 pixel or higher MVD resolution is supported. If an MVD resolution is not applied for a particular coding unit, then the above syntax elements for the corresponding unsupported MVD resolution may not be signaled.

[0086] In some example implementations, in bi-prediction with CU-level weight (BCW), a bi-prediction signal may be generated by averaging two prediction signals obtained from two different reference pictures and / or by using two different motion vectors. In some other implementations, the bi-prediction mode may be extended beyond simple averaging to allow weighted averaging of the two prediction signals. For example, P bi-pred =((8-w)*P 0 +w*P 1+4)>>3. Five weights are allowed in the weighted average dual prediction, w∈{-2, 3, 4, 5, 10}. When w is equal to 4, equal weighting factors are used to perform weighted averaging of the two predicted samples. For each dual-prediction CU, the weight w can be determined in one of the following two ways: 1) for non-merged CUs, the weight index is signaled after the motion vector difference; and / or 2) for merged CUs, the weight index is inferred from neighboring blocks based on the merged candidate index. BCW can be applied only to CUs with 256 or more luma samples (i.e., the CU width multiplied by the CU height is greater than or equal to 256). For low-latency pictures, all 5 weights are used. For non-low-latency pictures, only 3 weights (w∈{3, 4, 5}) are used.

[0087] In some implementations, block adaptive weighted prediction (BAWP) may include block-level weighted prediction to model the local illumination variation between a current block and its predicted block as a function of the local illumination variation between a current block template (or a causal sample of the current block) and a reference block template. Fig.10 , a template of a current block (1010) (or referred to as a current template, 1012) and a template of a reference block (1020) (or referred to as a reference template, 1022) are shown. The reference block may be indicated or determined by a motion vector (MV, 1030). The current block may be in a current picture (or current frame), and the reference block may be in a reference picture (or reference frame). In some implementations, the function may be a linear function. The parameters of the function may be represented by a scaling factor α and an offset β, which form a linear formula, i.e., α*p[x]+β, to compensate for illumination changes, where p[x] is the reference sample pointed to by the MV at position x on the reference picture. In some implementations, α and β may be derived based on the current block template and the reference block template, and they do not require signaling overhead. In some implementations, a BAWP flag may be signaled for a single inter-frame prediction mode to indicate the use of BAWP. BAWP may be applied to blocks having a size greater than or equal to 8x8 and encoded in a single inter-frame prediction mode. In some implementations, BAWP may be applied only to the luma component. In some implementations, BAWP may be referred to as local illumination compensation (LIC).

[0088] In some implementations, if the current block includes more than one motion vector, and each motion vector points to a block in a reference frame, multiple linear models can be used to describe the linear relationship between the current block and its multiple reference blocks in BAWP / LIC mode. For each linear model, the linear function includes a scaling α and an offset β, and the scaling α and / or the offset β can be derived from the template of the current block and the template of each reference block in the reference block, or can be represented by a signal in the bitstream and parsed at the decoder side to reconstruct the prediction block. Each reference block is specified by a motion vector associated with its reference frame. In one implementation, if the current block includes more than one motion vector, and each motion vector points to a block in the reference block, at least one linear model is used to describe the linear relationship between the current block and one of its reference blocks. In one implementation, if the current block includes more than one motion vector, and each motion vector points to a block in the reference frame, a linear model is used for each motion vector. Specifically, according to the disclosed method, an example decoder can receive an encoded video bitstream. In addition, the decoder can identify a first motion vector corresponding to a first reference block and a second motion vector corresponding to a second reference block associated with a current block of a current frame from the encoded video bitstream. Then, the decoder can obtain a first scaling factor corresponding to the first motion vector and a second scaling factor corresponding to the second motion vector by parsing the encoded video bitstream. In addition, the decoder can generate a first prediction block based on the first scaling factor and the first reference block according to a first linear formula, the first linear formula being associated with the first scaling factor and the first offset, and can generate a second prediction block based on the second reference block according to a second linear formula, the second linear formula being associated with the second scaling factor and the second offset. Then, the decoder can reconstruct the current block based on the first prediction block and the second prediction block.

[0089] In some implementations of explicit signaling with BAWP, where a current block is predicted from its reference block using a linear function with scaling α and offset β, the selection / value of scaling α and / or offset β may be signaled into the bitstream and parsed at the decoder side to reconstruct the predicted block. The reference block is specified by a motion vector associated with the current block. All supported values ​​for scaling α are stored in a predefined lookup table, and the index of the scaling factor in the lookup table may be signaled in the bitstream and parsed at the decoder side. The offset value β may be derived from a linear equation between the reference block and the current block. The offset value β is set to (cur_template_mean–α*ref_template_mean), where cur_template_mean indicates the mean of the samples in the template of the current block, and ref_template_mean indicates the mean of the samples in the template of the reference block.

[0090] In some implementations, one or more spatial motion vector predictors (SMVPs, both adjacent SMVPs and non-adjacent SMVPs), one or more temporal motion vector predictors (TMVPs), one or more additional MV candidates and additionally derived MVPs, and one or more reference library MVPs are additionally added. A stack with a fixed size can be generated at both the encoder side and the decoder side to store the MVPs, which is referred to as a motion vector predictor list.

[0091] The MVP list may be constructed to maintain a predetermined number of reconstructed MVP candidates (SMVP, TMVP or other derived MVP, or other types of MVP candidates) on both the encoder side and the decoder side for the current coding block or super block. When the current prediction block is encoded in inter prediction mode, the encoder will select the MVP that provides the best coding efficiency from the candidates in the MVP candidate list as the predictor for the motion vector of the current prediction block. The index of the selected MVP in the MVP list may be signaled in the bitstream. The decoder will correspondingly update the MVP list for the current coding block or super block when reconstructing the bitstream, extract the MVP index for the current inter prediction prediction block, obtain the MVP from the MVP candidate list according to the MVP index extracted in the MVP list, and use the MVP as the predictor for the motion vector of the current prediction block, so as to reconstruct the motion vector for the current prediction block (e.g., by combining the motion vector predictor extracted from the MVP list with the corresponding MVD). For example, the MVP list may represent a stack of a predetermined fixed size.

[0092] The spatial motion vector predictor may be a neighboring SMVP or a non-neighboring SMVP. A neighboring SMVP may refer to a motion vector predictor belonging to a prediction block that is adjacent to the current coding block or super block. A non-neighboring SMVP may refer to a motion vector predictor belonging to a prediction block that is not adjacent to the current coding block or super block. Other types of MVP candidates may also be derived based on the reconstructed motion vector. For another example, as described in further detail below, one or more additional MVP libraries may be maintained as one of the sources for establishing an MVP list.

[0093] like Fig.11 As shown, a spatial motion vector (MV) predictor may be derived from spatial neighboring blocks according to a current block (1120). The spatial neighboring blocks of the current block may include: i) adjacent spatial neighboring blocks (indicated by 1101 and 1102) that are direct neighbors on the top and left sides of the current block, and ii) non-adjacent spatial neighboring blocks (indicated by, for example, 1106, 1108, 1105, 1107, 1104, or 1103) that are close to but not directly adjacent to the current block. Fig.11An example of a set of spatial neighboring blocks of a luma block is shown in , where each spatial neighboring block is an 8×8 block.

[0094] In some implementations, spatially neighboring blocks are checked to find one or more MVs associated with the same reference frame index as the current block. For the current block, the search order for spatially neighboring 8×8 luma blocks is given by Fig.11 The sequence numbers 1101 to 1108 in FIG. 1 indicate as follows. 1. Check the upper adjacent row from left to right. 2. Check the left adjacent column from top to bottom. 3. Check the upper right adjacent block. 4. Check the upper left block adjacent block. 5. Check the first upper non-adjacent row from left to right. 6. Check the first left non-adjacent column from top to bottom. 7. Check the second upper non-adjacent row from left to right. 8. Check the second left non-adjacent column from top to bottom.

[0095] In some implementations, the neighboring candidates (1011 to 1103) may be a set of MVPs that are first placed in the MV predictor list before the TMVP; and / or the non-neighboring (also referred to as external candidates, i.e., candidates 1104 to 1108) may be placed in the MV predictor list after the TMVP. All SMVP candidates should have the same reference picture as the current block. That is, in the case where the current block has a single reference picture, the MVP candidate may have a single reference picture and the reference picture is the same as the reference picture of the current block, or may have a composite reference picture (2 reference pictures) and one of the reference pictures is the same as the reference picture of the current block, and the MVP candidate may be placed in the MV predictor list. In some other implementations, in the case where the current block has two reference pictures, only when the MVP candidate has two reference pictures, the two reference pictures are the same as the reference picture of the current block. In some implementations, the external lines 1105 and 1107 may also be removed from the non-neighboring candidates to reduce line memory.

[0096] In some implementations, a reference motion vector candidate library may be used. In some implementations, each buffer corresponds to a unique reference frame type corresponding to a single reference frame or a pair of reference frames that cover a single inter-frame mode and a composite inter-frame mode, respectively. All buffers are the same size. When a new MV is added to a full buffer, an existing MV is driven out to make room for the new MV. In some implementations, in addition to using a conventional reference MV list to generate the obtained reference MV candidates, the coding block can also refer to the MV candidate library to collect reference MV candidates. After encoding the super block, the MV library is updated using the MV used by the coding block of the super block. In some implementations, each tile has an independent MV reference library used by all super blocks within the tile. At the beginning of encoding each tile, the corresponding library is cleared. Thereafter, while encoding each super block within the tile, an MV from the library can be used as an MV reference candidate. At the end of encoding the super block, the library is updated.

[0097] In some implementations, the library update process can be as follows Fig.12 As shown. The library update process can be based on super blocks. That is, after a super block is encoded, the first (up to 64) candidate MVs used by each encoding block within the super block can be added to the library. During the update, a pruning process is also involved during the update.

[0098] In some implementations, the reference library reference process, after completing the reference MV candidate scan, if there is a vacancy in the candidate list, the encoder and / or decoder can refer to the MV candidate library (in the buffer with matching reference frame type) for additional MV candidates. From the end of the buffer backward to the beginning, the MV in the library buffer can be attached to the candidate list if it is not already in the candidate list.

[0099] In some implementations, for inter-coded blocks, overlapped block motion compensation (OBMC) may be allowed if the following conditions are met: the current block uses a single reference prediction, the width or height of the coding block is greater than or equal to 8, and at least one of the neighboring blocks is inter-coded. In some implementations, when OBMC is applied to the current block, initial inter-prediction samples are first generated by using the MV associated with the current block. Then, the final prediction samples are generated by mixing the inter-prediction samples for the current block with the inter-prediction samples derived using the MVs from the upper and left neighboring blocks. The maximum number of neighboring MVs may be limited by the size of the current block; up to four MVs from each of the upper and left neighboring blocks may be used in the OBMC process for the current block. For each of the upper and left neighboring blocks, if more than four MVs have been identified, OBMC is applied only to the prediction samples associated with the first four MVs.

[0100] Fig.13 A non-limiting example of the processing order of neighboring blocks is shown, where the values ​​(0 to 4) marked in each block indicate the processing order of the MVs of the current block and the neighboring blocks. Specifically, the MV of the current block is first applied to generate the inter-frame prediction sample p 0 (x, y). Then, the MV of block 1 is applied to generate the prediction sample p 1 (x, y). Then, the prediction samples in the overlapping area between block 0 and block 1 ( Fig.13 gray in the figure) is given as p 0 (x, y) and p 1 The weighted average of (x, y). The MVs of blocks 2, 3, and 4 are further applied and mixed in the same way. The weights w(x, y) are generated using the raised sine function as follows: Where y = 0, 1, ... and H / 2 - 1, and H is the current block height.

[0101] In some other example implementations, a warp motion model may be used. Conventional motion compensation may assume a translational motion model between a reference block and a target block, and the warp motion may utilize an affine model, which may be expressed by the following equation: Where [x, y] is the coordinate of the original pixel, and [x′, y′] is the warped coordinate of the reference block. As can be seen from the above formula, at most six parameters are required to specify the warp motion: a 3 and b 3 Specifies a regular translation MV; a 1 and b 2 Specifies the scaling along the MV; a 2 and b1 Specifies the rotation.

[0102] In some implementations, when a block is encoded as BAWP mode, a flag may be signaled to indicate whether explicit or implicit signaling is used for the BAWP scaling factor. In the case of implicit signaling of the BAWP scaling factor, the BAWP scaling factor and offset values ​​may be derived from a linear formula based on a template of the current block and a template of a reference block pointed to by a motion vector of the current block. In the case of explicit signaling of the BAWP scaling factor, another flag may be signaled to indicate which scaling factor is used for the current block and the offset is derived as zero. The supported scaling factors may be stored in one or more predefined lookup tables, and the index of the scaling factor in the lookup table is signaled into the bitstream and parsed at the decoder side.

[0103] In the present disclosure, the lookup table may also be referred to as a list, and the scaling factor lookup table may be referred to as a list of scaling factor candidates. In the present disclosure, the NEARMV mode may be referred to as a coding mode that inherits the motion vectors of neighboring blocks; and / or the NEWMV mode may be referred to as a coding mode that signals the motion vector difference relative to a motion vector predictor selected from a spatial neighboring block or a temporal neighboring block; and / or the AMVDNEWMV mode may be referred to as a coding mode that signals the motion vector difference relative to a motion vector predictor selected from a spatial neighboring block or a temporal neighboring block and the precision of the motion vector is implicitly determined based on the magnitude of the motion vector.

[0104] In some implementations, there are some problems or difficulties associated with the BAWP method, in particular, the BAWP method may only be applicable to the case where there is only one motion vector for the current block, which can be solved or improved to improve encoding / decoding efficiency. For non-limiting examples, the current block may have more than one motion vector, and in such cases, there may be room for further improvement in using BAWP or other methods to improve encoding / decoding efficiency. The present disclosure describes various embodiments for providing extensions to BAWP, solving at least one of the problems or difficulties discussed above, improving encoding / decoding efficiency, and advancing video codec technology. Various embodiments can provide more accurate predictions by using multiple reference blocks for prediction; and / or can save signaling by deriving a model of motion vectors.

[0105] The various embodiments and / or implementations described in this disclosure may be performed individually or in combination in any order. In addition, each of the method (or embodiment), encoder, and decoder may be implemented by a processing circuit system (e.g., one or more processors or one or more integrated circuits). One or more processors execute a program stored in a non-transitory computer-readable medium. In this disclosure, the term block may be interpreted as a prediction block, coding block, or coding unit (CU). In this disclosure, the direction of the reference frame may be determined by whether the reference frame is before or after the current frame in display order.

[0106] Fig.14 A flowchart 1400 of an exemplary method is shown, which follows the basic principles of the implementation method for decoding a current block of a current frame in a coded video bitstream, and the exemplary method can be performed by an electronic device (e.g., a decoder). The exemplary decoding method flow starts at 1401 and can include some or all of the following steps: S1410, receiving a coded video bitstream; S1420, identifying a first motion vector corresponding to a first reference block and a second motion vector corresponding to a second reference block associated with the current block of the current frame from the coded video bitstream; S1430, obtaining a first scaling factor corresponding to the first motion vector and a second scaling factor corresponding to the second motion vector by parsing the coded video bitstream; S1440, generating a first prediction block based on the first scaling factor and the first reference block according to a first linear formula, the first linear formula being associated with the first scaling factor and the first offset; S1450, generating a second prediction block based on the second reference block according to a second linear formula, the second linear formula being associated with the second scaling factor and the second offset; and / or S1460, reconstructing the current block based on the first prediction block and the second prediction block. The example method ends at S1499.

[0107] Various embodiments include another exemplary method that follows the basic principles of the above implementation for decoding a current block of a current frame in a coded video bitstream, which can be performed by an electronic device (e.g., a decoder). The exemplary decoding method may include some or all of the following steps: receiving a coded video bitstream; identifying multiple motion vectors of the current block based on the coded video bitstream, the multiple motion vectors including a first motion vector corresponding to a first reference block and a second motion vector corresponding to a second reference block; identifying a first scaling factor corresponding to the first motion vector based on the coded video bitstream; generating a first prediction block based on the first scaling factor and the first reference block according to a first linear formula; generating a second prediction block based on the second reference block according to a second formula; and / or reconstructing the current block based on the first prediction block and the second prediction block.

[0108] In any part or combination of the above implementations, the method may further include: obtaining a first scaling factor and a second scaling factor based on a syntax element represented by a signal in a coded bit stream; and / or deriving a first offset and a second offset based on a first linear equation and a second linear equation, respectively, based on the coded bit stream.

[0109] In any part or combination of the above implementations, the second equation is a second linear equation.

[0110] In any part or combination of the above implementations, the method may also include: extracting, by the device, a second scaling factor corresponding to a second motion vector based on a coded video bitstream; deriving, by the device, a first offset of the first linear equation based on a current template of the current block and a first reference template of the first reference block; and / or deriving, by the device, a second offset of the second linear equation based on the current template of the current block and a second reference template of the second reference block.

[0111] In any part or combination of the above implementations, identifying a first scaling factor corresponding to a first motion vector based on a coded video bitstream includes: deriving, by the device, a first derived scaling factor and a first offset of a first linear equation based on a current template of a current block and a first reference template of a first reference block; identifying, by the device, a first scaling factor adjustment based on the coded video bitstream; and / or generating, by the device, a first scaling factor based on the first derived scaling factor and the first scaling factor adjustment.

[0112] In any portion or combination of the above implementations, the plurality of supported scaling factors corresponding to the plurality of motion vectors are symmetrically distributed with respect to the predefined value.

[0113] In any part or combination of the above implementations, a first scaling factor corresponding to the first motion vector is signaled in the encoded video bitstream; and / or a second scaling factor corresponding to the second motion vector is a default predefined value, or is derived based on a current template of the current block and a second reference template of the second reference block.

[0114] In any part or combination of the above implementations, a first picture order count (POC) distance between a first reference frame of a first reference block and a current frame is greater than a second POC distance between a second reference frame of a second reference block and the current frame; a first error cost of the first motion vector is greater than a second error cost of the second motion vector; and / or at least one syntax indication signals a first scaling factor of the first motion vector.

[0115] In any part or combination of the above implementations, the first error cost includes: the sum of absolute differences (SAD) or the sum of squared errors (SSE) between the template of the current block and the following prediction template of the current block: the prediction template comes from a first template of a first reference block using the derived scaling factor and offset; and / or the second error cost includes: the sum of absolute differences (SAD) or the sum of squared errors (SSE) between the template of the current block and the following prediction template of the current block: the prediction template comes from a second template of a second reference block using the derived scaling factor and offset.

[0116] In any part or combination of the above implementations, reconstructing the current block based on the first prediction block and the second prediction block includes: performing weighted averaging on the first prediction block and the second prediction block to obtain the current block.

[0117] In any part or combination of the above implementations, the second formula corresponds to a prediction model other than a linear model; and / or reconstructing the current block based on the first prediction block and the second prediction block includes: performing a weighted average on the first prediction block and the second prediction block to obtain the current block

[0118] In any portion or combination of the above implementations, the first motion vector is signaled to use a first linear formula; and / or a first error cost of the first motion vector is greater than a second error cost of the second motion vector.

[0119] In any part or combination of the above implementations, the first error cost includes: the sum of absolute differences (SAD) or the sum of squared errors (SSE) between the template of the current block and the following prediction template of the current block: the prediction template comes from a first template of a first reference block using the derived scaling factor and offset; and / or the second error cost includes: the sum of absolute differences (SAD) or the sum of squared errors (SSE) between the template of the current block and the following prediction template of the current block: the prediction template comes from a second template of a second reference block using the derived scaling factor and offset.

[0120] In any part or combination of the above implementations, the method may further include: extracting, by the device based on the encoded video bitstream, a flag indicating which of the following models is used for the second formula: a translational motion model, a warping motion model, or an overlapped block motion compensation (OBMC) model.

[0121] In any part or combination of the above implementations, the second equation is a second linear equation; and / or the first linear equation and the second linear equation share at least one of: a same scaling factor or a same offset.

[0122] In any part or combination of the above implementations, the second equation is a second linear equation; and / or the first linear equation and the second linear equation have different scaling factors and share the same offset.

[0123] In various embodiments of the present disclosure, in the case where the current block includes more than one motion vector and each motion vector points to a block in a reference frame, multiple linear models can be used to describe the linear relationship between the current block and its multiple reference blocks in BAWP / LIC mode. For each linear model, the linear function includes a scaling factor α and an offset β, wherein the scaling factor α and / or the offset β can be derived from a template of the current block and a template of each reference block in the reference block, or the scaling factor α and / or the offset β can be signaled by the encoder into the bitstream and then parsed by the decoder to reconstruct the prediction block to obtain the current block. Each reference block in the reference block is specified by a motion vector associated with its reference frame.

[0124] In various embodiments, when the current block includes more than one motion vector and each motion vector points to one of the reference blocks, at least one linear model is employed to describe the linear relationship between the current block and one of its reference blocks.

[0125] In some implementations, when the current block includes more than one motion vector and each motion vector points to a block in the reference frame, a linear model is used for each motion vector. For non-limiting example, when the current block has two motion vectors, two linear models are used for the two motion vectors.

[0126] In some implementations, the scaling factor or index of the scaling factor is signaled separately for each model, and / or the offset for each model is derived based on a linear model formula.

[0127] In some implementations, the supported adjustment values ​​(or delta values) of the scaling factors are stored in a predefined lookup table, and the index of the adjustment of the scaling factor is signaled separately for each model, and the offset of each model is derived separately based on a linear model formula. The adjustment (or delta value) of the scaling factor is based on the scaling factor derived between the template of the current block and the template of the reference block pointed to by the motion vector.

[0128] In some implementations, the supported scaling factors or scaling factor adjustments are symmetrically distributed around a threshold value (TH), and for non-limiting examples, TH is equal to 0 or 1.

[0129] In some implementations, a portion of the scaling factor is signaled and another portion of the scaling factor is not signaled. The portion of the scaling factor that is not signaled may be derived based on a template of the current block and a template of a reference block pointed to by the motion vector, or may be equal to a default value. For non-limiting examples, in the case where the current block has two motion vectors, two linear models are used for the two motion vectors respectively; the scaling factor of one linear model is signaled, and the scaling factor of the other linear model takes a default value or is derived based on a template of the current block and a template of a reference block pointed to by the motion vector. In some implementations, the default value may be 1.

[0130] In some implementations, the decision of which scaling factor to signal may depend on the SAD / SSE cost between the template of the current block and the prediction template of the current block from the template of the reference block using the derived scaling factor and offset. For non-limiting example, the scaling factor with the larger SAD / SSE cost may be signaled, and the scaling factor with the smaller SAD / SSE may be derived or defaulted.

[0131] In some implementations, the decision of which scaling factor to signal may depend on the POC of the reference block relative to the current block. For non-limiting example, scaling factors with larger POCs may be signaled, and scaling factors with smaller POCs may be derived or defaulted.

[0132] In some implementations, one or more syntaxes may be signaled by an encoder and / or parsed by a decoder to indicate which scaling factor is selected for signaling or to be derived.

[0133] In various embodiments, in the case where the current block has more than one motion vector, where each motion vector points to a different block in the reference frame, a linear model may be used to generate prediction samples for one of the motion vectors. Other models (e.g., translational motion, warp motion, or OBMC) may be used for the other motion vectors to generate prediction samples. Two or more prediction blocks are then weighted and averaged to generate prediction samples for multiple predictions (e.g., bi-prediction of two motion vectors).

[0134] In some implementations, the decision about which motion vector to use with the linear model can be signaled in the bitstream by the encoder and resolved at the decoder side.

[0135] In some implementations, the decision about which motion vector to use with the linear model can be derived implicitly based on the encoding information of the current block and / or neighboring blocks. In one example, the decision can depend on the SAD / SSE cost between the template of the current block and the prediction template of the current block from the template of the reference block using the derived scaling factor and offset. For non-limiting examples, the decision with the smaller SAD / SSE cost can use the linear model, and the decision with the larger SAD / SSE can use a model other than the linear model.

[0136] In some implementations, in case of a decision not to use a linear model for a motion vector of the current block, another flag may be signaled to indicate which of the following models to use for the motion vector: translation model, warp model, or OBMC.

[0137] In various embodiments, when the current block consists of more than one motion vector and each motion vector points to a block in the reference frame, a linear model is used for each motion vector. In some implementations, the linear models associated with the multiple motion vectors may share the same value of a portion of the linear model parameters. For non-limiting examples, when the current block has two motion vectors, two linear models are used for the two motion vectors, respectively, and the two linear models may have different scaling factors α but the same offset β.

[0138] Various embodiments of the present disclosure may include a method performed by an encoder for encoding a current block into a video bitstream, the method including inverse processing of any part or all of the processing described for a decoder. Various embodiments of the present disclosure may include a method performed by one or more electronic devices (e.g., a streaming media player) for encoding a current block of a streaming video, the method including any part or all of the processing for a decoder and / or any part or all of the processing described for an encoder.

[0139] The above operations can be combined or arranged in any number or order as needed. Two or more of the steps and / or operations can be performed in parallel. The embodiments and implementations in the present disclosure can be used alone or in combination in any order. In addition, each of the method (or embodiment), encoder and decoder can be implemented by a processing circuit system (e.g., one or more processors or one or more integrated circuits). In one example, one or more processors execute a program stored in a non-transient computer-readable medium. The embodiments in the present disclosure can be applied to luminance blocks or chrominance blocks. The term block can be interpreted as a prediction block, a coding block or a coding unit, i.e., a CU. The term block here can also be used to refer to a transform block. In the following items, when talking about block size, it can refer to block width or height, or the maximum value of width and height, or the minimum value of width and height, or area size (width*height), or the aspect ratio of the block (width:height or height:width).

[0140] 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.15 A computer system (1800) suitable for implementing certain embodiments of the disclosed subject matter is shown.

[0141] Computer software may be encoded using any suitable machine code or computer language, which may be subjected to mechanisms such as assembly, compilation, linking, etc. 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 interpretation, microcode execution, etc.

[0142] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, IoT devices, etc.

[0143] Fig.15 The components for the computer system (1800) shown in the example 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 present disclosure. 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 (1800).

[0144] The computer system (1800) may include certain human-machine interface input devices. The input human-machine interface devices may include one or more of the following (only one of each is depicted): keyboard (1801), mouse (1802), touch pad (1803), touch screen (1810), data gloves (not shown), joystick (1805), microphone (1806), scanner (1807), camera (1808).

[0145] The computer system (1800) may also include certain human-machine interface output devices. Such human-machine interface output devices may stimulate the senses of one or more human users through, for example, tactile output, sound, light, and smell / taste. Such human-machine interface output devices may include: tactile output devices (e.g., tactile feedback through a touch screen (1810), a data glove (not shown), or a joystick (1805), but there may also be tactile feedback devices that are not used as input devices); audio output devices (e.g., speakers (1809), headphones (not depicted)); visual output devices (e.g., screens (1810), 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 may be capable of outputting two-dimensional visual output or more than three-dimensional output through means such as stereo output; virtual reality glasses (not depicted); holographic displays and smoke generators (not depicted)); and printers (not depicted).

[0146] The computer system (1800) may also include human-accessible storage devices and their associated media, such as optical media including CD / DVD ROM / RW (1820) with CD / DVD etc. media (1821), thumb drives (1822), removable hard drives or solid-state drives (1823), traditional magnetic media such as tapes and floppy disks (not depicted), dedicated ROM / ASIC / PLD based devices such as security dongles (not depicted), etc.

[0147] 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 include transmission media, carrier waves, or other transitory signals.

[0148] The computer system (1800) may also include an interface (1854) to one or more communication networks (1855). The network may be, for example, a wireless network, a wired network, an optical network. The network may also be a local area network, a wide area network, a metropolitan area network, an in-vehicle and industrial network, a real-time network, a delay-tolerant network, etc. Examples of networks include: a local area network (e.g., Ethernet, wireless LAN); 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 CAN bus, etc.

[0149] The above-mentioned human-machine interface device, human-accessible storage device, and network interface may be attached to the core ( 1840 ) of the computer system ( 1800 ).

[0150] The core (1840) may include one or more central processing units (CPUs) (1841), graphics processing units (GPUs) (1842), dedicated programmable processing units in the form of field programmable gate areas (FPGAs) (1843), hardware accelerators for certain tasks (1844), graphics adapters (1850), etc. These devices, along with read-only memory (ROM) (1845), random access memory (1846), internal mass storage devices (e.g., internal non-user accessible hard drives, SSDs, etc.) (1847) may be connected via a system bus (1848). In some computer systems, the system bus (1848) may be accessed in the form of one or more physical plugs to enable expansion by additional CPUs, GPUs, etc. Peripheral devices may be attached to the core's system bus (1848) directly or via a peripheral bus (1849). In an example, a screen (1810) may be connected to a graphics adapter (1850). The architecture of the peripheral bus includes PCI, USB, etc.

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

[0152] Although the present disclosure has described several exemplary embodiments, there are changes, permutations, and various substitute equivalents that fall within the scope of the present disclosure. Therefore, it should be recognized that those skilled in the art will be able to conceive of many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and are therefore within the spirit and scope of the present disclosure.

Claims

1. A method for decoding a current block of a current frame in a coded video bitstream, the method comprising: Receiving the encoded video bitstream by an apparatus including a memory storing instructions and a processor in communication with the memory; identifying, by the device, from the encoded video bitstream, a first motion vector corresponding to a first reference block and a second motion vector corresponding to a second reference block associated with a current block of the current frame; Obtaining, by the device, a first scaling factor corresponding to the first motion vector and a second scaling factor corresponding to the second motion vector by parsing the encoded video bitstream; generating, by the device, a first prediction block based on the first scaling factor and the first reference block according to a first linear equation, the first linear equation being associated with the first scaling factor and a first offset; generating, by the device, a second prediction block based on the second reference block according to a second formula, wherein the second formula is associated with the second scaling factor and the second offset; as well as The device reconstructs the current block based on the first prediction block and the second prediction block.

2. The method according to claim 1, further comprising: obtaining the first scaling factor and the second scaling factor based on a syntax element signaled in the coded video bitstream; as well as Based on the encoded bit stream, the first offset and the second offset are derived based on the first linear equation and the second equation, respectively.

3. The method according to claim 1, further comprising: extracting, by the device, the second scaling factor corresponding to the second motion vector based on the encoded video bitstream; The device derives the first offset of the first linear equation based on a current template of the current block and a first reference template of the first reference block; as well as The second offset of the second formula is derived by the device based on the current template of the current block and a second reference template of the second reference block.

4. The method according to claim 1, wherein: Obtaining the first scaling factor corresponding to the first motion vector comprises: deriving, by the device, a first derived scaling factor of the first linear equation and the first offset based on a current template of the current block and a first reference template of the first reference block; identifying, by the apparatus, a first scale factor adjustment based on the encoded video bitstream; and The first scaling factor is generated by the apparatus based on the first derived scaling factor and the first scaling factor adjustment.

5. The method according to claim 1, wherein: A plurality of supported scaling factors corresponding to the plurality of motion vectors are distributed symmetrically with respect to a predefined value.

6. The method according to claim 1, wherein: signaling, in the coded video bitstream, the first scaling factor corresponding to the first motion vector; as well as The second scaling factor corresponding to the second motion vector is a default predefined value or is derived based on a current template of the current block and a second reference template of the second reference block.

7. The method according to claim 6, wherein: A first picture order count (POC) distance between a first reference frame of the first reference block and the current frame is greater than a second POC distance between a second reference frame of the second reference block and the current frame; A first error cost of the first motion vector is greater than a second error cost of the second motion vector; or At least one syntax indication signals the first scaling factor of the first motion vector.

8. The method according to claim 7, wherein: The first error cost comprises a sum of absolute differences (SAD) or a sum of squared errors (SSE) between a template of the current block and a prediction template of the current block from a first template of the first reference block using the derived scaling factor and offset; and The second error cost comprises a sum of absolute differences (SAD) or a sum of squared errors (SSE) between a template of the current block and a prediction template of the current block from a second template of the second reference block using the derived scaling factor and offset.

9. The method according to claim 1, wherein: Reconstructing the current block based on the first prediction block and the second prediction block includes: A weighted average is performed on the first prediction block and the second prediction block to obtain the current block.

10. The method of claim 1, wherein: The second formula corresponds to a prediction model other than a linear model; and Reconstructing the current block based on the first prediction block and the second prediction block includes: A weighted average is performed on the first prediction block and the second prediction block to obtain a current block.

11. The method according to claim 10, wherein: signaling that the first motion vector uses a first linear formula; or A first error cost of the first motion vector is greater than a second error cost of the second motion vector.

12. The method according to claim 11, wherein: The first error cost comprises a sum of absolute differences (SAD) or a sum of squared errors (SSE) between a template of the current block and a prediction template of the current block from a first template of the first reference block using the derived scaling factor and offset; and The second error cost comprises a sum of absolute differences (SAD) or a sum of squared errors (SSE) between a template of the current block and a prediction template of the current block from a second template of the second reference block using the derived scaling factor and offset.

13. The method according to claim 10, further comprising: A flag is extracted by the apparatus based on the encoded video bitstream, indicating which of the following models is used for the second formula: a translational motion model, a warping motion model, or an overlapped block motion compensation (OBMC) model.

14. The method of claim 1, wherein: The second formula is a second linear formula; and The first linear equation and the second linear equation share at least one of: a same scaling factor or a same offset.

15. The method of claim 1, wherein: The second formula is a second linear formula; and The first linear equation and the second linear equation have different scaling factors and share the same offset.

16. An apparatus for decoding a current block of a current frame in a coded video bitstream, the apparatus comprising: a memory for storing instructions; as well as A processor in communication with the memory, wherein when the processor executes the instructions, the processor is configured to cause the apparatus to perform the method of any one of claims 1 to 15.

17. A non-transitory computer-readable storage medium storing instructions, wherein: When the instructions are executed by a processor, the instructions are configured to cause the processor to perform the method according to any one of claims 1 to 15.