Method and apparatus for adaptive motion compensation filtering

By adopting adaptive motion compensation filtering technology in video encoding and decoding technology, and using template prediction and filter adjustment, the problem of insufficient coding/decoding efficiency in the existing technology is solved, and higher encoding efficiency and video quality are achieved.

CN119744533APending Publication Date: 2025-04-01BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380060727.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-19
Filing Date
2023-08-21
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing video encoding and decoding technology has shortcomings in improving the encoding/decoding efficiency of inter-frame encoding blocks, especially when processing complex video data, there is still room for improvement in encoding efficiency and video quality.

Method used

By adopting adaptive motion compensation filtering technology in video decoder and encoder, the filter is dynamically adjusted to minimize the difference between the template prediction and the current template, thereby improving the encoding/decoding efficiency of the inter-coded block.

Benefits of technology

This technology significantly improves the encoding/decoding efficiency of inter-frame encoding blocks, reduces the encoded bit rate, and improves the decoding quality of videos, which is suitable for the optimization of future video encoding and decoding standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119744533A_ABST
    Figure CN119744533A_ABST
Patent Text Reader

Abstract

Methods, apparatus, and non-transitory computer-readable storage media for video decoding and encoding are provided. In a video decoding method, a decoder may obtain a plurality of prediction blocks based on a current inter coding block; obtaining a current template of the current inter-frame coding block, the current template comprising a plurality of reconstruction sample points adjacent to the current inter-frame coding block; obtaining a plurality of template predictions of the current template corresponding to the plurality of prediction blocks of the current inter-frame coding block, respectively; obtaining at least one filter based on the plurality of template predictions and the current template; and obtaining a filtered block based on the at least one filter and the plurality of prediction blocks.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is filed based on and claims priority to U.S. Provisional Application No. 63 / 399,641, filed on August 19, 2022, entitled “Adaptive Motion Compensated Filtering for Bi-Prediction,” the entire text of which is incorporated by reference for all purposes. Technical Field

[0003] The present disclosure relates to video coding and compression, and in particular, but not limited to, methods and apparatus for improving encoding / decoding efficiency of inter-coded blocks. Background Art

[0004] Various video codec techniques can be used to compress video data. Video coding is performed according to one or more video codec standards. For example, video codec standards include versatile video coding (VVC), high-efficiency video coding (H.265 / HEVC), advanced video coding (H.264 / AVC), moving picture expert group (MPEG) coding, etc. Video coding typically uses prediction methods (e.g., inter-frame prediction, intra-frame prediction, etc.) that utilize redundancy present in video images or sequences. An important goal of video coding technology is to compress video data into a form that uses a lower bit rate while avoiding or minimizing video quality degradation.

[0005] The first version of the VVC standard was completed in July 2020, providing approximately 50% bitrate savings or equivalent perceptual quality compared to the previous generation video codec standard HEVC. Although the VVC standard provides significant codec improvements over its predecessor, there is evidence that superior codec efficiency can be achieved using additional codec tools. Recently, the Joint Video Exploration Team (JVET), in collaboration with ITU-T VECG and ISO / IEC MPEG, began exploring advanced technologies that can significantly improve codec efficiency compared to VVC. In April 2021, a software code base called Enhanced Compression Model (ECM) was established for future video codec exploration work. The ECM reference software is based on the VVC Test Model (VTM) developed by JVET for VVC, and further extends and / or improves several existing modules (e.g., intra / inter prediction, transform, in-loop filter, etc.). In the future, any new codecs beyond the VVC standard will need to be integrated into the ECM platform and tested using the JVET common test conditions (CTC). Summary of the invention

[0006] This disclosure provides examples of techniques related to improving encoding / decoding efficiency of inter-coded blocks.

[0007] According to the first aspect of the present disclosure, a video decoding method for an inter-frame coding block is provided. In the method, a decoder may obtain multiple prediction blocks based on a current inter-frame coding block; obtain a current template of the current inter-frame coding block, wherein the current template includes multiple reconstructed samples adjacent to the current inter-frame coding block; obtain multiple template predictions of the current template corresponding to the multiple prediction blocks of the current inter-frame coding block respectively; obtain at least one filter based on the multiple template predictions and the current template; and obtain a filtered block based on the at least one filter and the multiple prediction blocks.

[0008] According to the second aspect of the present disclosure, a video decoding method for an inter-frame coding block is provided. In the method, the decoder can obtain multiple prediction blocks based on the current inter-frame coding block; obtain a current template of the current inter-frame coding block; wherein the current template includes multiple reconstructed samples adjacent to the current inter-frame coding block; obtain multiple template predictions of the current template corresponding to the multiple prediction blocks respectively; obtain a filter based on the multiple template predictions and the current template; and obtain a filtered block based on the one filter and a prediction block in the multiple prediction blocks, wherein the decoder can calculate a target template based on the current template and a previously filtered template prediction; obtain the coefficients of the current filter by minimizing the difference between the current template prediction and the target template; and calculate the current filtered template prediction by applying the current filter to the current template prediction.

[0009] According to a third aspect of the present disclosure, a video encoding method for an inter-frame coding block is provided. In the method, the encoder can obtain multiple prediction blocks based on the current inter-frame coding block; obtain a current template of the current inter-frame coding block, wherein the current template includes multiple reconstructed samples adjacent to the current inter-frame coding block; obtain multiple template predictions of the current template corresponding to the multiple prediction blocks of the current inter-frame coding block respectively; obtain at least one filter based on the multiple template predictions and the current template; and obtain a filtered block based on the at least one filter and the multiple prediction blocks.

[0010] According to the fourth aspect of the present disclosure, a video encoding method for an inter-frame coding block is provided. In the method, the encoder can obtain multiple prediction blocks based on the current inter-frame coding block; obtain a current template of the current inter-frame coding block; wherein the current template includes multiple reconstructed samples adjacent to the current inter-frame coding block; obtain multiple template predictions of the current template corresponding to the multiple prediction blocks respectively; obtain a filter based on the multiple template predictions and the current template; and obtain a filtered block based on the one filter and a prediction block in the multiple prediction blocks, wherein the decoder can calculate a target template based on the current template and a previously filtered template prediction; obtain the coefficients of the current filter by minimizing the difference between the current template prediction and the target template; and calculate the current filtered template prediction by applying the current filter to the current template prediction.

[0011] According to a fifth aspect of the present disclosure, a device for video decoding is provided. The device may include one or more processors and a memory, the memory being coupled to the one or more processors and configured to store instructions executable by the one or more processors. In addition, the one or more processors are configured to perform the method according to the first aspect or the second aspect when executing the instructions.

[0012] According to a sixth aspect of the present disclosure, a device for video encoding is provided. The device may include one or more processors and a memory, the memory being coupled to the one or more processors and configured to store instructions executable by the one or more processors. In addition, the one or more processors are configured to execute the method according to the third aspect or the fourth aspect when executing the instructions.

[0013] According to the seventh aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which is used to store computer-executable instructions, and when the computer-executable instructions are executed by one or more computer processors, the one or more computer processors execute the method according to the first aspect or the second aspect based on a bit stream.

[0014] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing a bit stream to be decoded by the method according to the third aspect or the fourth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] A more specific description of examples of the present disclosure will be presented by reference to specific examples illustrated in the accompanying drawings. Given that these drawings depict only some examples and are therefore not to be considered limiting of scope, these examples will be described and explained in more detail and detail through the use of the accompanying drawings.

[0016] Figure 1A is a block diagram illustrating a system for encoding and decoding video blocks according to some examples of the present disclosure.

[0017] Figure 1B is a block diagram of an encoder according to some examples of the present disclosure.

[0018] Figure 1C to Figure 1F is a block diagram illustrating how a frame may be recursively partitioned into multiple video blocks of different sizes and shapes according to some examples of the present disclosure.

[0019] Figure 1G is a block diagram illustrating an exemplary video encoder according to some examples of the present disclosure.

[0020] Figure 2A is a block diagram of a decoder according to some examples of the present disclosure.

[0021] Figure 2B is a block diagram illustrating an exemplary video decoder according to some examples of the present disclosure.

[0022] Figure 3A is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0023] Figure 3B is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0024] Figure 3C is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0025] Figure 3D is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0026] Figure 3E is a diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0027] Figure 4 Some examples according to the present disclosure are shown. x and d y is an example of the horizontal and vertical values ​​of MV.

[0028] Figure 5 An example is shown in which one MV has a fractional value and an interpolation filter is applied to generate corresponding prediction samples at fractional sample positions according to some examples of the present disclosure.

[0029] FIG. 6 illustrates an example of two diamond filter shapes according to some examples of the present disclosure.

[0030] Figure 7 A sub-sampled 1-D Laplacian computation applied to gradient computation in all directions according to some examples of the present disclosure is shown.

[0031] Figure 8 is a simplified diagram illustrating local illumination compensation (LIC) for unidirectional prediction according to some examples of the present disclosure.

[0032] Fig.9A and Fig. 9B is a simplified diagram showing the generation of LIC template prediction samples for an affine mode according to some examples of the present disclosure.

[0033] Fig.10is a block diagram of video encoding with adaptive filtering for bidirectional prediction according to some examples of the present disclosure.

[0034] Fig.11 is a block diagram of video decoding with adaptive filtering for bidirectional prediction according to some examples of the present disclosure.

[0035] Fig.12 is a simplified diagram illustrating template-based adaptive motion compensation filtering of bi-directional prediction samples according to some examples of the present disclosure.

[0036] Fig.13 is a simplified diagram illustrating adaptive motion compensation filtering of template-based unidirectional prediction samples according to some examples of the present disclosure.

[0037] Fig.14 is a diagram illustrating a computing environment coupled with a user interface according to some examples of the present disclosure.

[0038] Fig.15 is a flowchart illustrating a video decoding method according to an example of the present disclosure.

[0039] Fig.16 is a flowchart illustrating a video decoding method according to an example of the present disclosure.

[0040] Fig.17 is a flowchart illustrating a video encoding method according to an example of the present disclosure.

[0041] Fig.18 is a flowchart illustrating a video encoding method according to an example of the present disclosure. DETAILED DESCRIPTION

[0042] Reference will now be made in detail to specific embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, a number of non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0043] The terms used in this disclosure are only used for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms "a / an", "said" and "the" in this disclosure and the appended claims are also intended to include plural forms, unless otherwise clearly indicated throughout the disclosure. It should also be understood that the term "and / or" used in this disclosure refers to and includes one or any one or all possible combinations of the listed multiple related items.

