Explicit signaling for block adaptive weighting factors
By using block adaptive weighted prediction (BAWP) method in video encoding, the scaling factor is determined using syntax elements in the video code stream, which solves the problem of low local lighting change processing efficiency in video encoding, and achieves more efficient and high-quality Video encoding.
Patent Information
- Application Number
- CN202380015299.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-06
- Filing Date
- 2023-09-12
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to effectively handle local lighting changes in video encoding, resulting in limited encoding efficiency and quality.
The block adaptive weighted prediction (BAWP) method is used to determine the scaling factor α by receiving syntax elements in the video code stream, and use the equation p'(x') = α*p(x) + β to predict the current block. Rebuild the current block.
Through the BAWP method, local lighting changes can be more efficiently modeled and compensated, and the efficiency and quality of video encoding can be improved.
Smart Images

Figure CN119487844A_ABST
Abstract
Description
[0001] This application claims priority to U.S. Application No. 18 / 461,785, filed on September 6, 2023, and U.S. Provisional Application No. 63 / 459,565, filed on April 14, 2023, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application are related to a set of advanced video / stream coding and decoding technologies. In particular, the disclosed technology is related to enhancing block adaptive weighted prediction (BAWP) and local illumination compensation (LIC) to compensate for local illumination changes. Background Art
[0003] Uncompressed digital video may include a series of pictures and impose specific bit rate requirements on transmission bandwidth in storage, data processing, and streaming applications. One purpose of video encoding and decoding may be to reduce redundancy in the uncompressed input video signal through various compression techniques. Summary of the invention
[0004] Embodiments of the present application relate to methods, apparatuses, and computer storage media for enhancing block adaptive weighted prediction (BAWP) to model local illumination compensation (LIC).
[0005] According to one aspect, an embodiment of the present application provides a method for processing video data, including:
[0006] Receiving a video bitstream, the video bitstream comprising a current block in a current frame and a reference block in a reference frame, the reference block being used to predict the current block and being identified by a motion vector associated with the current block;
[0007] Receiving a syntax element indicating a scaling factor α from the video bitstream;
[0008] Determining the scaling factor α based on the value of the syntax element;
[0009] The current block is predicted using the following equation:
[0010] p'(x')=α*p(x)+β
[0011] Wherein, p'(x') is a predicted sample in the current block, p(x) is a co-located reference sample in the reference block corresponding to p'(x'), α is a scaling factor determined based on the value of the syntax element, and β is an offset;
[0012] Based on the predicted current block, the current block is reconstructed.
[0013] According to another aspect, an embodiment of the present application further provides a device for processing a current block of a current frame in an encoded video bitstream. The device comprises: a memory for storing computer instructions, and a processor communicating with the memory, wherein when the processor executes the computer instructions, the processor is configured to cause the device to perform the above-mentioned video decoding method.
[0014] According to another aspect, an embodiment of the present application further provides a non-transitory computer-readable storage medium having instructions stored thereon, which, when executed by a computer for video decoding and / or encoding, enables the computer to implement the above-mentioned video decoding method.
[0015] The above and other aspects and implementations thereof are described in more detail in the drawings, the description and the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, properties and various advantages of the disclosed subject matter will become further apparent from the following detailed description and accompanying drawings, in which:
[0017] Figure 1 is a schematic diagram of a simplified block diagram of a communication system (100) according to an embodiment;
[0018] Figure 2 is a schematic diagram of a simplified block diagram of a communication system (200) according to another embodiment;
[0019] Figure 3 is a schematic diagram of a simplified block diagram of a video decoder according to an embodiment;
[0020] Figure 4 is a schematic diagram of a simplified block diagram of a video encoder according to an embodiment;
[0021] Figure 5 shows a block diagram of a video encoder according to another embodiment;
[0022] Figure 6 shows a block diagram of a video decoder according to another embodiment;
[0023] Figure 7 A scheme for partitioning coding blocks according to an embodiment of the present application is shown;
[0024] Figure 8 Another scheme for coding block partitioning according to an embodiment of the present application is shown;
[0025] Fig. 9 Another scheme of coding block partitioning according to an embodiment of the present application is shown;
[0026] Fig.10 Compound motion compensation is shown;
[0027] Fig.11 An exemplary interpolated reference frame for motion compensation is shown;
[0028] Fig.12 An example of a template of a current block and a template of a reference block is shown;
[0029] Fig.13 An example of a logic flow of a method according to an embodiment of the present application is shown;
[0030] Fig.14 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION
[0031] The present invention will 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 embodiments. However, please note that the present invention may be embodied in a variety of different forms and, therefore, the subject matter covered or claimed is intended to be construed as not limited to any embodiment described below. Please also note that the present invention may be embodied as a method, apparatus, assembly or system. Thus, embodiments of the present invention may, for example, take the form of hardware, software, firmware or any combination thereof.
[0032] Throughout the specification and claims, terms may have subtle meanings that are implied or suggested in the context rather than the express 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 "in another implementation" or "in other implementations" as used herein do not necessarily refer to different implementations. For example, the claimed subject matter includes all or part of the combination of exemplary embodiments / implementations.
[0033] In general, terms can be understood at least in part from usage in context. For example, terms used herein, such as "and", "or", "and / or", can include multiple meanings, which can depend at least in part on the context in which these terms are used. Typically, "or", if used in an associative list, such as a, B, or C, means a, B, and C, which are used here in an inclusive sense, and a, B, or C, which are used here only in an exclusive sense. In addition, the terms "at least one" or "at least one" used herein, depending at least in part on the context, can be used to describe any feature, structure, or characteristic in a singular sense, or can be used to describe a combination of features, structures, and characteristics in a plural sense. Similarly, terms, such as "a", "an", or "the", can also be understood to convey singular or plural usage, depending at least in part on the context. In addition, the terms "based on" or "by" can be understood to not necessarily be intended to convey a set of exclusive factors, but rather to allow for the presence of other factors that are not necessarily explicitly described, again, depending at least in part on the context.
[0034] 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 application may not be limited thereto. Embodiments of the present application can be implemented in desktop computers, laptop computers, tablet computers, media players, wearable computers, dedicated video conferencing equipment, etc. Network (130) 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 (130) 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.
[0035] As an example, Figure 2 The video encoder and video decoder are shown in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0036] like Figure 2As shown, the streaming system may include an acquisition subsystem (213), which may include a video source (201), such as a digital camera, for creating an uncompressed video picture stream (202). In an embodiment, the video picture stream (202) includes samples captured by the digital camera of the video source (201). Compared to the encoded video data (204) (or the encoded video bitstream), the video picture stream (202) is depicted as a thick line to emphasize the high data volume of the video picture stream, and the video picture stream (202) can be processed by an electronic device (420), which includes a video encoder (203) coupled to the video source (201). 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. Compared to the video picture stream (202), the encoded video data (204) (or the encoded video bitstream (204)) is depicted as a thin line to emphasize the lower amount of data of the encoded video data (204) (or the encoded video bitstream (204)), which can be stored on the streaming server (205) for future use. At least one streaming client subsystem, such as Figure 3 The client subsystem (206) and the client subsystem (208) in the video transmission server (205) can access the streaming server (205) to retrieve the copy (207) and the copy (209) of the encoded video data (204). The client subsystem (206) can include, for example, a video decoder (210) in the electronic device (330). The video decoder (210) decodes the incoming copy (207) of the encoded video data and produces an output video picture stream (211) that can be presented on a display (212) (such as a display screen) or another presentation device (not depicted).
[0037] Figure 3 1 is a block diagram of a video decoder (310) according to an embodiment disclosed in the present application. The video decoder (310) may be provided in an electronic device (330). The electronic device (330) may include a receiver (331) (e.g., a receiving circuit). The video decoder (310) may be used to replace Figure 2 A video decoder (210) of an embodiment.
[0038] A receiver (331) may receive at least one encoded video sequence to be decoded by a video decoder (310). To prevent network jitter, a buffer memory (315) may be coupled between the receiver (331) and an entropy decoder / parser (320) (hereinafter referred to as "parser (320)"). The parser (320) reconstructs 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 potential information for controlling a display device such as a display device (312) (e.g., a display screen). The parser (320) may extract a subgroup parameter set for at least one subgroup of subgroups of pixels in the video decoder from the encoded video sequence based on at least one parameter corresponding to the group. The subgroup may include a group of pictures (Group of Pictures, GOP), a picture, a tile, a slice, a macroblock, a coding unit (Coding Unit, CU), a block, a transform unit (Transform Unit, TU), a prediction unit (Prediction Unit, PU), etc. The parser (320) may also extract information from the coded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, and the like. The reconstruction of the symbols (321) may involve a number of different units. Which units are involved and how they are involved may be controlled by subgroup control information that the parser (320) parses from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (320) and the various units below is not described.
[0039] The first unit is a sealer / inverse transform unit (351). The sealer / inverse transform unit (351) receives quantized transform coefficients as symbols (321) from the parser (320) and control information including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (351) may output a block including sample values, which may be input into an aggregator (355).
[0040] In some cases, the output samples of the scaler / inverse transform unit (351) may belong to an intra-coded block; that is, 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) generates surrounding blocks of the same size and shape as the block being reconstructed using reconstructed information extracted from a current picture buffer (358). For example, the current picture buffer (358) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (355) adds the prediction information generated by the intra-prediction unit (352) to the output sample information provided by the scaler / inverse transform unit (351) on a per-sample basis.
[0041] 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 this case, the motion compensated prediction unit (353) may access the reference picture memory (357) to extract samples for prediction. After motion compensation of the extracted samples according to the symbols (321), these samples may be added to the output of the scaler / inverse transform unit (351) (in this case referred to as residual samples or residual signal) by an aggregator (355) to generate output sample information.
[0042] The output samples of the aggregator (355) can be used by various loop filtering techniques in the loop filter unit (356). The output of the loop filter unit (356) can be a sample stream that can be output to the display device (312) and stored in the reference picture memory (357) for subsequent inter-frame picture prediction.
[0043] Figure 4 4 is a block diagram of a video encoder (403) according to an embodiment disclosed in the present application. The video encoder (403) is provided in an electronic device (420). The electronic device (420) includes a transmitter (440) (e.g., a transmission circuit). The video encoder (403) can be used to replace Figure 4 A video encoder (403) in an embodiment.
[0044] The video encoder (403) may receive video samples from a video source (401). According to an embodiment, 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 the application. Implementing an appropriate encoding speed is a function of the controller (450). In some embodiments, the controller (450) controls other functional units as described below and is functionally coupled to these units. The parameters set by the controller (450) may include rate control related parameters (picture skipping, quantizer, lambda value of rate-distortion optimization techniques, etc.), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc.
[0045] In some embodiments, the video encoder (403) operates in a coding loop. As a simple description, in an embodiment, the coding loop may include a source encoder (430) (e.g., responsible for creating symbols, such as a symbol stream, based on the input picture to be encoded and the reference picture) and a (local) decoder (433) embedded in the video encoder (403). It can be observed at this point that any decoder technology other than parsing / entropy decoding present in the decoder must also exist in the corresponding encoder in substantially the same functional form. For this reason, the present application focuses on the decoder operation. The description of the encoder technology can be simplified because the encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is only required in certain areas and is provided below.
[0046] During operation, in some embodiments, the source encoder (430) may perform motion compensated predictive coding, which predictively encodes an input picture with reference to at least one previously encoded picture from a video sequence designated as a "reference picture."
[0047] The local video decoder (433) can decode the encoded video data that can be designated as a 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 locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture that will be obtained by the remote video decoder.
[0048] The predictor (435) may perform prediction search for the encoding engine (432). That is, for a new picture to be encoded, the predictor (435) may search the reference picture memory (434) for sample data (as a candidate reference pixel block) or certain metadata, such as reference picture motion vector, block shape, etc., that may serve as a suitable prediction reference for the new picture.
[0049] The controller (450) may manage encoding operations of the source encoder (430), including, for example, setting parameters and subgroup parameters for encoding video data.
[0050] 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 created by the entropy encoder (445) in preparation for transmission over a communication channel (460), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (440) may combine the encoded video data from the video encoder (403) with other data to be transmitted, such as encoded audio data and / or auxiliary data streams (source not shown).
[0051] The controller (450) may manage the operation of the video encoder (403). During encoding, the controller (450) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that may be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types: intra picture (I picture), predictive picture (P picture), bidirectional predictive picture (B picture), multiple predicted pictures. A source picture may generally be spatially subdivided into a plurality of sample coding blocks, as described in further detail below.
[0052] Figure 5 1 is a diagram of a video encoder (503) according to another embodiment disclosed in the present application. The video encoder (503) is used to receive a processed block (e.g., a prediction block) of sample values in a current video picture in a video picture sequence, and encode the processed block into an encoded picture that is part of an encoded video sequence. In this embodiment, the video encoder (503) is used to replace Figure 4 A video encoder (403) in an embodiment.
[0053] For example, the video encoder (503) receives a matrix of sample values for a processing block. The video encoder (503) uses, for example, rate-distortion (RD) optimization to determine whether to use intra mode, inter mode, or bi-prediction mode to encode the processing block.
[0054] exist Figure 5 In an embodiment of the present invention, the video encoder (503) includes: Figure 5 Shown are 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.
[0055] The inter-frame encoder (530) is used to receive samples of a current block (e.g., a processing block), compare the block with at least one reference block in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., redundant information description according to an inter-frame coding technique, motion vectors, merge mode information), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some embodiments, the reference picture is a decoded reference picture decoded based on the encoded video information.
[0056] The intra-frame encoder (522) is used to receive samples of a current block (e.g., a processing block), compare the block with an encoded block in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra-frame prediction information (e.g., intra-frame prediction direction information according to at least one intra-frame coding technique). In an embodiment, the intra-frame encoder (522) also calculates an intra-frame prediction result (e.g., a predicted block) based on the intra-frame prediction information and a reference block in the same picture.
[0057] The general controller (521) is used to determine general control data and control other components of the video encoder (503) based on the general control data, for example, determining a prediction mode of a block and providing a control signal to a switch (526) based on the prediction mode.
[0058] The residual calculator (523) is used to calculate the difference (residual data) between the received block and the prediction result selected from the intra-frame encoder (522) or the inter-frame encoder (530). The residual encoder (524) is used to operate based on the residual data to encode the residual data to generate a transform coefficient. The transform coefficient is then quantized to obtain a quantized transform coefficient. In various embodiments, the video encoder (503) also includes a residual decoder (528). The residual decoder (528) is used to perform an inverse transform and generate decoded residual data. The decoded residual data can be used appropriately by the intra-frame encoder (722) and the inter-frame encoder (730). The entropy encoder (525) is used to format the code stream to produce an encoded block.
[0059] Figure 6 FIG. 6 is a diagram of a video decoder (610) according to another embodiment disclosed in the present application. The video decoder (610) is used to receive an encoded image as part of an encoded video sequence and decode the encoded image to generate a reconstructed picture. In an embodiment, the video decoder (610) is used to replace Figure 4 A video decoder (410) of an embodiment.
[0060] exist Figure 6 In one embodiment, the video decoder (610) includes: Figure 6An 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 FIG.
[0061] The entropy decoder (671) is used to reconstruct certain symbols from the encoded picture, which represent the syntax elements constituting the encoded picture. The inter-frame decoder (680) is used 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) is used to receive intra-frame prediction information and generate a prediction result based on the intra-frame prediction information. The residual decoder (673) is used 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) is used to combine the residual output by the residual decoder (673) with the prediction result (which can be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which can be part of the reconstructed picture, and the reconstructed picture can then be part of the reconstructed video. It should be noted that other suitable operations such as deblocking operations can be performed to improve visual quality.
[0062] It should be noted that the video encoder (203), video encoder (403) and video encoder (503) and video decoder (210), video decoder (310) and video decoder (610) may be implemented using any suitable technology. In an embodiment, the video encoder (203), video encoder (403) and video encoder (503) and video decoder (210), video decoder (310) and video decoder (610) may be implemented using at least one integrated circuit. In another embodiment, the video encoder (203), video encoder (403) and video encoder (503) and video decoder (210), video decoder (310) and video decoder (610) may be implemented using at least one processor that executes software instructions.
[0063] Turning to block partitioning for encoding and decoding, general partitioning can start from basic blocks and can follow a predefined set of rules, a specific pattern, a partition tree, or any partition structure or scheme. Partitioning can be hierarchical and recursive. After following any example partitioning procedure or other procedures described below or a combination thereof to divide or partition basic blocks, a final set of partitions or coding blocks can be obtained. Each of these partitions can be in one of the various partition levels in the partition hierarchy and can have various shapes. Each of the partitions can be referred to as a coding block (CB). For 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 units to which some basic coding / decoding decisions can be made, and coding / decoding parameters can be optimized, determined, and signaled in the encoded video code stream. The highest or deepest level in the final partition represents the depth of the coding block partition structure of the tree. The coding block can be a luminance coding block or a chrominance coding block. The CB tree structure for each color can be referred to as a coding block tree (CBT). The coding blocks of all color channels may be collectively referred to as coding units (CUs). The hierarchical structure of all color channels may be collectively referred to as coding tree units (CTUs). The partitioning modes or structures of various color channels in a CTU may be the same or different.
[0064] In some embodiments, the partition tree schemes or structures for the luma and chroma channels may not have to be the same. In other words, the luma and chroma channels may have independent coding tree structures or modes. In addition, whether the luma and chroma channels use the same or different coding partition tree structures and the actual coding partition tree structures to be used may depend on whether the stripe being encoded is a P stripe, a B stripe, or an I stripe. For example, for an I stripe, the chroma channel and the luma channel may have independent coding partition tree structures or coding partition tree structure modes, while for a P stripe or a B stripe, the luma and chroma channels may share the same coding partition tree scheme. When independent coding partition tree structures or modes are applied, the luma channel may be partitioned into CBs by one coding partition tree structure, and the chroma channel may be partitioned into chroma CBs by another coding partition tree structure.
[0065] Figure 7 An example of a predefined 10-way partitioning structure / pattern is shown, which allows recursive partitioning to form a partition tree.The root block may start at a predefined level (eg, starting from a basic block at a 128x128 or 64x64 level). Figure 7 Example partition structures include various 2:1 / 1:2 and 4:1 / 1:4 rectangular partitions. In some example embodiments, further subdivision is not allowed. Figure 7The coding tree depth may be further defined to indicate the depth of the partition from the root node or the root block. For example, the coding tree depth of the root node or the root block may be set to 0, and after the root block is further partitioned once, as Figure 7 As shown, the coding tree depth is increased by 1. In some embodiments, only all square partitions in 710 may be allowed, following Figure 7 The mode recursively partitions to the next level of the partition tree.
[0066] In some other example implementations for coding block partitioning, a quadtree structure may be used. This quadtree segmentation may be applied hierarchically and recursively to any square-shaped partition. Whether a basic block or an intermediate block or partition is further quadtree segmented may be applicable to various local characteristics of the basic block or intermediate block / partition.
[0067] In yet other examples, a ternary partitioning scheme may be used to partition a basic block or any intermediate block, such as Figure 8 The ternary mode can be implemented vertically, as shown in 802, or horizontally, as shown in 804. Although Figure 8 The example segmentation ratio in is shown as 1:2:1, but other ratios may be predefined. In some embodiments, two or more different ratios may be predefined. In some embodiments, the width and height of the partitions of the example ternary tree are always powers of 2 to avoid additional transformations.
[0068] The above partitioning schemes can be combined in any manner at different partitioning levels. As an example, the above quadtree and binary partitioning schemes can be combined to partition basic blocks into a quadtree-binary tree (QTBT) structure. In this scheme, basic blocks or intermediate blocks / partitions can be quadtree-partitioned or binary-partitioned, if specified, subject to a predefined set of conditions. Fig. 9A specific example is illustrated in , where a basic block is first partitioned by a quadtree into four partitions, as shown in 902, 904, 906, and 908. Thereafter, each of the resulting partitions is partitioned by a quadtree into four additional partitions (such as 908) at the next level, or is binary partitioned into two additional partitions (horizontally or vertically, such as 902 or 906, for example, both are symmetrical), or is non-partitioned (such as 904). For square-shaped partitions, binary or quadtree partitioning can be recursively allowed, as shown in the entire example partitioning pattern of 910 and the corresponding tree structure / representation in 920, where solid lines represent quadtree partitioning and dashed lines represent binary partitioning. A flag can be used for each binary partition node (non-leaf binary partition) to indicate whether the binary partitioning is horizontal or vertical. For example, as shown in 920, consistent with the partitioning structure of 910, a flag "0" can represent a horizontal binary partition, and a flag "1" can represent a vertical binary partition. For quadtree partitioning, there is no need to indicate the partitioning type, because quadtree partitioning always partitions a block or partition horizontally and vertically to produce 4 sub-blocks / partitions of equal size. In some embodiments, a flag "1" may represent horizontal binary partitioning, and a flag "0" may represent vertical binary partitioning.
[0069] In some example implementations of QTBT, the quadtree and binary segmentation rule set may be represented by the following predefined parameters and corresponding functions associated therewith:
[0070] CTU size: the root node size of the quadtree (the size of the basic block)
[0071] MinQTSize: The minimum allowed size of a quadtree leaf node
[0072] MaxBTSize: Maximum allowed binary tree root node size
[0073] MaxBTDepth: Maximum allowed binary tree depth
[0074] MinBTSize: The minimum allowed binary tree leaf node size
[0075] In some example implementations of the QTBT partition structure, the CTU size can be set to 128×128 luma samples with two corresponding 64×64 chroma sample blocks (when example chroma subsampling is considered and used), MinQTSize can be set to 16×16, MaxBTSize can be set to 64×64, MinBTSize (for both width and height) can be set to 4×4, and MaxBTDepth can be set to 4. Quadtree partitioning can be first applied to the CTU to generate quadtree leaf nodes. 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 by the binary tree first because the size exceeds the MaxBTSize (i.e., 64×64). Otherwise, nodes that do not exceed MaxBTSize can be partitioned by 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 split by a quadtree. The basic block has a partition depth of 0. Each of the four resulting partitions is 64×64, not exceeding MaxBTSize, and can be further split by a quadtree or binary tree at level 1. The process continues. When the binary tree depth reaches MaxBTDepth (i.e., 4), further splitting can be ignored. When the binary tree node has a width equal to MinBTSize (i.e., 4), further horizontal splitting can be ignored. Similarly, when the binary tree node has a height equal to MinBTSize, further vertical splitting is not considered.
[0076] In some example embodiments, the above QTBT scheme can be configured to support the flexibility of having the same QTBT structure or independent QTBT structures for luma and chroma. For example, for P and B slices, the luma and chroma CTBs in one CTU can share the same QTBT structure. However, for I slices, the luma CTB can be partitioned into CBs by the QTBT structure, and the chroma CTB can be partitioned 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.
[0077] The above various CB partitioning schemes and further partitioning of CB to PB can be combined in any manner.The following specific implementations are provided as non-limiting examples.
[0078] Inter prediction may be implemented, for example, in a single reference mode or a composite reference mode. In some embodiments, a skip flag may first be included in the codestream of the current block (or at a higher level) to indicate whether the current block is inter-coded and not skipped. If the current block is inter-coded, another flag may be further included in the codestream as a signal to indicate 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. At least one reference block may be identified using at least one reference frame index and additionally using at least one corresponding motion vector, which indicates at least one shift between at least one reference block and the current block in a position relative to the frame (for example, in horizontal and vertical pixels). For example, an inter-frame prediction block for a current block can be generated from a single reference block identified by a motion vector in a reference frame as a prediction block in a single reference mode, while for a composite reference mode, a prediction block can be generated by a weighted average of two reference blocks in two reference frames indicated by two reference frame indices and two corresponding motion vectors. At least one motion vector can be encoded in various ways and included in a code stream.
[0079] In some example embodiments, at least one reference picture list containing identifications of short-term and long-term reference frames for inter prediction may be formed based on information in a reference picture set (RPS). For example, a single picture reference list may be formed for unidirectional inter prediction, denoted as L0 reference (or reference list 0), while two picture reference lists may be formed for bidirectional inter prediction, 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 and L1 lists may be ordered in various predetermined ways. The lengths of the L0 and L1 lists 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 prediction may be in a single reference mode or in a composite reference mode. Bidirectional inter prediction may be a composite mode only because bidirectional inter prediction involves at least two reference blocks.
[0080] In some embodiments, a merge mode (MM) for inter prediction may be implemented. Typically, for merge mode, at least one of the motion vectors of c or the motion vectors in the composite reference prediction may be derived from at least one other motion vector, rather than being calculated and signaled independently. For example, in an encoding system, at least one current motion vector for a current PB may be represented by at least one difference between at least one current motion vector and at least one other already encoded motion vector (referred to as a reference motion vector). Such at least one difference in at least one motion vector, rather than the entirety of at least one current motion vector, may be encoded and included in a bitstream, and may be linked to at least one reference motion vector. Correspondingly, in a decoding system, at least one motion vector corresponding to the current PB may be derived based on at least one decoded motion vector difference and at least one decoded reference motion vector linked thereto. As a specific form of general merge mode (MM) inter prediction, such inter prediction based on at least one motion vector difference may be referred to as merge mode with motion vector difference (MMVD). Therefore, general MM or specific MMVD may be implemented to improve coding efficiency by utilizing the correlation between motion vectors associated with different PBs. For example, adjacent PBs may have similar motion vectors, and thus MVD may be small and may be efficiently encoded. For another example, motion vectors may be correlated in time (between frames) for blocks of similar location / position in space.
[0081] In some example embodiments of the MMVD, a reference motion vector (RMV) or MV predictor candidate list for motion vector prediction may be formed for the block being predicted. The RMV candidate list 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 adjacent blocks and / or temporal blocks in the same frame (e.g., blocks located in the same position in a continuation or subsequent frame of the current frame). These options represent blocks that may have similar or identical motion vectors as the current block at a spatial or temporal position relative to the current block. The size of the MV predictor candidate list may be predetermined. For example, the list may contain two or more candidates. In order to be on the RMV candidate list, for example, the candidate block may need to have at least one reference frame that is the same 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 embodiments, if spatial neighboring blocks are available and the above conditions are met, the merge candidate list can be first filled with spatial neighboring blocks (scanned in a specific predefined order) and then filled with temporal blocks if space is still available in the list. For example, the neighboring RMV candidate blocks can be selected from the left block and the top block of the current block. The RMV predictor candidate list 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.
[0082] In some embodiments, 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 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 RMV candidate more closely predicts the MV of the current coding block and signal the selection as an index to the DRL.
[0083] In some example embodiments of MMVD, after an RMV candidate is selected and used as a basic motion vector predictor for a motion vector to be predicted, a motion vector difference (MVD or delta MV, which represents the difference between the motion vector to be predicted and the 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.
[0084] In some example implementations of the MMVD, a distance index may be used to specify the magnitude information of the motion vector difference and 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 or 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.
[0085] Table 1 – Example relationship between distance index and predefined MV offsets
[0086]
[0087]
[0088] In some example embodiments of the MMVD, a direction index may be further signaled and used to indicate the direction of the MVD relative to a reference motion vector. In some embodiments, 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 interpretation of the MVD may vary depending on the information of the start / reference MV. For example, when the start / reference MV corresponds to a unidirectional prediction block or to a bidirectional prediction block, where the two 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 sign (direction) of the MV offset added to the start / reference MV. When the start / reference MV corresponds to a bidirectional prediction block, where two reference pictures are on 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.
[0089] Table 2 - Example implementation of the sign of the MV offset specified by the direction index
[0090]
[0091] In some example embodiments, the MVD may be scaled according to the difference in POC in each direction. If the difference in POC in both lists is the same, no scaling is required. Otherwise, if the difference in POC in reference list 0 is greater than the difference in POC in reference list 1, the MVD of reference list 1 is scaled. If the POC difference of reference list 1 is greater than list 0, the MVD of list 0 may be scaled in the same manner. If the starting MV is unidirectionally predicted, the MVD is added to the available or reference MV.
[0092] In some example embodiments 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, while the other MVD can be derived from the signaled MVD. In such embodiments, motion information including reference picture indices of list-0 and list-1 are not all signaled. Specifically, at the slice level, a flag called "mvd_l1_zero_flag" can be included in the bitstream 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), the bidirectional prediction flag (called "BiDirPredFlag") can be set to 0, meaning that there is no bidirectional prediction. Otherwise, if mvd_l1_zero_flag is zero, if the nearest reference picture in list-0 and the nearest reference picture in list-1 form a front-to-back pair of reference pictures or a back-to-front pair of reference pictures, BiDirPredFlag may be set to 1, and both list-0 and list-1 reference pictures are short-term reference pictures. Otherwise, BiDirPredFlag is set to 0. BiDirPredFlag of 1 may indicate that a symmetric mode flag is additionally signaled in the bitstream. When BiDirPredFlag is 1, the decoder may extract the symmetric mode flag from the bitstream. For example, a symmetric mode flag may be signaled at the CU level (if necessary), and it may indicate whether a symmetric MVD coding mode is being used for the corresponding CU. When the symmetric mode flag is 1, it indicates the use of the symmetric MVD coding mode, and only the reference picture indexes of list-0 and list-1 (referred to as "mvp_l0_flag" and "mvp_l1_flag") are signaled with the MVD associated with list-0 (referred to as "MVD0"), and the other motion vector difference "MVD1" will be derived instead of signaled. For example, MVD1 can be derived as -MVD0. In this way, only one MVD is signaled in the example symmetric MVD mode.
[0093] In some other example implementations for MV prediction, a coordination scheme may be used to implement general merge mode MMVD and some other types of MV prediction for single reference mode and composite reference mode MV prediction. Various syntax elements may be used to signal the manner in which the MV of the current block is predicted. For example, for a single reference mode, the following MV prediction modes may be signaled:
[0094] NEARMV - uses one of the motion vector predictors (MVP) in the list indicated by the DRL (Dynamic Reference List) index.
[0095] NEWMV—Uses one of the motion vector predictors (MVPs) in the list signaled by the DRL index as a reference and applies the delta to that MVP.
[0096] GLOBALMV – Use motion vectors based on frame-level global motion parameters.
[0097] 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:
[0098] NEAR_NEARMV—Use one of the motion vector predictors (MVP) in the list signaled by the DRL index.
[0099] 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 of the second MV.
[0100] 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 of the first MV.
[0101] 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 of the two MVs.
[0102] GLOBAL_GLOBALMV – Use the MV from each reference based on its frame-level global motion parameters.
[0103] The term "NEAR" above refers to MV prediction using a reference MV as a general merge mode in the absence of MVD, while the term "NEW" refers to MV prediction involving the use of a reference MV and the motion vector difference (MVD) signaled as in MMVD mode to offset it. For composite inter prediction, the above reference basic motion vector and motion vector increment may generally be different or independent between the two references, even though they may be correlated, and this correlation may be exploited to reduce the amount of information required to signal the two motion vector increments. In this case, joint signaling of the two MVDs may be implemented and indicated in the bitstream.
[0104] 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.
[0105] Motion Vector Differential Coding
[0106] In some example embodiments, in coding techniques such as AV1, fractional (such as 1 / 8 pixel (i.e., one eighth of a 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 list 1 (L1).
[0107] mv_joint specifies which components of the motion vector difference are non-zero
[0108] ο0 indicates that there is no non-zero MVD in the horizontal or vertical direction
[0109] ο1 indicates that there is non-zero MVD only along the horizontal direction
[0110] ο2 indicates that there is non-zero MVD only in the vertical direction
[0111] o3 indicates that there is non-zero MVD in both horizontal and vertical directions
[0112] mv_sign specifies whether the motion vector difference is positive or negative
[0113] 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.
[0114] Table 3: Magnitude classes of motion vector differences
[0115] Music Videos MVD Magnitude MV_CLASS_0 (0,2] MV_CLASS_1 (2,4] MV_CLASS_2 (4,8] MV_CLASS_3 (8,16] MV_CLASS_4 (16,32] MV_CLASS_5 (32,64] MV_CLASS_6 (64,128] MV_CLASS_7 (128,256] MV_CLASS_8 (256,512] MV_CLASS_9 (512,1024] MV_CLASS_10 (1024,2048]
[0116] mv_bit specifies the integer part of the offset between the motion vector difference and the starting amplitude for each MV class
[0117] mv_fr specifies the first 2 fractional bits of the motion vector difference
[0118] mv_hp specifies the third fractional bit of the motion vector difference
[0119] Adaptive MVD resolution
[0120] In some example embodiments, the resolution of the MVD in various MVD amplitude classes can be distinguished. For example, a high resolution MVD for a large MVD amplitude of a higher MVD class may not provide a statistically significant improvement in compression efficiency. Thus, for a larger MVD amplitude range corresponding to a higher MVD amplitude class, the MVD can be encoded with a reduced resolution (integer pixel resolution or fractional pixel resolution). Similarly, typically for larger MVD values, the MVD can be encoded with a reduced resolution (integer pixel resolution or fractional pixel resolution). This MVD resolution that depends on the MVD class or depends on the MVD amplitude can generally be referred to as an adaptive MVD resolution.
[0121] Using adaptive MVD resolution, the number of signaling bits reduced by targeting a less accurate MVD may be greater than the additional bits required to encode the inter-frame prediction residual due to such less accurate MVD, due to the statistical observation that processing a MVD resolution of a large amplitude or high class MVD at a level similar to the resolution of a low amplitude or low class MVD in a non-adaptive manner may not significantly increase the inter-frame prediction residual coding efficiency of blocks with a large amplitude or high class MVD. In other words, for a large amplitude or high class MVD, using a higher MVD resolution may not produce more coding gain than using a lower MVD resolution.
[0122] In some example embodiments, further constraints may be imposed on the composite reference modes, such as the NEW_NEARMV and NEAR_NEWMV modes described above. Specifically, the accuracy of the motion vector difference (MVD) depends on the associated class and magnitude of the MVD.
[0123] In some example embodiments, fractional MVD is allowed only when the MVD magnitude is equal to or less than one pixel. Alternatively or additionally, only one MVD value is allowed when the value of the associated MV class is equal to or greater than MV_CLASS_1, and the MVD values in each MV class are derived as 4, 8, 16, 32, 64 for MV class 1 (MV_CLASS_1), 2 (MV_CLASS_2), 3 (MV_CLASS_3), 4 (MV_CLASS_4), or 5 (MV_CLASS_5), respectively.
[0124] Exemplarily, the allowed MVD values in each MV class are illustrated in Table 4.
[0125] Table 4: Adaptive MVD in each MV amplitude class
[0126]
[0127]
[0128] Additionally, if the current block is coded in NEW_NEARMV or NEAR_NEWMV mode, one context is used to signal mv_joint or mv_class. Otherwise, a different context is used to signal mv_joint or mv_class. Note that in AV1, mv_class specifies the class of the motion vector difference. A higher class means that the motion vector difference represents a larger update; mv_joint specifies which components of the motion vector difference are non-zero.
[0129] Improvements for adaptive MVD resolution
[0130] In some example embodiments, further improvements can be implemented for adaptive MVD. A new inter-frame coding mode called AMVDMV can be added to the single reference case. When the AMVDMV mode is selected and / or marked, it indicates that AMVD is applied to signal MVD, thereby adopting adaptive MVD resolution.
[0131] In one solution, a flag named amvd_flag is added in JOINT_NEWMV mode to indicate whether AMVD is applied in joint MVD coding mode. When adaptive MVD resolution is applied in joint MVD coding mode (which can also be named joint AMVD coding mode), the MVD of two reference frames is jointly signaled, and the accuracy of MVD is implicitly determined by, for example, MVD amplitude. Otherwise, the MVD of two (or more than two) reference frames is jointly signaled, and traditional MVD coding is applied.
[0132] Alternatively, the MVD of two (or more than two) reference frames can be jointly signaled and conventional MVD coding is applied. In this case, instead of adding amvd_flag as discussed above, a new inter-frame prediction mode called JOINT_AMVDNEWMV is added to indicate that AMVD is applied in the joint MVD coding mode.
[0133] Adaptive Motion Vector Resolution (AMVR)
[0134] In some example embodiments, AMVR can be implemented in various coding techniques such as AV1. For example, a total of 7 MV precisions are supported (e.g., 8, 4, 2, 1, 1 / 2, 1 / 4, 1 / 8). For each prediction block, the encoder (e.g., AVM, AV1 encoder) searches all supported precision values and signals the best precision to the decoder.
[0135] In order to reduce the complexity of the encoder runtime, two precision sets are supported. Each precision set can contain, for example, 4 predefined precisions. One of the precision sets is adaptively selected at the frame level based on the maximum precision value of the frame. Exemplarily, the maximum precision can be signaled in the frame header. Table 5 summarizes the supported precision values based on the maximum precision at the frame level.
[0136] Table 5: MV accuracy supported in two sets
[0137] Maximum frame-level accuracy Supported MV accuracy 1 / 8 1 / 8、1 / 2、1、4 1 / 4 1 / 4、1、4、8
[0138] In some example embodiments, there is a frame-level flag to indicate whether the MV of the frame contains sub-pixel (i.e., sub-pixel) precision. AMVR is enabled only when the value of the cur_frame_force_integer_mv flag is 0. Under AMVR, if the precision of the block is lower than the maximum precision, the motion model and interpolation filter are not signaled. If the precision of the block is lower than the maximum precision, the motion mode can be inferred to be translational motion, and the interpolation filter is inferred to be a REGULAR interpolation filter. Similarly, if the precision of the block is 4 pixels or 8 pixels, the inter-intra mode is not signaled and is inferred to be 0.
[0139] Joint MVD coding (JMVD)
[0140] In some example embodiments, in a coding technique such as AV1, an inter-coding mode named JOINT_NEWMV is applied to indicate whether to jointly signal the MVDs of two reference lists. If the inter-prediction mode is equal to JOINT_NEWMV mode, the MVDs of reference list 0 and reference list 1 are jointly signaled. In this case, only one MVD (named joint_mvd) is signaled and transmitted to the decoder, and the delta MVs of reference list 0 and reference list 1 are derived from joint_mvd.
[0141] In some example embodiments, the JOINT_NEWMV mode is signaled together with the NEAR_NEARMV, NEAR_NEWMV, NEW_NEARMV, NEW_NEWMV and GLOBAL_GLOBALMV modes. No additional context needs to be added.
[0142] When JOINT_NEWMV mode is signaled, and the picture order count (POC) distances between two reference frames and the current frame are different, the MVD is scaled for reference list 0 or reference list 1 based on the POC distance. Specifically, the distance between reference frame list 0 and the current frame is td0, and the distance between reference frame list 1 and the current frame is td1. If td0 is equal to or greater than td1, joint_mvd is the jointly signaled MVD and is used directly for reference list 0, and the mvd of reference list 1 is derived from joint_mvd based on equation (1):
[0143]
[0144] Otherwise, if td1 is equal to or greater than td0, joint_mvd is used directly for reference list 1, and mvd for reference list 0 is derived from joint_mvd based on equation (2):
[0145]
[0146] Improved joint MVD coding
[0147] In some example embodiments, in a coding technique such as AV1, if a block is coded as a joint MVD coding mode (e.g., JOINT_NEWMV or JOINT_AMVDNEWMV), a new syntax named mvd_scaling_factor_idx is signaled into the codestream to explicitly indicate the scaling factor of the MVD between reference frame 0 and reference frame 1.
[0148] Exemplarily, as shown in Tables 6 and 7, two predefined lookup tables can be used to store the supported / allowed scaling factors for JOINT_NEWMV or JOINT_AMVDNEWMV, respectively. The associated entry index of the selected scaling factor in the lookup table is signaled in the bitstream. For the JOINT_AMVDNEWMV mode, the same scaling factor is applied to the vertical and horizontal components of the MVD of the reference frame list 0 and / or 1. For the JOINT_NEWMV mode, the scaling factor of one component of the MVD (vertical component or horizontal component) is limited to 1, and the scaling factor of the other component of the MVD can be other values, such as 2 or 1 / 2. In one example, the MVD of the reference frame lists 0 and 1 is calculated in the following equation:
[0149] mvd_ref0=joint_mvd (3)
[0150]
[0151] Here, mvd_ref0 and mvd_ref1 represent the MVD of reference frame list 1 and the MVD of reference frame list 2, respectively. The distance between reference frame list 0 and the current frame is td0, and the distance between reference frame list 1 and the current frame is td1; joint_mvd represents the jointly signaled MVD; and jmvd_scale represents the scaling factor.
[0152] Table 6: Scaling factors for JOINT_AMVDNEWMV
[0153]
[0154]
[0155] Table 7: Scaling factors for JOINT_NEWMV
[0156] index Scaling factor for the x-axis Scaling factor for the y-axis 0 1 1 1 1 2 2 2 1 3 1 1 / 2 4 1 / 2 1
[0157] Bidirectional prediction with CU-level weights (BCW)
[0158] In some example embodiments, 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 for a weighted average of the two prediction signals. For example, denoted as P 双向预测 The prediction using bidirectional can be calculated by using the following equation 5:
[0159] P 双向预测 =((8-w)*P0+w*P1+4)>>3 (5)
[0160] Exemplarily, five weights are allowed in weighted average bidirectional prediction, w∈{-2,3,4,5,10}. When w is equal to 4, the weighted average of the two prediction samples is performed using equal weighting factors. For each bidirectional prediction CU, the weight w is determined in one of 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.
[0161] In some example embodiments, 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.
[0162] Local Illumination Compensation (LIC)
[0163] LIC is a video coding tool that can be utilized by video encoders and video decoders. In some example embodiments, LIC can be applied based on a linear model for compensating for illumination changes between at least one temporal reference picture and the current picture (e.g., in a motion compensation stage). The linear model is based on LIC parameters including a scaling factor α and an offset β, and is described in more detail in the block adaptive weighted prediction section below. LIC can be enabled or disabled via, for example, high-level signaling at various levels.
[0164] In some example embodiments, 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 at least one motion vector 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 sample may be jointly considered (e.g., averaged) in LIC parameter derivation.
[0165] In some example embodiments, a minimum mean square 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 bidirectional prediction reference template reference samples and the template samples of the current CU may be minimized.
[0166] In some example embodiments, a similar approach may be used in unidirectional prediction. In this case, the LIC parameters may be determined so that the difference between the unidirectional prediction reference template reference sample and the template sample of the current CU may be minimized.
[0167] Note that the LMSE algorithm described herein is only an example of deriving LIC parameters. One or more other approaches / algorithms may be used.
[0168] Block Adaptive Weighted Prediction (BAWP)
[0169] In some example embodiments, BAWP is employed to simulate local illumination variations.
[0170] refer to Fig.12 For example, BAWP can be a block-level weighted prediction to model the local illumination variation between the current block and its predicted block as a function of 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 current template 1210) and a template of a reference block (1222) (or referred to as reference template 1220) are illustrated in FIG. 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 embodiments, the function may be a linear function. The parameters of the function may be represented by a scaling factor α and an offset β, which form a linear equation. The scaling factor may also be referred to as a ratio, an α factor, or an α value.
[0171] When encoding a block in BAWP mode, an exemplary linear function for compensating for illumination changes is listed below:
[0172] p′(x′)=α*p(x)+β (6)
[0173] 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 ratio), 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 6, 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 an incremental value to obtain the coordinates of the corresponding reference sample (in the reference picture). In some example embodiments, p ′ (x ′ ) and p(x) can be said to be co-located - p(x) is the reference sample at position x in the reference block, corresponding to the sample at position x in the current block. ′ p ′ (x ′ ). In some example embodiments, p ′ (x ′ ) and p(x) can be established by motion information (such as at least one motion vector).
[0174] In some example embodiments, α and β may be derived based on the current block template and the reference block template, and therefore, α and β do not require signaling overhead except for signaling a BAWP flag (e.g., bawp_flag) for a single inter prediction mode to indicate the use of BAWP. In some example embodiments, the BAWP method is only applied to blocks having a size greater than or equal to 8×8 and encoded in a single inter prediction mode. In some example embodiments, the BAWP method is only applied to the luma component.
[0175] Although deriving both the scaling factor and the offset (α and β) will save some signaling overhead, there may be some potential disadvantages during certain situations. For example, the effectiveness and / or accuracy of the scaling factor depends on the similarity between the current block and its template in the reference frame. When the correlation between the current block and its template in the reference frame is high, the derived scaling factor can significantly improve the prediction accuracy. However, if the current block and its template in the reference frame are significantly different, the scaling factor may be inaccurate and even useless, and the prediction accuracy may deteriorate.
[0176] In the present application, various embodiments for improving video encoding / decoding techniques in BAWP and / or LIC modes are disclosed, with the goal of enhancing prediction accuracy with minimal overhead in signaling cost. In particular, various methods for signaling and / or deriving scaling factors and offsets (α and β) as specified in Equation 6 are described. In addition, in order to increase the supported parameter range, adaptive precision of scaling factors and / or offsets is adopted.
[0177] In this application, 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 precedes the current frame in display order or follows the current frame in display order.
[0178] In this application, a sample can be interpreted as the pixel value of a pixel. It can generally refer to any component (luminance or chrominance).
[0179] In this application, 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 to a certain extent. For example, the x-axis and y-axis can be replaced by a 45-degree axis and a 135-degree axis.
[0180] In this application, conventional JMVD may refer to JMVD with conventional full MV resolution, or JMVD with AMVR.
[0181] For the embodiments described below, a coding block or a coded block may be encoded in BAWP (or LIC, or composite weighted prediction (CWP)) mode, which is referred to as BAWP hereinafter to simplify the description. In some examples, a BAWP flag (e.g., bawp_flag) is signaled in the video bitstream to indicate whether the BAWP mode is used for the current block. Based on the value of the BAWP flag (e.g., bawp_flag) equal to 1, a scaling factor and / or an offset is further signaled in the video bitstream to indicate the degree of illumination change of the current block.
[0182] In one embodiment, when a current block is predicted from its reference block using a linear function with a scaling factor and an offset β (such as linear equation 6 shown above), the selection of the scaling factor and / or offset β can be signaled into the bitstream and parsed on the decoder side to reconstruct the predicted block. The reference block can be specified by, for example, a motion vector associated with the current block. That is, the scaling factor and / or offset β can be explicitly signaled rather than derived by the decoder. In some example embodiments, only the scaling factor is signaled and the offset β can be derived based on the scaling factor, or vice versa. In the present application, the scaling factor may also be referred to as a ratio, a scaling factor, a scaling factor α, or an α factor.
[0183] Based on investigations and statistical observations, processing (coding, signaling) large-amplitude scaling factor values with similar or identical precision levels as low-amplitude scaling factor values in a non-adaptive manner may not significantly increase prediction accuracy and efficiency. In other words, for large-amplitude scaling factor values, using the same precision may not produce more coding gain than using lower precision.
[0184] In one embodiment, instead of using uniform precision, the signaling precision of the scaling factor a may depend on the magnitude of the scaling factor.
[0185] In one embodiment, the precision of the signaling of the scaling factor may decrease as the magnitude (or absolute value of the magnitude) of the scaling factor increases. The precision may be represented by the step size between two adjacent scaling factors.
[0186] As an example, the list of supported scaling factors may be: {1.0, 1.2, 1.6, 2.2, 3.0, 4.0}. The step size between two adjacent scaling factors is 0.2, 0.4, 0.6, 0.8, 1.0, with decreasing precision. As another alternative example, the step size may be the same for the first scaling factor range and may be increased for the second scaling factor range if the second scaling factor range covers a scaling factor with a larger value or a larger absolute value.
[0187] In one embodiment, in order to further increase the coding (e.g., entropy coding) gain and efficiency, and reduce signaling overhead, the supported range of the scaling factor can be divided into multiple groups. Different precisions can be assigned to each group in various ways. For example, the precision of the signaled scale value can decrease as the group index increases. The group index and the value of the scaling factor within each group are signaled into the code stream and parsed on the decoder side. The group index can be used to identify the group, and another index can be used to identify a specific scaling factor in the group. The group can be implemented as a lookup table, a list, a set, etc. The precision of the signaled scale value follows the precision of the group to which the scale value belongs.
[0188] In this application, the term “list” for storing ratio values may be used interchangeably with the term “lookup table.” Both the list and the lookup table may support classification functions and may be classified based on certain classification rules discussed below.
[0189] In some example embodiments, the supported range of scaling factors is divided into 4 groups as shown in Table 8 below. The second column of the table lists the range (or range of absolute values of scaling factors) for each group, while the third column lists the step size (or precision) of the signaled values within each group. In the table, brackets "(" or ")" indicate that the endpoint values are not included (exclusive). Brackets "[" or "]" indicate that the endpoint values are included (inclusive).
[0190] Table 8: Scaling factor groups with different precisions
[0191]
[0192] In one embodiment, the precision of the signaled scaling factor may decrease as the absolute difference between the magnitude of the scaling factor and a threshold (TH) increases. The absolute difference is labeled Diff and represents the distance from the scale to the threshold. In some example embodiments, TH may be set or preconfigured to 1.
[0193] An example is shown below in Table 9. The first column of the table lists the range of the Diff for each group, while the second column lists the precision of the signaled scaling factor values within each group.
[0194] Table 9: Diff range and corresponding step size
[0195]
[0196] For example, when TH is set to 1, if the scaling factor calculated by the encoder is 1.2, Diff is 0.2, and the signaled scaling factor will be assigned a step size of 1 / 8; if the scaling factor calculated by the encoder is 5.3, Diff is 4.3, and the signaled scaling factor will be assigned a step size of 2.
[0197] Alternatively, in one embodiment, to reduce encoder / decoder complexity, a uniform scaling factor precision may be used. That is, a fixed precision may be used for all supported values of the scaling factor.
[0198] In one embodiment, all supported values of the scaling factor are reordered based on the absolute difference (or distance) between the magnitude of the scaling factor and a threshold value TH. The encoder and / or decoder may support multiple thresholds and may dynamically update the TH for classifying the scale value, for example, via signaling or syntax elements. Selecting and dynamically updating TH may help improve the efficiency of entropy coding. With each TH value update, the decoder may reclassify (reorder) the supported scale values based on the updated TH. Therefore, the decoder maintains an ordered data structure (e.g., an ordered list, an ordered lookup table) for storing scaling factors. If multiple lookup tables are used, the scaling factors may be shuffled into different lookup tables (e.g., with different table indexes) during the reclassification process.
[0199] In one embodiment, the index of the selected scaling factor for the current block in the reordered scaling factor list (eg, lookup table) is directly signaled into the codestream and parsed at the decoder side.
[0200] In one embodiment, the reordered scale list may be divided into multiple groups (e.g., multiple lookup tables). A group index of a target group including the selected scaling factor for the current block is signaled into the bitstream together with an index identifying the selected scaling factor in the target group and parsed at the decoder side. For example, the reordered scale factor list contains 16 scaling factors, which may be divided into 4 groups (sublists), each of which may contain 4 scaling factors and may be assigned a group index. The use of the reordered scale list is only for example purposes of example embodiments. In some other embodiments, the decoder may not need to use the reordered scale factor list and may directly maintain multiple groups.
[0201] Note that in the present application, unless otherwise specified, signaling may include at least one sub-signaling. The at least one sub-signaling may be sent together or separately. In the above example, the group index identifying the target group and the index identifying the selected scaling factor in the target group may be signaled together in one signaling, or they may be signaled via two sub-signals, which may be signaled separately. Signaling in the present application may be carried via, for example, syntax elements.
[0202] In one embodiment, the value of TH is signaled in a high-level syntax (or syntax element), which includes at least one of: a sequence level syntax; a frame level syntax; or a slice level syntax.
[0203] In one embodiment, instead of signaling the scale factor value, the scale factor difference (delta scale factor), which is the difference between the scale factor predictor and the scale factor, can be signaled into the bitstream and parsed at the decoder side. The decoder can first derive or predict the predicted scale factor to obtain the scale factor predictor, and then apply the delta scale factor to the scale factor predictor to derive the final scale factor.
[0204] In some example embodiments, the decoder may derive a scale factor predictor based on the local illumination variation between the current block template 1210 (or causal samples of the current block) and the reference block template 1220, and signal the delta scale factor into the bitstream and parse it at the decoder side.
[0205] In one embodiment, the decoder may maintain an ordered list for all supported scale values.As described above, the sorting or reordering may be based on the magnitude of the scale factor and the absolute difference between the scale factor predictor.
[0206] In one embodiment, the index of the selected scaling factor for the current block in the re-ordered scale list is directly signaled into the codestream and parsed at the decoder side.
[0207] In one embodiment, the reordered scale list may be divided into multiple groups, and the group index of the selected scaling factor for the current block together with the index within each group may be signaled into the codestream and parsed at the decoder side.
[0208] In one embodiment, the prediction scaling factor may be derived using left causal samples or above (top) causal samples of the current block and / or reference block.
[0209] In some example embodiments, if the width of the current block is greater than the height, only the Fig.12 The prediction scaling factor is derived from the upper causal samples (for the current block and / or the reference block) in 1214.
[0210] In some example embodiments, if the height of the current block is greater than the width, only left causal samples (such as Fig.12 1216) to derive the prediction scaling factor.
[0211] In some example embodiments, the bottom left sample and / or the top right sample (of the current block and / or the reference block) may be used to derive the prediction scaling factor.
[0212] In one embodiment, the minimum supported value of the scaling factor α is greater than zero.
[0213] In one embodiment, the offset value β may be derived as an average value of the template of the current block.
[0214] In one example, if the width of the current block is greater than the height, only the upper causal samples (of the current block and / or the reference block) (such as Fig.12 1214) in to derive the offset value β.
[0215] In one example, if the height of the current block is greater than the width, only left causal samples (such as Fig.12 1216) in to derive the offset value β.
[0216] In one embodiment, the offset value β may be derived as an average value of the reference block (or a template of the reference block).
[0217] In one embodiment, the offset value β may be derived as a difference between the template of the current block and the template of the reference block. Exemplarily, when calculating the difference, an average value of each template may be used.
[0218] In one embodiment, a flag is signaled in the codestream and parsed from the codestream to indicate whether the scaling factor and / or offset β is selected for the current block. In some example embodiments, this flag is a signal for BAWP / LIC / CWP mode. In some example embodiments, this flag is signaled only in BAWP mode; or, this flag is signaled only in LIC mode, or this flag is signaled only in CWP mode. Note that the explicit signal may include a real value, or an index for looking up a real value from a lookup table.
[0219] In one embodiment, when the flag indicates that explicit signaling applies, the scaling factor is explicitly signaled and the offset β is set to 0 (thus not requiring access to neighboring samples) or the average value of the template (which requires access to neighboring samples).
[0220] In one embodiment, a high-level syntax is signaled to indicate whether explicit signaling of scaling factor and / or offset β is supported. The syntax may be signaled via at least one of the following levels: sequence level; frame level; slice level; or super-block level.
[0221] In one embodiment, the scaling factor and the offset value β may be signaled jointly.
[0222] In one embodiment, a set of combinations of α and β may be predefined or implicitly derived for each block, and an index indicating the selected combination of (α and β) may be signaled. For example, the set may be "{(1.1, 0.2), (1.6, 0.1), (2.3, 0.3)}", with each pair in brackets forming a combination of α and β.
[0223] In one embodiment, a set of predicted combinations of α and β are predefined or implicitly derived for each block, and the difference between the selected combination of α and β and the predicted combination of α and β is signaled.
[0224] In the present application, 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 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.
[0225] The various embodiments and / or implementations described in this application may be performed individually or in any order. In addition, each of the method (or embodiment), encoder, and decoder may be implemented by a processing circuit (e.g., at least one processor or at least one integrated circuit). At least one processor executes a program stored in a non-volatile computer-readable medium. In this application, the term block may be understood as a prediction block, a coding block, or a coding unit (CU).
[0226] Fig.13 A flowchart 1300 of an exemplary method for indicating a scaling factor and / or offset value following the basic principles of the above embodiments is shown. The exemplary decoding method flow may include part or all of the following steps: S1310, receiving a video code stream including a current block and a reference block, the reference block being used to predict the current block and being identified by a motion vector associated with the current block; S1320, receiving a syntax element indicating a scaling factor (α) from the video code stream; S1330, determining the scaling factor (α) based on the value of the syntax element; S1340, predicting the current block using the following equation: p′(x′)=α*p(x)+β, where: p′(x′) is a predicted sample in the current block, p(x) is a co-located reference sample corresponding to p′(x′) in the reference block, α is a scaling factor determined based on the value of the syntax element, and β is an offset; and S1350, reconstructing the current block based on the predicted current block.
[0227] In some example embodiments, the current block may be in a current frame, and the reference block may be in a reference frame.
[0228] In some example embodiments, S1320 may alternatively include: receiving from the video code stream an indication of a scaling factor (α) used as a slope of a linear equation (eg, p′(x′)=α*p(x)+β)) or a syntax element associated therewith.
[0229] In the present application, the direction of the reference frame may be determined by whether the reference frame is before the current frame in the display order or after the current frame in the display order.
[0230] The above operations can be combined or arranged in any amount or order as needed. Two or more steps and / or operations can be performed in parallel. The embodiments and implementation methods in this application can be used alone or in combination in any order. The steps in an embodiment / method can be divided to form multiple sub-methods, each of which can be independent of other steps in the embodiment and can form an independent solution. In addition, each of the method (or embodiment), encoder and decoder can be implemented by a processing circuit (e.g., at least one processor or at least one integrated circuit). In one example, at least one processor executes a program stored in a non-volatile computer-readable medium. The embodiments in this application can be applied to luminance blocks or chrominance blocks. The term block can be interpreted as a prediction block, a coding block or a coding unit, i.e., a CU. The term block can also be used here to refer to a transform block. In the following items, when the block size is said, it can refer to the block width or height, or the maximum value of the width and height, or the minimum value of the width and height, or the area size (width*height), or the aspect ratio of the block (width:height, or height:width).
[0231] The above techniques may be implemented as computer software via computer-readable instructions and physically stored in at least one computer-readable storage medium. Fig.14 A computer system (1800) is shown that is suitable for implementing certain embodiments of the disclosed subject matter.
[0232] The computer software may be encoded in any suitable machine code or computer language, and may be assembled, compiled, linked, or the like to create a code comprising instructions, which may be directly executed by at least one computer central processing unit (CPU), graphics processing unit (GPU), or the like, or executed by decoding, microcode, or the like.
[0233] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smartphones, gaming devices, IoT devices, etc.
[0234] Fig.14The components shown for the computer system (1800) are exemplary in nature and are not intended to limit the scope of use or functionality of computer software implementing the embodiments of the present application. The configuration of the components should not be interpreted as having any dependency or requirement on any component or combination of components shown in the exemplary embodiment of the computer system (1800).
[0235] The computer system (1800) may include certain human-computer interface input devices. The human-computer interface input devices may include at least one of the following (only one of which is depicted): a keyboard (1801), a mouse (1802), a touch pad (1803), a touch screen (1810), a data glove (not shown), a joystick (1805), a microphone (1806), a scanner (1807), and a camera (1808).
[0236] The computer system (1800) may also include certain human-computer interface output devices. Such human-computer interface output devices may stimulate at least one sense 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 (e.g., speakers (1809), headphones (not shown)), visual output devices (e.g., screens (1810) including cathode ray tube screens, liquid crystal screens, plasma screens, organic light emitting diode screens, each of which has or does not have a touch screen input function, each of which has or does not have a tactile feedback function - some of which may output two-dimensional visual output or output of more than three dimensions by means such as stereoscopic picture output; virtual reality glasses (not shown), holographic displays, and smoke boxes (not shown)) and printers (not shown).
[0237] The computer system (1800) may also include human-accessible storage devices and their associated media, such as optical media including high-density read-only / rewritable compact disks (CD / DVD ROM / RW) (1820) with CD / DVD or similar media (1821), thumb drives (1822), removable hard disk drives or solid state drives (1823), traditional magnetic media such as tapes and floppy disks (not shown), special-purpose ROM / ASIC / PLD-based devices such as security software protectors (not shown), and the like.
[0238] Those skilled in the art should also understand that the term "computer-readable storage media" used in connection with the disclosed subject matter does not include transmission media, carrier waves, or other transient signals.
[0239] The computer system (1800) may also include an interface (1854) to at least one communication network (1855). For example, the network may be wireless, wired, or optical. The network may also be a local area network, a wide area network, a metropolitan area network, an in-vehicle network, an industrial network, a real-time network, a delay-tolerant network, and the like. The network also includes local area networks such as Ethernet, wireless local area networks, cellular networks (GSM, 3G, 4G, 5G, LTE, etc.), television wired or wireless wide area digital networks (including cable television, satellite television, and terrestrial broadcast television), in-vehicle and industrial networks (including CANBus), and the like. Some networks typically require an external network interface adapter for connecting to some universal data port or peripheral bus (1849) (e.g., a USB port of the computer system (1800)); other systems are typically integrated into the core of the computer system (1800) by connecting to a system bus as described below (e.g., an Ethernet interface integrated into a PC computer system or a cellular network interface integrated into a smart phone computer system). By using any of these networks, the computer system (1800) can communicate with other entities. The communication can be one-way, for receiving only (e.g., wireless television), one-way for sending only (e.g., CAN bus to certain CAN bus devices), or two-way, such as to other computer systems via a local or wide area digital network. Each of the above networks and network interfaces can use certain protocols and protocol stacks.
[0240] The above-mentioned human-machine interface devices, human-accessible storage devices, and network interfaces may be connected to the core (1820) of the computer system (1800).
[0241] The core (1820) may include at least one central processing unit (CPU) (1821), a graphics processing unit (GPU) (1842), a dedicated programmable processing unit in the form of a field programmable gate array (FPGA) (1843), a hardware accelerator for a specific task (1844), a graphics adapter (1830), etc. These devices, as well as a read-only memory (ROM) (1845), a random access memory (1846), an internal mass storage (e.g., an internal non-user accessible hard disk drive, a solid state drive, etc.) (1847), etc., may be connected via a system bus (1848). In some computer systems, the system bus (1848) may be accessed in the form of at least one physical plug so that it may be expanded by additional central processing units, graphics processing units, etc. Peripheral devices may be directly attached to the system bus (1848) of the core, or connected via a peripheral bus (1849). In one example, a screen (1810) may be connected to a graphics adapter (1830). The architecture of the peripheral bus includes a peripheral controller interface PCI, a universal serial bus USB, etc.
[0242] The computer readable storage medium may have computer code thereon for performing various computer-implemented operations. The medium and computer code may be specially designed and constructed for the purpose of this application, or may be medium and code well known and available to those skilled in the art of computer software.
[0243] Although the present application has described a number of exemplary embodiments, various changes, arrangements and various equivalent substitutions of the embodiments are within the scope of the present application. Therefore, it should be understood that those skilled in the art can design a variety of systems and methods, which, although not explicitly shown or described herein, embody the principles of the present application and are therefore within the spirit and scope of the present application.
Claims
1. A method for processing video data in a decoder, characterized in that: The method comprises: Receiving a video bitstream, the video bitstream comprising a current block in a current frame and a reference block in a reference frame, the reference block being used to predict the current block and being identified by a motion vector associated with the current block; Receiving a syntax element indicating a scaling factor α from the video bitstream; Determining the scaling factor α based on the value of the syntax element; The current block is predicted using the following equation: p'(x')=α*p(x)+β Wherein, p'(x') is a predicted sample in the current block, p(x) is a co-located reference sample in the reference block corresponding to p'(x'), α is a scaling factor determined based on the value of the syntax element, and β is an offset; Based on the predicted current block, the current block is reconstructed.
2. The method according to claim 1, characterized in that: The decoder maintains a lookup table for storing a plurality of candidate scaling factors and carries an index in signaling to identify the scaling factor α.
3. The method according to claim 2, characterized in that The plurality of candidate scaling factors are sorted in the lookup table based on a difference between each candidate scaling factor and a threshold value.
4. The method according to claim 1, characterized in that: The decoder maintains at least two lookup tables, which are used to store multiple candidate scaling factors, wherein each of the at least two lookup tables supports a different scaling factor range and carries a first index and a second index in signaling, wherein the first index is used to identify a target lookup table among the at least two lookup tables, and the second index is used to identify the scaling factor α in the target lookup table.
5. The method according to claim 4, characterized in that The plurality of candidate scaling factors are sorted in each of the at least two lookup tables based on a difference between each candidate scaling factor and a threshold value.
6. The method according to claim 5, characterized in that The threshold value is equal to 1.
7. The method according to claim 5, further comprising: Receiving a high-level syntax element indicating the threshold value from the video bitstream, wherein the high-level syntax element is signaled at at least one of the following levels: Sequence level; Frame level; or Stripe level.
8. The method according to claim 5, further comprising: In response to the threshold value being updated, each of the at least two lookup tables is updated and reordered.
9. The method according to claim 4, characterized in that For any pair of a first lookup table and a second lookup table among the at least two lookup tables, the first precision of the first lookup table is less than the second precision of the second lookup table, wherein the amplitude of the candidate scaling factors stored in the first lookup table is higher than the amplitude of the candidate scaling factors stored in the second lookup table, and the first precision and the second precision are measured respectively using the step size between two adjacent scaling factors in the corresponding lookup table.
10. The method according to claim 4, characterized in that For any pair of a first lookup table and a second lookup table in the at least two lookup tables, a first precision of the first lookup table is less than a second precision of the second lookup table, wherein a distance between a candidate scaling factor stored in the first lookup table and a preset threshold is greater than a distance between a candidate scaling factor stored in the second lookup table and the preset threshold; The distance between the candidate scaling factor and the preset threshold is determined by the absolute value of the difference between the candidate scaling factor and the preset threshold; The first precision and the second precision are measured respectively using a step size between two adjacent scaling factors in a corresponding lookup table.
11. The method according to claim 1, characterized in that: The current block is encoded using one of the following modes: a block adaptive weighted prediction (BAWP) mode; or a local illumination compensation (LIC) mode.
12. The method according to claim 1, further comprising: An average value of the template of the current block is determined as the offset.
13. The method according to claim 1, further comprising: In response to a width of the current block being greater than a height of the current block, determining the offset based on an upper sample of a template of the current block; In response to a height of the current block being greater than a width of the current block, the offset is determined based on a left sample of a template of the current block.
14. The method according to claim 1, further comprising: The offset is determined to be one of the following: an average value of the reference block; or, The average value of the template of the reference block.
15. The method according to claim 1, further comprising: Receiving a high-level syntax element, the high-level syntax element indicating whether signaling indicating the scaling factor α or signaling associated with the scaling factor α is used in the video bitstream, wherein the high-level syntax element is sent at at least one of the following levels: Sequence level; Frame level; Stripe level; or Super block level.
16. The method according to claim 15, further comprising: In response to the high-level syntax element indicating that the signaling is used in the video bitstream: Determining to explicitly indicate the scaling factor through the signaling; The offset is set to 0 or the average value of the template of the current block.
17. The method according to claim 1, characterized in that The decoder maintains a lookup table for storing a plurality of candidate value pairs including a scaling factor and an offset, and carries an index in signaling to identify a target value pair in the lookup table including the scaling factor α and the offset β used in the equation.
18. The method according to claim 1, characterized in that The syntax element explicitly or implicitly indicates the scaling factor α; Based on the motion vector, p(x) is derived from p'(x').
19. A device for processing video data, characterized in that: The device comprises a memory for storing computer instructions, and a processor in communication with the memory, wherein when the processor executes the computer instructions, the processor is configured to cause the device to: Receiving a video bitstream, the video bitstream comprising a current block in a current frame and a reference block in a reference frame, the reference block being used to predict the current block and being identified by a motion vector associated with the current block; Receiving a syntax element indicating a scaling factor α from the video bitstream; Determining the scaling factor α based on the value of the syntax element; The current block is predicted using the following equation: p'(x')=α*p(x)+β Wherein, p'(x') is a predicted sample in the current block, p(x) is a co-located reference sample in the reference block corresponding to p'(x'), α is a scaling factor determined based on the value of the syntax element, and β is an offset; Based on the predicted current block, the current block is reconstructed.
20. A non-volatile storage medium, characterized in that: For storing computer readable instructions which, when executed by a processor, cause the processor to: Receiving a video bitstream, the video bitstream comprising a current block in a current frame and a reference block in a reference frame, the reference block being used to predict the current block and being identified by a motion vector associated with the current block; Receiving a syntax element indicating a scaling factor α from the video bitstream; Determining the scaling factor α based on the value of the syntax element; The current block is predicted using the following equation: p'(x')=α*p(x)+β Wherein, p'(x') is a predicted sample in the current block, p(x) is a co-located reference sample in the reference block corresponding to p'(x'), α is a scaling factor determined based on the value of the syntax element, and β is an offset; Based on the predicted current block, the current block is reconstructed.