Multi-model for block adaptive weighted prediction
By using block adaptive weighted prediction (BAWP) and multiple linear models to simulate local lighting compensation (LIC) in video encoding technology, the problem of difficulty in effectively compensating local lighting changes in the prior art is solved, improving the video decoding quality and reducing signaling costs.
Patent Information
- Application Number
- CN202380062846.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-30
- Filing Date
- 2023-10-31
- Publication Date
- 2025-04-08
AI Technical Summary
Existing video encoding technology is difficult to effectively compensate for local lighting changes, resulting in a decline in video decoding quality.
Block Adaptive Weighted Prediction (BAWP) technology is used to simulate local lighting compensation (LIC) by using multiple linear models to more accurately predict sample values in the current block.
Improve the quality of video decoding, enhance the compensation ability for local lighting changes, and reduce signaling costs.
Smart Images

Figure CN119790647A_ABST
Abstract
Description
Cross-references
[0001] This application is based upon and claims the benefit of priority to U.S. non-provisional application No. 18 / 497,336, filed on October 30, 2023, which is based upon and claims the benefit of priority to U.S. provisional application No. 63 / 463,813, filed on May 3, 2023, each of 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 enhancements to Block Adaptive Weighted Prediction (BAWP) and Local Illumination Compensation (LIC) to compensate for local illumination variations. Background Art
[0003] Uncompressed digital video may include a series of pictures and may have specific bit rate requirements for transmission bandwidth in storage, data processing, and streaming applications. One purpose of video encoding and video decoding may be to reduce redundancy in an 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 enhancing block adaptive weighted prediction (BAWP) to simulate local illumination compensation (LIC).
[0005] According to one aspect, an embodiment of the present disclosure provides a method for decoding a current block in a video bitstream in a decoder. The method includes: receiving a video bitstream including a current block and a reference block, the reference block being identified by a motion vector associated with the current block; grouping samples in the current block into at least a first class and a second class based on a predefined criterion, the first class and the second class being associated with a first linear model and a second linear model, respectively, wherein the first linear model has at least a scale factor α1 or an offset β1, and wherein the second linear model has at least a scale factor α2 different from α1 or an offset β2 different from β1; determining the first linear model and the second linear model; predicting samples in the first class based on the reference block and the first linear model; predicting samples in the second class based on the reference block and the second linear model; and reconstructing the current block based on the predicted samples in the first class and the second class.
[0006] According to another aspect, an embodiment of the present disclosure provides a device or decoder for decoding 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-mentioned 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, causes the computer to perform the above-mentioned method for video decoding and / or encoding.
[0008] The above-mentioned 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] Additional features, properties, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:
[0010] Figure 1 A schematic illustration showing a simplified block diagram of a communication system (100) according to an example embodiment;
[0011] Figure 2 A schematic illustration showing a simplified block diagram of a communication system (200) according to an example embodiment;
[0012] Figure 3 A schematic illustration showing a simplified block diagram of a video decoder according to an example embodiment;
[0013] Figure 4 A schematic illustration showing a simplified block diagram of a video encoder according to an example embodiment;
[0014] Figure 5 shows a block diagram of a video encoder according to another example embodiment;
[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 Composite motion compensation is shown.
[0020] Fig.11 Example interpolated reference frames for motion compensation are shown.
[0021] Fig.12 Examples of a template of a current block and a template of a reference block are shown.
[0022] Fig.13 Various partitioning examples in geometric partitioning mode are shown.
[0023] Fig.14 An example block is shown divided into two groups (classes), where each group has a linear model.
[0024] Fig.15 Example current blocks and reference blocks are shown, as well as example partitions based on one partition line.
[0025] Fig.16 An example logic flow of a method in the present disclosure is shown.
[0026] Fig.17 A schematic diagram of a computer system according to an example implementation of the present disclosure is shown. DETAILED DESCRIPTION
[0027] 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, device, component or system. Therefore, embodiments of the present invention may, for example, take the form of hardware, software, firmware or any combination thereof.
[0028] 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" as used herein do not necessarily refer to the same embodiment, and the phrases "in another embodiment" or "in other embodiments" as used herein do not necessarily refer to different embodiments. Similarly, the phrases "in one implementation" or "in some implementations" as used herein do not necessarily refer to the same implementation, and the phrases "in another implementation" or "in other implementations" as used herein do not necessarily refer to different implementations. For example, it is intended that the claimed subject matter includes a combination of all or part of the exemplary embodiments / implementations.
[0029] Typically, terms can be understood at least in part from usage in context. For example, terms such as "and", "or" or "and / or" as 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, e.g., 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" as 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, or 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.
[0030] 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 so limited. The embodiments of the present disclosure can be implemented in desktop computers, laptop computers, tablet computers, media players, wearable computers, special video conferencing devices, etc. 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. Communication network (150) can exchange data in circuit switching, packet switching and / or other types of channels. Representative networks include telecommunication networks, local area networks, wide area networks and / or the Internet.
[0031] As examples of applications for the disclosed subject matter, Figure 2 The placement of the video encoder and 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.
[0032] like Figure 2As shown, a video streaming system may include a video capture subsystem (213) that 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 of hardware and software 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 depicted).
[0033] 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 to replace Figure 2 A video decoder (210) in an example of FIG.
[0034] like Figure 3As shown, a receiver (331) can receive one or more encoded video sequences from a channel (301). To prevent network jitter and / or process playback timing, a buffer memory (315) can be set between the receiver (331) and an entropy decoder / parser (320) (hereinafter referred to as "parser (320)"). The parser (320) can reconstruct symbols (321) based on the encoded video sequence. The categories of these symbols include: information for managing the operation of the video decoder (310), and information that may be used to control a rendering device such as a display (312) (e.g., a display screen). The parser (320) can parse / entropy decode the encoded video sequence. The parser (320) can extract a set of subgroup parameters for at least one of the pixel subgroups in the video decoder from the encoded video sequence. The subgroups can include groups of pictures (Groups of Picture, GOP), pictures, tiles, slices, macroblocks, coding units (Coding Unit, CU), blocks, transform units (Transform Unit, TU), prediction units (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 encoded video sequence. The reconstruction of the symbols (321) may involve a number of different processing or functional units. The units involved and how they are involved may be controlled by subgroup control information parsed by the parser (320) from the encoded video sequence.
[0035] The first unit may include a scaler / inverse transform unit (351). The scaler / inverse transform unit (351) receives quantized transform coefficients as symbol(s) (321) and control information from the parser (320), including information indicating which inverse transform to use, block size, quantization factors / parameters, quantization scaling matrix, etc. The scaler / inverse transform unit (351) may output a block including sample values that may be input into an aggregator (355).
[0036] 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 prediction information that has been generated by the intra-prediction unit (352) to the output sample information as provided by the scaler / inverse transform unit (351) on a per-sample basis.
[0037] In other cases, the output samples of the scaler / inverse transform unit (351) may belong to an inter-coded and potentially 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) (the output of unit 351 may be referred to as residual samples or residual signal) by an aggregator (355) to generate output sample information.
[0038] 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.
[0039] 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 to replace Figure 4 A video encoder (403) in an example.
[0040] 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 rate control related parameters (picture skipping, quantizer, lambda value for rate distortion optimization techniques, ...), picture size, picture group (GOP) layout, maximum motion vector search range, etc.
[0041] 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). The decoder (433) reconstructs symbols to create sample data in a manner similar to that in which the (remote) decoder would create sample data, although the embedded decoder 433 processes the coded video stream of the source encoder 430 without entropy coding (because in the video compression technology considered in the disclosed subject matter, any compression between the coded video bitstream in the symbol and the entropy coding can be lossless). At this point, it can be observed that any decoder technology other than parsing / entropy decoding that may only exist in the decoder 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. Therefore, the description of the encoder technology can be simplified because the encoder technology is opposite to the decoder technology described comprehensively. A more detailed description of the encoder is provided below only in certain areas or aspects.
[0042] During operation, in some example implementations, the source encoder (430) may perform motion compensated predictive coding, which predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures."
[0043] 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 that has common content (absent transmission errors) with the reconstructed reference picture to be obtained by the far-end (remote) video decoder.
[0044] 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 suitable prediction references for the new picture.
[0045] The controller (450) can manage encoding operations of the source encoder (430), including, for example, setting parameters and subgroup parameters for encoding video data.
[0046] The outputs of all of the above functional units may be entropy encoded 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 storing the encoded video data. 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).
[0047] The controller (450) may manage the operation of the video encoder (403). During encoding, the controller (450) may assign a particular encoding picture type to each encoded picture, which may affect the encoding techniques that may be applied to the corresponding picture. For example, a picture may generally be designated as one of the following picture types: intra picture (I picture), predictive picture (P picture), bidirectional predictive picture (B picture), multi-predictive picture. A source picture may generally be spatially subdivided into a plurality of sample coding blocks, as described in further detail below.
[0048] 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 image in a video image sequence and encode the processed block into an encoded image that is part of an encoded video sequence. The example video encoder (503) may be used in place of Figure 4 A video encoder (403) in an example.
[0049] 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.
[0050] exist Figure 5 In the example of FIG. 5 , the video encoder ( 503 ) includes: Figure 5 The example arrangement shown in FIG. 1 includes 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.
[0051] 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., a block in a previous picture and a block in a subsequent picture in display order); generate inter-frame prediction information (e.g., motion vectors, merge mode information, description of redundant information according to inter-frame coding techniques); and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique.
[0052] The intra encoder (522) is configured to: receive samples of a current block (e.g., a processing block); compare the block with already encoded blocks in the same picture; and generate quantized coefficients after transformation; and in some cases also generate intra prediction information (e.g., intra prediction direction information according to one or more intra coding techniques).
[0053] The general controller (521) can 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.
[0054] 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 quantized 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.
[0055] Figure 6 A 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 4A video decoder (410) in an example of FIG.
[0056] 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.
[0057] The entropy decoder (671) may be configured to reconstruct certain symbols according to the coded picture, which represent the syntax elements constituting 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 the reconstructed picture as a part of the reconstructed video.
[0058] 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 executing software instructions.
[0059] Turning to the block partitioning for encoding and decoding, the general partitioning can start from the basic block and can follow a predefined set of rules, a specific pattern, a partitioning tree, or any partitioning structure or scheme. The partitioning can be hierarchical and recursive. After following any of the example partitioning processes described below or other processes or combinations thereof to block or partition the basic block, a final set of partitions or coding blocks can be obtained. Each of these partitions can be at one of the various partitioning levels in the partitioning hierarchy and can have various shapes. Each of the partitions can be referred to as a coding block (CB). For the various example partitioning implementations further described below, each generated CB can have any allowed size and partitioning level. Such partitions are called coding blocks because they can form the following units, for which some basic encoding / decoding decisions can be made and encoding / decoding parameters can be optimized, determined, and represented in the encoded video bitstream with signals. 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 of 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 structure of all color channels may be collectively referred to as coding tree units (CTUs). The division modes or structures for various color channels in a CTU may be the same or different.
[0060] In some implementations, the partitioning tree schemes or structures for the luma channel and the chroma channel may not need to be the same. In other words, the luma channel and the chroma channel may have separate coding tree structures or modes. In addition, whether the luma channel and the chroma channel use the same or different coding partitioning tree structures and the actual coding partitioning tree structures 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 separate coding partitioning tree structures or coding partitioning tree structure modes, while for a P slice or a B slice, the luma channel and the chroma channel may share the same coding partitioning tree scheme. When a separate coding partitioning tree structure or mode is applied, the luma channel is divided into CBs by one coding partitioning tree structure, and the chroma channel may be divided into chroma CBs by another coding partitioning tree structure.
[0061] Figure 7 An example predefined 10-way partitioning structure / pattern is shown that allows recursive partitioning to form a partition tree. A root block may start from a predefined level (eg, from a basic block at a 128x128 level or a 64x64 level). Figure 7 Example partition structures include various 2:1 / 1:2 and 4:1 / 1:4 rectangular partitions. In some example implementations, Figure 7 The rectangular partitions of are not allowed to be further subdivided. The coding tree depth can be further defined to indicate the split depth starting 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 can be divided into Figure 7 After one further split, the coding tree depth increases by 1. In some implementations, only full square partitions in 710 may be allowed to be Figure 7 The pattern is recursively partitioned to the next level of the partitioning tree.
[0062] In some other example implementations for coding block partitioning, a quadtree structure may be used. Such a quadtree split may be applied hierarchically and recursively to any square-shaped partition. Whether a basic block or an intermediate block or partition is further quadtree split may be adapted to various local characteristics of the basic block or intermediate block / partition.
[0063] In still other examples, the ternary partitioning scheme can be used to partition the basic block or any intermediate block, such as Figure 8 The ternary pattern can be implemented vertically as shown in 802, or horizontally as shown in 804. Although 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.
[0064] 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 basic block into a quadtree-binary-tree (QTBT) structure. In such a scheme, the basic block or intermediate block / partition can be quadtree split or binary split, subject to a set of predefined conditions (if specified). Fig. 9A specific example is shown in , where the basic block is first split into four partitions by a quadtree, as shown in 902, 904, 906 and 908. Thereafter, each of the generated partitions is divided into four additional partitions (such as 908) by a quadtree at the next level, or is binary split into two additional partitions (e.g., horizontally or vertically, such as 902 or 906, both of which are symmetrical), or is not split (such as 904). For square-shaped partitions, binary splitting or quadtree splitting can be recursively allowed, as shown in the entire example partitioning pattern of 910 and the corresponding tree structure / representation in 920, where the solid line represents the quadtree split and the dotted line represents the binary split. A flag can be used for each binary split node (non-leaf binary partition) to indicate whether the binary split is horizontal or vertical. For example, as shown in 920, consistent with the partitioning structure of 910, the flag "0" can represent a horizontal binary split, and the flag "1" can represent a vertical binary split. For quadtree split partitioning, there is no need to indicate the split type, because quadtree splitting always splits a block or partition horizontally and vertically to produce 4 sub-blocks / partitions of equal size. In some implementations, a flag "1" may indicate a horizontal binary split, and a flag "0" may indicate a vertical binary split.
[0065] In some example implementations of QTBT, the quadtree and binary splitting 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 basic 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
[0066] 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 blocks of chroma samples (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 first be applied to the CTU to generate quadtree leaf nodes. 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, it will not be split first through the binary tree because the size exceeds MaxBTSize (i.e., 64×64). Otherwise, nodes that do not exceed MaxBTSize can be split through the binary tree. Fig. 9 In the example of , the basic block is 128×128. According to a predefined set of rules, the basic block can only be quadtree split. The basic block has a partition depth of 0. Each of the four partitions generated is 64×64 - not exceeding MaxBTSize, and further quadtree or binary tree splits are possible at level 1. Continue with this process. When the binary tree depth reaches MaxBTDepth (i.e., 4), no further splits can be considered. When the width of the binary tree node is equal to MinBTSize (i.e., 4), no further horizontal splits can be considered. Similarly, when the height of the binary tree node is equal to MinBTSize, no further vertical splits are considered.
[0067] 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.
[0068] The above various CB partitioning schemes and further partitioning of CB to PB may be combined in any manner. The following specific implementations are provided as non-limiting examples.
[0069] Inter prediction may be implemented, for example, in a single reference mode or a composite reference mode. In some implementations, a skip flag may be first included in the bitstream of the current block (or at a higher level) to indicate whether the current block is inter-coded and is 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, one 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, for example, by weighted averaging. One or more reference blocks may be identified using one or more reference frame indexes and additionally using one or more corresponding motion vectors indicating the displacement between the reference block(s) and the current block relative to the frame (e.g., in horizontal and vertical pixels). For example, an inter-frame prediction block for a current block may be generated from a single reference block identified as a prediction block in a single reference mode by a motion vector in a reference frame, while for a composite reference mode, the 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. The motion vector(s) may be encoded and included in the bitstream in various ways.
[0070] In some example implementations, one or more reference picture lists including identifications of short-term reference frames and long-term reference frames for inter-frame 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-frame 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-frame 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 lengths of the L0 list and the L1 list may be signaled in the video bitstream. 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, the unidirectional inter-frame prediction may be in a single reference mode or in a composite reference mode. Bidirectional inter-frame prediction may be performed only in composite mode because bidirectional inter-frame prediction involves at least two reference blocks.
[0071] 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 the encoding system, the (one or more) current motion vectors of the current PB may be represented by (one or more) differences between the (one or more) current motion vectors and one or more other already encoded motion vectors (referred to as reference motion vectors). Such (one or more) differences in (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 the decoding system, (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 may 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 may be efficiently encoded. For another example, for blocks that are similarly positioned / located in space, the motion vectors may be correlated in time (between frames).
[0072] 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 a spatial position or temporal position 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 frame) 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 and top blocks 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.
[0073] 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.
[0074] 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 delta 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.
[0075] In some example implementations of MMVD, a distance index may be used to specify 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 offsets
[0076] In some example implementations of MMVD, a direction index may also be signaled, and the direction index is used to indicate 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 example 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 Directions to IDX 00 01 10 11 x-axis (horizontal) + – N / A N / A y-axis (vertical) N / A N / A + –
[0077] In some example implementations, the MVD may be scaled according to the difference in POC in each direction. If the difference in POC is the same in both lists, no scaling is required. Otherwise, if the difference in POC in reference list 0 is greater than the difference in POC of reference list 1, the MVD of reference list 1 is scaled. If the difference in POC 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 MV.
[0078] 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 signaled simultaneously. 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 the reference picture indexes of only 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 another motion vector difference "MVD1" is derived instead of signaled. For example, MVD1 can be derived as -MVD0. Thus, in the example symmetric MVD mode, only one MVD is signaled.
[0079] In some other example implementations of MV prediction, for both single reference mode and composite reference mode MV prediction, a coordination scheme may be used to implement general merge mode MMVD and some other types of MV prediction.Various syntax elements may be used to signal the manner in which the MV of the current block is predicted.
[0080] Inter-mode coding using Motion Vector Predictor (MVP)
[0081] In some example implementations, in a coding technique such as AV1, for each coding block of an inter frame, if the mode of the current block is not a skip mode but an inter coding mode, another flag may be signaled to indicate whether a single reference mode or a composite reference mode is used for the current block. The prediction block is generated by one motion vector in the single reference mode, while the prediction block is generated by weighted averaging two prediction blocks derived from two motion vectors in the composite reference mode.
[0082] For the single reference case, the following MV prediction modes can be signaled:
[0083] NEARMV - uses one of the motion vector predictors (MVP) in the list indicated by the DRL (Dynamic Reference List) index.
[0084] NEWMV - uses one of the motion vector predictors (MVPs) in the list signaled by the DRL index as a reference and applies a delta to the MVP.
[0085] GLOBALMV – Use motion vectors based on frame-level global motion parameters.
[0086] Likewise, for the composite reference inter prediction mode using two reference frames corresponding to the two MVs to be predicted, the following MV prediction modes may be signaled:
[0087] NEAR_NEARMV—Use one of the motion vector predictors (MVPs) in the list signaled by the DRL index.
[0088] NEAR_NEWMV—Uses one of the motion vector predictors (MVPs) in the list signaled by the DRL index as a reference and sends a delta MV for the second MV.
[0089] NEW_NEARMV—Uses one of the motion vector predictors (MVPs) in the list signaled by the DRL index as a reference and sends a delta MV for the first MV.
[0090] NEW_NEWMV—Uses one of the motion vector predictors (MVPs) in the list signaled by the DRL index as a reference and sends a delta MV for both MVs.
[0091] GLOBAL_GLOBALMV – Use the MV from each reference based on its frame level global motion parameters.
[0092] The term "NEAR" above refers to MV prediction using a reference MV as a general merge mode without MVD, while the term "NEW" refers to MV prediction involving using a reference MV as in MMVD mode and offsetting the reference MV using a motion vector difference (MVD) represented by a signal. For composite inter-frame prediction, the reference base motion vector and motion vector increment above may generally be different or independent between the two references, even though the two references may be correlated and such correlation may be exploited to reduce the amount of information required to signal the two motion vector increments. In such a case, joint signaling of the two MVDs may be implemented and indicated in the bitstream.
[0093] The above dynamic reference list (DRL) can be used to store a set of indexed motion vectors that are dynamically maintained and considered as candidate motion vector predictors.
[0094] Motion Vector Difference Coding
[0095] In some example implementations, in coding techniques such as AV1, fractional such as 1 / 8 pixel (i.e., one eighth pixel) motion vector precision (or accuracy) is allowed / supported, and the following syntax is used to signal the motion vector difference in reference frame list 0 (L0) or reference frame list 1 (L1). mv_joint specifies which components of the motion vector difference are non-zero: ο0 indicates that there is no non-zero MVD along the horizontal or vertical direction ο1 indicates that there is non-zero MVD only along the horizontal direction ο2 indicates that there is non-zero MVD only along the vertical direction ο3 indicates that there is non-zero MVD in both horizontal and vertical directions mv_sign specifies whether the motion vector difference is positive or negative mv_class specifies the class of the motion vector difference. As shown in Table 3, a higher class means that the motion vector difference has a larger magnitude. Table 3: Motion vector difference magnitude categories mv_bit specifies the integer part of the offset between the motion vector difference and the starting magnitude of each MV category mv_fr specifies the first 2 fractional bits of the motion vector difference mv_hp specifies the third fractional bit of the motion vector difference
[0096] Bi-prediction with CU-Level Weight (BCW)
[0097] In some example implementations, in video coding techniques such as HEVC, a bidirectional prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and / or using two different motion vectors. In VVC, the bidirectional prediction mode is extended beyond simple averaging to allow weighted averaging of the two prediction signals. For example, P denoted as P can be calculated using the following equation 1 bi-pred Use bidirectional prediction: P bi-pred =((8-w)*P0+w*P1+4)>>3 (1)
[0098] Exemplarily, five weights are allowed in weighted average bidirectional prediction, w∈{-2,3,4,5,10}. When w is equal to 4, equal weight factors are used to perform weighted averaging of two prediction samples. For each bidirectionally predicted CU, the weight w is determined in one of the following two ways: 1) For non-merged CUs, the weight index is signaled after the motion vector difference; 2) For merged CUs, the weight index is inferred from neighboring blocks based on the merge candidate index.
[0099] In some example implementations, BCW is only applied to CUs with 256 or more luma samples (i.e., CU width multiplied by 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.
[0100] Local Illumination Compensation (LIC)
[0101] LIC is a video coding tool that a video encoder and a video decoder can utilize. In some example implementations, LIC can be applied based on a linear model to compensate for illumination changes between one or more temporal reference pictures and a current picture (e.g., in a motion compensation stage). The linear model is based on LIC parameters including a scale factor α and an offset β, and is described in more detail in the block adaptive weighted prediction section below. LIC can be enabled or disabled by, for example, high-level signaling at various levels.
[0102] In some example implementations, a bidirectional prediction reference template may be generated for a template sample associated with a current block. The reference template sample may be identified based on one or more motion vectors associated with the current block. For example, the reference template sample may include a neighboring temporal reference CU of the current CU and may correspond to a template sample of the current CU. The reference template samples may be jointly considered (e.g., averaged) in LIC parameter derivation.
[0103] In some example implementations, a least mean-squared-error (LMSE) algorithm may be applied to derive the LIC parameters. For example, a LMSE-based calculation may be performed to determine the LIC parameters so that the difference between the reference template reference sample of the bidirectional prediction and the template sample of the current CU may be minimized.
[0104] In some example implementations, a similar method may be used under unidirectional prediction. In this case, the LIC parameters may be determined so that the difference between the reference template reference sample of the unidirectional prediction and the template sample of the current CU may be minimized.
[0105] Note that the LMSE algorithm described herein is only an example of deriving LIC parameters. One or more other methods / algorithms may be used.
[0106] Block Adaptive Weighted Prediction (BAWP)
[0107] In some example implementations, BAWP is used to simulate local lighting variations.
[0108] Reference Fig.12 For example, BAWP can be a block-level weighted prediction to model the local illumination variation between the current block and its prediction block according to the local illumination variation between the current block template (or the causal sample of the current block) and the reference block template. Fig.12 A template of a current block (1212) (or referred to as a current template, 1210) and a template of a reference block (1222) (or referred to as a reference template, 1220) are shown. Each template may include an upper portion and a left portion. For example, the current block 1212 includes an upper portion 1214 and a left portion 1216. The reference block may be indicated or determined by a motion vector (MV, 1230). 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 scale factor α and an offset β, which form a linear equation. The scale factor may also be referred to as a scale, an α factor, or an α value.
[0109] When a block is encoded in BAWP mode, an exemplary linear function for compensating for illumination changes is listed below: p′(x′)=α*p(x)+β (2)
[0110] Where: p′(x′) is the prediction sample at position x′ in the current block (or the prediction sample in the prediction unit (PU) in the current block), p(x) is the sample at position x in the reference block corresponding to p′(x′), α is a scaling factor (or scale), and β is an offset value. Note that the reference block can be identified or derived from the MV associated with the current block, and p(x) is the reference sample pointed to by the MV at position x on the reference picture. Note that in Equation 2, the reference sample and the prediction sample can have the same coordinates (i, j) in their respective blocks (i.e., the reference block and the current block, or the reference block and the prediction unit). Alternatively, the coordinates of the reference sample in the reference block can be based on the coordinates of the prediction sample in the current block. For example, the coordinates of the prediction sample can be adjusted by a delta value to obtain the coordinates of the corresponding reference sample (in the reference picture).
[0111] In some example implementations, α and β can be derived based on the current block template and the reference block template, so they do not require signaling overhead, except for signaling the BAWP flag for the single inter prediction mode to indicate the use of BAWP. In some example implementations, the BAWP method is only applied to blocks of size greater than or equal to 8×8 and encoded in the single inter prediction mode. In some example implementations, the BAWP method is only applied to the luma component.
[0112] Explicit signaling of Block Adaptive Weighted Prediction (BAWP)
[0113] In some example implementations, when a current block is predicted from a reference block of the current block using a linear function with a scale α and an offset β (e.g., Equation 2 above), the selection or value of the scale factor α and / or the offset β may be signaled into the bitstream and parsed at the decoder side to reconstruct the predicted block. The reference block is specified by, for example, a motion vector associated with the current block. All supported values of the scale α may be stored in a predefined lookup table, and the index of the scale factor in the lookup table is signaled in the bitstream and parsed at the decoder side.
[0114] In some example implementations, the offset value β may be derived from a linear equation between the reference block and the current block. For example, the offset value β may be set to (cur_template_mean-α*ref_template_mean), where cur_template_mean is the mean of the samples in the template of the current block, and ref_template_mean is the mean of the samples in the template of the reference block.
[0115] Multi-Model Linear Mode (MMLM)
[0116] In some example implementations, MMLM is introduced as an extension of the Cross-Component Linear Model (CCLM) included in VVC. For example, CCLM can be extended by adding three multi-model linear model (MMLM) modes. In each MMLM mode, the reconstructed neighboring samples are classified into two categories using a threshold value that is the average value of the neighboring samples for brightness reconstruction. The linear model for each category is derived by using, for example, the Least-Mean-Square (LMS) method. For the CCLM mode, the LMS method is also used to derive the linear model. Slope adjustment can be applied to cross-component linear model (CCLM) and multi-model LM predictions. The adjustment is to tilt the linear function that maps brightness values to chrominance values relative to the center point determined by the average brightness value of the reference sample.
[0117] Geometric Partitioning Mode (GPM)
[0118] In video coding techniques such as VVC, a geometric partitioning mode is used for inter-frame prediction, aiming to improve the partitioning accuracy of moving objects by using non-rectangular and asymmetric rectangular partitioning on top of the conventional rectangular block partitioning structure.
[0119] The CU level flag is used to signal the geometric partitioning mode as a merge mode. Other merge modes include normal merge mode, merge MVD mode, combined inter-intra prediction (CIIP) mode, and sub-block merge mode. For example, for each possible CU size w×h=2 m ×2 n , where m,n∈{3…6}, excluding 8×64 and 64×8, the geometric partitioning mode supports a total of 64 partitions.
[0120] When using GPM mode, the CU is split into two regions / parts by geometrically positioned straight lines. Fig.13 Various exemplary partitioning methods are shown. Fig.13 , each square, such as 1310, represents a CU. Each line in a CU represents a partition. As an example, CU 1310 shows three GPM partitions 1312, 1314, and 1316, each corresponding to a partition line. For example, GPM partition 1312 splits the CU into two regions: 1320 and 1322.
[0121] The location of the partition line can be mathematically derived from the angle and offset parameters of the specific partition. Each part of the geometric partition in the CU (such as 1320 or 1322) uses its own motion information (e.g., motion vector) for inter-frame prediction. In some example implementations, each partition only allows unidirectional prediction, that is, each partition has one motion vector and one reference index. For backward compatibility, unidirectional prediction motion constraints are applied to ensure that, as with conventional bidirectional prediction, only two motion compensated predictions are required for each CU.
[0122] In some example implementations, if the geometric partitioning mode is used for the current CU, a geometric partitioning index (angle and offset, which may indicate, for example, Fig.13 The number of maximum GPM candidate sizes is explicitly signaled in the Sequence Parameter Set (SPS), and the syntax binarization is specified for the GPM merge index.
[0123] In some example implementations, after predicting each geometric partition, a blending process with, for example, adaptive weights is used to adjust the edges along the geometric partitions (e.g., Fig.13 After the mixing process, the prediction signal of the entire CU is obtained, and the entire CU will be transformed and quantized like other prediction modes.
[0124] In some example implementations, the GPM encoding tool can be further extended. For example, it is not limited to inter-frame prediction, but also applies to intra-frame prediction. Therefore, each of the two partitions divided by GPM can now be inter-frame predicted or intra-frame predicted.
[0125] Under current coding techniques, such as VVC, for BAWP / LIC mode, only one linear model (e.g., a linear model based on Equation 2) is adopted for all samples within a coding block, which may not be effective and accurate when there are some variations between different samples in a block. Fig.13 As shown, when GPM is used to partition CU 1310 into two regions 1320 and 1322, only one linear model is supported. If the correlation between the two regions is low and / or the characteristics of the two regions are very different, a single linear model may not be applicable to the two regions, and encoding accuracy / efficiency may be compromised.
[0126] In the present disclosure, various embodiments are disclosed for improving video encoding / decoding techniques in BAWP and / or LIC modes, aiming to improve prediction accuracy with minimal signaling cost overhead. Specifically, multiple linear models are adopted / supported to predict the current block. Various methods are described for signaling and / or deriving the coefficients specified in Equation 2 (e.g., scaling factors and offsets (α and β)).
[0127] In the present disclosure, the term block may refer to a transform block, a coded block, a prediction block, a coding block, a coding unit (CU), etc. The term chroma block may refer to a block in any chroma (color) channel. The direction of the reference frame is determined by whether the reference frame is before the current frame in the display order or the reference frame is after the current frame in the display order.
[0128] In this disclosure, a sample may be interpreted as a pixel value of a pixel. It may generally refer to any component (luminance or chrominance).
[0129] In the present disclosure, the terms x-axis and y-axis refer to the horizontal and vertical components of a 2-D value. They can also be replaced by two other axes along two predefined directions perpendicular to each other, and the same embodiments apply. That is, the x-axis and y-axis can be rotated by a certain degree. For example, the x-axis and y-axis can be replaced by a 45-degree axis and a 135-degree axis.
[0130] In the present disclosure, a conventional JMVD may refer to a JMVD with a conventional full MV resolution, or a JMVD with AMVR.
[0131] In the present disclosure, signaling (e.g., syntax elements) may indicate values, such as scaling factors and / or offsets β, in an explicit or implicit manner. Explicit indication may be performed by sending an index to a lookup table to look up the value, or by sending the value directly. When the value is sent implicitly, the decoder may need to perform further derivations based on the signaled syntax element. In the case of implicit indication, the syntax element may also be referred to as being "associated" with the value to be derived.
[0132] For the embodiments described below, the coding block or the coded block may be encoded in BAWP (or LIC, or compound weighted prediction (CWP)) mode (hereinafter referred to as BAWP to simplify the description).
[0133] In one embodiment, multiple linear models may be used to describe the linear relationship between the current block and its reference block, and multiple model approaches may be employed in the BAWP / LIC mode. For each linear model, the linear function includes a scaling factor α and an offset β. In some example embodiments, the scaling factor α and / or the offset β may be derived from a template of the current block (current template) and a template of the reference block (reference template). In some example implementations, the scaling factor α and / or the 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. Example current templates and reference templates have been described previously and may be described in Fig.12 Found in.
[0134] Fig.14 An example linear model assignment is shown. In GPM mode, for example, the current block is divided / classified into 2 groups (Group 1 and Group 2). There are two candidate linear models, Linear Model 1 and Linear Model 2, which are assigned to Group 1 and Group 2, respectively. The assignment of linear models can follow certain rules described below.
[0135] In one embodiment, the classification for a sample in the current block (the linear model used for the classification) may depend on the magnitude of the sample in the reference block. For example, samples with values above a threshold may be classified in one group and assigned one linear model, and samples with values below a threshold may be classified in another group and assigned another linear model. Exemplarily, the threshold may be determined based on the samples in the reference block.
[0136] In some example implementations, the classification for a sample in the current block (the linear model used for the classification) may depend on whether the sample value of the sample is greater than or less than the average value of the samples in the reference block. That is, samples with values above the above average value may be classified in one group and assigned one linear model, and samples with values below a threshold may be classified in another group and assigned another linear model. Note that the linear model assignment is based on the sample classification.
[0137] In one embodiment, the linear model for each sample in the current block may be determined by comparing the corresponding sample in the reference block to the mean or average of one of the following: Fig.12 , 1220), the current block template (e.g., Fig.12 , 1210) or a reference block (e.g., Fig.12 , 1222).
[0138] In one embodiment, when the corresponding reference / prediction sample in the reference block is equal to or less than the average value of the template of the reference block (or prediction block), one linear model is selected / used. Otherwise, another linear model is selected / used instead.
[0139] In one embodiment, when the corresponding reference / prediction sample in the reference block is equal to or less than the median value of the template of the reference block (or prediction block), one linear model is selected / used. Otherwise, another linear model is selected / used instead.
[0140] In one embodiment, both the scaling factor α and the offset β can be derived at the decoder side (e.g., for one or both of the linear models), and the template of the current block and / or the template of the reference block are used to derive these two parameters. The samples in the template are also divided into two categories based on the magnitude (or value) of each sample in the template of the reference block. And the samples in each group / category are used to derive the linear model parameters of each class. In some example implementations, the samples in the template of the current block can be grouped according to similar rules / methods as described above for grouping the samples in the current block, and the samples in the template can be grouped in the same manner as how the samples in the template of the current block are grouped. Therefore, for each group in the current block, there is a corresponding group in the current template and / or a corresponding group in the reference template. The derivation of the scaling factor α and the offset β for a group in the current block can be based on the corresponding group in the current template and / or the corresponding group in the reference template.
[0141] In some example implementations, only samples in the template of the reference block (i.e., the reference template) are used to derive the scale factor α and the offset β. For example, the samples in the reference template can be classified / grouped by comparing the reference template sample values with the average value of the reference template. A correspondence can be established between the reference template groups and the current block groups based on the grouping rules used for classification. In order to determine a linear model for a group in the current block, the corresponding group in the reference template can be used.
[0142] In the above embodiment, when the current block is classified into multiple groups, each group can be assigned a group index. The group index is synchronized between the encoder and the decoder so that the same group index refers to a group that satisfies the same division rule. In other words, there is a consensus on the group index between the encoder and the decoder.
[0143] In one embodiment, if two (or more) linear models are used for the current block, the scale factor α (or an adjustment of the scale factor α or an adjustment of the slope, also referred to as an incremental scale factor) or offset β of at least one linear model can be signaled into the bitstream and parsed at the decoder side. In one example, this embodiment is applicable to a current block that is classified or divided into multiple groups (partitions), each group having its own linear model. In another example, the division can be performed by GPM or LIC, as described above. For example, in GPM mode, the current block can be divided into two partitions, each of which has its own linear model.
[0144] In some example embodiments, if two linear models are employed for the current block, the scale factors α (or adjustments to the scale factors α, adjustments to the slopes, incremental scale factors) or offsets β of the two models may be signaled separately into the bitstream (versus signaling jointly) and parsed at the decoder side. Note that when incremental scale factors are used, the decoder may first derive the original scale factors and then apply the incremental scale factors to the original scale factors for further adjustment to obtain the final scale factors used in the linear models.
[0145] In some example embodiments, if two linear models are used for the current block, the scale factor α (or an adjustment of the scale factor α, an adjustment of the slope, an incremental scale factor) and the offset β of one linear model are directly signaled, and the parameters of the model are used to predict the other model, and the difference (increment) between the parameters of the two models is signaled into the bitstream.
[0146] In one embodiment, if two linear models are used for the current block, the scale factor α (or adjustment of the scale factor α, adjustment of the slope, incremental scale factor) or offset β of one model is signaled into the bitstream and parsed at the decoder side, and the scale factor α and offset β of the other model are derived at the decoder side.
[0147] In one embodiment, there are predefined or preconfigured candidate linear models on the encoder side and / or the decoder side. These candidate models can be used as base models for further refinement or optimization. For example, candidate linear models can be assigned to each group according to the rules as described above. Therefore, the original scale factor α can be predicted or derived from these assigned models. In order to further optimize the original scale factor, the adjustment / difference of the scale factor α (called the incremental scale factor) is signaled into the bitstream and parsed by the decoder. The decoder can apply the incremental scale factor to the original scale factor to obtain the final optimized scale factor, which is replaced into the linear model originally assigned.
[0148] In some example implementations, the offset value may be derived from the assigned linear equation.
[0149] In some example implementations, the precision of the adjustment / difference of the scale factor α (ie, the incremental scale factor) is fixed for all supported magnitudes.
[0150] In some example implementations, the precision of the adjustment / difference of the scale factor α (i.e., the incremental scale factor) may depend on the absolute magnitude of each supported scale factor value. In one example, the precision of the incremental scale factor may gradually decrease as the absolute magnitude of each supported scale value increases. The precision may be represented by the step size between two adjacent values among all supported values.
[0151] In some example embodiments, a mode index may be signaled to indicate how many and which groups are associated with the signaled scaling factor α and offset β. For example, a mode index (values from 0 to 3) is signaled to indicate the following: Index 0): None of the two groups are associated with the signaled scaling factor α and offset β, or the scaling factor α and offset β are not signaled at all; Index 1): Group 0 is associated with the signaled scaling factor α and offset β (e.g., explicitly indicated), and Group 1 is implicitly associated with the scaling factor α and offset β (e.g., further derivation is required); Index 2): Group 0 is implicitly associated with the signaled scaling factor α and offset β (e.g., further derivation is required), and Group 1 is associated with the signaled scaling factor α and offset β (e.g., explicitly indicated); and Index 3): Both Group 0 and Group 1 are associated with the signaled scaling factor α and offset β (e.g., explicitly indicated). As previously described, there is a consensus between the encoder and the decoder on the group index.
[0152] In one embodiment, to indicate whether multiple linear models of BAWP / LIC are supported, a high-level syntax may be signaled at at least one of the following levels: sequence level; frame level; slice level; or super-block level.
[0153] In one embodiment, two (or more) linear models are used in BAWP / LIC mode to describe the linear relationship between the current block and its reference block. The samples in the current block are grouped / classified into two (or more) categories, and each category has its own linear model. The classification of a sample in the current block (the linear model is used for the classification) can depend on the position of the corresponding sample in the reference block, or on the position of the sample in the current block, because there is a mapping relationship between the samples in the current block and the samples of the reference block.
[0154] As an example, see Fig.15, the reference block is divided into regions 1510 and 1520 by a dividing line. The samples in each region belong to one group / category. The division can follow the GPM scheme, and each region is along one side of the dividing line. Fig.15 As shown, and for this particular partition, region 1510 is on the left side of the dividing line and can be referred to as the left partition, and region 1520 is on the right side of the dividing line and can be referred to as the right partition. Depending on the angle of the dividing line, it is possible that the two regions can be located at the top and bottom of the dividing line, respectively.
[0155] In some example implementations, the reference block may be viewed using some partitioning schemes, such as Fig.15 In this case, one linear model is defined for the right partition 1520, and another model is defined for the left partition 1510. Along the dividing line (or the dividing line extending to the template), the upper template of the reference block is divided into two regions: the upper left region 1512 and the upper right region 1522. The samples in the templates (including the upper template and the left template) can be used for the derivation of model coefficients. Fig.15 , Table 4 below shows an example of template selection for coefficient derivation. Table 4: Blocks with multiple linear models
[0156] As shown in Table 4, for region 2 1520, samples in the upper right template 1522 are used for the derivation of model coefficients α2 and β2. For region 1 1510, samples in the left template 1514 and the upper left template 1512 are used for the derivation of model coefficients α1 and β1. The reference samples in each partition are applied to their corresponding models to derive the prediction signal (i.e., the predicted samples).
[0157] As an example, see Fig.15 , the sample X' in the current block has a corresponding reference sample X in the reference block. X is located in region 2 1520. Therefore, model 2 is selected, and α2 and β2 can be derived based on the samples in the top right template 1522. To predict sample X', linear model 2 with derived α2 and β2 is used.
[0158] As another example, if the reference sample falls in region 11510 , model 1 is selected, and α1 and β1 may be derived based on samples in the upper left template 1512 and the left template 1514 .
[0159] In some example implementations, when predicting a current block in GPM mode, the upper template samples of the current block or a reference block are used to derive model coefficients for the right portion of the GPM partition (i.e., along the right side of the partition line). The left template samples of the current block or a reference block are used to derive model coefficients for the left portion of the GPM partition. For example, referring to Fig.15 , the model coefficients of region 1520 are derived using the upper template samples (upper left template 1512 and upper right template 1522), and the model coefficients of region 1510 are derived using the left template samples (left template 1514).
[0160] In some example implementations, the partitioning of samples in the current block corresponds to the partitioning of the reference block. Fig.15 As shown, the current block has the same partition as the reference block, using the same partition line (eg, the same angle and offset).
[0161] In some example implementations, the partitioning of the template is defined by extending the partitioning of the reference block to the left template or the upper template. For example, the partitioning line 1530 can be extended to the upper template, so the upper template is divided into the upper left template 1512 and the upper right template 1522. In some example implementations, the templates (or portions of the templates) on the same side of the partitioning line (or the extended partitioning line) are used to derive the model coefficients of the specific partition. For example, 1522 is on the same side (right side) as region 1520; 1512 and 1514 are on the same side (left side) as region 1510.
[0162] In some example implementations, the blending process defined in the GPM can be performed after the prediction of each partition (e.g., partition 1510 and partition 1520) is completed to derive the final prediction signal for samples along the edges of the geometric partitions. This process will help smooth the edges along the partition lines.
[0163] In the above embodiment, the block (current block and / or reference block) is divided into two regions (groups, categories). The division of the two regions is only for exemplary purposes. For example, by using 2 or more division lines, the block can be divided into more than 2 regions, and the above principles still apply.
[0164] In the above embodiments, the block can be partitioned by GPM. The GPM partitioning is for exemplary purposes only. If there is no conflict, other types of partitioning methods are also supported by using the same basic principles, for example, using lines other than straight lines, or partitioning the block into regions of any type of shape.
[0165] In the above embodiments, BAWP and LIC modes are used for exemplary purposes. These embodiments may also support other prediction techniques, such as CCLM, MMLM. For example, the derivation of the linear model for the current block may depend on the partition information of the reference block and the template of the reference block.
[0166] 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, a coding block, or a coding unit (CU).
[0167] Fig.16 A flowchart 1600 of an exemplary method for processing video data following the basic principles of the above implementation is shown. The exemplary decoding method may include some or all of the following steps: step 1610, receiving a video bitstream including a current block and a reference block, the reference block being identified by a motion vector associated with the current block; step 1620, grouping samples in the current block into at least a first class and a second class based on a predefined criterion, the first class and the second class being associated with a first linear model and a second linear model, respectively, wherein the first linear model has at least a scale factor α1 or an offset β1, and wherein the second linear model has at least a scale factor α2 different from α1 or an offset β2 different from β1; step 1630, determining the first linear model and the second linear model; step 1640, predicting samples in the first class based on the reference block and the first linear model; step 1650, predicting samples in the second class based on the reference block and the second linear model; and step 1660, reconstructing the current block based on the predicted samples in the first class and the second class.
[0168] In any part or combination of the foregoing implementations, the predefined criteria may include at least one of the following: grouping the samples into at least a first class and a second class based on a magnitude or value of each of the samples in the current block; or grouping the samples into at least a first class and a second class based on a position of each of the samples in the current block. Exemplarily, the value of the sample may refer to a luma pixel value or a chroma pixel value. The value may have a sign (positive or negative).
[0169] In any part or combination of the above implementations, the first linear model is represented by the following equation: p′(x′)=α1*p(x)+β1, wherein p′(x′) is the sample belonging to the first class at position x′ in the current block, and p(x) is the sample corresponding to p′(x′) at position x in the reference block; and the second linear model is represented by the following equation; p′(y′)=α2*p(y)+β2, wherein p′(y′) is the sample belonging to the second class at position y′ in the current block, and p(y) is the sample corresponding to p′(y′) at position y in the reference block.
[0170] As required, the above operations may be combined or arranged in any number or order. Two or more of the steps and / or operations may be performed in parallel. The embodiments and implementations in the present disclosure may be used alone or in any order. The steps in an embodiment / method may be divided to form a plurality of sub-methods, each of which may be independent of the other steps in the embodiment and may form an independent solution. 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). In one example, one or more processors execute a program stored in a non-transitory computer-readable medium. The embodiments in the present disclosure may be applied to luminance blocks or chrominance blocks. The term block may be interpreted as a prediction block, a coding block, or a coding unit, i.e., a CU. The term block here may also be used to refer to a transform block. In the following items, when talking about block size, it may 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).
[0171] The techniques described above may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Fig.17 A computer system (1800) suitable for implementing certain embodiments of the disclosed subject matter is shown.
[0172] Computer software may be encoded using any suitable machine code or computer language, which may be assembled, compiled, linked, or the like to create code comprising instructions, which may be executed directly by one or more computer central processing units (CPU), graphics processing units (GPU), etc., or through interpretation, microcode execution, or the like.
[0173] 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, Internet of Things devices, etc.
[0174] Fig.17 The components for the computer system (1800) shown in the example are exemplary in nature and are not intended to imply any limitation on the scope of use or functionality of computer software implementing embodiments of the present disclosure. Nor 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).
[0175] The computer system (1800) may include certain human interface input devices. The input human 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).
[0176] The computer system (1800) may also include certain human-computer interface output devices. Such human-computer interface output devices may stimulate one or more senses of a human user through, for example, tactile output, sound, light, and smell / taste. Such human-computer 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 (such as: speakers (1809), headphones (not depicted)), visual output devices (such as 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 output two-dimensional visual outputs or output more than three-dimensional outputs through methods such as stereographic outputs; virtual reality glasses (not depicted), holographic displays, and smoke boxes (not depicted)) and printers (not depicted).
[0177] 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.
[0178] Those skilled in the art should also understand that the term "computer-readable media" used in conjunction with the presently disclosed subject matter does not include transmission media, carrier waves, or other transient signals.
[0179] The computer system (1800) may also include an interface (1854) to one or more communication networks (1855). The network may be, for example, wireless, wired, optical. The network may also be local, wide area, urban, vehicular and industrial, real-time, delay tolerant, etc. Examples of networks include: local area networks, such as 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; vehicular and industrial networks, including CAN bus, etc.
[0180] The above-mentioned human-machine interface devices, human-accessible storage devices, and network interfaces may be attached to the core ( 1840 ) of the computer system ( 1800 ).
[0181] 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 specific tasks (1844), graphics adapters (1850), etc. These devices, along with read-only memory (ROM) (1845), random access memory (1846), internal large-capacity storage devices such as 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.
[0182] The computer readable medium may have thereon computer code for performing various computer-implemented operations. The medium and computer code may be those specially designed and constructed for the purposes of the present disclosure, or the medium and computer code may be of a type well known and available to those skilled in the art of computer software.
[0183] Although the present disclosure has described several exemplary embodiments, there are changes, permutations, and various replacement equivalents that fall within the scope of the present disclosure. It will therefore be understood that those skilled in the art will be able to conceive of a variety of systems and methods that, although not explicitly shown or described herein, embody the principles of the disclosure and therefore fall within the spirit and scope of the disclosure.
Claims
1. A method for decoding a current block in a video bitstream performed by a decoder, the method comprising: receiving the video bitstream including the current block and a reference block, the reference block being identified by a motion vector associated with the current block; grouping samples in the current block into at least a first class and a second class based on a predefined criterion, the first class and the second class being associated with a first linear model and a second linear model, respectively, wherein the first linear model has at least a scaling factor α1 or an offset β1, and wherein the second linear model has at least a scaling factor α2 different from α1 or an offset β2 different from β1; determining the first linear model and the second linear model; predicting samples in the first class based on the reference block and the first linear model; predicting samples in the second class based on the reference block and the second linear model; and The current block is reconstructed based on the predicted samples in the first class and the second class.
2. The method according to claim 1, wherein: The predefined criteria include at least one of the following: grouping the samples in the current block into at least the first class and the second class based on a magnitude or value of each of the samples; or The samples in the current block are grouped into at least the first class and the second class based on a position of each of the samples.
3. The method according to any one of claims 1 to 2, wherein: The first linear model is represented by the following equation: p′(x′)=α1*p(x)+β1 wherein p′(x′) is a sample belonging to the first class at position x′ in the current block, and p(x) is a sample corresponding to p′(x′) at position x in the reference block; and The second linear model is represented by the following equation: p′(y′)=α2*p(y)+β2 Among them, p′(y′) is the sample belonging to the second class at position y′ in the current block, and p(y) is the sample corresponding to p′(y′) at position y in the reference block.
4. The method according to any one of claims 1 to 2, wherein: Grouping samples in the current block comprises: In response to at least one of the following: a) samples in the current block are greater than an average value or mean of samples in the reference block; or b) reference samples in the reference block corresponding to the samples in the current block are greater than an average value or mean of samples in the reference block, grouping the samples into the first category, otherwise grouping the samples into the second category; and Determining the first linear model and the second linear model includes determining the first linear model and the second linear model based on classification of the first class and the second class.
5. The method according to any one of claims 1 to 2, wherein: Grouping the samples in the current block includes: grouping the samples in the current block into the first category and the second category according to a classification rule, the classification rule being based on a value of each of the samples; According to the classification rule, grouping the samples in the template of the current block and the samples in the template of the reference block into a first reference class corresponding to the first class and a second reference class corresponding to the second class; and At least one of α1 and β1 is derived based on the first reference class, or at least one of α2 and β2 is derived based on the second reference class.
6. The method according to any one of claims 1 to 2, wherein: The method also includes receiving a first syntax element indicating at least one of α1 or β1; as well as Determining the first linear model includes: determining the first linear model based on α1 and β1.
7. The method according to claim 6, wherein: The method further includes receiving a second syntax element indicating at least one of α2 or β2; as well as Determining the second linear model includes determining the first linear model based on α2 and β2.
8. The method according to claim 6, wherein: The method further comprises: Predict α2 based on α1 to obtain predicted α2; receiving a third syntax element indicating a difference between α2 and the predicted α2; deriving α2 based on the predicted α2 and the difference between α2 and the predicted α2; and Determining the second linear model includes: determining the second linear model based on α2.
9. The method according to claim 6, wherein: The method further includes deriving α2 based on α1; as well as Determining the second linear model includes: determining the second linear model based on α2.
10. The method according to any one of claims 1 to 2, wherein: Determining the first linear model includes selecting the first linear model from two or more candidate models; The method further comprises: receiving a fourth syntax element indicating a scaling factor adjustment value to be used to adjust α1 in the selected first linear model; determining an adjusted α1 based on the α1 in the selected first linear model and the scale factor adjustment value; and The α1 in the selected first linear model is replaced by the adjusted α1 to obtain an updated first linear model.
11. The method according to claim 10, wherein: The precision of the scale factor differences signaled is fixed for all supported scale factor differences.
12. The method according to claim 10, wherein: The accuracy of the signaled scale factor difference is inversely related to the absolute magnitude of the scale factor associated with the scale factor adjustment value.
13. The method according to any one of claims 1 to 2, further comprising receiving a fifth syntax element indicating one of the following modes: a first mode in which all of α1, β1, α2 and β2 are not signaled and are derived by the decoder; a second mode in which α1 and β1 are signaled and α2 and β2 are not signaled and derived by the decoder; a third mode in which α2 and β2 are signaled and α1 and β1 are not signaled and are derived by the decoder; as well as A fourth mode, in which all of α1, β1, α2 and β2 are represented by signals.
14. The method according to any one of claims 1 to 2, wherein: Predicting the current block in one of a block adaptive weighted prediction (BAWP) mode or a local illumination compensation (LIC) mode, the method further comprising: receiving, from the video bitstream, high-level syntax indicating whether multiple linear models are to be used, the high-level syntax being signaled in at least one of the following levels: Sequence level; Frame level; Slice level; or Superblock level.
15. The method according to any one of claims 1 to 2, wherein: The current block is predicted in one of a BAWP mode or a LIC mode, and wherein grouping samples in the current block comprises: The samples in the current block are grouped based on a first partition line for the BAWP mode or the LIC mode such that samples along one side of the first partition line form the first class and samples along the other side of the first partition line form the second class.
16. The method according to claim 15, wherein: Determining the first linear model and the second linear model includes: determining the first linear model based on a first position of a first reference sample in the reference block, the first reference sample corresponding to a first sample in the first class; and The second linear model is determined based on a second position of a second reference sample in the reference block, the second reference sample corresponding to a second sample in the first class.
17. The method of claim 16, wherein: The reference block is in the same GPM partition or the same LIC partition as the current block based on a second partition line; as well as Determining the first linear model and the second linear model includes: deriving at least one of α1 or β1 based on a template sample of the reference block on the same side of the first reference sample along the second dividing line; as well as At least one of α2 or β2 is derived based on a template sample of the reference block along the second dividing line on the same side as the second reference sample.
18. The method of claim 15, wherein: The samples in the first category are located on the right side of the first dividing line; The samples in the second category are located on the left side of the first dividing line; Determining the first linear model includes: deriving at least one of α1 or β1 based on samples in an upper template of the current block or an upper template of the reference block; and Determining the second linear model includes: At least one of α2 or β2 is derived based on samples in a left template of the current block or a left template of the reference block.
19. A device comprising a memory and a processor, the memory being for storing computer instructions, the processor being in communication with the memory, wherein: When the processor executes the computer instructions, the processor is configured to cause the device to: receiving the video bitstream including the current block and a reference block, the reference block being identified by a motion vector associated with the current block; grouping samples in the current block into at least a first class and a second class based on a predefined criterion, the first class and the second class being associated with a first linear model and a second linear model, respectively, wherein the first linear model has at least a scaling factor α1 or an offset β1, and wherein the second linear model has at least a scaling factor α2 different from α1 or an offset β2 different from β1; determining the first linear model and the second linear model; predicting samples in the first class based on the reference block and the first linear model; predicting samples in the second class based on the reference block and the second linear model; and The current block is reconstructed based on the predicted samples in the first class and the second class.
20. A non-transitory storage medium for storing computer-readable instructions that, when executed by a processor, cause the processor to: receiving the video bitstream including the current block and a reference block, the reference block being identified by a motion vector associated with the current block; The samples in the current block are grouped into at least a first class and a second class based on a predefined criterion, the first class and the second class being associated with a first linear model and a second linear model, respectively, wherein: The first linear model has at least a scaling factor α1 or an offset β1, and wherein the second linear model has at least a scaling factor α2 different from α1 or an offset β2 different from β1; determining the first linear model and the second linear model; predicting samples in the first class based on the reference block and the first linear model; predicting samples in the second class based on the reference block and the second linear model; and The current block is reconstructed based on the predicted samples in the first class and the second class.