[0044] References throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some examples," or similar language mean that the particular feature, structure, or characteristic being described is included in at least one embodiment or example. Unless explicitly stated otherwise, features, structures, elements, or characteristics described in conjunction with one or some embodiments are also applicable to other embodiments.

[0045] Throughout this disclosure, the terms "first", "second", "third", etc. are used as nomenclatures and are only used to refer to related elements, such as devices, parts, components, steps, etc., and do not imply any spatial or temporal order unless otherwise explicitly stated. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components or working states of the same device, and may be named arbitrarily.

[0046] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include a memory (shared, dedicated, or group) that stores code or instructions that can be executed by one or more processors. A module may include one or more circuits with or without stored code or instructions. A module or circuit may include one or more components that are directly or indirectly connected. These components may or may not be physically attached to or adjacent to each other.

[0047] As used herein, the terms "if" or "when..." may be understood to mean "at" or "in response to" depending on the context. These terms, if they appear in a claim, may not indicate that the associated limitation or feature is conditional or optional. For example, a method may include the following steps: i) when or if condition X exists, perform function or action X', and ii) when or if condition Y exists, perform function or action Y'. The method may have the ability to perform function or action X' and the ability to perform function or action Y' at the same time. Therefore, functions X' and Y' may be performed at different times in multiple executions of the method.

[0048] The unit or module may be implemented by pure software, pure hardware, or a combination of hardware and software. For example, in a pure software implementation, the unit or module may include functionally related code blocks or software components that are linked together directly or indirectly to perform a specific function.

[0049] Figure 1A is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1AAs shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a destination device 14. Source device 12 and destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.

[0050] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to send the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (e.g., a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the Internet). The communication medium may include a router, a switch, a base station, or any other device that may be beneficial to facilitate communication from the source device 12 to the target device 14.

[0051] In some other embodiments, the encoded video data may be sent from the output interface 22 to a storage device 32. The encoded video data in the storage device 32 may then be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that may hold the encoded video data generated by the source device 12. The target device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a network server (e.g., for a website), a File Transfer Protocol (FTP) server, a Network Attached Storage (NAS) device, or a local disk drive. The target device 14 can access the encoded video data through any standard data connection suitable for accessing the encoded video data stored on the file server, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both wireless channels and wired connections. The transmission of the encoded video data from the storage device 32 can be a streaming transmission, a download transmission, or a combination of both streaming transmission and download transmission.

[0052] like Figure 1A As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application may be generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.

[0053] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device 32 for later access by the target device 14 or other devices for decoding and / or playback. The output interface 22 may further include a modem and / or a transmitter.

[0054] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.

[0055] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device and an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user, and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0056] The video encoder 20 and the video decoder 30 can operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, Part 10 of MPEG-4, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 can be configured to encode the video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 can be configured to decode the video data according to any of these current standards or future standards.

[0057] The video encoder 20 and the video decoder 30 can be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), discrete logic devices, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device can store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 can be included in one or more encoders or decoders, and either of the encoders or decoders can be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.

[0058] Similar to HEVC, VVC is built on a block-based hybrid video codec framework. Figure 1B 1 is a block diagram illustrating a block-based video encoder according to some embodiments of the present disclosure. In the encoder 100, the input video signal is processed block by block (a block is referred to as a coding unit (CU)). The encoder 100 may be as follows: Figure 1A Video encoder 20 shown. In VTM-1.0, a CU can be up to 128×128 pixels. However, unlike HEVC, which partitions blocks based solely on a quadtree, in VVC, a coding tree unit (CTU) is split into multiple CUs to accommodate different local characteristics based on quad / bin / ternary trees. In addition, the concept of multiple partition unit types in HEVC has been removed, that is, there is no longer a division of CU, prediction unit (PU), and transform unit (TU) in VVC; instead, each CU is always used as a basic unit for both prediction and transformation without further partitioning. In a multi-type tree structure, a CTU is first partitioned according to a quadtree structure. Then, each quadtree leaf node can be further partitioned according to a binary tree structure and a ternary tree structure.

[0059] FIG. 3A to FIG. 3E is a schematic diagram showing a multi-type tree partitioning mode according to some embodiments of the present disclosure. FIG. 3A to FIG. 3E Five partition types are shown, including quad partition ( Figure 3A ), vertical binary partition ( Figure 3B ), horizontal binary partitioning ( Figure 3C ), vertical trident partition ( Figure 3D ) and horizontal three-pronged partitioning ( Figure 3E ).

[0060] For each given video block, spatial prediction and / or temporal prediction can be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples (called reference samples) of already coded neighboring blocks in the same video picture / strip to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in the video signal. Temporal prediction (also known as "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from already coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in the video signal. The temporal prediction signal for a given CU is typically represented by one or more motion vectors (MVs), which indicate the amount and direction of motion between the current CU and its temporal reference. Similarly, if multiple reference pictures are supported, a reference picture index is additionally sent, which is used to identify which reference picture in the reference picture storage the temporal prediction signal comes from.

[0061] After spatial prediction and / or temporal prediction, the intra / inter mode decision circuit 121 in the encoder 100 selects the best prediction mode, for example, based on a rate-distortion optimization method. Then, the block prediction value 120 is subtracted from the current video block; and the generated prediction residual is decorrelated using the transform circuit 102 and the quantization circuit 104. The generated quantized residual coefficients are dequantized by the dequantization circuit 116, and the quantized residual coefficients are inversely transformed by the inverse transform circuit 118 to form a reconstructed residual, which is then added back to the prediction block to form a reconstructed signal of the CU. Further, before the reconstructed CU is placed in the reference picture storage of the picture buffer 117 and used for encoding and decoding future video blocks, in-loop filtering 115, such as a deblocking filter, sample adaptive offset (SAO) and / or an adaptive in-loop filter (ALF), can be applied to the reconstructed CU. To form the output video bitstream 114, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are sent to the entropy coding unit 106 for further compression and packing to form a bitstream.

[0062] For example, a deblocking filter is available in the current version of VVC as well as AVC and HEVC. In HEVC, an additional in-loop filter called SAO is defined to further improve the coding efficiency. In the current version of the VVC standard, another in-loop filter called ALF is being actively studied and is likely to be included in the final standard.

[0063] These in-loop filter operations are optional. Performing these operations helps improve coding efficiency and visual quality. Encoder 100 can also decide to turn off these operations to save computational complexity.

[0064] It should be noted that if these filter options are turned on by the encoder 100, intra prediction is typically based on unfiltered reconstructed pixels, while inter prediction is based on filtered reconstructed pixels.

[0065] Figure 2A is a block diagram showing a block-based video decoder 200 that can be used in conjunction with many video codec standards. The decoder 200 is located at Figure 1B The block-based video decoder 200 may be similar to the reconstruction-related part of the encoder 100. Figure 1A The video decoder 30 shown. In the decoder 200, the incoming video bitstream 201 is first decoded by entropy decoding 202 to obtain quantization coefficient levels and prediction related information. Then, the quantization coefficient levels are processed by inverse quantization 204 and inverse transform 206 to obtain reconstructed prediction residuals. The block prediction value mechanism implemented in the intra / inter mode selector 212 is configured to perform intra prediction 208 or motion compensation 210 based on the decoded prediction information. A set of unfiltered reconstructed pixels is obtained by summing the reconstructed prediction residual from the inverse transform 206 with the prediction output generated by the block prediction value mechanism using an adder 214.

[0066] The reconstructed block may further pass through the in-loop filter 209 and then be stored in a picture buffer 213 used as a reference picture storage. The reconstructed video in the picture buffer 213 may be sent to drive a display device and used to predict future video blocks. When the in-loop filter 209 is turned on, a filtering operation is performed on these reconstructed pixels to obtain a final reconstructed video output 222.

[0067] Figure 1Gis a block diagram illustrating another exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 can perform intra-frame prediction coding and inter-frame prediction coding on video blocks within a video frame. Intra-frame prediction coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that in the field of video coding and decoding, the term "frame" can be used as a synonym for the term "image" or "picture".

[0068] like Figure 1G As shown in , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (Decoded Picture Buffer, DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54 and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a segmentation unit 45, an intra-frame prediction processing unit 46 and an intra-frame block copy (Block Copy, BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60 and an adder 62 for video block reconstruction. A loop filter 63 such as a deblocking filter can be located between the adder 62 and the DPB 64 to filter the block boundary to remove the block effect from the reconstructed video. In addition to the deblocking filter, another loop filter (e.g., a sample adaptive offset (Sample Adaptive Offset, SAO) filter and / or an adaptive loop filter (Adaptive in-Loop Filter, ALF)) can also be used to filter the output of the adder 62. In some examples, the loop filter may be omitted, and the decoded video blocks may be provided directly by adder 62 to DPB 64. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed among one or more of the illustrated fixed or programmable hardware units.

[0069] Video data memory 40 may store video data to be encoded by components of video encoder 20. Figure 1A The video source 18 shown obtains video data in the video data memory 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) for use by the video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding the video data. The video data memory 40 and the DPB 64 can be formed by any of a variety of memory devices. In various examples, the video data memory 40 can be on-chip with other components of the video encoder 20, or off-chip relative to those components.

[0070] like Figure 1G As shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (Coding Unit, CU) according to a predefined splitting structure associated with the video data (e.g., a quadtree (Quad-Tree, QT) structure). A video frame is or can be viewed as a two-dimensional sample array or matrix with sample values. The samples in the array may also be referred to as pixels or picture elements (pel). The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the video frame. For example, a video frame may be divided into multiple video blocks by using QT segmentation. A video block is again or can be viewed as a two-dimensional sample array or matrix with sample values, but its dimension is smaller than the dimension of the video frame. The number of samples in the horizontal and vertical directions (or axes) of a video block defines the size of the video block. The video block may be further partitioned into one or more block partitions or sub-blocks (which may again form blocks) by, for example, iteratively using QT partitioning, binary-tree (BT) partitioning or ternary-tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or may be or correspond to a corresponding block (e.g., a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB)) and / or a sub-block.

[0071] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., coding rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (e.g., motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.

[0072] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block in relation to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block in relation to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate coding mode for each block of video data.

[0073] In some embodiments, motion estimation unit 42 determines an inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion of a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame associated with a current block being encoded within the current frame. The predetermined pattern may designate a video frame in a sequence as a P frame or a B frame. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vector determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine a block vector.

[0074] In terms of pixel differences, the prediction block for the video block may be or may correspond to a block or reference block of a reference frame that is considered to closely match the video block to be encoded, and the pixel difference may be determined by the sum of absolute differences (SAD), the sum of square differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values ​​for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 may interpolate values ​​for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel accuracy.

[0075] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (list 0) or a second reference frame list (list 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0076] The motion compensation performed by the motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector for the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by the motion compensation unit 44 from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include luminance component differences or chrominance component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying a prediction block, any flag indicating a prediction mode, or any other syntax information described herein. It should be noted that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are described separately for conceptual purposes.

[0077] In some embodiments, the intra BC unit 48 may generate vectors and obtain prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values ​​for the various tested intra prediction modes using rate-distortion analysis, and select an intra prediction mode with the best rate-distortion characteristic among the tested modes as a suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to produce the coded block, as well as the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate ratios based on the distortion and rate for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0078] In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identifying the prediction block may include calculating values ​​for sub-integer pixel positions.

[0079] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include both luma component differences and chroma component differences.

[0080] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 can perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 can determine the intra-frame prediction mode for encoding the current block. To this end, the intra-frame prediction processing unit 46 can use various intra-frame prediction modes to encode the current block, for example, during separate encoding passes, and the intra-frame prediction processing unit 46 (or in some examples, the mode selection unit) can select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 can provide information indicating the intra-frame prediction mode selected for the block to the entropy coding unit 56. The entropy coding unit 56 can encode the information indicating the selected intra-frame prediction mode into the bitstream.

[0081] After the prediction processing unit 41 determines the prediction block for the current video block via inter-frame prediction or intra-frame prediction, the adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to the transform processing unit 52. The transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform (e.g., a discrete cosine transform (DCT) or a conceptually similar transform).

[0082] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.

[0083] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream can then be sent to a video bitstream such as Figure 1A The video decoder 30 shown, or archived as Figure 1A The video frame may be stored in storage device 32 as shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.

[0084] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0085] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0086] Figure 2B 1 is a block diagram showing another exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned operations in combination with the above-mentioned operations. Figure 1GThe encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0087] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (e.g., the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (e.g., the motion compensation unit 82).

[0088] The video data memory 79 can store video data, such as a coded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 can be obtained, for example, from a storage device 32, from a local video source (e.g., a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk). The video data memory 79 may include a coded picture buffer (CPB) storing coded video data from a coded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use by the video decoder 30 (e.g., in an intra-frame or inter-frame prediction coding mode) when decoding video data. The video data memory 79 and the DPB 92 can be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magneto-resistive RAM (MRAM), resistive RAM (RRAM) or other types of memory devices. For illustrative purposes, video data memory 79 and DPB 92 are shown in FIG. Figure 2B92 are depicted as two different components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 can be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 can be on-chip with other components of the video decoder 30, or off-chip relative to those components.

[0089] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators, and other syntax elements to the prediction processing unit 81.

[0090] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, the intra-prediction unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the intra-prediction mode transmitted by the signal and reference data from a previously decoded block of the current frame.

[0091] When the video frame is encoded as an inter-frame prediction coding (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists, i.e., List 0 and List 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0092] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.

[0093] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for a video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) for encoding a video block of a video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter prediction encoded video block of the frame, inter prediction states for each inter prediction encoded video block of the frame, and other information for decoding a video block in the current video frame.

