Method and apparatus for adaptive motion compensation filtering
By determining the motion vectors of adjacent or non-adjacent neighboring blocks of inter-frame coding blocks in video encoding and decoding, and using filters to process the predicted blocks, the problem of insufficient encoding/decoding efficiency of inter-frame coding blocks in the existing technology is solved, and more efficient video data compression and quality preservation are achieved.
Patent Information
- Application Number
- CN202480008569.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-02-02
- Filing Date
- 2024-02-02
- Publication Date
- 2025-09-12
AI Technical Summary
Although existing video codec standards such as VVC provide significant improvements in coding and decoding efficiency, there is still room for improvement, especially in the coding/decoding efficiency of inter-frame coded blocks.
By determining the adjacent or non-adjacent neighboring blocks of the current inter-frame coding block, obtaining prediction samples based on the motion vectors of these blocks, using a filter to filter the current prediction block, and selecting an appropriate filter based on a candidate filter list to improve encoding/decoding efficiency.
The encoding/decoding efficiency of inter-frame coding blocks is improved, and the compression effect of video data is enhanced while maintaining or improving video quality.
Smart Images

Figure CN120642330A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on and claims priority from U.S. Provisional Application No. 63 / 443,044, filed on February 2, 2023, 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 coding techniques can be used to compress video data. Video coding is performed according to one or more video coding standards. For example, video coding 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 could significantly improve codec efficiency compared to VVC. In April 2021, a software code base called the 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, loop filter, etc.). In the future, any new codec tools 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 a first aspect of the present disclosure, a video decoding method for an inter-frame coding block is provided. In the method, a decoder may determine an adjacent or non-adjacent neighboring block of a current inter-frame coding block, wherein the adjacent or non-adjacent neighboring block includes a plurality of reconstructed samples that are adjacent or non-adjacent to the current inter-frame coding block; obtain prediction samples of the adjacent or non-adjacent neighboring block based on a motion vector of the adjacent or non-adjacent neighboring block; obtain a filter based on the prediction samples of the adjacent or non-adjacent neighboring block and the plurality of reconstructed samples; obtain a current prediction block based on the current inter-frame coding block and the motion vector of the current inter-frame coding block; and obtain a filtered prediction block as the prediction sample of the current inter-frame coding block by applying the filter to the current prediction block.
[0008] According to a second aspect of the present disclosure, a method for decoding a video of an inter-frame coded block is provided. In the method, a decoder may obtain a current filter based on a candidate filter list, wherein the candidate filter list includes at least one previous filter determined based on at least one previously encoded inter-frame coded block; and obtain a filtered prediction block by applying the current filter to a current prediction block of the current inter-frame coded block.
[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, an encoder may determine an adjacent or non-adjacent neighboring block of a current inter-frame coding block, wherein the adjacent or non-adjacent neighboring block includes a plurality of reconstructed samples that are adjacent or non-adjacent to the current inter-frame coding block; obtain prediction samples of the adjacent or non-adjacent neighboring block based on a motion vector of the adjacent or non-adjacent neighboring block; obtain a filter based on the prediction samples of the adjacent or non-adjacent neighboring block and the plurality of reconstructed samples; obtain a current prediction block based on the current inter-frame coding block and the motion vector of the current inter-frame coding block; and obtain a filtered prediction block as the prediction sample of the current inter-frame coding block by applying the filter to the current prediction block.
[0010] According to a fourth aspect of the present disclosure, a video encoding method for an inter-frame coded block is provided. In the method, an encoder may obtain a current filter based on a candidate filter list, wherein the candidate filter list includes at least one previous filter determined based on at least one previously encoded inter-frame coded block; and obtain a filtered prediction block by applying the current filter to a current prediction block of the current inter-frame coded block.
[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. Furthermore, when executing the instructions, the one or more processors are configured to perform the method according to the first aspect or the second aspect.
[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. Furthermore, when executing the instructions, the one or more processors are configured to perform the method according to the third aspect or the fourth aspect.
[0013] According to a seventh aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to the first aspect or the second aspect.
[0014] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to the third aspect or the fourth aspect.
[0015] According to a ninth 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 first aspect or the second aspect.
[0016] According to a tenth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided for storing a bit stream generated by the method according to the third aspect or the fourth aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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 using the accompanying drawings.
[0018] Figure 1A is a block diagram illustrating a system for encoding and decoding video blocks according to some examples of the present disclosure.
[0019] Figure 1B is a block diagram of an encoder according to some examples of the present disclosure.
[0020] Figures 1C to 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.
[0021] Figure 1G is a block diagram illustrating an exemplary video encoder according to some examples of the present disclosure.
[0022] Figure 2A is a block diagram of a decoder according to some examples of the present disclosure.
[0023] Figure 2B is a block diagram illustrating an exemplary video decoder according to some examples of the present disclosure.
[0024] Figure 3A is a simplified diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0025] Figure 3B is a simplified diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0026] Figure 3Cis a simplified diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0027] Figure 3D is a simplified diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0028] Figure 3E is a simplified diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.
[0029] 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.
[0030] 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.
[0031] FIG6 shows examples of two diamond filter shapes according to some examples of the present disclosure.
[0032] Figure 7 A subsampled 1-D Laplacian computation applied to gradient computation in all directions according to some examples of the present disclosure is shown.
[0033] Figure 8 is a simplified diagram illustrating local illumination compensation (LIC) for unidirectional prediction according to some examples of the present disclosure.
[0034] Figure 9A and Figure 9B is a simplified diagram illustrating the generation of LIC template prediction samples for an affine mode according to some examples of the present disclosure.
[0035] Figure 10 is a block diagram of video encoding with adaptive filtering for bidirectional prediction according to some examples of the present disclosure.
[0036] Figure 11 is a block diagram of video decoding with adaptive filtering for bidirectional prediction according to some examples of the present disclosure.
[0037] Figure 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.
[0038] Figure 13 is a simplified diagram illustrating adaptive motion compensated filtering of template-based unidirectional prediction samples according to some examples of the present disclosure.
[0039] Figure 14 is a simplified diagram illustrating an OBMC process for a CU encoded without sub-block motion compensation according to some examples of the present disclosure.
[0040] Figure 15 is a simplified diagram illustrating an OBMC process for a CU encoded in sub-block mode according to some examples of the present disclosure.
[0041] Figure 16 is a simplified diagram illustrating template-based OBMC according to some examples of the present disclosure.
[0042] Figure 17A and Figure 17B is a simplified diagram illustrating non-adjacent neighboring blocks of different sizes according to some examples of the present disclosure.
[0043] Figure 18 is a simplified diagram illustrating a computing environment coupled with a user interface according to some examples of the present disclosure.
[0044] Figure 19 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.
[0045] Figure 20 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.
[0046] Figure 21 is a flowchart illustrating a video encoding method according to some examples of the present disclosure.
[0047] Figure 22 is a flowchart illustrating a video encoding method according to some examples of the present disclosure. DETAILED DESCRIPTION
[0048] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to those skilled in the art that various alternatives may be employed. For example, it will be apparent to those skilled in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.
[0049] The terms used in this disclosure are used only for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms "a / an," "the," and "the" in this disclosure and the appended claims are also intended to include the plural forms, unless otherwise expressly 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.
[0050] Reference throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some examples," or similar language means that the particular feature, structure, or characteristic being described is included in at least one embodiment or example. Unless expressly stated otherwise, a feature, structure, element, or characteristic described in conjunction with one or some embodiments may also apply to the other embodiments.
[0051] Throughout this disclosure, the terms "first," "second," "third," etc. are used as nomenclature to refer only to related elements, such as devices, components, elements, steps, etc., and do not imply any spatial or temporal order unless otherwise expressly 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.
[0052] The terms "module," "sub-module," "circuit," "sub-circuit," "circuitry," "sub-circuitry," "unit," or "sub-unit" may include 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.
[0053] As used herein, the terms "if" or "when" may be understood to mean "at the time of" 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 steps of: i) when or if condition X exists, performing function or action X', and ii) when or if condition Y exists, performing 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.
[0054] The unit or module may be implemented in 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.
[0055] Figure 1A FIG. 1 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 1A As 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 a cloud server, a server computer, a desktop or laptop computer, a tablet computer, a smartphone, a set-top box, a digital television, a camera, a display device, a digital media player, a video game console, a video streaming device, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0056] In some embodiments, target device 14 can receive the encoded video data to be decoded via link 16. Link 16 can include any type of communication medium or device capable of moving the encoded video data from source device 12 to target device 14. In one example, link 16 can include a communication medium that enables source device 12 to send the encoded video data directly to target device 14 in real time. The encoded video data can be modulated according to a communication standard (e.g., a wireless communication protocol) and sent to target device 14. The communication medium can include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium can form part 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 can include a router, a switch, a base station, or any other device that can facilitate communication from source device 12 to target device 14.
[0057] In some other embodiments, the encoded video data can be sent from output interface 22 to storage device 32. The encoded video data in storage device 32 can then be accessed by target device 14 via input interface 28. Storage device 32 can include any of a variety of distributed or locally accessible data storage media, such as a hard drive, a Blu-ray Disc, a Digital Versatile Disk (DVD), a Compact Disc Read-Only Memory (CD-ROM), flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, storage device 32 can correspond to a file server or another intermediate storage device that can hold the encoded video data generated by source device 12. Target device 14 can access the stored video data from storage device 32 via streaming or downloading. A file server can be any type of computer capable of storing and sending encoded video data to 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 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 wireless 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 streaming and download transmission.
[0058] like Figure 1A As shown in , source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Video source 18 may include a source such as a video capture device (e.g., a video 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 the source video, or a combination of such sources. 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 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.
[0059] Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be sent directly to target device 14 via output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by target device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or a transmitter.
[0060] Target device 14 includes an input interface 28, a video decoder 30, and a 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 transmitted over a communication medium, stored on a storage medium, or stored on a file server.
[0061] In some embodiments, the target device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to the 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.
[0062] 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.
[0063] The video encoder 20 and the video decoder 30 can be implemented as any of a variety of suitable encoder and / or decoder circuits, respectively, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), 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 encoder or decoder can be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.
[0064] In some embodiments, at least some of the components of the source device 12 (e.g., the video source 18, the video encoder 20 or the components included in the video encoder 20 described below with reference to FIG. 2 , and the output interface 22) and / or at least some of the components of the target device 14 (e.g., the input interface 28, the video decoder 30 or the components included in the video decoder 30 described below with reference to FIG. 3 , and the display device 34) may be operated in a cloud computing service network such as Software as a Service (SaaS), Platform as a Service (PaaS), or Infrastructure as a Service (IaaS), where the cloud computing service network can provide software, platform, and / or infrastructure. In some embodiments, one or more components of the source device 12 and / or the target device 14 that are not included in the cloud computing service network may be provided in one or more client devices, and the one or more client devices may communicate with a server computer in the cloud computing service network via a wireless communication network (e.g., a cellular communication network, a short-range wireless communication network, or a global navigation satellite system (GNSS) communication network) or a wired communication network (e.g., a local area network (LAN) communication network or a power line communication (PLC) network). In an embodiment, at least a portion of the operations described herein may be implemented as a cloud-based service provided by one or more server computers, wherein the one or more server computers are implemented by at least a portion of the components of the source device 12 and / or at least a portion of the components of the target device 14 in the cloud computing service network; and one or more other operations described herein may be implemented by one or more client devices. In some embodiments, the cloud computing service network may be a private cloud, a public cloud, or a hybrid cloud. Terms such as "cloud," "cloud computing," and "cloud-based" may be used interchangeably herein as appropriate without departing from the scope of the present disclosure. It should be understood that the present disclosure is not limited to implementation in the aforementioned cloud computing service network. Rather, the present disclosure may also be implemented in any other type of computing environment currently known or developed in the future.
[0065] Like HEVC, VVC is built on a block-based hybrid video codec framework. Figure 1Bis 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 (called coding unit (CU)). The encoder 100 can 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 adapt to 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 into 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 the multi-type tree structure, a CTU is first partitioned according to the quadtree structure. Then, each quadtree leaf node can be further partitioned according to the binary tree structure and the ternary tree structure.
[0066] Figures 3A to 3E is a schematic diagram illustrating a multi-type tree partitioning mode according to some embodiments of the present disclosure. Figures 3A to 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 trifurcated partitions ( Figure 3E ).
[0067] For each given video block, spatial prediction and / or temporal prediction can be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples of already coded neighboring blocks in the same video picture / slice (called reference samples) 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.
[0068] After spatial prediction and / or temporal prediction, the intra / inter mode decision circuit 121 in the encoder 100 selects the optimal prediction mode, for example, based on a rate-distortion optimization method. The block prediction value 120 is then subtracted from the current video block; and the resulting prediction residual is decorrelated using the transform circuit 102 and the quantization circuit 104. The resulting quantized residual coefficients are dequantized by the dequantization circuit 116 and inversely transformed by the inverse transform circuit 118 to form a reconstructed residual, which is then added back to the predicted block to form a reconstructed signal for the CU. Furthermore, before the reconstructed CU is placed in the reference picture storage of the picture buffer 117 and used to encode future video blocks, loop filtering 115, such as a deblocking filter, sample adaptive offset (SAO), and / or an adaptive in-loop filter (ALF), may 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.
[0069] For example, a deblocking filter is available in the current version of VVC, as well as AVC and HEVC. In HEVC, an additional loop filter called SAO is defined to further improve codec efficiency. In the current version of the VVC standard, another loop filter called ALF is being actively studied and is likely to be included in the final standard.
[0070] These loop filter operations are optional. Performing these operations helps improve codec efficiency and visual quality. Encoder 100 can also decide to turn off these operations to save computational complexity.
[0071] 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.
[0072] Figure 2A is a block diagram illustrating a block-based video decoder 200 that can be used in conjunction with many video codec standards. Figure 1B The block-based video decoder 200 may be similar to the reconstruction-related part in the encoder 100. Figure 1AThe video decoder 30 is 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. The quantization coefficient levels are then processed by inverse quantization 204 and inverse transform 206 to obtain reconstructed prediction residuals. The block predictor 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 predictor mechanism using an adder 214.
[0073] The reconstructed block can further pass through the loop filter 209 and then be stored in the picture buffer 213 used as a reference picture storage. The reconstructed video in the picture buffer 213 can be sent to drive the display device and used to predict future video blocks. When the loop filter 209 is turned on, the filtering operation is performed on these reconstructed pixels, resulting in the final reconstructed video output 222.
[0074] Figure 1G is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described herein. 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, the term "frame" can be used as a synonym for the term "image" or "picture."
[0075] like Figure 1GAs shown in FIG, the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a 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 (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 block boundaries to remove blocking artifacts from the reconstructed video. In addition to the deblocking filter, another loop filter (e.g., a sample adaptive offset (SAO) filter, a cross component sample adaptive offset (CCSAO) filter, and / or an adaptive in-loop filter (ALF)) may be used to filter the output of the adder 62. It should be noted that with respect to the CCSAO technique, the present application is not limited to the embodiments described herein, but may also be applied to a case where an offset is selected for any other of the luma component, the Cb chroma component, and the Cr chroma component based on any of the luma component, the Cb chroma component, and the Cr chroma component to modify the other component based on the selected offset. Furthermore, it should be noted that the first component mentioned herein may be any one of the luma component, the Cb chroma component, and the Cr chroma component, the second component mentioned herein may be any other one of the luma component, the Cb chroma component, and the Cr chroma component, and the third component mentioned herein may be the remaining component among the luma component, the Cb chroma component, and the Cr chroma component. In some examples, the loop filter may be omitted, and the decoded video block may be provided directly by summer 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.
[0076] Video data memory 40 may store video data to be encoded by components of video encoder 20. Figure 1AThe video source 18 shown obtains video data from 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.
[0077] 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 slices, tiles (e.g., a set of video blocks), or other larger coding units (CUs) according to a predefined splitting structure associated with the video data, such as a quad-tree (QT) structure. A video frame is or can be considered as a two-dimensional array or matrix of 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 considered as a two-dimensional array or matrix of sample values, but its dimensions are smaller than the dimensions of the video frame. The number of samples in the horizontal and vertical directions (or axes) of the video block defines the size of the video block. The video block can be further partitioned into one or more block partitions or sub-blocks (which can 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 terms "block" or "video block" used herein can be a part of a frame or picture, in particular a rectangular (square or non-square) part. With reference to, for example, HEVC and VVC, a block or video block can be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or can 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.
[0078] The prediction processing unit 41 may select one of a plurality of possible 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 among 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.
[0079] 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.
[0080] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for the current video frame by generating motion vectors according to a predetermined pattern within a sequence of video frames, where the motion vectors indicate 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 motion vectors that estimate the motion of a video block. For example, a motion vector may indicate the displacement of a video block within the current video frame or picture relative to a prediction block within a reference frame associated with the current block being encoded within the current frame. The predetermined pattern may designate the video frames in the sequence as P-frames or B-frames. Intra BC unit 48 may determine vectors (e.g., block vectors) for intra BC coding in a manner similar to the motion vectors determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine the block vectors.
[0081] In terms of pixel differences, the prediction block for a 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 differences may be determined by the sum of absolute differences (SAD), 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. Thus, the motion estimation unit 42 may perform motion searches relative to full pixel positions and fractional pixel positions and output motion vectors with fractional pixel accuracy.
[0082] 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 either 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.
[0083] Motion compensation performed by motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by motion estimation unit 42. After receiving the motion vector for the current video block, 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 DPB 64, and forward the prediction block to adder 50. Adder 50 then forms a residual video block of pixel difference values by subtracting the pixel values of the prediction block provided by 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 luma component differences, chroma component differences, or both. Motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by 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 the prediction block, any flags indicating a prediction mode, or any other syntax information described herein. It should be noted that motion estimation unit 42 and motion compensation unit 44 may be highly integrated but are described separately for conceptual purposes.
[0084] 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 using rate-distortion analysis. Next, the intra BC unit 48 may select an appropriate intra prediction mode to use from 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 the intra prediction mode with the best rate-distortion characteristics among the tested modes as the appropriate intra prediction mode to use. Rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original, uncoded block that was coded 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 various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.
[0085] 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.
[0086] 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, video encoder 20 can form pixel difference values by subtracting the pixel values of the prediction block from the pixel values of the current video block being encoded, thereby forming a residual video block. The pixel difference values forming the residual video block may include both luma component differences and chroma component differences.
[0087] As an alternative to the inter-frame prediction performed by motion estimation unit 42 and motion compensation unit 44 or the intra-frame block copy prediction performed by intra BC unit 48 as described above, intra-frame prediction processing unit 46 can perform intra-frame prediction on the current video block. Specifically, intra-frame prediction processing unit 46 can determine an intra-frame prediction mode to use for encoding the current block. To do so, 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 intra-frame prediction processing unit 46 (or in some examples, mode selection unit) can select an appropriate intra-frame prediction mode to use from the tested intra-frame prediction modes. Intra-frame prediction processing unit 46 can provide information indicating the intra-frame prediction mode selected for the block to entropy coding unit 56. Entropy coding unit 56 can encode the information indicating the selected intra-frame prediction mode into the bitstream.
[0088] After prediction processing unit 41 determines a prediction block for the current video block via inter-frame prediction or intra-frame prediction, 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 transform processing unit 52. 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).
[0089] 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 comprising the quantized transform coefficients. Alternatively, entropy coding unit 56 may perform the scan.
[0090] 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 may then be sent to a video bitstream such as Figure 1A The video decoder 30 shown, or archived as Figure 1A The video frame is shown in storage device 32 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.
[0091] 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 a reference block 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.
[0092] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced by motion compensation unit 44 to produce a reference block for storage in DPB 64. The reference block may then be used by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 as a prediction block to inter-predict another video block in a subsequent video frame.
[0093] Figure 2B 3 is a block diagram illustrating an 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 operations described above in conjunction with the above. Figure 1GThe encoding process is essentially 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.
[0094] In some examples, units of the video decoder 30 may be tasked with performing embodiments of the present application. Furthermore, in some examples, embodiments of the present disclosure may be dispersed across 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 functionality 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).
[0095] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the 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) that stores encoded video data from the encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use by the video decoder 30 (e.g., in intra-frame or inter-frame prediction coding mode) when decoding the video data. The video data memory 79 and the DPB 92 may be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 2B 92 as two distinct components of video decoder 30. However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or by separate memory devices. In some examples, video data memory 79 may be on-chip with the other components of video decoder 30, or off-chip relative to those components.
[0096] 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.
[0097] When a video frame is encoded as an intra-frame prediction coded (I) frame or for intra-frame coded prediction blocks in other types of frames, intra-frame prediction unit 84 of prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the intra-frame prediction mode transmitted by the signal and reference data from a previously decoded block of the current frame.
[0098] When the video frame is encoded as an inter-frame prediction coded (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 use a default construction technique to construct the reference frame lists, i.e., List 0 and List 1, based on the reference frames stored in the DPB 92.
[0099] 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.
[0100] 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 vectors and other syntax elements, and then uses 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 the prediction mode (e.g., intra prediction or inter prediction) used to encode the video block of the video frame, the inter-prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, the motion vector for each inter-prediction-encoded video block of the frame, the inter-prediction state for each inter-prediction-encoded video block of the frame, and other information used to decode the video block in the current video frame.
[0101] 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 video blocks in the current video frame.
[0102] Motion compensation unit 82 may also perform interpolation to calculate interpolated values for sub-integer pixels of a reference block using interpolation filters, such as those used by video encoder 20 during encoding of the video block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from received syntax elements and use these interpolation filters to produce the prediction block.
[0103] 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 that were 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.
[0104] 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, a CCSAO 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 block in a given frame is 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 the display device 34).
[0105] 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.
[0106] In a typical video encoding and decoding process, a video sequence typically consists of 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 consist of only a two-dimensional array of luma samples.
[0107] like Figure 1C As shown in , the video encoder 20 (or more specifically, the partitioning unit 45 in the prediction processing unit of the video encoder 20) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs ordered consecutively from left to right and from top to bottom in 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. However, it should be noted 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 the samples of the coding tree blocks. The syntax elements describe the properties of different types of units of 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 the samples of the coding tree block. The coding tree block may be an N×N block of samples.
[0108] 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 FIG, a 64×64 CTU 400 is first divided into four smaller CUs, each having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four CUs with a block size of 16×16. Two 16×16 CUs 430 and CU 440 are each 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 is the final result of the partitioning process of the CTU 400 depicted in FIG. 4 , with each leaf node of the quadtree corresponding to a CU of a corresponding size ranging from 32×32 to 8×8. Figure 1D 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 Figures 1E to 1F The 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 the multi-type tree structure, one CTU is partitioned according to the quadtree structure, and each quadtree leaf CU can be further partitioned according to the binary and ternary tree structures. Figures 3A to 3E As shown, there are five possible partition 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.
[0109] 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) block of samples 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.
[0110] 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.
[0111] After the video encoder 20 generates the predicted luma block, the predicted Cb block, and the 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, such 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, such 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.
[0112] In addition, if Figure 1E As shown in , the video encoder 20 can use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of a 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) block of samples to which the same transform is applied. A TU of a 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 a 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 a 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.
[0113] Video encoder 20 may apply one or more transforms to the luma transform block of a TU to generate a luma coefficient block for the TU. A coefficient block may be a two-dimensional array of transform coefficients. A transform coefficient may be a scalar. Video encoder 20 may apply one or more transforms to the Cb transform block of a TU to generate a Cb coefficient block for the TU. Video encoder 20 may apply one or more transforms to the Cr transform block of a TU to generate a Cr coefficient block for the TU.
[0114] 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 the process by 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 comprising a sequence of bits forming a representation of the encoded frame and associated data, which is stored in the storage device 32 or sent to the target device 14.
[0115] 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 a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally the inverse of the encoding process performed by the video encoder 20. For example, the video decoder 30 can perform an inverse transform on the coefficient blocks associated with the TUs of the current CU to reconstruct the residual blocks associated with the TUs of the current CU. The video decoder 30 also reconstructs the coding blocks of the current CU by adding samples of the prediction blocks for the PUs of the current CU to corresponding samples of the transform blocks of the TUs of the current CU. After reconstructing the coding blocks for each CU of the frame, the video decoder 30 can reconstruct the frame.
[0116] As mentioned above, video coding mainly uses two modes: intra-frame prediction (or intra prediction) and inter-frame prediction (or inter 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 it uses motion vectors to predict the current video block based on the reference video block.
[0117] However, with ever-improving video data capture technologies and finer video block sizes for preserving details in 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 do a group of neighboring CUs in both the spatial and temporal domains have similar video data for prediction purposes, but the motion vectors between these neighboring CUs are also 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 exploiting their spatial and temporal correlations.
[0118] 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, it is not necessary to encode the motion vector determined by the motion estimation unit for each CU of the frame into the video bitstream, and the amount of data used to represent motion information in the video bitstream can be significantly reduced.
[0119] 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 spatially neighboring CUs and / or temporally co-located CUs of the current CU, and then selecting one member from the motion vector candidate list as the motion vector predictor 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 predictor within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor within the motion vector candidate list to encode and decode the current CU.
[0120] Some embodiments of the present disclosure aim to further improve inter-frame coding and decoding efficiency by applying an adaptive enhancement filter to the motion compensation prediction signal of a bidirectional prediction block. Some embodiments of the present disclosure also aim to further improve the chroma coding and decoding efficiency of the motion compensation module used in ECM. The following briefly reviews some relevant coding and decoding tools used in the transform and entropy coding processes in ECM. Subsequently, some shortcomings of existing motion compensation designs are discussed. Finally, solutions to improve existing designs are proposed.
[0121] Motion compensated prediction (MCP)
[0122] Motion compensated prediction (MCP) (also known 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 PU is associated with a set of motion parameters consisting of one or two MVs and a reference picture index. Inter 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 prediction samples are generated based on the corresponding area 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 Shown where d x and d y is an example of the horizontal and vertical values of an MV. In practice, the value of an MV may have decimal precision. When an MV has a decimal value, an interpolation filter is applied to generate the corresponding prediction samples at the decimal sample position, such as Figure 5 As shown in Figure 2, VVC supports MVs whose units are 1 / 16 of the distance between two adjacent luma samples of luma MC, and MVs whose units are 1 / 32 of the distance between two adjacent chroma samples of chroma MC.
[0123] Adaptive loop filtering
[0124] 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.
[0125] Filter shape: Two diamond filter shapes are used (such as Figures 6A to 6B ). The 7×7 diamond is used for the luma component and the 5×5 diamond is used for the chroma components.
[0126] 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:
[0127]
[0128] To calculate D and First, use the 1-D Laplacian operator to calculate the gradient in the horizontal, vertical, and two diagonal directions:
[0129]
[0130]
[0131] Where index 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.
[0132] Then, the maximum and minimum values of D for the gradient in the horizontal and vertical directions are set to:
[0133]
[0134] The maximum and minimum values of the gradients in the two diagonal directions are set to:
[0135]
[0136] To derive the value of the directionality D, these values are compared with each other and with two thresholds t1 and t2:
[0137] Step 1. If and is true, D is set to 0.
[0138] Step 2. If Then continue from step 3; otherwise, continue from step 4.
[0139] Step 3. If Then D is set to 2; otherwise, D is set to 1.
[0140] Step 4. If Then D is set to 4; otherwise, D is set to 3.
[0141] The activity value A is calculated as:
[0142]
[0143] 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.
[0144] Geometric transformation of filter coefficients and cutoff values
[0145] 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 with the ALF applied.
[0146] Three geometric transformations are provided, including diagonal, vertical flip, and rotation:
[0147]
[0148] 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 top left corner and position (K-1,K-1) is at the bottom right corner. These transforms are applied to the filter coefficients f(k,l) and the clipped values c(k,l) depending on the gradient values calculated for that block. The relationship between the transforms and the four gradients in these four directions is summarized in Table 1 below.
[0149] 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
[0150] Table 1
[0151] Filtering process
[0152] 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.
[0153]
[0154] 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 represents the filter length. Clip3(-y, y, x) is a clipping function that clips the input value x to the range [-y, y]. Clipping introduces nonlinearity, making the ALF more efficient by reducing the influence of neighboring sample values that differ significantly from the current sample value.
[0155] Local illumination compensation
[0156] Local illumination compensation (LIC) is a codec tool developed during the development of VVC that aims to address local illumination variations in temporally adjacent images. 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 using the following equation:
[0157] P(x,y)=ɑ·P r (x+v x ,y+v y )+β (8)
[0158] Among them, P(x,y) is the prediction signal of the current block at coordinate (x,y); P r (x+v x ,y+v y ) is based on the motion vector (v x ,v t ) generates the prediction block; α and β are the corresponding scaling factors and offsets. Figure 8 The diagram shows the LIC process. Figure 8 As shown, when LIC is applied to a video block, the neighboring samples of the current block (i.e., Figure 8 The template in ) and its corresponding predicted sample point (ie, Figure 8 A linear model (i.e., scaling factor α and offset β) is derived by minimizing the difference between the template predictions in .
[0159] Because the scaling factor and offset are derived based on the current block and template and their corresponding prediction signals, the overhead of signaling LIC parameters is eliminated. Furthermore, for non-merging inter blocks, a LIC flag is signaled to indicate whether LIC mode is enabled for the block. For merged inter blocks, the LIC flag is considered part of the motion information. Specifically, when constructing the merge list, the LIC flag inherits the flags of its corresponding neighboring blocks in addition to the MV and reference index. The LIC mode also applies to affine inter blocks. When applying affine mode, an inter block is divided into multiple subblocks, and a specific MV is derived for each subblock based on an 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 subblocks at the top and left boundaries of the block. The derived LIC model is then applied to the prediction samples for the entire block, as shown in Figure 9. Since the MVs of the boundary subblocks may differ, the prediction signal for the template is also generated on a subblock basis, and the prediction samples for each template subblock are generated using the MV of the corresponding subblock at the coding block boundary.
[0160] Finally, it is mentioned that in the current LIC design, LIC is only applicable to unidirectionally predicted inter-frame blocks.
[0161] Bidirectional prediction with CU-level weights
[0162] 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.
[0163] P bi-pred =((8-w)*P0+w*P1+4)>>3 (9)
[0164] 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 two ways: 1) For non-merged CUs, the weight index is signaled; 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., all reference pictures are displayed before the current picture), all five weights are used. For non-low-latency pictures (where at least one reference is displayed after the current picture), only three weights (w∈{3, 4, 5}) are used.
[0165] Overlapped Block Motion Compensation
[0166] OBMC is a coding technique that removes blocking artifacts during the MC phase. The basic idea of OBMC is to perform motion compensation on the current block using the MVs from neighboring blocks and combine multiple prediction signals using neighboring MVs to generate the final prediction signal for the CU. For each inter-frame CU, OBMC is performed on the top and left boundaries of the block. In addition, when a video block is encoded in a sub-block mode (e.g., affine, ATMVP, or DMVR), OBMC is also performed on all internal boundaries of each sub-block (i.e., top, left, bottom, and right boundaries). Figure 15 The diagram shows the OBMC process applied to a CU without sub-block level motion compensation. Figure 15 When considering the sub-block A in the example, in addition to the left and top neighboring sub-blocks of a sub-block, the MVs of the neighboring sub-blocks to the right and bottom of the current sub-block are also used to derive the prediction signal; these four prediction blocks are then averaged to generate the final prediction signal for the current sub-block.
[0167] In current ECM software, a template-based OBMC scheme is used. Specifically, rather than combining multiple motion compensation hypotheses using fixed weights, the prediction values for CU boundary samples are derived based on template matching costs, either using only the current block's motion information or also using motion information from neighboring blocks and adopting one of two hybrid modes.
[0168] In this scheme, for each 4×4 block on the top CU boundary, the template size is equal to 4×1. If N adjacent blocks have the same motion information, the template size is expanded to 4N×1 because the MC operations can be processed simultaneously. For each 4×4 left block at the left CU boundary, the left template size is equal to 1×4 or 1×4N (e.g. Figure 16 shown).
[0169] For each 4×4 top block (or N 4×4 block groups), the prediction values of the boundary samples are obtained according to the following steps.
[0170] Take the current block A and its upper neighbor block as an example. The operation on the left block is performed in the same way.
[0171] First, based on the following three types of motion information, three template matching costs (Cost1, Cost2, Cost3) are measured by the SAD between the template reconstructed samples obtained by the MC process and their corresponding reference samples:
[0172] Cost1 is calculated based on A's motion information.
[0173] Cost2 is calculated based on the motion information of AboveNeighbor_A.
[0174] Cost3 is calculated based on the weighted prediction of the motion information of A and AboveNeighbor_A, where the weighting factors are 3 / 4 and 1 / 4 respectively.
[0175] Second, a method is selected to calculate the final prediction results of the boundary samples by comparing Cost1, Cost2 and Cost3.
[0176] The original MC result using the motion information of the current block is denoted as Pixel1, and the MC result using the motion information of the neighboring blocks is denoted as Pixel2. The final prediction result is denoted as NewPixel.
[0177] If Cost1 is the smallest, then NewPixel(i,j)=Pixel1(i,j).
[0178] If (Cost2+(Cost2>>2)+(Cost2>>3))<=Cost1, then blending mode 1 is used.
[0179] For luma blocks, the number of mixed pixel rows is 4.
[0180] NewPixel(i,0)=(26×Pixel1(i,0)+6×Pixel2(i,0)+16)>>5
[0181] NewPixel(i,1)=(7×Pixel1(i,1)+Pixel2(i,1)+4)>>3
[0182] NewPixel(i,2)=(15×Pixel1(i,2)+Pixel2(i,2)+8)>>4
[0183] NewPixel(i,3)=(31×Pixel1(i,3)+Pixel2(i,3)+16)>>5
[0184] For chroma blocks, the number of mixed pixel rows is 1.
[0185] NewPixel(i,0)=(26×Pixel1(i,0)+6×Pixel2(i,0)+16)>>5
[0186] If Cost1<=Cost2, then blending mode 2 is used.
[0187] For luma blocks, the number of mixed pixel rows is 2.
[0188] NewPixel(i,0)=(15×Pixel1(i,0)+Pixel2(i,0)+8)>>4
[0189] NewPixel(i,1)=(31×Pixel1(i,1)+Pixel2(i,1)+16)>>5
[0190] For chroma blocks, the number of mixed pixel rows / columns is 1.
[0191] NewPixel(i,0)=(15×Pixel1(i,0)+Pixel2(i,0)+8)>>4
[0192] Otherwise, use blend mode 3.
[0193] For luma blocks, the number of mixed pixel rows is 4.
[0194] NewPixel(i,1)=(7×Pixel1(i,1)+Pixel2(i,1)+4)>>3
[0195] NewPixel(i,2)=(15×Pixel1(i,2)+Pixel2(i,2)+8)>>4
[0196] NewPixel(i,3)=(31×Pixel1(i,3)+Pixel2(i,3)+16)>>5
[0197] For chroma blocks, the number of mixed pixel rows is 1.
[0198] NewPixel(i,0)=(7×Pixel1(i,0)+Pixel2(i,0)+4)>>3
[0199] In all existing video codec standards, MCP plays a key role in ensuring inter-frame coding efficiency. Through MCP, the video signal to be encoded can be predicted based on the temporal neighboring signal, and only the prediction error, MV and reference picture index are transmitted. As analyzed above, 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:
[0200] Video signals can be encoded using coarse quantization (i.e., high quantization parameter (QP) values). When coarse quantization is applied, the reconstructed picture may contain severe coding and decoding artifacts, such as blocking artifacts and ringing artifacts. Given that the reconstructed signal of the current picture will be used as a reference for temporal prediction, this distortion may reduce the effectiveness of MCP, thereby reducing the inter-frame coding and decoding efficiency of subsequent pictures.
[0201] While LIC can effectively compensate for illumination variations between images, it can only be applied to unidirectional prediction blocks. It is well known that combining multiple prediction blocks can effectively suppress the codec noise present in the motion-compensated signal (which is caused by the quantization / dequantization process). Therefore, bidirectional prediction is generally more efficient than unidirectional prediction, meaning that the number of bidirectional prediction blocks is greater than that of unidirectional prediction blocks. This means that unidirectional LIC cannot fully exploit the codec gains that could be achieved with LIC tools.
[0202] According to the existing OBMC design in ECM, OBMC is always disabled for inter CUs coded with LIC. This design is suboptimal in terms of codec efficiency, as blocking artifacts can still occur between inter blocks coded and decoded with LIC and those not coded. Furthermore, even when LIC is applied to two adjacent blocks, potential blocking artifacts may still exist at the block boundary between the two blocks, as the LIC parameters applied to the two blocks may be different.
[0203] This disclosure proposes methods and devices for improving the efficiency of motion compensation, thereby enhancing the quality of temporal prediction. Specifically, adaptive filtering is applied to the prediction samples of bidirectionally predicted blocks. To reduce signaling overhead, filter coefficients are derived from the neighboring reconstructed samples (i.e., templates) of the current block and their corresponding prediction samples. This approach mitigates the energy of the prediction residual, thereby reducing the overhead of residual signal transmission.
[0204] Figure 10 Error! Reference source not found. A block diagram of a video encoder applying the proposed adaptive bidirectional prediction filter is presented. 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 a reference picture using the optimal MV. Then, for bidirectionally predicted blocks, the motion-compensated samples (luminance and chrominance) are fed into the proposed adaptive filter to generate filtered, motion-compensated prediction samples for the current block. The original signal is then subtracted from the prediction signal to remove temporal redundancy and produce a 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 through inverse quantization and inverse transformation. The reconstructed residual is then added to the motion-compensated prediction. Furthermore, loop filtering processes (such as deblocking, ALF, and SAO) are applied to the reconstructed video signal for output. As will be discussed later, the filter coefficients of the proposed adaptive bidirectional prediction filter are derived directly from the neighboring reconstructed luminance and chrominance samples at the decoder. In addition, to maximize the coding gain of the proposed method, additional syntax can be signaled at a given block level (e.g., CTU, CU, or PU level) to indicate whether the proposed filtering is applied to the current block for motion compensation.
[0205] Figure 11 shows a block diagram of the proposed decoder, which receives Figure 10The encoder in the video codec generates a bitstream. 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 bidirectionally predicted 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 will be further processed by the proposed adaptive filtering; otherwise, the motion compensated chrominance signals will not be filtered. The motion compensated signal (filtered or unfiltered) and the reconstructed residual are then added to obtain the reconstructed video. The reconstructed video may also need to be loop filtered before being stored in the reference picture store for display and / or for decoding future video signals.
[0206] Adaptive bidirectional prediction filtering based on template bidirectional prediction samples
[0207] In this section, we propose an adaptive filtering scheme for bidirectional prediction, in which the filter coefficients are derived based on the bidirectional prediction samples of a template of a bidirectionally predicted block. Specifically, in the proposed scheme, bidirectional prediction samples of the template are first generated according to the motion vector of the current block; then, the least squares mean error (LMSE) algorithm is applied to derive the filter parameters by minimizing the difference between the template prediction samples and the template samples. Figure 12 The figure shows the proposed adaptive filtering method based on template bidirectional prediction samples. Figure 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, i.e.,
[0208] T bi =w0*T0+w1*T1 (10)
[0209] Where 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, while 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 coefficient value of the adaptive filter by minimizing the difference between the template samples and their bidirectional prediction samples, that is,
[0210]
[0211] Among them, f* Indicates the prediction point 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 make the template prediction samples closer to the template samples, but at the cost of increased computational complexity. Finally, the resulting filter coefficients are applied to modify the original bidirectional prediction signal of the current block, as shown below
[0212]
[0213] Among them, P bi (x,y) and P′ bi (x,y) are the bidirectional prediction samples before and after the proposed adaptive filtering is applied. 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
[0214]
[0215] And, the filter in (12) is applied as
[0216]
[0217] 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 of (2x, 2y) (i.e., k = 2, ..., K-1).
[0218] 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
[0219]
[0220] Where α and β are the scaling factors and offsets 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
[0221] P′ bi (x,y)=α·Pbi (x,y)+β (16)
[0222] Adaptive bidirectional prediction filtering based on template unidirectional samples
[0223] In this section, an adaptive bidirectional prediction filtering scheme is proposed for unidirectional prediction samples of a template of 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. Figure 13 The figure shows the proposed solution. Figure 13 As shown, based on the L0 and L1 MVs, 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:
[0224]
[0225] Where 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
[0226] P′ bi (x,y)=w0*P′0(x,y)+w1*P′1(x,y) (18)
[0227] in,
[0228]
[0229] Where P0(x,y) and P1(x,y) are the 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
[0230]
[0231] And, the filtered unidirectional prediction samples of the current block are calculated as
[0232]
[0233] In one or more examples, a two-tap filter is proposed to enhance the two unidirectional predictions of a bidirectionally predicted block using a linear model (i.e., scaling factors and offsets). 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:
[0234]
[0235] 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
[0236] P′ bi (x,y)=w0*(α0·P0(x,y)+β0)+w1*(α1·P0(x,y)+β1) (23)
[0237] where w0 and w1 are the BCW weights applied to the current block.
[0238] Adaptive bidirectional predictive filtering based on recursive unidirectional filtering
[0239] exist Figure 13 In [1], 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. 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, alternately optimizing the prediction filter of one prediction direction while keeping the prediction filter of the other prediction direction fixed. Specifically, the derivation process of the two unidirectional prediction filter coefficients is summarized as follows:
[0240] 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 of the starting prediction direction Right now,
[0241]
[0242] Step 2: Based on filter coefficients Compute filtered one-way prediction And set k=1.
[0243]
[0244] 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
[0245]
[0246] Step 4: By making a one-way prediction With template T (k) The distortion between them is minimized to get the starting prediction direction L (k) The filter coefficients Right now,
[0247]
[0248] Step 5: Based on filter coefficients Compute filtered one-way prediction As shown below
[0249]
[0250] Step 6: Set k=k+1 and go to step 3.
[0251] The resulting filters are used as corresponding filters for the two unidirectional predictions of the current block, and the filtered prediction samples are then 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).
[0252] In practice, different numbers of iterations can be applied to the above-described iterative filter derivation scheme. Generally speaking, a higher number of iterations results in lower distortion between the template and its predicted signal (i.e., better codec gain), but this comes at the expense of increased computational complexity. Different approaches are proposed below to determine the number of iterations applied in the proposed algorithm. In one approach, a fixed number of iterations (i.e., three) is used at both the encoder and decoder. In a second approach, the encoder is given the freedom to select a specific number of iterations and signal the corresponding value to the decoder. When applying this approach, new syntax elements can be added at the sequence parameter set (SPS), picture parameter set (PPS), picture header, slice header, or even the coding block level to indicate the applied iteration value. In a third approach, the iteration value applied to a block is adaptively determined based on block statistics (e.g., sample variance, motion vector difference, and additional information). In one or more examples, the difference between the original L0 and L1 prediction samples of a bidirectionally predicted block is used as a criterion for selecting the applied iteration number. For example, when the difference between two prediction samples (i.e., sum of absolute difference (SAD), sum of squared difference (SSD), and other matrices) is greater than a threshold, a larger 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.
[0253] Last but not least, different initial prediction directions can be applied in the proposed scheme. In one approach, L0 is always used as the initial prediction direction in the proposed method. Another approach proposes using L1 as the initial prediction direction. A third approach proposes selecting 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.
[0254] Adaptive motion compensation filtering based on non-adjacent spatial neighboring blocks
[0255] In some embodiments, blocks surrounding the current block are defined as neighboring blocks of the current block. Figure 17A and Figure 17BAs shown, the unshaded adjacent blocks are adjacent adjacent blocks, while the shaded adjacent blocks are non-adjacent adjacent blocks. In the above method, the coefficients of the proposed motion compensation filter are always derived from reconstructed samples adjacent to the current coding block (i.e., the adjacent samples immediately to the top and left). This scheme may be efficient when the current block is highly correlated with its spatially adjacent blocks. However, in actual coding scenarios, due to the presence of coding noise (e.g., noise caused by quantization / inverse quantization and blocking artifacts introduced during the motion compensation stage), the current block may be more correlated with samples in reconstructed areas not adjacent to the current block. Based on this consideration, this section proposes an adaptive motion compensation filtering scheme based on non-adjacent adjacent blocks. Using this scheme, the coefficients of the adaptive motion compensation filter can be derived from samples in non-adjacent areas. Various methods can be applied to locate the non-adjacent reconstructed samples used to derive the filter coefficients. In one or more embodiments, non-adjacent adjacent blocks can be scanned from the left and top areas of the current block. The scanning distance can be defined as the number of at least one scanning block size from the left or top of the current block.
[0256] As shown in Figure 17, multiple rows (or columns) of non-adjacent neighboring blocks can be scanned at the top or left of the current block. The distances shown in Figure 17 represent the number of at least one scan block size from each candidate location to the current block, with each scan block size representing one distance unit. For example, a region with "Distance 2" to the left of the current block indicates that the candidate neighboring blocks located in that region are 2 scan block sizes away from the current block. Based on this pattern, different scan block sizes can be applied.
[0257] In one method, such as Figure 17A As shown in , the non-adjacent neighboring blocks at each distance can have the same block size as the current block. Note that when this method is applied, the granularity of block scanning is adaptively adjusted according to the partition granularity of the current block, that is, larger coding blocks have more opportunities to use farther non-adjacent reconstruction samples to calculate the coefficients of the adaptive filter.
[0258] In another approach, non-adjacent neighboring blocks that can be used for filter coefficient derivation can be defined based on fixed blocks (eg, 4×4, 8×8).
[0259] In the third approach, a combined approach can be applied to define the scan pattern. For example, for small blocks, a fixed scan block size (Ws × Hs) can be applied, where Ws and Hs are the width and height of the fixed scan block size; while for large blocks, the scan block size is defined as the current block size. Specifically, let xStep and yStep represent the width and height of the scan block size, and their corresponding values are xStep = max(Ws, width) and yStep = max(Hs, height), where width and height are the width and height of the current block, respectively.
[0260] To indicate the use of non-adjacent neighboring blocks for filter derivation, a spatial candidate list may be formed to include adjacent neighboring blocks (i.e., spatially adjacent reconstruction samples immediately above and to the left) and non-adjacent neighboring blocks. In some embodiments, an index may be signaled from the encoder to the decoder to specify which spatial candidate to select for filter coefficient derivation.
[0261] Additionally or alternatively, in some examples, it is proposed to apply the proposed non-adjacent spatially neighboring blocks to an existing LIC design, where the proposed adaptive motion compensation filtering degenerates into a 2-tap filter (i.e., one scale and one offset). Specifically, based on the motion information of the current block (unidirectional prediction or bidirectional prediction), the method uses the motion information to generate corresponding prediction signals for the selected non-adjacent blocks, which are then used to derive corresponding LIC parameters by minimizing the difference between the reconstructed samples of the non-adjacent blocks and their corresponding predictions.
[0262] Adaptive motion compensation filtering based on historical filter coefficients
[0263] In the aforementioned scheme based on non-adjacent neighboring blocks, filter coefficients are derived from reconstructed areas far from the current block, requiring additional on-chip memory to store these non-adjacent reconstructed samples. This is relatively costly for practical hardware codec implementations. Therefore, to reduce implementation costs, a history-based adaptive motion compensation filtering method is proposed. In this method, the filter coefficients of a previously encoded block are stored in a table and can be used to filter motion compensated samples in future blocks. In some embodiments, this table can be a candidate filter list. The table with multiple sets of filter coefficients can be maintained and synchronized during the encoding and decoding processes. Whenever an inter-frame block is encoded, a set of filter coefficients is derived based on its reconstructed samples and its predicted samples. This set of filter coefficients is then added as a new candidate to the last entry in the table. To maintain table size, a first-in-first-out (FIFO) rule can be used, in which a redundancy check is applied to check whether a candidate identical to the new candidate exists in the table. If so, the identical candidate is removed from the table, all other candidates are shifted forward, and the new candidate is added as the last entry. When the table is full and there are no identical candidates in the table, the first candidate is deleted from the table and a new candidate is added at the last position. A candidate set of filter coefficients can then be selected for filtering motion compensated samples of future coding blocks. For signaling, when history-based filter coefficient derivation is selected, an index can be signaled to indicate which candidate set in the table will be used to derive the filter coefficients for the current block. In another embodiment, to reduce the number of filter coefficient derivations, it is proposed to include in the table only the filter coefficients for coding blocks for which adaptive motion compensation filtering was selected.
[0264] Additionally or alternatively, in some examples, it is proposed to apply the proposed history-based filter derivation scheme to an existing LIC design, where the proposed adaptive motion compensation filter degenerates into a 2-tap filter. Specifically, in this case, each candidate in the table consists of two parameters, namely, a scale and an offset, which can be selected by an inter-frame coded block to adjust its prediction samples.
[0265] Combination of adaptive motion compensation filtering and OBMC
[0266] In this section, we provide methods for applying the proposed adaptive motion compensation filtering method to the OBMC process. Specifically, in some example methods, in addition to the motion vectors of the neighboring blocks, it is proposed to consider the influence of the LIC parameters of each neighboring block on its corresponding motion compensation prediction samples when performing the OBMC process on the current block. For ease of description, the following example uses conventional inter-frame prediction without sub-block partitioning to illustrate the proposed method. For example, let P obmc(x, y) represents the mixed prediction sample at coordinate (x, y) after combining the prediction signal of the current CU with multiple prediction signals based on the MVs of its spatially neighboring blocks. cur (x, y) represents the predicted sample point at the coordinate (x, y) of the current CU; P top (x,y) and P left (x, y) represents the predicted sample point located at the same position of the current CU but using the MV of the CU's left neighboring block and right neighboring block respectively. In some embodiments, as shown in equation (29), P obmc (x,y) can be P cur (x,y),P top (x,y) and P left Weighted average of (x,y).
[0267] P obmc (x,y)=w cur *P cur (x,y)+w top *P top (x,y)+w left *P left (x,y) (29)
[0268] In addition, for the sake of convenience, it is assumed that adaptive motion compensation filtering is applied to the current block and its top and left spatial neighboring blocks, and the applied filter is a tap filter (i.e., a scaling factor and offset), and the filter coefficients are: the current block is α cur and β cur , the top neighboring block is α top and β top , and the left neighboring block is α left and β left The proposed scheme first generates the prediction samples of the current block as follows
[0269] P cur (x,y)=α cur ·P org cur (x,y)+β cur (30)
[0270] Among them, P org cur (x,y) is the original prediction sample of the current block using the motion vector of the current block and without filtering. Then, the MVs of the top and left causal neighboring blocks of the current CU are used to update the boundary prediction samples of the current CU. The top neighboring block of the current block is checked first. If the block is an inter block, its MV and the filter coefficients (i.e., α top and β top) will be assigned to the current block to generate the prediction signal P at the same position of the current block top (x,y), as shown below.
[0271] P top (x,y)=α top ·P org top (x,y)+β top (31)
[0272] Among them, P org top (x,y) is the original prediction sample of the current block using the motion vector of the top neighboring block and without applying filtering. Then, following the same procedure, the corresponding prediction sample is generated based on the motion vector and LIC parameters of the left neighboring block, as shown below
[0273] P left (x,y)=α left ·P org left (x,y)+β left (32)
[0274] Among them, P org left (x,y) is the original prediction sample of the current block using the motion vector of the left neighboring block without filtering. Finally, these three prediction signals are combined according to the template-based OBMC blending process (as shown in the "Overlapped Block Motion Compensation" section) to generate the final prediction sample of the current block.
[0275] When the current block is encoded or decoded in one of the sub-block modes (e.g., affine, ATMVP, and DMVR), the proposed motion-compensated filtering-based OBMC can also be applied to the intra-OBMC of sub-blocks within the current CU. Specifically, when applying this scheme, the same filtering process as shown in equations (29) to (31) can be applied to generate the corresponding prediction samples of each sub-block using the top, left, bottom, and right neighboring sub-blocks of the sub-block. However, in the prediction sample derivation of the intra-OBMC process, the filter coefficients of the current CU will always be applied instead of the LIC parameters of the spatially neighboring blocks.
[0276] To achieve different complexity / performance trade-offs, this paper proposes two methods for applying the proposed motion-compensated filtered OBMC. In one method, it is proposed to apply the filter-based OBMC only to prediction samples at the CU boundary and not to prediction samples of sub-blocks within the CU (i.e., intra-OBMC). In this case, for intra-OBMC, only the neighboring motion vectors of each sub-block's neighboring blocks are considered to generate its OBMC prediction samples. In the other method, it is proposed to apply the filter-based OBMC to prediction samples at the CU boundary and along the sub-block boundaries of sub-blocks within the CU.
[0277] Figure 18 A computing environment (or computing device) 1810 is shown coupled to a user interface 1860. The computing environment 1810 may be part of a data processing server. In some embodiments, the computing device 1810 may execute any of the various methods or processes (e.g., encoding / decoding methods or processes) described above according to various examples of the present disclosure. The computing environment 1810 may include a processor 1820, a memory 1840, and an I / O interface 1850.
[0278] The processor 1820 generally controls the overall operation of the computing environment 1810, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1820 may include one or more processors for executing instructions to perform all or some of the steps in the above-described method. In addition, the processor 1820 may include one or more modules that facilitate interaction between the processor 1820 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a GPU, etc.
[0279] The memory 1840 is configured to store various types of data to support the operation of the computing environment 1810. The memory 1840 may include predetermined software 1842. Examples of the aforementioned data include instructions for any application or method operating on the computing environment 1810, video data sets, image data, etc. The memory 1840 may be implemented 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.
[0280] The I / O interface 1850 provides an interface between the processor 1820 and peripheral interface modules (e.g., a keyboard, a click wheel, buttons, etc.). The buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. The I / O interface 1850 may be coupled to an encoder and a decoder.
[0281] In an embodiment, a non-transitory computer-readable storage medium including, for example, a plurality of programs in a memory 1830 and / or storing a bit stream generated by the above encoding method or a bit stream to be decoded by the above decoding method is also provided. The plurality of programs can be executed by a processor 1820 in a computing environment 1810 to perform the above method. In one example, the plurality of programs can be executed by a processor 1820 in a computing environment 1810 to (for example, from Figure 1G The video encoder 20 in the computing environment 1810 receives a bit stream 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 1820 in the computing environment 1810 to perform the above-mentioned decoding method according to the received bit stream or data stream. In another example, multiple programs can be executed by the processor 1820 in the computing environment 1810 to perform the above-mentioned encoding method to encode video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bit stream or data stream, and can also be executed by the processor 1820 in the computing environment 1810 to (e.g., to Figure 2BAlternatively, 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 use by 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.
[0282] In an embodiment, a bit stream generated by the above encoding method or a bit stream to be decoded by the above decoding method is provided. In an embodiment, a bit stream including coded video information generated by the above encoding method or coded video information to be decoded by the above decoding method is provided.
[0283] In an embodiment, a computing device is also provided, comprising: one or more processors (e.g., processor 1820); and a non-transitory computer-readable storage medium or memory 1830 having stored therein a plurality of programs that can be executed by the one or more processors, wherein the one or more processors are configured to perform the above-described method when executing the plurality of programs.
[0284] In an embodiment, a computer program product having instructions for storing or transmitting a bitstream is also provided, the bitstream including encoded video information generated by the above encoding method or encoded video information to be decoded by the above decoding method. In an embodiment, a computer program product is also provided, including, for example, a plurality of programs in a memory 1830, which can be executed by a processor 1820 in a computing environment 1810 to perform the above method. For example, the computer program product can include a non-transitory computer-readable storage medium.
[0285] In an embodiment, the computing environment 1810 may be implemented by one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components for performing the above methods.
[0286] In an embodiment, a method for storing a bitstream is further provided, comprising: storing the bitstream on a digital storage medium, wherein the bitstream comprises encoded video information generated by the above encoding method or encoded video information to be decoded by the above decoding method.
[0287] In an embodiment, a method for transmitting a bit stream generated by the encoder is further provided. In an embodiment, a method for receiving a bit stream to be decoded by the decoder is further provided.
[0288] Figure 19 1 is a flowchart illustrating a video decoding method according to an example of the present disclosure. The method can be implemented for decoding an inter-frame coded block. In step 1901, at the decoder side, the processor 1820 can determine an adjacent or non-adjacent neighboring block of a current inter-frame coded block, wherein the adjacent or non-adjacent neighboring block includes a plurality of reconstructed samples that are adjacent or non-adjacent to the current inter-frame coded block. In step 1902, the processor 1820 can obtain prediction samples of the adjacent or non-adjacent neighboring block based on the motion vector of the adjacent or non-adjacent neighboring block. In step 1903, the processor 1820 can obtain a filter based on the prediction samples of the adjacent or non-adjacent neighboring block and the plurality of reconstructed samples. In step 1904, the processor 1820 can obtain a current prediction block based on the motion vector of the current inter-frame coded block. In step 1905, the processor 1820 can obtain a filtered prediction block as the prediction samples of the current inter-frame coded block by applying the filter to the current prediction block.
[0289] In some examples, determining adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: determining scanning parameters based on the partition granularity of the current inter-frame coding block, wherein the scanning parameters include a scanning distance or a scanning block size; or determining the scanning block size as a fixed size.
[0290] In some examples, determining the scanning parameters based on the partition granularity of the current inter-frame coding block includes: determining the scanning block size based on the size of the current inter-frame coding block.
[0291] In some examples, determining the scanning block size based on the size of the current inter-frame coding block includes: in response to the size of the current inter-frame coding block being smaller than a predefined size, determining the scanning block size as a fixed size; or in response to the size of the current inter-frame coding block being larger than a predefined size, determining the scanning block size as the size of the current inter-frame coding block.
[0292] In some examples, determining the scanning block size based on the size of the current inter-frame coding block includes: in response to a first horizontal value of the size of the current inter-frame coding block being less than a second horizontal value of the predefined size, determining the third horizontal value of the scanning block size as the second horizontal value; in response to a first vertical value of the size of the current inter-frame coding block being less than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the second vertical value; in response to a first horizontal value of the size of the current inter-frame coding block being greater than the second horizontal value of the predefined size, determining the third horizontal value of the scanning block size as the first horizontal value; or in response to a first vertical value of the size of the current inter-frame coding block being greater than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the first vertical value.
[0293] In some examples, the fixed size includes either 4×4 or 8×8.
[0294] In some examples, the method further includes receiving, by the decoder from the encoder, an index indicating whether adjacent or non-adjacent neighboring blocks are used to obtain the filter.
[0295] In some examples, determining the adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: determining the adjacent or non-adjacent neighboring blocks as one block, wherein prediction samples of the one block have been filtered.
[0296] In some examples, obtaining a filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring block includes obtaining coefficients of the filter by minimizing a difference between the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring block.
[0297] In some examples, obtaining the filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring block includes: in response to the predicted samples of the adjacent or non-adjacent neighboring block having been filtered, determining the coefficients of the filter to be the same as the coefficients of the filter applied to the predicted samples of the adjacent or non-adjacent neighboring block.
[0298] In some examples, the non-adjacent neighboring block is located in a top region or a left region of the current inter-frame coded block.
[0299] In some examples, the filter includes coefficients of a scaling factor and an offset.
[0300] In some examples, obtaining, by the decoder, the current prediction block based on the motion vector of the current inter-coded block includes determining the motion vector of the current inter-coded block to be the same as a motion vector of an adjacent or non-adjacent neighboring block.
[0301] Figure 20is a flow chart illustrating a video decoding method according to an example of the present disclosure. The method may be implemented for decoding an inter-coded block. In step 2001, at the decoder side, the processor 1820 may obtain a current filter based on a candidate filter list, wherein the candidate filter list includes at least one previous filter determined based on at least one previously encoded inter-coded block. In step 2002, the processor 1820 may obtain a filtered prediction block by applying the current filter to a current prediction block of the current inter-coded block.
[0302] In some examples, the previous filters of the candidate filter list are obtained by the following steps: the processor 1820 of the decoder obtains the previous filters based on the predicted samples and reconstructed samples of adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block.
[0303] In some examples, obtaining a previous filter based on prediction samples and reconstructed samples of an adjacent or non-adjacent neighboring block of a previously encoded inter-coded block includes determining, by the decoder, the previous filter to be the same as a filter applied to the prediction samples of the adjacent or non-adjacent neighboring block in response to the prediction samples of the adjacent or non-adjacent neighboring block having been filtered.
[0304] In some examples, adjacent or non-adjacent neighboring blocks of a previously encoded inter-frame coded block are identified by determining a scanning parameter based on a partition granularity of the previously encoded inter-frame coded block, wherein the scanning parameter includes a scanning distance or a scanning block size.
[0305] In some examples, determining the scanning parameter based on the partition granularity of the previously encoded inter-frame coding block includes: determining the scanning block size based on the size of the previously encoded inter-frame coding block; or determining the scanning block size as a fixed size.
[0306] In some examples, determining the scanning block size based on the size of the current inter-frame coding block includes: in response to the size of the previously encoded inter-frame coding block being smaller than a predefined size, determining the scanning block size as a fixed size; or in response to the size of the previously encoded inter-frame coding block being larger than a predefined size, determining the scanning block size as the size of the previously encoded inter-frame coding block.
[0307] In some examples, determining the scanning block size based on the size of a previously encoded inter-frame coding block includes: in response to a first horizontal value of the size of the previously encoded inter-frame coding block being less than a second horizontal value of a predefined size, determining the third horizontal value of the scanning block size as the second horizontal value; in response to a first vertical value of the size of the previously encoded inter-frame coding block being less than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the second vertical value; in response to a first horizontal value of the size of the previously encoded inter-frame coding block being greater than the second horizontal value of the predefined size, determining the third horizontal value of the scanning block size as the first horizontal value; or in response to a first vertical value of the size of the previously encoded inter-frame coding block being greater than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the first vertical value.
[0308] In some examples, the method further includes maintaining a candidate filter list to include a predefined number of previous filters.
[0309] In some examples, obtaining the current filter based on the candidate filter list includes scanning the previous filters in the candidate filter list in order of their corresponding previously encoded inter-frame coded blocks from nearest to farthest from the current inter-frame coded block.
[0310] In some examples, maintaining the candidate filter list to include a predefined number of previous filters includes: in response to the number of previous filters included in the candidate filter list reaching the predefined number, removing a first previous filter that was first added to the candidate filter list from the candidate filter list, and adding the new previous filter as the last entry to the candidate filter list.
[0311] In some examples, maintaining the candidate filter list to include a predefined number of previous filters includes: in response to a new previous filter being identical to a previous filter included in the candidate filter list, removing the previous filter that is identical to the new previous filter from the candidate filter list, and adding the new previous filter as the last entry in the candidate filter list.
[0312] In some examples, obtaining the current filter based on the candidate filter list includes: receiving an index indicating a target filter in the candidate filter list from an encoder; and determining the current filter as the target filter.
[0313] Figure 212 is a flowchart illustrating a video encoding method according to an example of the present disclosure. The method can be implemented for encoding an inter-frame coded block. In step 2101, on the encoder side, the processor 1822 can determine an adjacent or non-adjacent neighboring block of a current inter-frame coded block, wherein the adjacent or non-adjacent neighboring block includes a plurality of reconstructed samples that are adjacent or non-adjacent to the current inter-frame coded block. In step 2102, the processor 1822 can obtain prediction samples of the adjacent or non-adjacent neighboring block based on a motion vector of the adjacent or non-adjacent neighboring block. In step 2103, the processor 1822 can obtain a filter based on the prediction samples of the adjacent or non-adjacent neighboring block and the plurality of reconstructed samples. In step 2104, the processor 1822 can obtain a current prediction block based on the motion vector of the current inter-frame coded block. In step 2105, the processor 1822 can obtain a filtered prediction block as the prediction samples of the current inter-frame coded block by applying the filter to the current prediction block.
[0314] In some examples, determining adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: determining scanning parameters based on the partition granularity of the current inter-frame coding block, wherein the scanning parameters include a scanning distance or a scanning block size; or determining the scanning block size as a fixed size.
[0315] In some examples, determining the scanning parameters based on the partition granularity of the current inter-frame coding block includes: determining the scanning block size based on the size of the current inter-frame coding block.
[0316] In some examples, determining the scanning block size based on the size of the current inter-frame coding block includes: in response to the size of the current inter-frame coding block being smaller than a predefined size, determining the scanning block size as a fixed size; or in response to the size of the current inter-frame coding block being larger than a predefined size, determining the scanning block size as the size of the current inter-frame coding block.
[0317] In some examples, determining the scanning block size based on the size of the current inter-frame coding block includes: in response to a first horizontal value of the size of the current inter-frame coding block being less than a second horizontal value of the predefined size, determining the third horizontal value of the scanning block size as the second horizontal value; in response to a first vertical value of the size of the current inter-frame coding block being less than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the second vertical value; in response to a first horizontal value of the size of the current inter-frame coding block being greater than the second horizontal value of the predefined size, determining the third horizontal value of the scanning block size as the first horizontal value; or in response to a first vertical value of the size of the current inter-frame coding block being greater than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the first vertical value.
[0318] In some examples, the fixed size includes either 4×4 or 8×8.
[0319] In some examples, the method further includes sending, by the encoder to the decoder, an index indicating whether an adjacent or non-adjacent neighboring block is used to obtain the filter.
[0320] In some examples, determining the adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: determining the adjacent or non-adjacent neighboring blocks as one block, wherein prediction samples of the one block have been filtered.
[0321] In some examples, obtaining a filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring block includes obtaining coefficients of the filter by minimizing a difference between the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring block.
[0322] In some examples, obtaining the filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring block includes: in response to the predicted samples of the adjacent or non-adjacent neighboring block having been filtered, determining the coefficients of the filter to be the same as the coefficients of the filter applied to the predicted samples of the adjacent or non-adjacent neighboring block.
[0323] In some examples, the non-adjacent neighboring block is located in a top region or a left region of the current inter-frame coded block.
[0324] In some examples, the filter includes coefficients of a scaling factor and an offset.
[0325] In some examples, obtaining, by the encoder, the current prediction block based on the motion vector of the current inter-coded block includes determining the motion vector of the current inter-coded block to be the same as a motion vector of an adjacent or non-adjacent neighboring block.
[0326] Figure 22 2 is a flow chart illustrating a video encoding method according to an example of the present disclosure. The method may be implemented for encoding an inter-coded block. In step 2201, at the encoder side, the processor 1822 may obtain a current filter based on a candidate filter list, wherein the candidate filter list includes at least one previous filter determined based on at least one previously encoded inter-coded block. In step 2202, the processor 1822 may obtain a filtered prediction block by applying the current filter to a current prediction block of the current inter-coded block.
[0327] In some examples, the previous filters of the candidate filter list are obtained by the following steps: the encoder processor 1822 obtains the previous filters based on the predicted samples and reconstructed samples of adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block.
[0328] In some examples, obtaining a previous filter based on prediction samples and reconstructed samples of an adjacent or non-adjacent neighboring block of a previously encoded inter-coded block includes determining, by the encoder, the previous filter to be the same as a filter applied to the prediction samples of the adjacent or non-adjacent neighboring block, in response to the prediction samples of the adjacent or non-adjacent neighboring block having been filtered.
[0329] In some examples, adjacent or non-adjacent neighboring blocks of a previously encoded inter-frame coded block are identified by determining a scanning parameter based on a partition granularity of the previously encoded inter-frame coded block, wherein the scanning parameter includes a scanning distance or a scanning block size.
[0330] In some examples, determining the scanning parameter based on the partition granularity of the previously encoded inter-frame coding block includes: determining the scanning block size based on the size of the previously encoded inter-frame coding block; or determining the scanning block size as a fixed size.
[0331] In some examples, determining the scanning block size based on the size of the current inter-frame coding block includes: in response to the size of the previously encoded inter-frame coding block being smaller than a predefined size, determining the scanning block size as a fixed size; or in response to the size of the previously encoded inter-frame coding block being larger than a predefined size, determining the scanning block size as the size of the previously encoded inter-frame coding block.
[0332] In some examples, determining the scanning block size based on the size of a previously encoded inter-frame coding block includes: in response to a first horizontal value of the size of the previously encoded inter-frame coding block being less than a second horizontal value of a predefined size, determining the third horizontal value of the scanning block size as the second horizontal value; in response to a first vertical value of the size of the previously encoded inter-frame coding block being less than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the second vertical value; in response to a first horizontal value of the size of the previously encoded inter-frame coding block being greater than the second horizontal value of the predefined size, determining the third horizontal value of the scanning block size as the first horizontal value; or in response to a first vertical value of the size of the previously encoded inter-frame coding block being greater than the second vertical value of the predefined size, determining the third vertical value of the scanning block size as the first vertical value.
[0333] In some examples, the method further includes maintaining a candidate filter list to include a predefined number of previous filters.
[0334] In some examples, obtaining the current filter based on the candidate filter list includes scanning the previous filters in the candidate filter list in order of their corresponding previously encoded inter-frame coded blocks from nearest to farthest from the current inter-frame coded block.
[0335] In some examples, maintaining the candidate filter list to include a predefined number of previous filters includes: in response to the number of previous filters included in the candidate filter list reaching the predefined number, removing a first previous filter that was first added to the candidate filter list from the candidate filter list, and adding the new previous filter as the last entry to the candidate filter list.
[0336] In some examples, maintaining the candidate filter list to include a predefined number of previous filters includes: in response to a new previous filter being identical to a previous filter included in the candidate filter list, removing the previous filter that is identical to the new previous filter from the candidate filter list, and adding the new previous filter as the last entry in the candidate filter list.
[0337] In some examples, obtaining the current filter based on the candidate filter list includes sending an index indicating a target filter in the candidate filter table to a decoder.
[0338] In some examples, a device for video encoding and decoding is provided. The device includes a processor 1820 and a memory 1840, wherein 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 19 to 21 Any of the methods shown in .
[0339] In some other examples, a non-transitory computer-readable storage medium having instructions stored therein is provided. When the instructions are executed by the processor 1820, the instructions cause the processor to perform the following steps: Figures 19 to 21 In one example, multiple programs can be executed by a processor 1820 in a computing environment 1810 to receive (e.g., from Figure 1G The video encoder 20 in the computing environment 1810 includes a bit stream or data stream of 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 1820 in the computing environment 1810 to perform the above-mentioned decoding method based on the received bit stream or data stream. In another example, multiple programs can be executed by the processor 1820 in the computing environment 1810 to perform the above-mentioned encoding method to encode video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bit stream or data stream, and can also be executed by the processor 1820 in the computing environment 1810 to transmit the bit stream or data stream (e.g., to Figure 2B Alternatively, a non-transitory computer-readable storage medium may have stored therein a bitstream or data stream comprising the video decoder 30 in FIG. 1 . Figure 1GThe video encoder 20 in FIG. 1 uses the coded video information (e.g., video blocks representing coded video frames and / or associated one or more syntax elements, etc.) generated by the above-mentioned coding method for a decoder (e.g., Figure 2B The video decoder 30 in the video decodes the 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.
[0340] 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.
[0341] Unless otherwise specified, the order of the 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 circumstances. 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.
[0342] The examples are chosen and described in order to explain the principles of the present disclosure and to enable others 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 as are suited to the particular use contemplated. Therefore, it should be understood that the scope of the present disclosure is not limited to the specific examples of the embodiments disclosed and that modifications and other embodiments are intended to be included within the scope of the present disclosure.
[0343] The above method can be implemented using a device including one or more circuits, the one or more circuits including 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 one or more circuits.
[0344] Other examples of the present disclosure will be apparent to those skilled in the art from consideration of the description 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 departures from the present disclosure within known or customary practices in the art. It is intended that the description and examples be considered merely exemplary.
[0345] It will 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: Determining, by a decoder, an adjacent or non-adjacent neighboring block of a current inter-frame coding block, wherein the adjacent or non-adjacent neighboring block includes a plurality of reconstructed samples that are adjacent or non-adjacent to the current inter-frame coding block; Obtaining, by the decoder, prediction samples of the adjacent or non-adjacent neighboring block based on the motion vector of the adjacent or non-adjacent neighboring block; Obtaining, by the decoder, a filter based on the predicted samples and the plurality of reconstructed samples of the adjacent or non-adjacent neighboring blocks; Obtaining, by the decoder, a current prediction block based on the motion vector of the current inter-frame coding block; and A filtered prediction block is obtained by the decoder as prediction samples of the current inter-frame coding block by applying the filter to the current prediction block.
2. The method according to claim 1, wherein Determining adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: determining a scanning parameter according to a partition granularity of the current inter-frame coding block, wherein the scanning parameter includes a scanning distance or a scanning block size; or Determines the scan block size to a fixed size.
3. The method according to claim 2, wherein: Determining the scanning parameter according to the partition granularity of the current inter-frame coding block includes: The scanning block size is determined according to the size of the current inter-frame coding block.
4. The method according to claim 3, wherein: Determining the scanning block size according to the size of the current inter-frame coding block includes: In response to the size of the current inter-frame coding block being smaller than a predefined size, determining the scanning block size to be a fixed size; or In response to a size of the current inter-frame coding block being larger than a predefined size, the scanning block size is determined as the size of the current inter-frame coding block.
5. The method according to claim 3, wherein: Determining the scanning block size according to the size of the current inter-frame coding block includes: In response to a first level value of the size of the current inter-frame coding block being smaller than a second level value of the predefined size, determining a third level value of the scanning block size as the second level value; In response to a first vertical value of the size of the current inter-frame coding block being smaller than a second vertical value of the predefined size, determining a third vertical value of the scanning block size as the second vertical value; In response to a first horizontal value of the size of the current inter-frame coding block being greater than a second horizontal value of the predefined size, determining a third horizontal value of the scanning block size as the first horizontal value; or In response to a first vertical value of the size of the current inter-frame coding block being greater than a second vertical value of the predefined size, a third vertical value of the scanning block size is determined as the first vertical value.
6. The method of claim 3, wherein: The fixed size includes either 4×4 or 8×8.
7. The method of claim 1, further comprising: An index is received by the decoder from the encoder, the index indicating the adjacent or non-adjacent neighboring block used to obtain the filter.
8. The method of claim 1, wherein: Determining the adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: The adjacent or non-adjacent neighboring blocks are determined as one block, wherein the prediction samples of the one block have been filtered.
9. The method of claim 1, wherein: Obtaining the filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks comprises: The coefficients of the filter are obtained by minimizing the difference between the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks.
10. The method of claim 1, wherein: Obtaining the filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks comprises: In response to the prediction samples of the adjacent or non-adjacent neighboring block having been filtered, coefficients of the filter are determined to be the same as coefficients of a filter applied to the prediction samples of the adjacent or non-adjacent neighboring block.
11. The method of claim 1, wherein: The non-adjacent neighboring blocks are located in a top area or a left area of the current inter-frame coding block.
12. The method of claim 1, wherein: The filter includes coefficients of a scaling factor and an offset.
13. The method of claim 1, wherein: Obtaining, by the decoder based on the motion vector of the current inter-frame coded block, the current prediction block includes: The motion vector of the current inter-frame coded block is determined to be the same as the motion vector of the adjacent or non-adjacent neighboring block.
14. A video decoding method, comprising: Obtaining, by a decoder, a current filter based on a candidate filter list, wherein the candidate filter list includes at least one previous filter determined based on at least one previously encoded inter-frame coded block; and A filtered prediction block is obtained by the decoder by applying the current filter to a current prediction block of a current inter-coded block.
15. The method of claim 14, wherein: The previous filters of the candidate filter list are obtained by the following steps: The previous filter is obtained by the decoder based on prediction samples and reconstructed samples of adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block.
16. The method of claim 15, wherein: Obtaining the previous filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block comprises: In response to the prediction samples of the adjacent or non-adjacent neighboring block having been filtered, the previous filter is determined by the decoder to be the same as the filter applied to the prediction samples of the adjacent or non-adjacent neighboring block.
17. The method of claim 15, wherein: The adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block are identified by: A scanning parameter is determined according to a partition granularity of the previously encoded inter-frame coding block, wherein the scanning parameter includes a scanning distance or a scanning block size.
18. The method of claim 17, wherein: Determining the scanning parameter according to the partition granularity of the previously encoded inter-frame coding block includes: Determining the scanning block size according to the size of the previously encoded inter-frame coding block; or The scanning block size is determined to be a fixed size.
19. The method of claim 18, wherein: Determining the scanning block size according to the size of the current inter-frame coding block includes: In response to the size of the previously encoded inter-frame coding block being smaller than a predefined size, determining the scanning block size to be a fixed size; or In response to a size of the previously encoded inter-frame coding block being larger than a predefined size, the scanning block size is determined to be the size of the previously encoded inter-frame coding block.
20. The method of claim 18, wherein: Determining the scanning block size according to the size of the previously encoded inter-frame coding block includes: In response to a first level value of the size of the previously encoded inter-frame coding block being smaller than a second level value of the predefined size, determining a third level value of the scanning block size to be the second level value; In response to a first vertical value of the size of the previously encoded inter-frame coded block being smaller than a second vertical value of the predefined size, determining a third vertical value of the scanning block size to be the second vertical value; In response to a first level value of the size of the previously encoded inter-frame coding block being greater than a second level value of the predefined size, determining a third level value of the scanning block size as the first level value; or In response to a first vertical value of the size of the previously encoded inter-frame coded block being greater than a second vertical value of the predefined size, a third vertical value of the scanning block size is determined to be the first vertical value.
21. The method of claim 14, further comprising: The candidate filter list is maintained to include a predefined number of previous filters.
22. The method of claim 21, wherein: Obtaining the current filter based on the candidate filter list comprises: The previous filters in the candidate filter list are scanned in order of the previously encoded inter-frame coding blocks corresponding to the previous filters from nearest to farthest from the current inter-frame coding block.
23. The method of claim 21, wherein: Maintaining the candidate filter list to include the predefined number of previous filters comprises: In response to the number of previous filters included in the candidate filter list reaching the predefined number, a first previous filter first added to the candidate filter table is removed from the candidate filter list, and a new previous filter is added to the candidate filter table as a last entry.
24. The method of claim 21, wherein: Maintaining the candidate filter list to include the predefined number of previous filters comprises: In response to a new previous filter being identical to a previous filter included in the candidate filter list, removing the previous filter identical to the new previous filter from the candidate filter list and adding the new previous filter as a last entry to the candidate filter table.
25. The method of claim 14, wherein: Obtaining the current filter based on the candidate filter list includes: receiving, from an encoder, an index indicating a target filter in the candidate filter table; and The current filter is determined as the target filter.
26. A video encoding method, comprising: Determining, by an encoder, an adjacent or non-adjacent neighboring block of a current inter-frame coding block, wherein the adjacent or non-adjacent neighboring block includes a plurality of reconstructed samples that are adjacent or non-adjacent to the current inter-frame coding block; Obtaining, by the encoder, prediction samples of the adjacent or non-adjacent neighboring block based on the motion vector of the adjacent or non-adjacent neighboring block; Obtaining, by the encoder, a filter based on the predicted samples and the plurality of reconstructed samples of the adjacent or non-adjacent neighboring blocks; Obtaining, by the encoder, a current prediction block based on the motion vector of the current inter-frame coding block; and The encoder obtains a filtered prediction block as prediction samples of the current inter-frame coding block by applying the filter to the current prediction block.
27. The method of claim 26, wherein: Determining the adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: determining a scanning parameter according to a partition granularity of the current inter-frame coding block, wherein the scanning parameter includes a scanning distance or a scanning block size; or Determines the scan block size to a fixed size.
28. The method of claim 27, wherein: Determining the scanning parameter according to the partition granularity of the current inter-frame coding block includes: The scanning block size is determined according to the size of the current inter-frame coding block.
29. The method of claim 28, wherein: Determining the scanning block size according to the size of the current inter-frame coding block includes: In response to the size of the current inter-frame coding block being smaller than a predefined size, determining the scanning block size to be a fixed size; or In response to a size of the current inter-frame coding block being larger than a predefined size, the scanning block size is determined as the size of the current inter-frame coding block.
30. The method of claim 28, wherein Determining the scanning block size according to the size of the current inter-frame coding block includes: In response to a first level value of the size of the current inter-frame coding block being smaller than a second level value of the predefined size, determining a third level value of the scanning block size as the second level value; In response to a first vertical value of the size of the current inter-frame coding block being smaller than a second vertical value of the predefined size, determining a third vertical value of the scanning block size as the second vertical value; In response to a first horizontal value of the size of the current inter-frame coding block being greater than a second horizontal value of the predefined size, determining a third horizontal value of the scanning block size as the first horizontal value; or In response to a first vertical value of the size of the current inter-frame coding block being greater than a second vertical value of the predefined size, a third vertical value of the scanning block size is determined as the first vertical value.
31. The method of claim 28, wherein: The fixed size includes either 4×4 or 8×8.
32. The method of claim 26, further comprising: An index is sent by the encoder to a decoder, the index indicating the adjacent or non-adjacent neighboring block used to obtain the filter.
33. The method of claim 26, wherein: Determining the adjacent or non-adjacent neighboring blocks of the current inter-frame coding block includes: The adjacent or non-adjacent neighboring blocks are determined as one block, wherein the prediction samples of the one block have been filtered.
34. The method of claim 26, wherein: Obtaining the filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks comprises: The coefficients of the filter are obtained by minimizing the difference between the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks.
35. The method of claim 26, wherein: Obtaining the filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks comprises: In response to the prediction samples of the adjacent or non-adjacent neighboring block having been filtered, coefficients of the filter are determined to be the same as coefficients of a filter applied to the prediction samples of the adjacent or non-adjacent neighboring block.
36. The method of claim 26, wherein: The non-adjacent neighboring blocks are located in a top area or a left area of the current inter-frame coding block.
37. The method of claim 26, wherein: The filter includes coefficients of a scaling factor and an offset.
38. The method of claim 26, wherein: Obtaining, by the encoder based on the motion vector of the current inter-frame coding block, the current prediction block includes: The motion vector of the current inter-frame coded block is determined to be the same as the motion vector of the adjacent or non-adjacent neighboring block.
39. A video encoding method, comprising: Obtaining, by an encoder, a current filter based on a candidate filter list, wherein the candidate filter list includes at least one previous filter determined based on at least one previously encoded inter-frame coded block; and A filtered prediction block is obtained by the encoder by applying the current filter to a current prediction block of a current inter-coded block.
40. The method of claim 39, wherein The previous filters of the candidate filter list are obtained by the following steps: The previous filter is obtained by the encoder based on prediction samples and reconstructed samples of adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block.
41. The method of claim 40, wherein: Obtaining the previous filter based on the predicted samples and the reconstructed samples of the adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block comprises: In response to the prediction samples of the adjacent or non-adjacent neighboring block having been filtered, the previous filter is determined by the encoder to be the same as the filter applied to the prediction samples of the adjacent or non-adjacent neighboring block.
42. The method of claim 40, wherein The adjacent or non-adjacent neighboring blocks of the previously encoded inter-frame coded block are identified by: A scanning parameter is determined according to a partition granularity of the previously encoded inter-frame coding block, wherein the scanning parameter includes a scanning distance or a scanning block size.
43. The method of claim 42, wherein: Determining the scanning parameter according to the partition granularity of the previously encoded inter-frame coding block includes: Determining the scanning block size according to the size of the previously encoded inter-frame coding block; or The scanning block size is determined to be a fixed size.
44. The method of claim 43, wherein Determining the scanning block size according to the size of the current inter-frame coding block includes: In response to the size of the previously encoded inter-frame coding block being smaller than a predefined size, determining the scanning block size to be a fixed size; or In response to a size of the previously encoded inter-frame coding block being larger than a predefined size, the scanning block size is determined to be the size of the previously encoded inter-frame coding block.
45. The method of claim 43, wherein: Determining the scanning block size according to the size of the previously encoded inter-frame coding block includes: In response to a first level value of the size of the previously encoded inter-frame coding block being smaller than a second level value of the predefined size, determining a third level value of the scanning block size to be the second level value; In response to a first vertical value of the size of the previously encoded inter-frame coded block being smaller than a second vertical value of the predefined size, determining a third vertical value of the scanning block size to be the second vertical value; In response to a first level value of the size of the previously encoded inter-frame coding block being greater than a second level value of the predefined size, determining a third level value of the scanning block size as the first level value; or In response to a first vertical value of the size of the previously encoded inter-frame coded block being greater than a second vertical value of the predefined size, a third vertical value of the scanning block size is determined to be the first vertical value.
46. The method of claim 39, further comprising: The candidate filter list is maintained to include a predefined number of previous filters.
47. The method of claim 46, wherein Obtaining the current filter based on the candidate filter list comprises: The previous filters in the candidate filter list are scanned in order of the previously encoded inter-frame coding blocks corresponding to the previous filters from nearest to farthest from the current inter-frame coding block.
48. The method of claim 46, wherein Maintaining the candidate filter list to include the predefined number of previous filters comprises: In response to the number of previous filters included in the candidate filter list reaching the predefined number, a first previous filter first added to the candidate filter table is removed from the candidate filter list, and a new previous filter is added to the candidate filter table as a last entry.
49. The method of claim 46, wherein Maintaining the candidate filter list to include the predefined number of previous filters comprises: In response to a new previous filter being identical to a previous filter included in the candidate filter list, removing the previous filter identical to the new previous filter from the candidate filter list and adding the new previous filter as a last entry to the candidate filter table.
50. The method of claim 39, wherein Obtaining the current filter based on the candidate filter list includes: An index indicating a target filter in the candidate filter table is sent to the decoder.
51. An apparatus for video decoding, the 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 according to any one of claims 1 to 25.
52. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more computer processors, cause the one or more computer processors to receive a bitstream and perform the method of any one of claims 1 to 25 based on the bitstream.
53. An apparatus for video encoding, the 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 according to any one of claims 26 to 50.
54. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more computer processors, cause the one or more computer processors to receive a bitstream and perform the method of any one of claims 26 to 50 based on the bitstream.
55. A non-transitory computer-readable storage medium for storing a bitstream to be decoded by the method of any one of claims 1-25.
56. A non-transitory computer-readable storage medium for storing a bitstream generated by the method of any one of claims 26-50.