[0094] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as flags, to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video block in the current video frame.

[0095] Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of the video blocks to calculate interpolated values ​​for sub-integer pixels of reference blocks. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 based on the received syntax elements and use these interpolation filters to produce the prediction blocks.

[0096] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0097] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (e.g., a deblocking filter, an SAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1A on a display device 34).

[0098] In the current VVC and AVS3 standards, the motion information of the current coding block is either copied from the spatial or temporal neighboring blocks specified by the merge candidate index, or obtained through an explicit signal of motion estimation. The focus of the present disclosure is to improve the accuracy of the motion vector of the affine merge mode by improving the derivation method of the affine merge candidate. For the convenience of describing the present disclosure, the existing affine merge mode design in the VVC standard is used as an example to illustrate the proposed ideas. Please note that although the existing affine mode design in the VVC standard is used as an example throughout the disclosure, for technicians in the field of modern video coding and decoding technology, the proposed technology can also be applied to different designs of affine motion prediction modes or other coding and decoding tools with the same or similar design spirit.

[0099] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other examples, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0100] like Figure 1CAs shown in , the video encoder 20 (or more specifically, a segmentation unit in a prediction processing unit of the video encoder 20) generates an encoded representation of a frame by first segmenting the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 1D As shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of the coding pixel blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding samples of the coding tree block. The coding tree block may be an N×N block of samples.

[0101] To achieve better performance, the video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof, on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 1E As depicted in , a 64×64 CTU 400 is first divided into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are respectively divided into four CUs with a block size of 16×16. Two 16×16 CUs 430 and CU 440 are further divided into four CUs with a block size of 8×8. Figure 1F Depicted is a diagram showing Figure 1E The quadtree data structure of the final result of the partitioning process of the CTU 400 depicted in FIG. 4 corresponds to a CU of a corresponding size ranging from 32×32 to 8×8. Figure 1D In the CTU depicted in FIG, each CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, and syntax elements for encoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding the samples of the coding block. It should be noted that Figure 1E to Figure 1FThe quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU can be split into multiple CUs based on quadtree partitioning / ternary tree partitioning / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is partitioned according to a quadtree structure, and each quadtree leaf CU can be further partitioned according to a binary and ternary tree structure. FIG. 3A to FIG. 3E As shown, there are five possible partitioning types for a coding block with width W and height H, namely, quadruple partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.

[0102] In some embodiments, the video encoder 20 may further partition the coding block of the CU into one or more (M×N) PBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma PB, Cb PB, and Cr PB of each PU of the CU.

[0103] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0104] After the video encoder 20 generates a predicted luma block, a predicted Cb block, and a predicted Cr block for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma coding block of the CU, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0105] In addition, if Figure 1EAs shown in , the video encoder 20 can use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. The TU of the CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Therefore, each TU of the CU may be associated with a luma transform block, a Cb transform block and a Cr transform block. In some examples, the luma transform block associated with the TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.

[0106] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.

[0107] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream including a sequence of bits that form a representation of an encoded frame and associated data, and the bitstream is stored in the storage device 32 or sent to the target device 14.

[0108] After receiving the bitstream generated by the video encoder 20, the video decoder 30 can parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 can reconstruct the frame of the video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally inverse to the encoding process performed by the video encoder 20. For example, the video decoder 30 can perform an inverse transform on the coefficient block associated with the TU of the current CU to reconstruct the residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding the samples of the prediction block for the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 can reconstruct the frame.

[0109] As mentioned above, video coding mainly uses two modes, namely, intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to coding efficiency than intra-frame prediction because motion vectors are used to predict the current video block based on the reference video block.

[0110] But with the ever-improving video data capture technology and finer video block sizes for retaining details in the video data, the amount of data required to represent the motion vector for the current frame has also increased significantly. One way to overcome this challenge benefits from the fact that not only a group of neighboring CUs in both the spatial and temporal domains have similar video data for prediction purposes, but also the motion vectors between these neighboring CUs are similar. Therefore, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU (which is also called the "motion vector predictor" (MVP) of the current CU) by exploring their spatial and temporal correlations.

[0111] Instead of combining as above Figure 1B The actual motion vector of the current CU determined by the motion estimation unit is encoded into the video bitstream, and the motion vector prediction value of the current CU is subtracted from the actual motion vector of the current CU to generate a motion vector difference (MVD) for the current CU. By doing so, the motion vector determined by the motion estimation unit for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent the motion information in the video bitstream can be significantly reduced.

[0112] Similar to the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, both the video encoder 20 and the video decoder 30 need to adopt a set of rules for constructing a motion vector candidate list (also called a "merge list") for the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector prediction value for the current CU. By doing so, the motion vector candidate list itself does not need to be sent from the video encoder 20 to the video decoder 30, and the index of the selected motion vector prediction value within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector prediction value within the motion vector candidate list to encode and decode the current CU.

[0113] The present disclosure aims to further improve the chroma coding efficiency of the motion compensation module used in ECM. Next, some related coding tools used in the transformation and entropy coding process in ECM are briefly reviewed. Subsequently, some deficiencies in the existing motion compensation design are discussed. Finally, solutions to improve the existing design are proposed.

[0114] Motion compensated prediction (MCP)

[0115] Motion compensated prediction (MCP) (also referred to as motion compensation) is one of the most widely used video codec techniques in the development of modern video codec standards. In MCP, a video frame is partitioned into multiple blocks (called prediction units (PUs)). Each PU is predicted from a block of the same size in a temporal reference picture, which significantly reduces the overhead required to signal the block. In all existing video codec standards, each inter-frame PU is associated with a set of motion parameters, which consists of one or two MVs and a reference picture index. Inter-frame PUs in P slices have only one reference picture list, while PUs in B slices can use up to two reference picture lists. In MCP, the corresponding inter-frame prediction samples are generated based on the corresponding areas in the reference picture identified by the MV and the reference picture index. The MV specifies the horizontal and vertical displacement between the current block and its reference block in the reference picture. Figure 4 It shows that d x and d y is an example of a horizontal and vertical value of an MV. In practice, the value of an MV may have fractional precision. Figure 5As shown, when an MV has a fractional value, an interpolation filter is applied to generate the corresponding prediction sample at the fractional sample position. VVC supports MVs whose units are 1 / 16 of the distance between two adjacent luma samples of the luma MC, and MVs whose units are 1 / 32 of the distance between two adjacent chroma samples of the chroma MC.

[0116] Adaptive loop filtering

[0117] In VVC and ECM, adaptive loop filtering (ALF) selects one of 25 filters for each 4×4 block based on the direction and activity of the local gradient.

[0118] Filter Shapes: Two diamond filter shapes are used (e.g. FIG. 6A to FIG. 6B ). The 7×7 diamond is used for the luma component and the 5×5 diamond is used for the chroma components.

[0119] Block classification: For the luminance component, each 4×4 block is classified into one of 25 classes. The class index C is based on its directionality D and the quantized value of the activity The results are as follows:

[0120]

[0121] To calculate D and First, use the 1-D Laplacian to calculate the gradient in the horizontal, vertical, and two diagonal directions:

[0122]

[0123]

[0124]

[0125]

[0126] Where indexes i and j refer to the coordinates of the top left corner sample point in the 4×4 block, and R(i,j) represents the reconstructed sample point at coordinate (i,j). In order to reduce the complexity of block classification, Figure 7 As shown, the subsampled 1-D Laplacian calculation is applied to the gradient calculation in all directions.

[0127] Then, the maximum and minimum values ​​of the gradient of D in the horizontal and vertical directions are set to:

[0128]

[0129] The maximum and minimum values ​​of the gradients in the two diagonal directions are set to:

[0130]

[0131] To derive the value of the directionality D, these values ​​are compared with each other and with two thresholds t1 and t2:

[0132] Step 1. If and is true, D is set to 0.

[0133] Step 2. If Then continue from step 3; otherwise, continue from step 4.

[0134] Step 3. If Then D is set to 2; otherwise, D is set to 1.

[0135] Step 4. If Then D is set to 4; otherwise, D is set to 3.

[0136] The activity value A is calculated as:

[0137]

[0138] A is further quantized to the range of 0 to 4 (inclusive), and the quantized value is expressed as No classification method is applied to the chrominance components of the image.

[0139] Geometric transformation of filter coefficients and cutoff values

[0140] Before filtering each 4×4 luma block, geometric transformations such as rotation or diagonal and vertical flipping are applied to the filter coefficients f(k,l) and the corresponding filter cutoff values ​​c(k,l), depending on the gradient values ​​calculated for the block. This is equivalent to applying these transformations to the samples in the filter support region. The idea is to make different blocks more similar by aligning their directionality, to which the ALF is applied.

[0141] Three geometric transformations are provided, including diagonal, vertical flip, and rotation:

[0142] Diagonal: f D (k,l)=f(l,k),c D (k,l)=c(l,k),

[0143] Flip vertically: f V (k,l)=f(k,Kl-1),c V (k,l)=c(k,Kl-1)(6)

[0144] Rotation: f R (k,l)=f(Kl-1,k),cR (k,l)=c(Kl-1,k)

[0145] Where K is the size of the filter and 0≤k,l≤K-1 are the coefficient coordinates such that position (0,0) is at the upper left corner and position (K-1,K-1) is at the lower right corner. These transforms are applied to the filter coefficients f(k,l) and the intercept values ​​x(k,l) depending on the gradient values ​​calculated for the block. The relationship between the transforms and the four gradients in these four directions is summarized in Table 1 below.

[0146] Gradient Value Transform gd2 < gd1 and gh < gv No transformation gd2 < gd1 and gv < gh diagonal gd1 < gd2 and gh < gv Flip Vertically gd1 < gd2 and gv < gh Rotation

[0147] Table 1

[0148] Filtering process

[0149] When ALF is enabled for CTB, each sample point R(i,j) in the CU is filtered to obtain the sample value R′(i,j), as shown below:

[0150]

[0151] Where f(k,l) represents the decoded filter coefficients, K(x,y) is the truncation function, and c(k,l) represents the decoded truncation parameters. The variables k and l are located in to Where L is the filter length. Clip3(-y, y, x) is a clipping function that clips the input value x to the range [-y, y]. The clipping operation introduces nonlinearity, making the ALF more efficient by reducing the impact of neighboring sample values ​​that are too different from the current sample value.

[0152] Local illumination compensation

[0153] Local illumination compensation (LIC) is a codec tool studied during the development of VVC, which aims to address the local illumination changes in temporally adjacent pictures. LIC is based on a linear model in which scaling factors and offsets are derived to enhance the predicted samples of the current block. Specifically, LIC can be mathematically modeled by the following equation:

[0154] P(x,y)=α·P r (x+v x ,y+v y )+β (8)

[0155] Among them, P(x,y) is the prediction signal of the current block at the coordinate (x,y); P r (x+v x,y+v y ) is based on the motion vector (v x ,v y ) generated prediction block; α and β are the corresponding scaling factors and offsets. Figure 8 The LIC process is shown in FIG. Figure 8 As shown, when LIC is applied to a video block, by making the neighboring samples of the current block (i.e., Figure 8 The template in ) and its corresponding predicted sample point (i.e., Figure 8 A linear model (i.e., scaling factor α and offset β) is derived by minimizing the difference between the template predictions in .

[0156] Since the scaling factor and offset are derived based on the current block and the template and their corresponding prediction signals, there is no need for the signaling overhead of the LIC parameters. In addition, for a non-merged inter-frame block, a LIC flag is signaled to indicate whether the LIC mode is enabled for the block. For merged inter-frame blocks, the LIC flag is considered as part of the motion information. Specifically, when building the merge list, in addition to the MV and reference index, the LIC flag will also inherit the flag of its corresponding neighboring block. At the same time, the LIC mode is also applied to affine inter-frame blocks. When the affine mode is applied, an inter-frame block is divided into multiple sub-blocks, and a specific MV is derived for each sub-block based on the affine model. Based on this design, when LIC is applied to an affine block, the corresponding LIC parameters are derived based on the motion information of the sub-blocks on the top and left boundaries of the block; then, the derived LIC model is applied to the prediction samples of the entire block, as shown in Figure 9. Since the MVs of each boundary sub-block may be different, the prediction signal of the template is also generated on a sub-block basis, and the prediction samples of each template sub-block are generated using the MV of the corresponding sub-block on the boundary of the coding block.

[0157] Finally, it is mentioned that in the current LIC design, LIC is only applicable to unidirectionally predicted inter-frame blocks.

[0158] Bidirectional prediction with CU-level weights

[0159] In 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 goes beyond simple averaging and allows a weighted average of the two prediction signals, i.e.

[0160] P bi-pred =((8-w)*P0+w*P1+4)>>3 (9)

[0161] Weighted average bidirectional prediction allows five weights, w∈{-2,3,4,5,10}. For each bidirectional prediction CU, the weight w is determined in one of the following two ways: 1) For non-merged CUs, the weight index is transmitted by signal; 2) For merged CUs, the weight index is inherited from one of the neighboring blocks based on the merge candidate index. In addition, in VVC, for low-latency pictures (i.e., the display order of all reference pictures is before the current picture), all 5 weights are used. For non-low-latency pictures (at least one reference is displayed after the current picture), only 3 weights are used (w∈{3, 4, 5}).

[0162] The main focus of this disclosure is to further improve the inter-frame coding efficiency by applying an adaptive enhancement filter on the motion compensation prediction signal of the bidirectional prediction block. Next, some related coding tools applied in the transform and entropy coding process in ECM are briefly reviewed. Subsequently, some deficiencies in the existing motion compensation design are discussed. Finally, solutions to improve the existing design are proposed.

[0163] In all existing video codec standards, MCP plays a key role in ensuring inter-frame coding efficiency. With MCP, the video signal to be coded can be predicted based on temporal neighboring signals, and only the prediction error, MV, and reference picture index are transmitted. As analyzed earlier, ALF can effectively improve the quality of the reconstructed video, thereby improving the performance of inter-frame coding by providing high-quality reference pictures. LIC can be considered as an enhancement of conventional motion compensated prediction. Although both tools can improve inter-frame coding efficiency, the quality of temporal prediction may still not be good enough for the following reasons:

[0164] The video signal may be coded or decoded with coarse quantization (i.e., high quantization parameter (QP) value). When coarse quantization is applied, the reconstructed picture may contain severe coding artifacts, such as blocking artifacts, ringing artifacts, etc. Since the reconstructed signal of the current picture will be used as a reference for temporal prediction, such distortion may reduce the effectiveness of MCP, thereby reducing the inter-frame coding efficiency of subsequent pictures.

[0165] Although LIC can effectively compensate for illumination changes between different pictures, it can only be applied to unidirectional prediction blocks. It is well known that the combination of multiple prediction blocks can effectively suppress the codec noise present in the motion compensation signal (these noises are caused by the quantization / dequantization process). Therefore, bidirectional prediction is usually more compression efficient than unidirectional prediction, that is, the number of bidirectional prediction blocks is larger than that of unidirectional prediction blocks. This means that unidirectional LIC cannot fully utilize the codec gain that the LIC tool can achieve.

[0166] The present disclosure proposes a method and apparatus for improving the efficiency of motion compensation, thereby improving the quality of temporal prediction. Specifically, it is proposed to apply adaptive filtering at the prediction samples of a bidirectional prediction block. In order to reduce signaling overhead, filter coefficients are derived from neighboring reconstructed samples (i.e., templates) of the current block and their corresponding prediction samples. In this way, the energy of the prediction residual is mitigated, thereby reducing the residual signaling overhead.

[0167] Fig.10 A block diagram of a video encoder when the proposed adaptive bidirectional prediction filter is applied is given. First, similar to conventional video encoders, the motion estimation and compensation module generates a motion compensated signal by matching the current block with one block (unidirectional prediction) or two blocks (bidirectional prediction) in the reference picture using the best MV. Then, for the bidirectional prediction block, the motion compensated samples (luminance and chrominance) are provided to the proposed adaptive filter to generate filtered motion compensated prediction samples of the current block. Then, the original signal is subtracted from the prediction signal to eliminate temporal redundancy and produce the corresponding residual signal. The residual signal is transformed and quantized, then entropy encoded and output to the bitstream. To obtain the reconstructed signal, the residual signal is reconstructed by dequantization and inverse transformation. Then, the reconstructed residual is added to the motion compensated prediction. Further, an in-loop filtering process (such as deblocking, ALF and SAO) is applied to the reconstructed video signal for output. As will be discussed later, the filter coefficients of the proposed adaptive bidirectional prediction filter are directly derived from the neighboring reconstructed luminance and chrominance samples at the decoder. In addition, in order to maximize the coding gain of the proposed method, additional syntax can be signaled at a given block level (eg, CTU, CU, or PU level) to indicate whether the proposed filtering is applied to the current block for motion compensation.

[0168] Fig.11 shows a block diagram of the proposed decoder, which receives Fig.10 The bitstream generated by the encoder in . At the decoder, the bitstream is first parsed by an entropy decoder. The residual coefficients are then dequantized and inverse transformed to obtain the reconstructed residual. For temporal prediction, a prediction signal is first generated by obtaining a motion compensated block using the prediction information transmitted by the signal (i.e., MV and reference index). Then, for a bidirectional prediction block, the bitstream is parsed to determine whether adaptive filtering is enabled for the block. If adaptive filtering is enabled, the motion compensated luminance and chrominance signals are further processed by the proposed adaptive filtering; otherwise, the motion compensated chrominance signals are not filtered. Then, the motion compensated signal (filtered or unfiltered) and the reconstructed residual are added to obtain the reconstructed video. The reconstructed video may also need to be loop filtered before it can be stored in the reference picture storage area for display and / or for decoding future video signals.

[0169] Adaptive Bidirectional Prediction Filtering Based on Template Bidirectional Prediction Samples

[0170] In this section, an adaptive filtering scheme for bidirectional prediction is proposed, in which the filter coefficients are derived based on the bidirectional prediction samples of a template of a bidirectional prediction block. Specifically, in the proposed scheme, the bidirectional prediction samples of the template samples are first generated according to the motion vector of the current block; then, the least square mean error (LMSE) algorithm is applied to derive the filter parameters by minimizing the difference between the template prediction samples and the template samples. Fig.12 The proposed adaptive filtering method based on template bidirectional prediction samples is shown in FIG. Fig.12 As shown, T represents the template of the current bidirectional prediction block; T0 and T1 are the L0 and L1 prediction samples of the template, which are the bidirectional motion vectors of the current block. and Based on these representations, in the proposed scheme, the bidirectional prediction samples of the template are first generated by averaging the two unidirectional predictions of the template in L0 and L1, that is,

[0171] T bi =w0*T0+w1*T1 (10)

[0172] Wherein, w0 and w1 are the weights applied to the L0 and L1 directions when generating the bidirectional prediction samples of the current block. When BCW is not applied, the weight is equal to 0.5, and when BCW is applied, the weight may be equal to -0.125, 0.375, 0.625, and 1.125. Based on the obtained template bidirectional prediction samples, LMSE derivation is used to calculate the value of the adaptive filter coefficient by minimizing the difference between the template samples and their bidirectional prediction samples, that is,

[0173]

[0174] Among them, f * Indicates the prediction sample T applied to a template bi The coefficients of the filter corresponding to the H×L neighborhood of (x,y), where In practice, various filters with different sizes and shapes can be applied to provide different trade-offs between codec performance and complexity. Larger filters can bring the template prediction samples closer to the template samples, but at the expense of increased computational complexity. Finally, the resulting filter coefficients are applied to modify the original bidirectional prediction signal for the current block, as shown below

[0175]

[0176] Among them, P bi(x,y) and P′ bi (x, y) are the bidirectional prediction samples before and after the proposed adaptive filtering. In addition, in order to further improve the codec gain, the proposed method introduces an offset and some nonlinear terms when deriving the filter coefficients, which can further reduce the distortion between the template sample and its prediction sample. Specifically, after such modification, the filter coefficient derivation in equation (11) becomes

[0177]

[0178] And, the filter application in (12) is

[0179]

[0180] Where o is the offset, nl k is a nonlinear term, which is represented as a template prediction sample T bi The sum of a series of powers (i.e., k=2, ..., K-1) of (2x, 2y).

[0181] In one or more examples, a linear model (i.e., scaling factor and offset) is proposed to derive a two-tap filter to enhance the prediction samples of a bidirectional prediction block. Specifically, a bidirectional prediction LIC is proposed, which operates as follows: 1) Generate bidirectional prediction samples of a template, as shown in (10); 2) Use the template samples and their corresponding bidirectional prediction samples to derive scaling factors and offsets, as shown below

[0182]

[0183] Among them, α and β are the scaling factor and offset of the LIC linear model; N is the number of template samples involved in the derivation process. After that, the final bidirectional prediction of the current block is generated as follows

[0184] P′ bi (x,y)=α·P bi (x,y)+β (16)

[0185] Adaptive Bidirectional Predictive Filtering Based on Template Unidirectional Samples

[0186] In this section, an adaptive bidirectional prediction filtering scheme is proposed for unidirectional prediction samples of a template using a bidirectional prediction block. For example, in this method, two adaptive filtering operations are applied to the prediction samples of the template in a unilateral manner: two sets of filter coefficients are derived and applied to the prediction samples in L0 and L1 respectively; then the weighted average of the two filtered unidirectional prediction samples is formed as the final prediction sample of the current block. Fig.13 The proposed scheme is shown in Figure 2. Fig.13As shown, based on L0MV and L1 MV, two unidirectional predictions T0 and T1 of the template are generated. Then, based on the separate minimization of the distortion between T0 and T and T1 and T, two sets of filter parameters f0 and f1 can be derived for the L0 and L1 directions, respectively, as described below:

[0187]

[0188] Wherein, N represents the number of template samples involved; T is the template sample of the current block; Indicates that the template samples are unidirectionally predicted based on the MV (L0 or L1) of the current block. After that, the two filters are applied to the two unidirectional predictions of the current block respectively, and then they are combined to generate the final bidirectional prediction of the current block, as shown below

[0189] P′ bi (x,y)=w0*P′0(x,y)+w1*P′1(x,y) (18)

[0190] in,

[0191]

[0192] Where P0(x,y) and P1(x,y) are two unidirectional prediction samples of the current block before applying the proposed adaptive filtering. Similar to (13) and (14), in addition, in order to further improve the codec gain, an offset and nonlinear term can be introduced when deriving the filter coefficients. After such modification, the filter coefficients can be obtained as follows

[0193]

[0194] And, the filtered unidirectional prediction samples of the current block are calculated as

[0195]

[0196] In one or more examples, a linear model (i.e., scaling factors and offsets) is proposed to derive a two-tap filter to enhance two unidirectional predictions of a bidirectional prediction block. Specifically, a bidirectional prediction LIC is proposed, which operates as follows: 1) generates two unidirectional predictions of a template; 2) uses the template samples and their corresponding unidirectional prediction samples to derive two sets of scaling factors and offsets, as shown below

[0197]

[0198] Where α0 and β0 are the scaling factors and offsets of the LIC linear model for L0 unidirectional prediction, and α1 and β1 are the scaling factors and offsets of the LIC linear model for L1 unidirectional prediction; N is the number of template samples involved in the derivation process. After that, the final bidirectional prediction of the current block is generated as follows

[0199] P′ bi (x,y)=w0*(α0·P0(x,y)+β0)+w1*(α1·P0(x,y)+β1) (23)

[0200] Where w0 and w1 are the BCW weights applied to the current block.

[0201] Recursive unidirectional filtering based on adaptive bidirectional predictive filtering

[0202] exist Fig.13 In the present invention, since the filter coefficients of the two unidirectional prediction signals applied to the template are derived separately, the obtained bidirectional prediction signal of the template (i.e., the weighted combination of the two filtered unidirectional prediction signals) may not be optimal when considering the minimization of the distortion between the template samples and their corresponding prediction samples. In order to solve this problem, an iterative scheme is proposed to derive the optimal filter coefficients of the two unidirectional prediction signals of the template applied to a bidirectional prediction block. The proposed scheme is performed in an iterative manner, which alternately optimizes the prediction filter of the other prediction direction while keeping the prediction filter of one prediction direction fixed. Specifically, the derivation process of the two unidirectional prediction filter coefficients is summarized as follows:

[0203] Step 1: Given the starting prediction direction L (0) , by making the one-way prediction Minimize the distortion between the template T and the initial filter coefficients in the starting prediction direction Right now,

[0204]

[0205] Step 2: Based on filter coefficients Compute filtered one-way prediction And set k=1.

[0206]

[0207] Step 3: Select the target prediction direction L (k) =1-L (k-1) And calculate the target template sample points of the current block as follows

[0208]

[0209] Step 4: By making a one-way prediction With template T (k) The distortion between them is minimized to obtain the starting prediction direction L (k) The filter coefficients Right now,

[0210]

[0211] Step 5: Based on filter coefficients Compute filtered one-way prediction As shown below

[0212]

[0213] Step 6: Set k=k+1 and go to step 3.

[0214] The resulting filter is used as the corresponding filter for the two unidirectional predictions applied to the current block, and then the filtered prediction samples are combined to generate the final bidirectional prediction of the current block, as shown in (18) and (19). Similarly, the offsets and nonlinear terms shown in (20) and (21) can also be applied to the proposed iterative bidirectional prediction filter derivation scheme. In addition, in one or more examples, it is proposed to use a linear model (i.e., scaling factors and offsets) to derive a two-tap filter through the proposed iterative filter derivation scheme: 1) generate two unidirectional predictions of the template; 2) derive two sets of scaling factors and offsets based on the iterative algorithm shown in steps 1 to 6; 3) calculate the final bidirectional prediction samples of the current block, as shown in (23).

[0215] In practical applications, different numbers of iterations can be applied to the above-mentioned iterative filter derivation scheme. In general, the more iterations, the smaller the distortion between the template and its prediction signal (i.e., the better the codec gain), but this is at the expense of increased computational complexity. Different methods are proposed below to determine the number of iterations applied in the proposed algorithm. In one method, it is proposed to use a fixed number of iterations (i.e., 3) at both the encoder and the decoder. In a second method, it is proposed to let the encoder freely choose a specific number of iterations and transmit the corresponding value to the decoder by signaling. When applying this method, (multiple) new syntax elements can be added at the sequence parameter set (SPS), picture parameter set (PPS), picture header, slice header, or even coding block level to indicate the value of the applied iteration. In a third method, it is proposed to adaptively determine the iteration value applied to a block based on the statistical data of the block (e.g., sample change, motion vector difference, and additional information). In one or more examples, it is proposed to use the difference between the original L0 and L1 prediction samples of a bidirectional prediction block as a criterion for selecting the number of iterations applied. For example, when the difference between two prediction samples (i.e., the sum of absolute differences (SAD), sum of squared differences (SSD), and other matrices) is greater than a threshold, a greater number of iterations is applied to the block; otherwise (i.e., the difference is less than the threshold), a smaller number of iterations is applied.

[0216] Last but not the least, different initial prediction directions can be applied in the proposed scheme. In one approach, it is proposed to always use L0 as the initial prediction direction in the proposed method. In another approach, it is proposed to use L1 as the initial prediction direction. The third approach proposes to select the initial prediction direction based on the slice type, prediction structure, and QP of the slice to which the current block belongs. For example, L0 can be used as the initial prediction direction for non-low-latency pictures, while L1 can be used as the initial prediction direction for low-latency pictures.

[0217] Fig.14 A computing environment (or computing device) 1410 coupled to a user interface 1460 is shown. The computing environment 1410 may be part of a data processing server. In some embodiments, the computing device 1410 may perform any of the various methods or processes (such as encoding / decoding methods or processes) described above according to various examples of the present disclosure. The computing environment 1410 may include a processor 1420, a memory 1440, and an I / O interface 1450.

[0218] The processor 1420 generally controls the overall operation of the computing environment 1410, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1420 may include one or more processors for executing instructions to perform all or some steps in the above method. In addition, the processor 1420 may include one or more modules that facilitate the interaction between the processor 1420 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a GPU, etc.

[0219] The memory 1440 is configured to store various types of data to support the operation of the computing environment 1410. The memory 1440 may include predetermined software 1442. Examples of such data include instructions for any application or method operating on the computing environment 1410, video data sets, image data, etc. The memory 1440 may be implemented by using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0220] I / O interface 1450 provides an interface between processor 1420 and peripheral interface modules (such as keyboard, click wheel, buttons, etc.). Buttons may include but are not limited to a home button, a start scanning button, and a stop scanning button. I / O interface 1450 may be coupled to an encoder and a decoder.

[0221] In some embodiments, a non-transitory computer-readable storage medium is also provided, the non-transitory computer-readable storage medium includes a plurality of programs, the programs are included in the memory 1440, and can be executed by the processor 1420 in the computing environment 1410 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

[0222] The non-transitory computer-readable storage medium stores a plurality of programs for execution by a computing device having one or more processors, wherein the plurality of programs, when executed by the one or more processors, causes the computing device to perform the above-mentioned motion prediction method.

[0223] In some embodiments, the computing environment 1410 can be implemented using one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), graphic processing units (GPUs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0224] Fig.15 is a flow chart showing a video decoding method according to an example of the present disclosure. The method may be implemented for decoding an inter-coded block.

[0225] In step 1501, at the decoder side, the processor 1420 may obtain multiple prediction blocks based on the current inter-frame coding block. For example, as shown in equations (8) and Fig.12 As shown, the current block can be based on the motion vector (v x ,v y ) to obtain P0 (prediction block 0) and P1 (prediction block 1). P0 and P1 will be further used to obtain the combined prediction block P in equation (9): bi-pred Or in equation (12) we get P bi In some embodiments, more than two prediction blocks may be obtained to implement the method. In some embodiments of the present disclosure, the number of prediction blocks is not limited to two.

[0226] In step 1502, the processor 1420 may obtain a current template of a current inter-frame coding block, wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block, such as Fig.12 shown.

[0227] In step 1503, the processor 1420 may obtain multiple template predictions of the current template corresponding to multiple prediction blocks of the current inter-frame coding block. For example, as shown in equations (11) and Fig.12As shown, template predictions T0 (template prediction 0) and T1 (template prediction 1) are obtained as L0 and L1 prediction samples of template T, respectively. In some embodiments, as Fig.12 As shown, each template prediction may include a plurality of template prediction sample points corresponding to a plurality of reconstructed sample points of the current template.

[0228] In step 1504, the processor 1420 may obtain at least one filter based on multiple template predictions and the current template.

[0229] In step 1505 , the processor 1420 may obtain a filtered block based on at least one filter and a plurality of prediction blocks.

[0230] In some examples, the processor 1420 may obtain a combined template prediction based on multiple template predictions; and obtain a coefficient of a filter by minimizing the difference between the combined template prediction and the current template. For example, as shown in equations (10), (11) and Fig.12 As shown, the combined template prediction T can be obtained based on template prediction T0 (template prediction 0) and T1 (template prediction 1). bi , then based on T bi Get the filter coefficient f * .

[0231] In some examples, processor 1420 may obtain a combined prediction block based on multiple prediction blocks; and obtain a filtered block by applying a filter to the combined prediction block. For example, as shown in equations (12) and Fig.12 As shown, P0 (prediction block 0) and P1 (prediction block 1) are further used to obtain the combination P bi , and then the filter coefficients f * Applied to the combined prediction block P bi , so that the filtered block P′ can be obtained bi (x,y).

[0232] In some examples, the coefficients include at least one of a scaling factor, an offset, and at least one nonlinear term. For example, as shown in equation (13), o is the offset, nl k is a nonlinear term, as shown in equation (15), and α and β are the scaling factor and offset.

[0233] In some examples, processor 1420 may obtain a first prediction block and a second prediction block. Fig.12 As shown, two prediction blocks P0 (prediction block 0) and P1 (prediction block 1) are obtained. In some embodiments, more than two prediction blocks can be obtained to implement the method. In some embodiments of the present disclosure, the number of prediction blocks is not limited to the two shown.

[0234] In some examples, processor 1420 may obtain the first coefficient of the first filter by minimizing the difference between the first template prediction and the current template; and obtain the second coefficient of the second filter by minimizing the difference between the second template prediction and the current template. For example, as shown in equations (17) and Fig.13 As shown, two sets of filter parameters f0 (first coefficient) and f1 (second coefficient) can be obtained for the L0 and L1 directions respectively.

[0235] In some examples, processor 1420 may obtain a first filtered prediction block by applying a first filter to a first prediction block; obtain a second filtered prediction block by applying a second filter to a second prediction block; and obtain a filtered block by combining the first filtered prediction block with the second filtered prediction block. For example, as shown in equations (19) and Fig.13 As shown, f0 (first coefficient) and f1 (second coefficient) are applied to P0 (prediction block 0) and P1 (prediction block 1) respectively to obtain P'0 (filtered prediction block 0) and P'1 (filtered prediction block 1), as shown in equation (18), and the filtered block P' is obtained by combining P'0 and P'1 bi .

[0236] In some examples, the first coefficient or the second coefficient includes at least one of a scaling factor, an offset, and at least one nonlinear term. For example, as shown in equation (20), o is the offset, nl k is a nonlinear term, as shown in equation (22), and α and β are the scaling factor and offset.

[0237] In some examples, processor 1420 may calculate a target template based on a current template and a previously filtered template prediction; obtain coefficients of a current filter by minimizing the difference between the current template prediction and the target template; and calculate a current filtered template prediction by applying the current filter to the current template prediction. For example, as shown in equation (26), based on the current template T and the previously filtered template prediction T (k-1) To calculate the target template T (k) , then as shown in Equation (27), we can make the current template predict With target template T (k) The coefficients of the current filter are obtained by minimizing the difference between Finally, as shown in equation (28), based on the filter coefficients Compute the current filtered template prediction In some embodiments, the processor 1420 may repeat the above steps shown in equations (26)-(28) to alternately and recursively update the filter parameters f0 (first coefficient) and f1 (second coefficient).

[0238] In some examples, processor 1420 may obtain coefficients of a first filter by minimizing the difference between the first template prediction and the current template; and calculate the previously filtered template prediction by applying the first filter to the first template prediction. For example, as shown in equation (24), by making it a unidirectional prediction Minimize the distortion between the template T and obtain the initial filter coefficients Then, as shown in equation (25), based on the initial filter coefficients Compute filtered one-way prediction and used as the previously filtered template prediction T in equation (26) (k-1) .

[0239] In some examples, the processor 1420 may obtain a first filtered prediction block by applying a first filter to a first prediction block; obtain a second filtered prediction block by applying a second filter to a second prediction block; and obtain a filtered block by combining the first filtered prediction block with the second filtered prediction block. For example, as shown in equations (18) and (19), two filters are respectively applied to two unidirectional predictions P0 and P1 of the current block to obtain P'0 and P'1, and then they are combined to generate a final bidirectional prediction P' of the current block. bi .

[0240] In some examples, the coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

[0241] In some examples, processor 1420 may, in response to reaching an iteration number, obtain a first filtered prediction block by applying a first filter to a first prediction block, and obtain a second filtered prediction block by applying a second filter to a second prediction block; and obtain a filtered block by combining the first filtered prediction block with the second filtered prediction block.

[0242] In some examples, the number of iterations is preset or determined based on the difference between a previously filtered template prediction and a current template prediction.

[0243] Fig.16 is a flow chart showing a video decoding method according to an example of the present disclosure. The method may be implemented for decoding an inter-coded block.

[0244] In step 1601, at the decoder side, the processor 1420 may obtain multiple prediction blocks based on the current inter-frame coding block. For example, as shown in equation (8), the current block may be based on the motion vector (v x ,v y ) to obtain the prediction block.

[0245] In step 1602, the processor 1420 may obtain a current template of a current inter-frame coding block; wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block.

[0246] In step 1603, the processor 1420 may obtain a plurality of template predictions of the current template respectively corresponding to the plurality of prediction blocks. In some embodiments, each template prediction may include a plurality of template prediction samples corresponding to a plurality of reconstructed samples of the current template.

[0247] In step 1604, the processor 1420 may obtain a filter based on the multiple template predictions and the current template. Specifically, the processor 1420 may calculate a target template based on the current template and the previously filtered template prediction; obtain coefficients of the current filter by minimizing the difference between the current template prediction and the target template; and calculate the current filtered template prediction by applying the current filter to the current template prediction. For example, as shown in equation (26), the target template T (k) Based on the current template T and the previously filtered template prediction T (k-1) , then as shown in Equation (27), we can make the current template predict With target template T (k) The coefficients of the current filter are obtained by minimizing the difference between Finally, as shown in equation (28), based on the filter coefficients Compute the current filtered template prediction In some embodiments, the processor 1420 repeats the above steps shown in equations (26)-(28) to alternately and recursively update the filter parameters f0 (first coefficient) and f1 (second coefficient), but only one of the updated filter parameters f0 (first coefficient) and f1 (second coefficient) is used to obtain the filtered block.

[0248] In step 1605 , the processor 1420 may obtain a filtered block based on a filter and a prediction block among a plurality of prediction blocks.

[0249] In some examples, processor 1420 may obtain coefficients of a first filter by minimizing a difference between a first template prediction and a current template; and computing a previously filtered template prediction by applying the first filter to the first template prediction. In some examples, the coefficients include at least one of a scaling factor, an offset, and at least one nonlinear term. For example, as shown in equation (24), by making it a unidirectional prediction Minimize the distortion between the template T and obtain the initial filter coefficients Then, as shown in equation (25), based on the initial filter coefficients Compute filtered one-way prediction and used as the previously filtered template prediction T in equation (26) (k-1) .

[0250] In some examples, processor 1420 may obtain a filtered block based on the current filter and one of the multiple prediction blocks corresponding to the current template prediction. In some embodiments, processor 1420 repeats the steps shown in equations (26)-(28) to alternately and recursively update filter parameters f0 (first coefficient) and f1 (second coefficient), but only one of the filter parameters f0 (first coefficient) and f1 (second coefficient) is used as the filter parameter of the current filter, and then obtains a filtered block based on the current filter and one of the multiple prediction blocks corresponding to the current template prediction.

[0251] In some examples, processor 1420 may obtain a filtered block based on the current filter and one of the plurality of prediction blocks corresponding to the current template prediction in response to reaching an iteration number.

[0252] In some examples, the number of iterations is preset or determined based on the difference between a previously filtered template prediction and a current template prediction.

[0253] Fig.17 is a flow chart showing a video encoding method according to an example of the present disclosure. The method may be implemented for encoding an inter-coded block.

[0254] In step 1701, at the encoder side, the processor 1420 may obtain multiple prediction blocks based on the current inter-frame coding block. For example, as shown in equations (8) and Fig.12 As shown, the current block can be based on the motion vector (v x ,v y ) to obtain P0 (prediction block 0) and P1 (prediction block 1). P0 and P1 will be further used to obtain the combined prediction block P in equation (9): bi-pred Or we can get P in equation (12): bi In some embodiments, more than two prediction blocks may be obtained to implement the method. In some embodiments of the present disclosure, the number of prediction blocks is not limited to two.

[0255] In step 1702, the processor 1420 may obtain a current template of a current inter-frame coding block, wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block, such as Fig.12 shown.

[0256] In step 1703, the processor 1420 may obtain multiple template predictions of the current template corresponding to multiple prediction blocks of the current inter-frame coding block. For example, as shown in equations (11) and Fig.12 As shown, template predictions T0 (template prediction 0) and T1 (template prediction 1) are obtained as L0 and L1 prediction samples of template T, respectively. In some embodiments, as Fig.12 As shown, each template prediction may include a plurality of template prediction samples corresponding to a plurality of reconstructed samples of the current template.

[0257] In step 1704, the processor 1420 may obtain at least one filter based on multiple template predictions and the current template.

[0258] In step 1705 , the processor 1420 may obtain a filtered block based on at least one filter and a plurality of prediction blocks.

[0259] In some examples, the processor 1420 may obtain a combined template prediction based on multiple template predictions; and obtain a coefficient of a filter by minimizing the difference between the combined template prediction and the current template. For example, as shown in equations (10), (11) and Fig.12 As shown, the combined template prediction T can be obtained based on template prediction T0 (template prediction 0) and T1 (template prediction 1). bi , then based on T bi Get the filter coefficient f * .

[0260] In some examples, processor 1420 may obtain a combined prediction block based on multiple prediction blocks; and obtain a filtered block by applying a filter to the combined prediction block. For example, as shown in equations (12) and Fig.12 As shown, P0 (prediction block 0) and P1 (prediction block 1) are further used to obtain the combination P bi , and then the filter coefficients f * Applied to the combined prediction block P bi , so that the filtered block P′ can be obtained bi (x,y).

[0261] In some examples, the coefficients include at least one of a scaling factor, an offset, and at least one nonlinear term. For example, as shown in equation (13), o is the offset, nl k is a nonlinear term, as shown in equation (17), and α and β are the scaling factor and offset.

[0262] In some examples, processor 1420 may obtain a first prediction block and a second prediction block. Fig.12 As shown, two prediction blocks P0 (prediction block 0) and P1 (prediction block 1) are obtained. In some embodiments, more than two prediction blocks can be obtained to implement the method. In some embodiments of the present disclosure, the number of prediction blocks is not limited to the two shown.

[0263] In some examples, processor 1420 may obtain the first coefficient of the first filter by minimizing the difference between the first template prediction and the current template; and obtain the second coefficient of the second filter by minimizing the difference between the second template prediction and the current template. For example, as shown in equations (17) and Fig.13 As shown, two sets of filter parameters f0 (first coefficient) and f1 (second coefficient) can be obtained for the L0 and L1 directions respectively.

[0264] In some examples, processor 1420 may obtain a first filtered prediction block by applying a first filter to a first prediction block; obtain a second filtered prediction block by applying a second filter to a second prediction block; and obtain a filtered block by combining the first filtered prediction block with the second filtered prediction block. For example, as shown in equations (19) and Fig.13 As shown, f0 (first coefficient) and f1 (second coefficient) are applied to P0 (prediction block 0) and P1 (prediction block 1) respectively to obtain P'0 (filtered prediction block 0) and P'1 (filtered prediction block 1), as shown in equation (18), and the filtered block P' is obtained by combining P'0 and P'1 bi .

[0265] In some examples, the first coefficient or the second coefficient includes at least one of a scaling factor, an offset, and at least one nonlinear term. For example, as shown in equation (20), o is the offset, nl k is a nonlinear term, as shown in equation (22), and α and β are the scaling factor and offset.

[0266] In some examples, processor 1420 may calculate a target template based on a current template and a previously filtered template prediction; obtain coefficients of a current filter by minimizing the difference between the current template prediction and the target template; and calculate a current filtered template prediction by applying the current filter to the current template prediction. For example, as shown in equation (26), based on the current template T and the previously filtered template prediction T (k-1) To calculate the target template T (k) , then as shown in Equation (27), we can make the current template predict With target template T (k) The coefficients of the current filter are obtained by minimizing the difference between Finally, as shown in equation (28), based on the filter coefficients Compute the current filtered template prediction In some embodiments, the processor 1420 may repeat the above steps shown in equations (26)-(28) to alternately and recursively update the filter parameters f0 (first coefficient) and f1 (second coefficient).

[0267] In some examples, processor 1420 may obtain coefficients of a first filter by minimizing the difference between the first template prediction and the current template; and calculate the previously filtered template prediction by applying the first filter to the first template prediction. For example, as shown in equation (24), by making it a unidirectional prediction Minimize the distortion between the template T and obtain the initial filter coefficients Then, as shown in equation (25), based on the initial filter coefficients Compute filtered one-way prediction and used as the previously filtered template prediction T in equation (26) (k-1) .

[0268] In some examples, the processor 1420 may obtain a first filtered prediction block by applying a first filter to a first prediction block; obtain a second filtered prediction block by applying a second filter to a second prediction block; and obtain a filtered block by combining the first filtered prediction block with the second filtered prediction block. For example, as shown in equations (18) and (19), two filters are respectively applied to two unidirectional predictions P0 and P1 of the current block to obtain P'0 and P'1, and then they are combined to generate a final bidirectional prediction P' of the current block. bi .

[0269] In some examples, the coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

[0270] In some examples, processor 1420 may, in response to reaching an iteration number, obtain a first filtered prediction block by applying a first filter to a first prediction block, and obtain a second filtered prediction block by applying a second filter to a second prediction block; and obtain a filtered block by combining the first filtered prediction block with the second filtered prediction block.

[0271] In some examples, the number of iterations is preset or determined based on the difference between a previously filtered template prediction and a current template prediction.

[0272] Fig.18 is a flow chart showing a video encoding method according to an example of the present disclosure. The method may be implemented for encoding an inter-coded block.

[0273] In step 1801, at the encoder side, the processor 1420 may obtain multiple prediction blocks based on the current inter-frame coding block. For example, as shown in equation (8), the current block may be based on the motion vector (v x ,v y ) to obtain the prediction block.

[0274] In step 1802, the processor 1420 may obtain a current template of a current inter-frame coding block; wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block.

[0275] In step 1803, the processor 1420 may obtain a plurality of template predictions of the current template respectively corresponding to the plurality of prediction blocks. In some embodiments, each template prediction may include a plurality of template prediction samples corresponding to a plurality of reconstructed samples of the current template.

[0276] In step 1804, the processor 1420 may obtain a filter based on the multiple template predictions and the current template. Specifically, the processor 1420 may calculate a target template based on the current template and the previously filtered template prediction; obtain coefficients of the current filter by minimizing the difference between the current template prediction and the target template; and calculate the current filtered template prediction by applying the current filter to the current template prediction. For example, as shown in equation (26), the target template T (k) Based on the current template T and the previously filtered template prediction T (k-1) , then as shown in Equation (27), we can make the current template predict With the target template T (k) The coefficients of the current filter are obtained by minimizing the difference between Finally, as shown in equation (28), based on the filter coefficients Compute the current filtered template prediction In some embodiments, the processor 1420 repeats the above steps shown in equations (26)-(28) to alternately and recursively update the filter parameters f0 (first coefficient) and f1 (second coefficient), but only one of the updated filter parameters f0 (first coefficient) and f1 (second coefficient) is used to obtain the filtered block.

[0277] In step 1805 , the processor 1420 may obtain a filtered block based on a filter and a prediction block among a plurality of prediction blocks.

[0278] In some examples, processor 1420 may obtain coefficients of a first filter by minimizing a difference between a first template prediction and a current template; and computing a previously filtered template prediction by applying the first filter to the first template prediction. In some examples, the coefficients include at least one of a scaling factor, an offset, and at least one nonlinear term. For example, as shown in equation (24), by making it a unidirectional prediction Minimize the distortion between the template T and obtain the initial filter coefficients Then, as shown in equation (25), based on the initial filter coefficients Compute filtered one-way prediction and used as the previously filtered template prediction T in equation (26) (k-1) .

[0279] In some examples, processor 1420 may obtain a filtered block based on the current filter and one of the multiple prediction blocks corresponding to the current template prediction. In some embodiments, processor 1420 repeats the steps shown in equations (26)-(28) to alternately and recursively update filter parameters f0 (first coefficient) and f1 (second coefficient), but only one of the filter parameters f0 (first coefficient) and f1 (second coefficient) is used as the filter parameter of the current filter, and then obtains a filtered block based on the current filter and one of the multiple prediction blocks corresponding to the current template prediction.

[0280] In some examples, processor 1420 may obtain a filtered block based on the current filter and one of the plurality of prediction blocks corresponding to the current template prediction in response to reaching an iteration number.

[0281] In some examples, the number of iterations is preset or determined based on the difference between a previously filtered template prediction and a current template prediction.

[0282] In some examples, a device for video encoding and decoding is provided. The device includes a processor 1420 and a memory 1440, the memory is configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Figures 15 to 18 Any of the methods shown in .

[0283] In some other examples, a non-transitory computer-readable storage medium is provided, which has instructions stored therein. When the instructions are executed by the processor 1420, the instructions will cause the processor to perform the following steps: Figures 15 to 18 In one example, multiple programs can be executed by processor 1420 in computing environment 1410 to (e.g., from Figure 1GThe video encoder 20 in the computing environment 1410 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1420 in the computing environment 1410 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 1420 in the computing environment 1410 to perform the above-mentioned encoding method to encode the video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1420 in the computing environment 1410 to (e.g., to Figure 2B Alternatively, a non-transitory computer-readable storage medium may store the bit stream or data stream generated by the encoder (e.g., Figure 1G The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 2B A bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) used by the video decoder 30 in the video decoder 30 when decoding video data. The non-transitory computer-readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0284] The description of the present disclosure is presented for purposes of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to one of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.

[0285] Unless otherwise specifically stated, the order of steps of the method according to the present disclosure is intended to be illustrative only, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but can be changed according to actual conditions. In addition, at least one of the steps of the method according to the present disclosure can be adjusted, combined or deleted according to actual needs.

[0286] The examples are chosen and described in order to explain the principles of the present disclosure and to enable other persons skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications suitable for the specific use contemplated. Therefore, it should be understood that the scope of the present disclosure is not limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the present disclosure.

[0287] The above method can be implemented using a device including one or more circuits, which include an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components. The device can use these circuits in combination with other hardware or software components for performing the above method. Each module, submodule, unit, or subunit disclosed above can be implemented at least in part using these one or more circuits.

[0288] Other examples of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any changes, uses or adaptations of the disclosure made in accordance with its general principles, including deviations from the present disclosure within known or customary practices in the art. It is intended that the specification and examples be considered exemplary only.

[0289] It should be understood that the present disclosure is not limited to the exact examples described above and shown in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A video decoding method, comprising: A decoder obtains a plurality of prediction blocks based on a current inter-frame coding block; Obtaining, by the decoder, a current template of the current inter-frame coding block, wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block; Obtaining, by the decoder, a plurality of template predictions of the current template respectively corresponding to the plurality of prediction blocks of the current inter-frame coding block; Obtaining, by the decoder, at least one filter based on the plurality of template predictions and the current template; and A filtered block is obtained by the decoder based on the at least one filter and the plurality of prediction blocks.

2. The method of claim 1, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template comprises: Obtaining a combined template prediction based on the plurality of template predictions; and The coefficients of a filter are obtained by minimizing the difference between the combined template prediction and the current template.

3. The method of claim 2, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: Obtaining a combined prediction block based on the plurality of prediction blocks; and A filtered block is obtained by applying the one filter to the combined prediction block.

4. The method of claim 2, wherein: The coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

5. The method of claim 1, wherein: Obtaining the multiple prediction blocks of the current inter-frame coding block includes: A first prediction block and a second prediction block are obtained.

6. The method of claim 5, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template comprises: obtaining first coefficients of a first filter by minimizing a difference between a first template prediction and the current template; and Second coefficients of the second filter are obtained by minimizing the difference between the second template prediction and the current template.

7. The method of claim 6, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: obtaining a first filtered prediction block by applying the first filter to the first prediction block; obtaining a second filtered prediction block by applying the second filter to the second prediction block; and The filtered block is obtained by combining the first filtered prediction block with the second filtered prediction block.

8. The method of claim 6, wherein: The first coefficient or the second coefficient includes at least one of a scaling factor, an offset, and at least one non-linear term.

9. The method of claim 5, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template comprises: calculating a target template based on the current template and a previously filtered template prediction; Obtaining coefficients of a current filter by minimizing the difference between the current template prediction and the target template; and A current filtered template prediction is calculated by applying the current filter to the current template prediction.

10. The method of claim 9, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template further comprises: Obtaining coefficients of a first filter by minimizing a difference between a first template prediction and the current template; and The previously filtered template prediction is calculated by applying the first filter to the first template prediction.

11. The method of claim 9, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: obtaining a first filtered prediction block by applying a first filter to the first prediction block; obtaining a second filtered prediction block by applying a second filter to the second prediction block; and The filtered block is obtained by combining the first filtered prediction block with the second filtered prediction block.

12. The method of claim 9, wherein: The coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

13. The method of claim 9, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: In response to reaching an iteration number, obtaining a first filtered prediction block by applying a first filter to the first prediction block, and obtaining a second filtered prediction block by applying a second filter to the second prediction block; and The filtered block is obtained by combining the first filtered prediction block with the second filtered prediction block.

14. The method of claim 13, wherein: The number of iterations is preset or determined according to the difference between the previously filtered template prediction and the current template prediction.

15. A video decoding method, comprising: A decoder obtains a plurality of prediction blocks based on a current inter-frame coding block; Obtaining, by the decoder, a current template of the current inter-frame coding block; wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block; Obtaining, by the decoder, a plurality of template predictions of the current template respectively corresponding to the plurality of prediction blocks; Obtaining, by the decoder, a filter based on the multiple template predictions and the current template; and obtaining, by the decoder, a filtered block based on the one filter and a prediction block among the plurality of prediction blocks, Wherein, obtaining the one filter based on the multiple template predictions and the current template comprises: calculating a target template based on the current template and a previously filtered template prediction; Obtaining coefficients of a current filter by minimizing the difference between the current template prediction and the target template; and A current filtered template prediction is calculated by applying the current filter to the current template prediction.

16. The method of claim 15, wherein: Obtaining the one filter based on the multiple template predictions and the current template further comprises: Obtaining coefficients of a first filter by minimizing a difference between a first template prediction and the current template; and The previously filtered template prediction is calculated by applying the first filter to the first template prediction.

17. The method of claim 15, wherein: The coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

18. The method of claim 15, wherein: Obtaining the filtered block based on the one filter and one of the plurality of prediction blocks comprises: The filtered block is obtained based on the current filter and the one prediction block among the plurality of prediction blocks corresponding to the current template prediction.

19. The method of claim 15, wherein: Obtaining the filtered block based on the one filter and one of the plurality of prediction blocks comprises: In response to reaching the iteration number, the filtered block is obtained based on the current filter and the one prediction block among the plurality of prediction blocks corresponding to the current template prediction.

20. The method of claim 19, wherein: The number of iterations is preset or determined according to the difference between the previously filtered template prediction and the current template prediction.

21. A video encoding method, comprising: The encoder obtains a plurality of prediction blocks based on the current inter-frame coding block; Obtaining, by the encoder, a current template of the current inter-frame coding block, wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block; Obtaining, by the encoder, a plurality of template predictions of the current template respectively corresponding to the plurality of prediction blocks of the current inter-frame coding block; Obtaining, by the encoder, at least one filter based on the plurality of template predictions and the current template; and A filtered block is obtained by the encoder based on the at least one filter and the plurality of prediction blocks.

22. The method of claim 21, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template comprises: Obtaining a combined template prediction based on the plurality of template predictions; and The coefficients of a filter are obtained by minimizing the difference between the combined template prediction and the current template.

23. The method of claim 22, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: Obtaining a combined prediction block based on the plurality of prediction blocks; and A filtered block is obtained by applying the one filter to the combined prediction block.

24. The method of claim 22, wherein: The coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

25. The method of claim 21, wherein: Obtaining the multiple prediction blocks of the current inter-frame coding block includes: A first prediction block and a second prediction block are obtained.

26. The method of claim 25, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template comprises: obtaining first coefficients of a first filter by minimizing a difference between a first template prediction and the current template; and Second coefficients of the second filter are obtained by minimizing the difference between the second template prediction and the current template.

27. The method of claim 26, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: obtaining a first filtered prediction block by applying the first filter to the first prediction block; obtaining a second filtered prediction block by applying the second filter to the second prediction block; and The filtered block is obtained by combining the first filtered prediction block with the second filtered prediction block.

28. The method of claim 26, wherein: The first coefficient or the second coefficient includes at least one of a scaling factor, an offset, and at least one non-linear term.

29. The method of claim 25, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template comprises: calculating a target template based on the current template and a previously filtered template prediction; Obtaining coefficients of a current filter by minimizing the difference between the current template prediction and the target template; and A current filtered template prediction is calculated by applying the current filter to the current template prediction.

30. The method of claim 29, wherein: Obtaining the at least one filter based on the multiple template predictions and the current template further comprises: Obtaining coefficients of a first filter by minimizing a difference between a first template prediction and the current template; and The previously filtered template prediction is calculated by applying the first filter to the first template prediction.

31. The method of claim 29, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: obtaining a first filtered prediction block by applying a first filter to the first prediction block; obtaining a second filtered prediction block by applying a second filter to the second prediction block; and The filtered block is obtained by combining the first filtered prediction block with the second filtered prediction block.

32. The method of claim 29, wherein: The coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

33. The method of claim 29, wherein: Obtaining the filtered block based on the at least one filter and the plurality of prediction blocks comprises: In response to reaching an iteration number, obtaining a first filtered prediction block by applying a first filter to the first prediction block, and obtaining a second filtered prediction block by applying a second filter to the second prediction block; and The filtered block is obtained by combining the first filtered prediction block with the second filtered prediction block.

34. The method of claim 33, wherein: The number of iterations is preset or determined according to the difference between the previously filtered template prediction and the current template prediction.

35. A video encoding method, comprising: The encoder obtains a plurality of prediction blocks based on the current inter-frame coding block; Obtaining, by the encoder, a current template of the current inter-frame coding block; wherein the current template includes a plurality of reconstructed sample points adjacent to the current inter-frame coding block; Obtaining, by the encoder, a plurality of template predictions of the current template respectively corresponding to the plurality of prediction blocks; Obtaining, by the encoder, a filter based on the multiple template predictions and the current template; and obtaining, by the encoder, a filtered block based on the one filter and one of the plurality of prediction blocks, Wherein, obtaining the one filter based on the multiple template predictions and the current template comprises: calculating a target template based on the current template and a previously filtered template prediction; Obtaining coefficients of a current filter by minimizing the difference between the current template prediction and the target template; and A current filtered template prediction is calculated by applying the current filter to the current template prediction.

36. The method of claim 35, wherein: Obtaining the one filter based on the multiple template predictions and the current template further comprises: Obtaining coefficients of a first filter by minimizing a difference between a first template prediction and the current template; and The previously filtered template prediction is calculated by applying the first filter to the first template prediction.

37. The method of claim 35, wherein: The coefficients include at least one of a scaling factor, an offset, and at least one non-linear term.

38. The method of claim 35, wherein: Obtaining the filtered block based on the one filter and one of the plurality of prediction blocks comprises: The filtered block is obtained based on the current filter and the one prediction block among the plurality of prediction blocks corresponding to the current template prediction.

39. The method of claim 35, wherein: Obtaining the filtered block based on the one filter and one of the plurality of prediction blocks comprises: In response to reaching the iteration number, the filtered block is obtained based on the current filter and the one prediction block among the plurality of prediction blocks corresponding to the current template prediction.

40. The method of claim 39, wherein: The number of iterations is preset or determined according to the difference between the previously filtered template prediction and the current template prediction.

41. An apparatus comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein, when executing the instructions, the one or more processors are configured to perform the method as claimed in any one of claims 1 to 40.

42. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and perform the method of any one of claims 1 to 40 based on the bit stream.