Non-local loop filter for video coding

By adopting non-local correlation loop filtering technology in video encoding and decoding, and optimizing the filtering process with filter parameter sets, the problem of low filtering efficiency in the existing technology is solved, and more efficient video encoding and decoding effects are achieved.

CN118975237APending Publication Date: 2024-11-15BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202380031430.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-28
Filing Date
2023-03-28
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the existing video encoding and decoding technology, the filter module has limitations in improving the encoding and decoding efficiency and visual quality. Especially in the design and implementation of loop filters, it is difficult to make full use of non-local correlations, resulting in low encoding and decoding efficiency. .

Method used

Loop filtering is performed using non-local correlation, and the filtering parameter set includes the number of similar blocks, search range and window size, optimize the filtering method and equipment during video encoding and decoding, and combine non-local mean filters and low rank constraints. , achieve more efficient filtering effect.

Benefits of technology

The encoding efficiency and decoding efficiency of video encoding and decoding are improved, visual quality is enhanced, and the adaptability and flexibility of filtering parameters are optimized through non-local correlation filtering technology, and adapt to different encoding and decoding configurations and quantization parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118975237A_ABST
    Figure CN118975237A_ABST
Patent Text Reader

Abstract

A method for video encoding, a method for video decoding, an apparatus, and a non-transitory computer-readable storage medium thereof are provided. In a method for video encoding, an encoder may obtain one or more similar pixels for a first pixel to be filtered in a picture based on a set of filtering parameters, where the one or more similar pixels and the first pixel are from the picture, and wherein the set of filtering parameters may include a number of similar blocks, a search range, and a window size. Further, the encoder may obtain filtered pixels for the first pixel based on the one or more similar pixels.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on and claims priority from U.S. Provisional Application No. 63 / 324,631, filed on March 28, 2022, entitled “Nonlocal Loop Filter for Video Coding,” the entire contents of which are incorporated herein by reference for all purposes. Technical Field

[0003] The present disclosure relates to video coding and compression, and more particularly, but not limited to, methods and apparatus for improving the coding efficiency of filtering in video coding. Background Art

[0004] Various video codec technologies can be used to compress video data. Video coding is performed according to one or more video codec standards. For example, today, some well-known video codec standards include Universal Video Codec (VVC), High Efficiency Video Codec (HEVC, also known as H.265 or MPEG-H Part 2) and Advanced Video Codec (AVC, also known as H.264 or MPEG-4 Part 10) jointly developed by ISO / IEC MPEG and ITU-TVECG. AOMedia Video 1 (AV1) was developed by the Alliance for Open Media (AOM) as a successor to its previous standard VP9. Audio Video Coding (AVS) refers to digital audio and digital video compression standards, another video compression standard series developed by the Chinese Audio and Video Coding Standard Working Group. Most existing video codec standards are based on the well-known hybrid video codec framework, that is, block-based prediction methods (e.g., inter-frame prediction, intra-frame prediction) are used to reduce the redundancy present in video images or sequences, and transform coding is used to compress the energy of prediction errors. 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 generation of AVS standards includes the Chinese national standard "Information Technology Advanced Audio and Video Codec Part 2: Video" (referred to as AVS1) and "Information Technology Advanced Audio and Video Codec Part 16: Broadcasting and Television Video" (referred to as AVS+). Compared with the MPEG-2 standard, it can provide about 50% bit rate savings at the same perceptual quality. The second generation of AVS standards includes the Chinese national standard "Information Technology High Efficiency Multimedia Codec" (referred to as AVS2), which is mainly aimed at the transmission of ultra-high-definition television programs. The codec efficiency of AVS2 is twice that of AVS+. In May 2016, AVS2 was released as a Chinese national standard. At the same time, the video part of the AVS2 standard was submitted by the Institute of Electrical and Electronics Engineers (IEEE) as an international standard for application. The AVS3 standard is a new generation of video codec standards for UHD video applications, aiming to exceed the codec efficiency of the latest international standard HEVC. In March 2019, at the 68th AVS meeting, the AVS3-P2 baseline was completed, which provides about 30% bit rate savings compared to the HEVC standard. Currently, there is a reference software called High Performance Model (HPM) maintained by the AVS group to demonstrate a reference implementation of the AVS3 standard. Summary of the invention

[0006] The present disclosure relates to video coding and compression, and in particular, but not limited to, improving the coding efficiency of filtering in video coding. More specifically, non-local correlation is utilized in a loop filtering module.

[0007] According to a first aspect of the present disclosure, a method for video encoding is provided. In the method, an encoder may obtain one or more similar pixels for a first pixel to be filtered in a picture based on a filtering parameter set. In addition, the one or more similar pixels and the first pixel are from the picture, and the filtering parameter set includes the number of similar blocks, a search range, and a window size.

[0008] According to a second aspect of the present disclosure, a method for video decoding is provided. In the method, a decoder may obtain one or more filtering parameters, wherein the one or more filtering parameters are from a filtering parameter set including the number of similar blocks, a search range, and a window size. In addition, the decoder may obtain a first pixel to be filtered in a picture and one or more similar pixels for the first pixel based on the one or more filtering parameters. In addition, the decoder may obtain an original pixel associated with the first pixel based on the one or more similar pixels.

[0009] According to a third aspect of the present disclosure, a device for video encoding is provided. The device includes one or more processors and a memory, the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors. In addition, the one or more processors are configured to perform the method according to the first aspect above when executing the instructions.

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

[0011] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer-executable instructions is provided, wherein the computer-executable instructions, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and execute the method according to the above-mentioned second aspect.

[0012] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer-executable instructions is provided, wherein when the computer-executable instructions are executed by one or more computer processors, the one or more computer processors execute the method according to the first aspect above to encode a current block into a bit stream and send the bit stream. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

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

[0016] Figure 1C-1F is a block diagram showing how to recursively divide a frame into multiple video blocks of different sizes and shapes according to some examples of the present disclosure.

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

[0018] Figure 2Ais a block diagram of a decoder according to some examples of the present disclosure.

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

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

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

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

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

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

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

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

[0027] Figure 4A-4B A 4-parameter affine model according to some examples of the present disclosure is shown.

[0028] Figure 5A is a 5×5 diamond-shaped block diagram illustrating an ALF filter applied to chroma components according to some examples of the present disclosure.

[0029] Figure 5B is a 7×7 diamond-shaped block diagram illustrating an ALF filter applied to a luma component according to some examples of the present disclosure.

[0030] Figure 6A-6D Sub-sampled Laplacian computations according to some examples of the present disclosure are shown.

[0031] Figure 7 is a block diagram illustrating an extended prediction signal according to some examples of the present disclosure.

[0032] Figure 8 Non-local structure based filters according to some examples of the present disclosure are shown.

[0033] Fig. 9Non-local means filters according to some examples of the present disclosure are shown.

[0034] Fig.10 A computing environment according to some examples of the present disclosure is shown.

[0035] Fig.11 is a flowchart illustrating a method for video encoding according to some examples of the present disclosure.

[0036] Fig.12 is a diagram showing some examples according to the present disclosure. Fig.11 The method for video decoding shown in FIG. 1 corresponds to a flowchart of a method for video decoding.

[0037] Fig.13 is a block diagram illustrating samples surrounding a center sample according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0038] 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 one of ordinary skill in the art that various alternatives may be used. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

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

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

[0041] Throughout the disclosure, the terms "first", "second", "third", etc. are used as nomenclatures for referring only to related elements (e.g., devices, components, compositions, steps, etc.), without implying any spatial or temporal order, unless otherwise explicitly stated. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components, or operating states of the same device, and may be named arbitrarily.

[0042] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include memory (shared, dedicated, or combined) 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 connected directly or indirectly. These components may or may not be physically attached to or located adjacent to each other.

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

[0044] A unit or module may be implemented only by software, only by hardware, or by a combination of hardware and software. In a software-only implementation, for example, a unit or module may include functionally related code blocks or software components that are linked together directly or indirectly to perform a specific function.

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

[0046] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to send the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (such as a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form 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 may include a router, a switch, a base station, or any other device that may be useful in facilitating communication from the source device 12 to the target device 14.

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

[0048] 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 camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video, 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 a video phone. However, the embodiments described in this application may be generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.

[0049] The 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 also include a modem and / or a transmitter.

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

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

[0052] The video encoder 20 and the video decoder 30 may operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, MPEG-4, Part 10, 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 may be applicable to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 may be configured to encode 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 may be configured to decode video data according to any of these current standards or future standards.

[0053] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder and / or decoder circuits, respectively, such as one or more microprocessors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), discrete logic, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-volatile 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 may be included in one or more encoders or decoders, and either of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.

[0054] Like HEVC, VVC is built on a block-based hybrid video codec framework. Figure 1B 1 is a block diagram illustrating a block-based video encoder according to some embodiments of the present disclosure. In the encoder 100, the input video signal is processed block by block (referred to as a coding unit (CU)). The encoder 100 may be as follows: Figure 1A The video encoder 20 shown in . In VTM-1.0, a CU can be up to 128×128 pixels. However, unlike HEVC, which partitions blocks based only on a quadtree, in VVC, a coding tree unit (CTU) is divided into multiple CUs to adapt to the changing local characteristics based on quadtrees / binary trees / ternary trees. In addition, the concept of multiple partition unit types in HEVC is removed, that is, there is no longer a distinction between CUs, prediction units (PUs), and transform units (TUs) in VVC; instead, each CU is always used as a basic unit for prediction and transformation without further division. In a multi-type tree structure, a CTU is first divided by a quadtree structure. Then, each quadtree leaf node can be further divided by a binary tree structure and a ternary tree structure.

[0055] Figure 3A-3G is a schematic diagram illustrating a multi-type tree partitioning mode according to some embodiments of the present disclosure. Figure 3A-3G Five types of segmentation are shown, including four-element segmentation ( Figure 3A ), vertical binary division Figure 3B ), horizontal binary partition ( Figure 3C ), vertical ternary division ( Figure 3D ), horizontal ternary partition ( Figure 3E), vertical expansion of the three-way partition ( Figure 3F ) and horizontally extended ternary partitioning ( Figure 3G ).

[0056] For each given video block, spatial prediction and / or temporal prediction may be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples of coded neighboring blocks in the same video picture / slice (which are called reference samples) to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in video signals. Temporal prediction (also known as "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in video signals. The temporal prediction signal for a given CU is typically signaled by one or more motion vectors (MVs), which indicate the amount and direction of motion between the current CU and its temporal reference. In addition, 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 repository the temporal prediction signal comes from.

[0057] After spatial prediction and / or temporal prediction, the intra / inter mode decision circuit 121 in the encoder 100 selects the best prediction mode, for example, based on a rate-distortion optimization method. The block prediction factor 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. In addition, before the reconstructed CU is placed in the reference picture storage of the picture buffer 117 and used to encode and decode future video blocks, loop filtering 115, such as a deblocking filter, sample adaptive offset (SAO) and / or adaptive loop filter (ALF), may be applied to the reconstructed CU. In order to form an output video bitstream 114, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit 106 for further compression and packaging to form a bitstream.

[0058] For example, deblocking filters are available in the current versions of AVC, HEVC, and VVC. In HEVC, an additional loop filter called SAO is defined to further improve the coding 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.

[0059] These loop filter operations are optional. Performing these operations helps improve codec efficiency and visual quality. They can also be turned off as a decision presented by the encoder 100 to save computational complexity.

[0060] It should be noted that intra prediction is usually based on unfiltered reconstructed pixels, while inter prediction is based on filtered reconstructed pixels if the encoder 100 turns on these filter options.

[0061] Figure 2A is a block diagram illustrating a block-based video decoder 200 that can be used in conjunction with many video codec standards. The decoder 200 is similar to the one residing in Figure 1B The block-based video decoder 200 may be as follows: Figure 1A . In the decoder 200, the input video bitstream 201 is first decoded by entropy decoding 202 to derive 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 residuals from the inverse transform 206 and the prediction output generated by the block predictor mechanism using an adder 214.

[0062] The reconstructed block may further pass through a loop filter 209 before it is stored in a picture buffer 213 used as a reference picture repository. The reconstructed video in the picture buffer 213 may be sent to drive a display device and used to predict future video blocks. With the loop filter 209 turned on, a filtering operation is performed on these reconstructed pixels to derive a final reconstructed video output 222.

[0063] Figure 1G is a block diagram illustrating another exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 may perform intra-frame prediction encoding and inter-frame prediction encoding of video blocks within a video frame. Intra-frame prediction encoding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction encoding 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 the term "frame" may be used as a synonym for the term "image" or "picture" in the field of video coding and decoding.

[0064] like Figure 1GAs shown in FIG. 1 , 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 also includes a motion estimation unit 42, a motion compensation unit 44, a partition 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) may be located between the adder 62 and the DPB 64 to filter the block boundaries to remove blocking artifacts from the reconstructed video. In addition to using a deblocking filter, additional loop filters, such as a Sample Adaptive Offset (SAO) filter and / or an Adaptive in-Loop Filter (ALF), may be used to filter the output of adder 62. In some examples, the loop filter may be omitted, and the decoded video block may be provided directly by adder 62 to DPB 64. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed among one or more of the illustrated fixed or programmable hardware units.

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

[0066] like Figure 1GAs shown in , after receiving the video data, the partitioning unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning operation may also include partitioning the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (Coding Unit, CU) according to a predefined splitting structure associated with the video data (e.g., a quadtree (Quad-Tree, QT) structure). A video frame is or can be considered to be a two-dimensional array or matrix of samples with sample values. The samples in the array may also be referred to as pixels or pels. 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. The video frame may be divided into multiple video blocks by (for example) using QT partitioning. A video block is also or can be considered to be a two-dimensional array or matrix of samples with sample values, but the size of the video block is smaller than 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 may be further divided into one or more block partitions or sub-blocks (which may again form blocks) by, for example, iteratively using QT partitioning, binary-tree (BT) partitioning or ternary-tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" as used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or may be or correspond to a corresponding block, such as a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB) and / or correspond to a sub-block.

[0067] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., code rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block (e.g., prediction 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 (such as motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.

[0068] 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 relative 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 relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, e.g., to select an appropriate coding mode for each block of video data.

[0069] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion for a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame, the prediction block in the reference frame relative to the current block being encoded in the current frame. The predetermined pattern may designate video frames in a sequence as P frames or B frames. Intra BC unit 48 may determine a vector (e.g., a block vector) 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 vector.

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

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

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

[0073] In some embodiments, the intra BC unit 48 may generate vectors and extract 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 different encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values ​​for the various tested intra prediction modes using rate-distortion analysis, and select the intra prediction mode with the best rate-distortion characteristics among the tested modes as the suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to generate the coded block, as well as the bit rate (i.e., the number of bits) used to generate the coded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0074] 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 identification of the prediction block may include calculating values ​​for sub-integer pixel positions.

[0075] 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.

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

[0077] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-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 such as a discrete cosine transform (DCT) or a conceptually similar transform.

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

[0079] 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 Storage device 32 is shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.

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

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

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

[0083] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the multiple 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 (such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).

[0084] 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 (such as 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 when decoding the video data (e.g., in an intra-frame or inter-frame prediction decoding mode). The video data memory 79 and the DPB 92 may be formed by 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 9 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 separate memory devices. In some examples, video data memory 79 may be on-chip with other components of video decoder 30, or off-chip relative to those components.

[0085] 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.

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

[0087] 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 vectors and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks may be generated from a reference frame within one of the reference frame lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference frames stored in the DPB 92.

[0088] In some examples, when a video block is decoded 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.

[0089] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for the video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) for decoding the video block of the video frame, the inter prediction frame type (e.g., B or P), the 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 for decoding the video block in the current video frame.

[0090] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as a flag 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, a block vector for each intra BC predicted video block of the frame, an intra BC prediction state for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.

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

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

[0093] 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 (such as a deblocking filter, an SAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1A on a display device 34).

[0094] In the current VVC standard and AVS3 standard, the motion information of the current coding block is copied from the spatial neighboring blocks or temporal neighboring blocks specified by the merge candidate index, or obtained through explicit signaling 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 present 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 tools with the same or similar design spirit.

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

[0096] like Figure 1C As shown in , the video encoder 20 (or more specifically, a partitioning unit in a 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 sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 1D As shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding and decoding 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 and decoding samples of the coding tree block. The coding tree block may be an N×N sample block.

[0097] To achieve better performance, 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 1EAs depicted in , a 64×64 CTU 400 is first partitioned into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are partitioned into four CUs of a block size of 16×16, respectively. Two 16×16 CUs 430 and CU 440 are further partitioned into four CUs of a block size of 8×8, respectively. Figure 1F Depicted is a diagram showing Figure 1E The quadtree data structure of the final result of the partitioning process of CTU 400 depicted in FIG. 4 is a quadtree data structure, each leaf node of the quadtree corresponds to a CU of each 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 and decoding 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 and decoding the samples of the coding block. It should be noted that Figure 1E-1F The quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU may be split into CUs based on quadtree / ternary tree / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is divided by a quadtree structure, and each quadtree leaf CU may be further divided by a binary tree structure and a ternary tree structure. Figure 3A-3G As shown, there are seven possible partition types for a coding block with a width of W and a height of H, namely, quadruple partition, horizontal binary partition, vertical binary partition, horizontal ternary partition and vertical ternary partition.

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

[0099] 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.

[0100] 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, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0101] In addition, if Figure 1E As shown in , the video encoder 20 may use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. 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.

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

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

[0104] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may 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 may perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding samples of the prediction block for the PU of the current CU to corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 may reconstruct the frame.

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

[0106] However, with the ever-improving video data capture technology and more refined video block sizes for retaining details in the video data, the amount of data required to represent the motion vector of the current frame has also increased significantly. One way to overcome this challenge is to benefit from the fact that not only a group of neighboring CUs in both the spatial domain and the temporal domain 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 by exploring the spatial and temporal correlation of the spatially neighboring CUs and / or the temporally co-located CUs, which is also referred to as the "motion vector predictor (MVP)" of the current CU.

[0107] 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 factor of the current CU is subtracted from the actual motion vector of the current CU to generate the motion vector difference (MVD) of the current CU. By doing so, the motion vector determined by the motion estimation unit for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent motion information in the video bitstream can be significantly reduced.

[0108] As in 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") of the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or the temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector predictor of 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 in the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor in the motion vector candidate list to encode and decode the current CU.

[0109] Deblocking filter

[0110] The deblocking filtering process is similar to that in HEVC. In VVC, the deblocking filtering process is applied on CU boundaries, transform sub-block boundaries, and prediction sub-block boundaries. The prediction sub-block boundaries include prediction unit boundaries introduced by the SbTMVP mode and the affine mode, and the transform sub-block boundaries include transform unit boundaries introduced by the SBT mode and the ISP mode and the transforms caused by the implicit partitioning of the large CU. As done in HEVC, the processing order of the deblocking filter is defined as first filtering the vertical edges for the entire picture horizontally, and then filtering the horizontal edges vertically. This particular order enables the application of multiple horizontal filtering processes or multiple vertical filtering processes in parallel threads, or can still be implemented on a CTB-by-CTB basis with only a small processing delay. Compared to HEVC deblocking, the following modifications are introduced: the filter strength of the deblocking filter depends on the average luminance level of the reconstructed samples; the deblocking tC table is extended and adapted to 10-bit video; 4×4 grid deblocking for luminance; a stronger deblocking filter for luminance; a stronger deblocking filter for chrominance; a deblocking filter for sub-block boundaries; and deblocking decisions adapted to smaller motion differences.

[0111] Sample Adaptive Offset

[0112] In VVC, the sample adaptive offset technology is inherited from HEVC. SAO can use different offsets sample by sample in the region according to the sample classification, and the SAO parameters are adapted according to the region. Two types of SAO that can meet the low complexity requirements are adopted in HEVC: edge offset (EO) and band offset (BO). For EO, ​​sample classification is based on the comparison between the current sample and the adjacent samples. For BO, sample classification is based on sample values. Note that each color component can have its own SAO parameters. In order to achieve low coding delay and reduce buffer requirements, the region size is fixed to one CTB. To reduce side information, multiple CTUs can be merged together to share SAO parameters.

[0113] Adaptive Loop Filter

[0114] In VVC, an adaptive loop filter (ALF) with block-based filter adaptation is applied. For the luma component, a filter is selected from 25 filters for each 4×4 block based on the direction and activity of the local gradient.

[0115] Use as Figure 5A and Figure 5B Two diamond filter shapes are shown. A 7×7 diamond shape is applied to the luma component, such as Figure 5B As shown, and a 5×5 diamond shape is applied to the chrominance components, as Figure 5A shown.

[0116] For the luma component, each 4×4 block is classified into one of 25 classes. The class index C is based on the quantized values ​​of its directionality D and activity Export as follows:

[0117]

[0118] In order to calculate D and First, use the one-dimensional (1-D) Laplacian operator to calculate the gradient in the horizontal, vertical, and two diagonal directions:

[0119]

[0120] where the indices i and j refer to the coordinates of the top left sample point within the 4×4 block, and R(i, j) indicates the reconstructed sample point at coordinate (i, j).

[0121] In order to reduce the complexity of block classification, a subsampled 1-D Laplacian operator is applied. Figure 6A-6D As shown, the same subsampling positions are used for gradient calculations in all directions.

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

[0123]

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

[0125]

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

[0127] -Step 1. If and are both true, then D is set to 0.

[0128] -Step 2. If Then continue from step 3; otherwise continue from step 4.

[0129] -Step 3. If Then D is set to 2; otherwise D is set to 1.

[0130] -Step 4. If Then D is set to 4; otherwise D is set to 3.

[0131] The activity value A is calculated as:

[0132]

[0133] A is further quantized to the range of 0 to 4 (inclusive), and the quantized value is represented as For the chrominance components of the picture, no classification method is applied.

[0134] 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 clipping 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 to which the ALF is applied more similar by aligning their directionality.

[0135] Introduces three geometric transformations: diagonal flipping, vertical flipping, and rotation:

[0136] Diagonal flip: f D (k, () = f (l, k), c D (k, l) = c(l, k) (9)

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

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

[0139] Where K is the size of the filter and 0≤k, l≤K-1 are the coefficient coordinates, so that the position (0,0) is at the upper left corner and the position (K-1,K-1) is at the lower right corner. According to the gradient value calculated for the block, the transform is applied to the filter coefficients f(k,l) and the clipping value c(k,l). The relationship between the transform and the four gradients in the four directions is summarized in Table 1 below.

[0140] Table 1. Mapping of gradients computed for a block to transformations

[0141] Gradient Value Transform <![CDATA[g d2 <g d1 And g h <g v ]]> No change <![CDATA[g d2 <g d1 And g v <g h ]]> Diagonal Flip <![CDATA[gd1<g d2 And g h <g v ]]> Flip Vertically <![CDATA[gd1<g d2 And g v <g h ]]> Rotation

[0142] At the decoder side, when ALF is enabled for CTB, each sample R(i, j) within the CU is filtered, resulting in a sample value R′(i, j) as shown below,

[0143] R′(i, j)=R(i, j)+((∑ k≠0 ∑ l≠0 f(k,l)×K(R(i+k,j+l)-R(i,j),c(k,l))+64)>>7) (12)

[0144] where f(k, l) represents the decoded filter coefficients, K(x, y) is the clipping function, and c(k, l) represents the decoded clipping parameters. The variables k and l are and where L represents the filter length. The clipping function K(x, y) = min(y, max(-y, x)), which corresponds to the function Clip3(-y, y, x). The clipping operation introduces nonlinearity to make the ALF more effective by reducing the influence of neighboring sample values ​​that are very different from the current sample value.

[0145] Bilateral filter

[0146] Bilateral filtering is one of the typical filtering techniques. For the filter kernel of bilateral filtering, the contribution of each sample point depends not only on the spatial distance, but also on the intensity difference between the samples. The sample point at position (i, j) will be filtered using its neighboring sample point (k, l). The weight ω(i, j, k, l) is the weight assigned to the sample point (k, l) for filtering the sample point (i, j) and is defined as:

[0147]

[0148] Where I(i, j) and I(k, l) are the intensity values ​​of sample points (i, j) and (k, l) respectively. The intensity of the bilateral filter is given by σ d (spatial intensity) and σ r (Enhancement Strength) control. The output samples are the weighted average of the samples within the filter window.

[0149] In ECM, there are three loop filter modules, including deblocking filter (DBF), sample adaptive offset (SAO), and adaptive loop filter (ALF). During the development of VVC, bilateral filters were first proposed to refine the reconstruction after inverse transformation. Later, bilateral filtering technology was extended as part of the loop filter in ECM, which can be used in conjunction with SAO as described by the following equation. Before proceeding to ALF, each filter creates per-sample offsets and adds these offsets to the input samples before clipping.

[0150] I OUT =clip3(I C +ΔI BIF +ΔI SAO ) (14)

[0151] Among them I C is the input sample from deblocking, ΔI BIF is the offset from the bilateral filter, and ΔI SAO is the offset from SAO. The current implementation of bilateral filtering in ECM provides the encoder with the possibility to enable or disable filtering at CTU level and slice level. The encoder makes the decision by evaluating the RDO cost.

[0152] Tables 2, 3 and 4 below provide the picture parameter set RBSP syntax, slice header syntax and coding tree unit syntax for the bilateral filter, respectively.

[0153] Table 2. Picture parameter set RBSP syntax for bilateral filter

[0154]

[0155]

[0156] pps_bilateral_filter_enabled_flag equal to 0 specifies that the bilateral loop filter is disabled for the slices that reference the PPS. pps_bilateral_filter_flag equal to 1 specifies that the bilateral loop filter is enabled for the slices that reference the PPS.

[0157] bilateral_filter_strength specifies the bilateral loop filter strength value used in the bilateral transform block filtering process. The value of bilateral_filter_strength should be in the range of 0 to 2 (inclusive).

[0158] bilateral_filter_qp_offset specifies the offset used in the derivation of the bilateral filter lookup table LUT(x) for the slice of the reference PPS. bilateral_filter_qp_offset should be in the range of -12 to +12 (inclusive).

[0159] Table 3. Slice header syntax for bilateral filter

[0160]

[0161] Table 4. Coding tree unit syntax for bilateral filter

[0162]

[0163] slice_bilateral_filter_all_ctb_enabled_flag equal to 1 specifies that the bilateral filter is enabled and applied to all CTBs in the current slice. When slice_bilateral_filter_all_ctb_enabled_flag is not present, it is inferred to be equal to 0.

[0164] slice_bilateral_filter_enabled_flag equal to 1 specifies that the bilateral filter is enabled and may be applied to CTBs of the current slice. When slice_bilateral_filter_enabled_flag is not present, it is inferred to be equal to slice_bilateral_filter_all_ctb_enabled_flag.

[0165] bilateral_filter_ctb_flag[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] equal to 1 specifies that the bilateral filter is applied to the luma CTB of the CTU at luma position (xCtb, yCtb). bilateral_filter_ctb_flag[cIdx][xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] equal to 0 specifies that the bilateral filter is not applied to the luma CTB of the CTU at luma position (xCtb, yCtb). When bilateral_filter_ctb_flag is not present, it is inferred to be equal to (slice_bilateral_filter_all_ctb_enabled_flag & slice_bilateral_filter_enabled_flag).

[0166] The filtering process for the filtered CTU proceeds as follows. At picture boundaries where samples are unavailable, the bilateral filter uses expansion (sample repetition) to fill in the unavailable samples. For virtual boundaries, the same behavior as SAO may be performed, i.e., no filtering occurs. When crossing horizontal CTU boundaries, the bilateral filter may access the same samples as SAO. As an example, if the center sample I C (See Fig.13 ) is located on the top line of CTU, and I NW ,I A and I NE Read from the upper CTU, just like SAO does, but I AA is filled, so no additional line buffer is needed.

[0167] Center Sample I C The surrounding samples are based on Fig.13 Indicates, where A, B, L and R represent above, below, left and right, and where NW, NE, SW, SE represent northwest, etc. Likewise, AA represents above, BB represents below, etc.

[0168] Each surrounding sample point I A ,I R etc. will be used for the corresponding modifier value etc. These are calculated as follows: from the sample point I from the right R Starting with the contribution of , we calculate the difference:

[0169] ΔI R =(|I R -I C |+4)>>3 (15)

[0170] where |·| represents the absolute value. For data other than 10 bits, we use ΔI instead. R =(|I R -I C |+2 n -6 )>>(n-7), where for 8-bit data, n=8, etc. The resulting value is now clipped so that it is less than 16:

[0171] i R =min(15,ΔI R ) (16)

[0172] The modifier value is now calculated as:

[0173]

[0174] Among them, LUT ROW [] is an array of 16 values ​​determined by the value of qpb=clip(0, 25, QP+bilateral_filter_qp_offset-17).

[0175] and The modifier value is in the same way as the I L ,I A and I B For the diagonal sample point I NW ,I NE ,I SE ,I SW and the sample point I with two steps of distance AA ,I BB ,I RR and I LL , the calculation also follows equations 3 and 4, but uses values ​​shifted by 1. Taking the diagonal sample point I SE For example:

[0176]

[0177] And similarly calculate the other diagonal samples and the samples at two steps. Add the modifier values ​​together:

[0178]

[0179] Notice, Equal to the previous sample point Likewise, Equal to the sample point above And similar symmetries can be found for the modifier values ​​for the diagonal and two-step distances. This means that in hardware implementation, the six values ​​are calculated and That's it, and the remaining six values ​​can be obtained from the previously calculated values.

[0180] m sum The value is now multiplied by c=1, 2 or 3, which can be done using a single adder and a logic AND gate according to the following:

[0181] c v =k1&(m sum <<1)+k2&m sum (20)

[0182] Where & represents logical AND, and k1 is the most significant bit of the multiplier c, and k2 is the least significant bit. The minimum block size D=min(width, height) as shown in Table 5 is used to obtain the value to be multiplied.

[0183] Table 5. Parameter c is obtained from the minimum size of the block D = min (width, height)

[0184] Block Type D≤4 4<D<16 D≥16 Intra 3 2 1 Interframe 2 2 1

[0185] Finally, calculate the bilateral filter offset ΔI BIF For full strength filtering,

[0186] ΔI BIF =(c v +16)>>5 (21)

[0187] For half-intensity filtering, we use instead:

[0188] ΔI BIF =(c v +32)>>6 (22)

[0189] The general formula for n bits of data is to use:

[0190]

[0191] where bilateral_filter_strength can be 0 or 1 and is signaled in pps.

[0192] Signal Adaptive Diffusion Filter

[0193] Diffusion filtering technique was proposed in JVET-J0038, where it was applied to the prediction signal generated by a hybrid video codec. Two types of diffusion filters were proposed: linear diffusion filter and nonlinear diffusion filter. Linear diffusion filter uses a symmetric filter mask to perform n-fold correlation on the extended prediction signal. Nonlinear diffusion filter uses the input prediction signal to identify the structure of the underlying signal and diffuses along the edges instead of perpendicular to them.

[0194] General algorithm description. It is proposed to apply a diffusion filter to the prediction signal pred generated by the underlying codec. The filter can be applied to intra prediction as well as inter prediction. Two types of diffusion filters are proposed: linear diffusion filter and nonlinear diffusion filter.

[0195] Linear diffusion filter. Mathematically, the linear diffusion filter is motivated by the following partial differential equation:

[0196]

[0197] u(x,0)=pred(x)

[0198] where u represents the filtered prediction and the parameter t corresponds to the number of iterations in a discrete setting. The linear diffusion filter is implemented as a symmetric filter mask,

[0199]

[0200] Note that all 2D filter masks are implemented as 1D filters whenever possible. The filtered prediction u is computed by correlating the prediction signal pred with the filter mask h n times, i.e., by n :

[0201]

[0202] Here * indicates that the filter mask is applied to the image, also known as correlation processing. At each correlation processing step, symmetric boundary conditions are assumed at the right and lower boundaries, while at the upper and left boundaries, equality with the reconstructed samples is assumed, as Figure 7 shown.

[0203] In some examples, the number of iterations n is equal to 5 or 15 iteration steps in the case of an inter prediction signal and equal to 5 or 35 iteration steps in the case of an intra prediction signal. The more iteration steps are performed, the smoother the modified prediction will be. Finally, the filtered prediction is used as a modified prediction block.

[0204] Nonlinear diffusion filter. The linear diffusion filter smoothes the edges and similarly obtains smoother areas, while the idea of ​​the nonlinear diffusion filter is to use a given prediction signal to locate the edges and reduce the amplitude of the diffusion at those locations. The implementation of the nonlinear diffusion filter is motivated by the following nonlinear differential equation with initial and boundary conditions as described above:

[0205]

[0206] Here, the edge and its direction are detected based on the gradient of the initial prediction signal. Therefore, the proposed nonlinear diffusion filter performs n-times correlation of the prediction signal pred with the mask h(x), which is at each position is different and is calculated from the prediction signal pred as follows.

[0207] First, in order to identify the edge, a Gaussian smoothed diffusion tensor is constructed using the Gaussian kernel K:

[0208]

[0209] Discrete Gradient The finite difference calculation is performed using the following boundary conditions:

[0210] and This means that the gradient components EW and NS are given by the simple difference of the two sample values.

[0211] Then, for each sample point position in the prediction block area The 2×2 diffusion tensor is given by:

[0212]

[0213] The dot product is understood as point-wise. The Gaussian kernel is chosen as:

[0214]

[0215] The Gaussian kernel is applied to the gradient matrices EW·EW, EW·NS, and NS·NS. In this way, for each We obtain a symmetric 2×2 matrix:

[0216]

[0217] Secondly, the matrix is diagonalized so that

[0218]

[0219] Where λ1(x) and λ2(x) represent The eigenvalues ​​of and θ represent the associated rotation angle in the coordinate system. Using trigonometric formulas, it can be shown that:

[0220]

[0221] in

[0222]

[0223] The determination of the eigenvalues ​​λ1, λ2 is achieved using an integer lookup table. For this purpose, in the case where a and b represent rounded integers,

[0224] and For a = 0..256 and b = 0..256, the following expressions are tabulated:

[0225]

[0226]

[0227]

[0228]

[0229]

[0230]

[0231] where the square brackets [] specify rounding to the next integer.

[0232] Next, the function f is applied to the edge detector Eigenvalues ​​λ1, λ2: If the eigenvalues ​​λ1, λ2 are large, i.e. an edge is indicated, then the function f will be small. In the case of an intra-frame, the function f is chosen to be is an approximation of , and in the case of inter-frames, the function f is chosen to be Wherein the parameter μ>0. In an embodiment, the factor Can be incorporated into function f.

[0233] The parameter μ is a fixed value given by:

[0234]

[0235] Tabulate these two functions f(s) using a table of integers.

[0236] After applying the function f, the matrix is ​​transformed again:

[0237]

[0238] Using this sample-by-sample definition, each sample position in the prediction block area is used The entry defines three functions a xx 、a xy 、a yy Similarly, as described above, rotation of a 2×2 matrix is ​​achieved using the lookup table given above.

[0239] Given the position of each sample point The array a xx (x), a xy (x), a yy (x), using the simple average of two adjacent sample points to derive the following 8 arrays:

[0240]

[0241]

[0242]

[0243]

[0244]

[0245]

[0246]

[0247]

[0248] The integer weighting matrices wN, wS, wW, wE, wO1, wO2, wO3, wO4 are calculated at the beginning of the nonlinear diffusion filtering process. These matrices are used for the actual filtering in the iterative steps. To summarize the method, the integer weighting matrices are derived by the following sequential steps:

[0249] 1) Calculate the discrete sample point difference EW(x) and NS(x)

[0250] 2) Calculate the product (EW·EW)(x), (EW·NS)(x), (NS·NS)(x)

[0251] 3) Filter the three products with a 5-tap filter kernel to obtain the gradient array g xx (x), g xy (x) and g yy (x)

[0252] 4) Use the lookup table to determine the eigenvalues ​​λ1(x) and λ2(x)

[0253] 5) Apply the function f(s) to the eigenvalues ​​using a predefined lookup table

[0254] 6) Use the lookup table to derive the integer array a xx (x), a xy (x) and a yy (x)

[0255] 7) Use the sample point average to derive the integer weighted arrays wN, wS, wW, wE, wO1, wO2, wO3 and w04.

[0256] Given the sample point position The iterative filtering is performed as follows: Let u0 = pred represent the initial brightness prediction signal. In each iterative step, the signal u is modified according to the following formula:

[0257]

[0258] The dot product and summation should be understood as point-by-point. t+1 represents the filtered prediction after t+1 iteration steps. In this way, diffusion along the edges is preferred over diffusion perpendicular to the edges. A nonlinear filter is applied to the prediction for two different numbers of iteration steps corresponding to two nonlinear diffusion filter modes from which the encoder can choose. It is proposed that in the case of intra frames, the encoder can choose between 5 and 20 iteration steps, and in the case of inter frames, the encoder can choose between 4 and 8 iteration steps, as shown in Table 3 below. Finally, the filtered prediction is used as a modified prediction block.

[0259] Non-local means filtering

[0260] The non-local mean filtering technique was first proposed in the field of image denoising. Fig. 9 As shown. The image to be filtered is denoted as I. For each pixel p[i] to be filtered, the filtered pixel is calculated as the weighted average of all pixels in the image:

[0261]

[0262] where the weighting factor depends on the similarity between pixels p[i] and p[j]. The similarity between two pixels p[i] and p[j] depends on the similarity of the windows centered around pixels i and j, denoted as B[i] and B[j]. The weighting factor is calculated as follows:

[0263]

[0264] where D{,} is used to measure the distance between two blocks, h is used as the filtering degree, and Z[i] is a normalization constant:

[0265]

[0266] Nonlocal structure-based loop filter (NLSF)

[0267] The non-local structure based loop filter (NLSF) was first introduced in JVET-J0011 and then improved in JVET-J0071. The NLSF design in J0011 contains two modules: group construction by block matching and SVD-based filtering. Collaborative filtering is implemented by iterative singular value decomposition (SVD), which calculates singular values ​​and their singular vectors by iterative power method, and the internal data type of iterative power method is represented by double precision floating point. In order to adapt to video codec standards and be hardware-friendly, it is proposed to solve this problem by eliminating double precision values ​​through decimal digit clipping after shifting the intermediate results to large numbers during iterations in JVET-J0071.

[0268] Group construction through block matching. Figure 8 As shown in Figure 1, the input reconstructed frame is first divided into K overlapping blocks, each of which is used as a basic cycle unit. s ×B s represents the size of the recurrent unit, which is set to 6 by default. For each recurrent unit, it is stretched to the vector k = 1, 2, ..., K. Then, for each block x k , collect no more than c (default is 20) similar blocks in the corresponding search window to build a block group. Figure 8 , square 801 represents the current cycle unit, square 802 represents the search window, and square 803 represents the CTU in which the current block is located. m is used to represent the number of similar blocks selected in the block matching process. After the block matching process, all selected similar blocks are stacked into a block of size B. s 2 ×m matrix, Represented by , where each column of the matrix corresponds to a block, i.e.,

[0269] SVD-based filtering. For each group k = 1, 2, ..., K, decomposed by SVD as follows:

[0270]

[0271] in is a column vector, It has on its main diagonal is a diagonal matrix of elements of , and They are and In order to suppress compression noise, the singular values Apply hard thresholding,

[0272]

[0273] Wherein hard(x, a)=x⊙1(abs(x)-a) represents the operator of hard threshold operation, ⊙ represents the element-by-element product of two vectors, and τ represents the threshold.

[0274] Since the threshold τ used in the hard thresholding process is related to Qstep, the relationship between QP and Qstep for orthogonal transformation is formulated as follows:

[0275]

[0276] The relationship between τ and Qstep is linear, as follows:

[0277]

[0278] Where a and b represent the parameters of offline training. a and b are double type (double precision floating point) variables.

[0279] The reduced singular values Reconstruct the filtered image and The reconstruction of can be formulated as,

[0280]

[0281] This process is applied to all K groups to achieve k = 1, 2, ..., K. Finally, all are averaged to get the frame

[0282] In the present disclosure, methods and apparatus for loop filtering using non-local correlation are provided.

[0283] Non-local means filter. When applying non-local means filtering in video codecs, several factors may affect the codec performance, including: the number of similar blocks, the search range, the window size, and the filter strength, which are referred to as the filter parameter set of the non-local means filter.

[0284] In one example of non-local means filtering, using the sum of absolute differences (SAD) when searching for similar blocks is provided.

[0285] In another example of non-local mean filtering, QP-dependent filtering parameters using a non-local mean filter are provided. That is, for different QPs, different sets of {number of similar blocks, search range, window size, filter strength} are used.

[0286] In another example of non-local mean filtering, the filter parameter set of the non-local mean filter depends on the codec configuration in addition to the QP in the second embodiment. That is, different filter parameter sets are used for different codec configurations (intra-frame, low delay and random access).

[0287] In another example of non-local mean filtering, it is proposed to enable a CTU / strip / picture adaptive filtering parameter set for a non-local mean filter. For each CTU / strip / picture, the best filtering parameters are determined at the encoder side through rate-distortion optimization, and then the best filtering parameters are signaled in the bitstream. One way to determine the filtering parameters is to define a candidate list for each filtering parameter and traverse each candidate at the encoder side to calculate its RD cost.

[0288] Non-local low-rank filter with soft thresholding. In order to improve the codec gain of the non-local mean filter, non-local correlation is combined with a low-rank constraint. After searching for similar blocks, the blocks are organized into a matrix, after which singular value decomposition (SVD) is applied to the matrix. Then, soft thresholding is used to shrink the singular values, followed by inverse SVD to obtain the filtered image.

[0289] In the non-local low-rank filtering technique, the filtering process can be divided into the following steps.

[0290] Step 1. First, divide the noisy image into p×p patches.

[0291] Step 2. For each block y i , block matching is used to search for the K nearest neighbors in the current picture and (optionally) the reference picture by a specific metric (such as SAD, SSE or other metric).

[0292] Step 3. i The K nearest neighbors of the image block group G are constructed i and are arranged as a matrix:

[0293]

[0294] in is by group G i Each block in is arranged as a column vector with p 2 A matrix of size K × K.

[0295] Step 4. Matrix Perform SVD decomposition.

[0296]

[0297] Step 5. For the singular value matrix Apply a soft thresholding operation.

[0298]

[0299] Where softTh() is reduced by the threshold τ A function of the diagonal elements of . The kth diagonal element in is quantized by the nonlinear function D at level τ(k). τ(k) Zoom out:

[0300] D τ(k) :λ k,τ(k) =max(|λ k |-τ(k), 0)

[0301] is the reduced singular value λ at the diagonal position k,τ(k) The matrix composed of.

[0302] Step 6. Perform inverse SVD to obtain filtered block groups.

[0303]

[0304] One of the key steps is to determine the threshold for each diagonal element in step 5. In the present disclosure, the threshold is calculated as follows. The threshold is estimated for each image block group using the following equation:

[0305]

[0306] in is the standard deviation of the compression noise, and For group G i The standard deviation of the original image patch in the kth dimension of the SVD space is estimated as follows.

[0307]

[0308] in yes The kth singular value of . When α is zero, the soft threshold operation is skipped. In addition, the deviation of the reconstructed image block is used to estimate the deviation of the compression noise using a power function parameterized by α and β.

[0309] σ n =α×σ yβ

[0310] where σ y The calculation is as follows,

[0311]

[0312] Here k (i) represents the image block vector y k The i-th pixel of .

[0313] In summary, to perform non-local low-rank filtering, the filtering parameters may include: the search range, the number of matching blocks, the window size for non-local search, α and β for estimating the deviation of the compression noise, ω for estimating the deviation of the original image partition, and a constant c for estimating the threshold.

[0314] In one example of non-local low rank filtering, using the sum of absolute differences (SAD) when searching for similar blocks is provided.

[0315] In another example of non-local low-rank filtering, QP-dependent filtering parameters using a non-local mean filter are provided. That is, for different QPs, different sets of {number of blocks, search range, window size, α, β, ω, c} are used.

[0316] In another example of non-local low-rank filtering, the filtering parameters of the non-local mean filter depend on the codec configuration in addition to the QP in the second embodiment. That is, different sets of filtering parameters are used for different codec configurations (intra-frame, low-delay or random access configuration) and for pictures with different temporal layers.

[0317] In another example of non-local low-rank filtering, a CTU / strip / picture adaptive filtering parameter set for a non-local low-rank filter is provided. For each CTU / strip / picture, the optimal filtering parameters are determined on the encoder side by rate-distortion optimization, and then the index indicating the optimal filtering parameters is signaled in the bitstream. One method for determining the filtering parameters is to define a candidate list for each filtering parameter and traverse each candidate on the encoder side to calculate its RD cost. The parameter set that results in the minimum RD cost is selected as the final parameter set.

[0318] Classification-based non-local filtering

[0319] Due to the diversity of video content, the statistics of different videos may vary greatly for different blocks in the same image. In order to further improve the compression performance of non-local filtering, the image blocks are first divided into N categories, and different sets of filtering parameters are used for different categories.

[0320] In one example, classification of partitions based on, but not limited to, directionality and activity is provided, such as adaptive loop filters in VVC and ECM.

[0321] In another example, after all partitions are divided into N categories, separate sets of filtering parameters are used for the non-local mean filter and the non-local low rank filter for different {category, QP, codec configuration} pairs.

[0322] In another example, for each CTU / slice / picture, the best filtering parameters are selected from a predefined parameter candidate list at the encoder side through rate-distortion optimization, and then the best filtering parameters are signaled in the bitstream. After all blocks are divided into N categories, for different {category, QP, codec configuration, category} pairs, separate parameter candidate lists are defined and used for each parameter of the non-local average filter and the non-local low rank filter.

[0323] Syntax Design: In order to better improve the encoding and decoding performance of the non-local filter, the use of switching the non-local filter at multiple granularities is provided.

[0324] In some examples, non-local filters are turned on / off at picture level, slice level, and CTU level, and the filtering parameters are fixed at both the encoder and decoder. Tables 6, 7, and 8 provide picture parameter set RBSP syntax, slice header syntax, and coding tree unit syntax for non-local filters, respectively.

[0325] Table 6. Picture parameter set RBSP syntax for non-local filters

[0326]

[0327] pps_nonlocal_filter_enabled_flag equal to 0 specifies that the non-local loop filter is disabled for the slices that reference the PPS. pps_nonlocal_filter_flag equal to 1 specifies that the non-local loop filter is enabled for the slices that reference the PPS.

[0328] Table 7. Slice header syntax for non-local filters

[0329]

[0330] Table 8. Coding tree unit syntax for non-local filters

[0331]

[0332] slice_nonlocal_filter_all_ctb_enabled_flag equal to 1 specifies that the non-local filter is enabled and applied to all ctbs in the current slice. When slice_nonlocal_filter_all_ctb_enabled_flag is not present, it is inferred to be equal to 0.

[0333] slice_nonlocal_filter_enabled_flag equal to 1 specifies that the non-local filter is enabled and may be applied to the CTBs of the current slice. When slice_nonlocal_filter_enabled_flag is not present, it is inferred to be equal to slice_nonlocal_filter_all_ctb_enabled_flag.

[0334] nonlocal_filter_ctb_flag[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] equal to 1 specifies that a non-local filter is applied to the luma coding tree block of the coding tree unit at luma position (xCtb, yCtb). nonlocal_filter_ctb_flag[cIdx][xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] equal to 0 specifies that a non-local filter is not applied to the luma coding tree block of the coding tree unit at luma position (xCtb, yCtb). When nonlocal_filter_ctb_flag is not present, it is inferred to be equal to (slice_nonlocal_filter_all_ctb_enabled_flag & slice_nonlocal_filter_enabled_flag).

[0335] In some examples, turning on / off the non-local filter at the picture level, slice level, and CTU level is provided, and the filtering parameters are signaled at the slice level in the bitstream. Table 9 provides the syntax of the slice header for this embodiment. In this example, if the non-local filter is used for the current slice, nonlocal_filter_param_set_idx is signaled at the slice level. The picture parameter set RBSP syntax and coding tree unit syntax are the same as Table 6 and Table 8.

[0336] Table 9. Slice header syntax for non-local filters

[0337]

[0338] In some examples, non-local filters are turned on / off at picture level, slice level, CTU level, and sub-block level. If a non-local filter is used for a particular CTU, the CTU is divided into N×N sub-blocks, and an additional flag is signaled for each sub-block to indicate that a non-local filter is used for the sub-block. Table 10 provides the coding tree unit syntax of this embodiment.

[0339] Table 10. Coding tree unit syntax for non-local filters

[0340]

[0341] nonlocal_filter_all_block_flag equal to 1 specifies that the nonlocal filter is enabled for the CTU and is applied to all subblocks in the current CTB. When nonlocal_filter_all_block_flag is not present, it is inferred to be equal to 0.

[0342] nonlocal_filter_subblock_flag equal to 1 specifies that the nonlocal filter is enabled for the current subblock.

[0343] Fig.10 A computing environment (or computing device) 1010 coupled to a user interface 1060 is shown. The computing environment 1010 may be part of a data processing server. In some embodiments, the computing device 1010 may perform any of the various methods or processes (such as encoding / decoding methods or processes) described above according to various examples of the present disclosure. The computing environment 1010 may include a processor 1020, a memory 1040, and an I / O interface 1050.

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

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

[0346] The I / O interface 1050 provides an interface between the processor 1020 and peripheral interface modules such as 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 1050 may be coupled to an encoder and a decoder.

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

[0348] A non-transitory computer-readable storage medium has stored therein a plurality of programs for execution by a computing device having one or more processors, wherein the plurality of programs, when executed by the one or more processors, causes the computing device to perform the above-described method for motion prediction.

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

[0350] Fig.11 is a flowchart illustrating a method for video encoding according to an example of the present disclosure.

[0351] In step 1101, the processor 1020 on the encoder side may obtain one or more similar pixels for a first pixel to be filtered in a picture based on a filtering parameter set, wherein the one or more similar pixels and the first pixel are from the picture, and the filtering parameter set includes the number of similar blocks, a search range, and a window size.

[0352] In some examples, processor 1020 may obtain similar blocks based on the SAD, and obtain one or more similar pixels from the similar blocks, respectively.

[0353] In some examples, processor 1020 may obtain a set of filtering parameters based on a quantization parameter (QP) value used during the encoding process.

[0354] In some examples, processor 1020 may obtain a set of filtering parameters based on a codec configuration used during the encoding process.

[0355] In some examples, processor 1020 may determine one or more optimal filtering parameters from a set of filtering parameters based on rate-distortion cost, signal the one or more optimal filtering parameters at a specified level in a bitstream, and send the bitstream to a decoder, where the specified level may be one of the following levels: picture level, slice level, or CTU level.

[0356] In some examples, processor 1020 may determine a candidate list for filtering parameters from a filtering parameter set such that the decoder obtains optimal filtering parameters from the candidate list according to a rate-distortion cost.

[0357] In some examples, the filter parameter set may further include a filter strength, and the filter parameter set is associated with a non-local means filter.In addition, the processor 1020 may calculate a weighted average based on one or more similar pixels, and obtain a filtered pixel for the first pixel based on the weighted average.

[0358] In some examples, the filter parameter set may also include one or more first estimated parameters for estimating the deviation of the compressed noise, a second estimated parameter for estimating the deviation of the original patch, and a constant parameter for estimating the threshold, and wherein the filter parameter set is associated with the non-local low rank filter. In addition, the processor 1020 may calculate a singular value decomposition (SVD) based on one or more similar pixels, and obtain a filtered pixel for the first pixel based on the SVD. For example, the one or more first estimated parameters may include parameters α and β used in the filtering process in the non-local low rank filtering technology. The second estimated parameter may be a parameter ω used in the filtering process in the non-local low rank filtering technology. The constant parameter may be a constant c used in the filtering process in the non-local low rank filtering technology.

[0359] In some examples, processor 1020 may divide the image into multiple blocks, classify the multiple blocks into multiple categories, and determine multiple filter parameter sets for the multiple categories, wherein the filter parameter set is one of the multiple filter parameter sets and is different from other filter parameter sets in the multiple filter parameter sets.

[0360] In some examples, processor 1020 may classify the plurality of tiles into a plurality of categories based on directionality and activity.

[0361] In some examples, processor 1020 may determine each set of filter parameters based on at least one of the following parameters: a category, a QP value used during encoding, or a codec configuration used during encoding. For example, QP-dependent filter parameters may be used for a non-local mean filter, and different sets of {number of similar blocks, search range, window size, filter strength} may be used for different QPs. For another example, a set of filter parameters for a non-local mean filter may depend on the codec configuration. That is, different sets of filter parameters are used for different codec configurations (intra-frame, low latency, and random access).

[0362] In some examples, processor 1020 may signal one or more non-local filter enabling syntax elements at a specified level, including one or more of the following levels: picture level, slice level, or CTU level.

[0363] In some examples, processor 1020 may determine that a non-local filter is enabled for a slice of a reference corresponding picture parameter set (PPS) in response to determining that a first non-local filter enabling syntax element is signaled at a picture level and is equal to 1. Additionally, processor 1020 may determine that a non-local filter is disabled for a slice of a reference corresponding PPS in response to determining that a first non-local filter enabling syntax element is signaled at a picture level and is equal to 0. For example, the first non-local filter enabling syntax element may be pps_nonlocal_filter_enabled_flag in Table 6.

[0364] In some examples, in response to determining that the first non-local filter enable syntax element is equal to 1, processor 1020 may, in response to determining that the second non-local filter enable syntax element is signaled at the slice level and is equal to 1, determine that the non-local filter is enabled and the non-local filter is applied to all coding tree blocks (CTBs) in the current slice; in response to determining that the second non-local filter enable syntax element is not present, infer that the second non-local filter enable syntax element is zero; in response to determining that the second non-local filter enable syntax element is zero and the third non-local filter enable syntax element is signaled at the slice level and is equal to 1, determine that the non-local filter is enabled and the non-local filter is applied to one or more CTBs in the current slice; and in response to determining that the second non-local filter enable syntax element is zero and the third non-local filter enable syntax element is equal to 0, infer that the third non-local filter enable syntax element is equal to the second non-local filter enable syntax element. For example, the second non-local filter enable syntax element may be equal to slice_nonlocal_filter_all_ctb_enabled_flag in Table 7, and the third non-local filter enable syntax element may be slice_nonlocal_filter_enabled_flag in Table 7.

[0365] In some examples, in response to determining that the second non-local filter enable syntax element is equal to 0 and the third non-local filter enable syntax element is equal to 1, processor 1020 may determine to apply the non-local filter to the luma CTB in the CTU at the luma position in response to determining that the fourth non-local filter enable syntax element is equal to 1, determine not to apply the non-local filter to the luma CTB in the CTU at the luma position in response to determining that the fourth non-local filter enable syntax element is equal to 0, and in response to determining that the fourth non-local filter enable syntax element does not exist, infer the fourth non-local filter enable syntax element based on the second non-local filter enable syntax element and the third non-local filter enable syntax element. For example, the fourth non-local filter enable syntax element may be nonlocal_filter_ctb_flag in Table 8.

[0366] In some examples, processor 1020 may signal one or more filter parameters in the filter parameter set at a slice level in response to determining to apply a non-local filter to the current slice.

[0367] In some examples, the specified level may also include a sub-block level, and processor 1020 may, in response to determining that the fifth non-local filter enable syntax element is equal to 1, determine that the non-local filter is enabled for the CTU and applies the non-local filter to all sub-blocks in the current CTB, and in response to determining that the fifth non-local filter enable syntax element is not present, infer that the fifth non-local filter enable syntax element is equal to 0.

[0368] In some examples, processor 1020 may determine to enable a non-local filter for the current sub-block in response to determining that a sixth non-local filter enable syntax element is equal to 1.

[0369] In step 1102 , the processor 1020 may obtain a filtered pixel for a first pixel based on one or more similar pixels.

[0370] Fig.12 is a flowchart illustrating a method for video decoding according to an example of the present disclosure.

[0371] In step 1201, the processor 1020 at the decoder side may obtain one or more filtering parameters, wherein the one or more filtering parameters are from a filtering parameter set including the number of similar blocks, a search range, and a window size.

[0372] In some examples, processor 1020 may obtain a set of filtering parameters based on a QP value used during the encoding process.

[0373] In some examples, processor 1020 may obtain a set of filtering parameters based on a codec configuration used during the encoding process.

[0374] In some examples, processor 1020 may obtain one or more filter parameters signaled at a specified level in a bitstream received from an encoder, where the specified level may include one of the following levels: picture level, slice level, or CTU level.

[0375] In some examples, processor 1020 may obtain the best filtering parameters from a candidate list for filtering parameters from a filtering parameter set according to a rate-distortion cost.

[0376] In some examples, the set of filtering parameters also includes a filter strength, and the set of filtering parameters is associated with a non-local means filter.

[0377] In some examples, the filter parameter set also includes one or more first estimation parameters for estimating the deviation of compression noise, second estimation parameters for estimating the deviation of original image blocks, and a constant parameter for estimating the threshold, and wherein the filter parameter set is associated with a non-local low rank filter.

[0378] In some examples, the filter parameter set is one of a plurality of filter parameter sets, and the plurality of filter parameter sets correspond to a plurality of categories for a plurality of partitions from a picture.

[0379] In some examples, multiple tiles are classified into multiple categories based on directionality and activity.

[0380] In some examples, each set of filter parameters is determined based on at least one of the following parameters: a category, a QP value used during encoding, or a codec configuration used during encoding. For example, QP-dependent filter parameters can be used for a non-local mean filter, and for different QPs, different sets of {number of similar blocks, search range, window size, filter strength} are used. For another example, a set of filter parameters for a non-local mean filter may depend on the codec configuration. That is, for different codec configurations (intra-frame, low delay, and random access), different sets of filter parameters are used.

[0381] In some examples, processor 1020 may obtain one or more non-local filter enabling syntax elements at a specified level, where the specified level includes one or more of the following levels: picture level, slice level, or CTU level.

[0382] In some examples, the processor 1020 may determine to enable a non-local filter for a slice based on a corresponding picture parameter set (PPS). For example, the processor 1020 may determine to enable a non-local filter for a slice referring to the corresponding picture parameter set (PPS) in response to determining that a first non-local filter enable syntax element is signaled at a picture level and is equal to 1. In addition, the processor 1020 may determine to disable a non-local filter for a slice referring to the corresponding PPS in response to determining that a first non-local filter enable syntax element is signaled at a picture level and is equal to 0. For example, the first non-local filter enable syntax element may be pps_nonlocal_filter_enabled_flag in Table 6.

[0383] In some examples, in response to determining that the first non-local filter enable syntax element is equal to 1, processor 1020 may, in response to determining that the second non-local filter enable syntax element is signaled at the slice level and is equal to 1, determine that the non-local filter is enabled and the non-local filter is applied to all coding tree blocks (CTBs) in the current slice; in response to determining that the second non-local filter enable syntax element is not present, infer that the second non-local filter enable syntax element is zero; in response to determining that the second non-local filter enable syntax element is zero and the third non-local filter enable syntax element is signaled at the slice level and is equal to 1, determine that the non-local filter is enabled and the non-local filter is applied to one or more CTBs in the current slice; and in response to determining that the second non-local filter enable syntax element is zero and the third non-local filter enable syntax element is equal to 0, infer that the third non-local filter enable syntax element is equal to the second non-local filter enable syntax element. For example, the second non-local filter enable syntax element may be equal to slice_nonlocal_filter_all_ctb_enabled_flag in Table 7, and the third non-local filter enable syntax element may be slice_nonlocal_filter_enabled_flag in Table 7.

[0384] In some examples, in response to determining that the second non-local filter enable syntax element is equal to 0 and the third non-local filter enable syntax element is equal to 1, processor 1020 may determine to apply the non-local filter to the luma CTB in the CTU at the luma position in response to determining that the fourth non-local filter enable syntax element is equal to 1, determine not to apply the non-local filter to the luma CTB in the CTU at the luma position in response to determining that the fourth non-local filter enable syntax element is equal to 0, and in response to determining that the fourth non-local filter enable syntax element does not exist, infer the fourth non-local filter enable syntax element based on the second non-local filter enable syntax element and the third non-local filter enable syntax element. For example, the fourth non-local filter enable syntax element may be nonlocal_filter_ctb_flag in Table 8.

[0385] In some examples, processor 1020 may predefine one or more filtering parameters in a filtering parameter set.

[0386] In some examples, processor 1020 may obtain one or more filtering parameters at a slice level in response to determining to apply a non-local filter to the current slice.

[0387] In some examples, processor 1020 may obtain a fifth non-local filter enable syntax element indicating whether a non-local filter is enabled for a CTU and applied to all sub-blocks in a current CTB, and may obtain a sixth non-local filter enable syntax element indicating whether a non-local filter is enabled for a current sub-block.

[0388] In some examples, processor 1020 may determine that a non-local filter is enabled for the CTU and that the non-local filter is applied to all sub-blocks in the current CTB in response to determining that the fifth non-local filter enable syntax element is equal to 1. In addition, processor 1020 may infer that the fifth non-local filter enable syntax element is equal to 0 in response to determining that the fifth non-local filter enable syntax element is not present.

[0389] In some examples, processor 1020 may determine to enable a non-local filter for the current sub-block in response to determining that a sixth non-local filter enable syntax element is equal to 1.

[0390] In step 1202 , the processor 1020 may obtain a first pixel in a picture that has been filtered and one or more similar pixels to the first pixel based on one or more filtering parameters.

[0391] In some examples, processor 1020 may obtain one or more similar blocks based on the SAD, and obtain one or more similar pixels from the one or more similar blocks, respectively.

[0392] In step 1203 , the processor 1020 may obtain an original pixel associated with the first pixel based on one or more similar pixels.

[0393] In some examples, a device for video encoding and decoding is provided. The device includes a processor 1020 and a memory 1040 configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Figure 11-Figure 12 Any method shown.

[0394] In some other examples, a non-transitory computer-readable storage medium is provided having instructions stored therein. When the instructions are executed by the processor 1020, the instructions cause the processor to perform the following steps: Figure 11-Figure 12 In one example, multiple programs may be executed by processor 1020 in computing environment 1010 to receive (e.g., from Figure 1GThe video encoder 20 in the computing environment 1010 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1020 in the computing environment 1010 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 1020 in the computing environment 1010 to perform the above-mentioned encoding method, encode the video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1020 in the computing environment 1010 to send a bitstream or data stream (e.g., to a Figure 2B Optionally, a non-transitory computer-readable storage medium may store therein a bit stream or a data stream, the bit stream or the data stream comprising a video decoder 30 in the encoder (e.g., Figure 1G The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 2B 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.

[0395] By considering the specification and practice of the disclosure disclosed herein, other examples of the disclosure will be apparent to those skilled in the art. This application is intended to cover any variation, use or adaptation of the disclosure, which follows the general principles of the disclosure and includes such deviations from the disclosure within known or customary practice in the art. The specification and examples are intended to be considered exemplary only.

[0396] It will be understood that the present disclosure is not limited to the precise 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 method for video encoding, include: Obtaining, by an encoder, one or more similar pixels for a first pixel to be filtered in a picture based on a filtering parameter set, wherein the one or more similar pixels and the first pixel are from the picture, and wherein the filtering parameter set includes a number of similar blocks, a search range, and a window size; as well as A filtered pixel for the first pixel is obtained by the encoder based on the one or more similar pixels.

2. The method according to claim 1, further comprising: include: Obtaining the similar blocks based on the sum of absolute differences (SAD) by the encoder; as well as The one or more similar pixels are obtained by the encoder from the similar blocks respectively.

3. The method according to claim 1, further comprising: include: The filter parameter set is obtained by the encoder according to a quantization parameter QP value used in the encoding process.

4. The method according to claim 1, further comprising: include: The filter parameter set is obtained by the encoder according to the codec configuration used in the encoding process.

5. The method according to claim 1, further comprising: include: Determining, by the encoder, one or more optimal filtering parameters from the set of filtering parameters based on rate-distortion cost; The one or more optimal filtering parameters are signaled by the encoder at a specified level in a bitstream, wherein the specified level comprises one of the following levels: a picture level, a slice level, or a coding tree unit (CTU) level; and The bitstream is sent by the encoder to a decoder.

6. The method according to claim 1, further comprising: include: A candidate list for filtering parameters from the filtering parameter set is determined by the encoder, so that a decoder obtains optimal filtering parameters from the candidate list according to rate-distortion cost.

7. The method of claim 1 , wherein the set of filter parameters further comprises a filter strength, and the set of filter parameters is associated with a non-local means filter, and The method also include: calculating, by the decoder, a weighted average based on the one or more similar pixels; as well as The filtered pixel for the first pixel is obtained by the encoder based on the weighted average.

8. The method according to claim 1, wherein the filter parameter set further comprises one or more first estimation parameters for estimating the deviation of the compressed noise, a second estimation parameter for estimating the deviation of the original block, and a constant parameter for estimating the threshold, and wherein the filter parameter set is associated with a non-local low rank filter, and The method also include: Calculating, by the decoder, a singular value decomposition (SVD) based on the one or more similar pixels; as well as The filtered pixel for the first pixel is obtained by the encoder based on the SVD.

9. The method according to claim 1, further comprising: include: The encoder divides the picture into a plurality of blocks; Classifying, by the encoder, the plurality of partitions into a plurality of categories; A plurality of filter parameter sets for the plurality of categories is determined by the encoder, wherein the filter parameter set is one filter parameter set from the plurality of filter parameter sets and is different from other filter parameter sets from the plurality of filter parameter sets.

10. The method according to claim 9, further comprising: include: The plurality of partitions are classified, by the encoder, into the plurality of categories based on directionality and activity.

11. The method according to claim 9, further comprising: include: Each filter parameter set is determined by the encoder according to at least one of the following parameters: Category, the quantization parameter (QP) value used during encoding, or the codec configuration used during encoding.

12. The method according to claim 1, further comprising: include: One or more non-local filter enabling syntax elements are signaled by the encoder at a specified level, the specified level comprising one or more of the following levels: a picture level, a slice level, or a coding tree unit (CTU) level.

13. The method according to claim 12, further comprising: include: In response to determining that a first non-local filter enabling syntax element is signaled at a picture level and is equal to 1, determining to enable a non-local filter for a slice based on a corresponding picture parameter set (PPS); as well as In response to determining that the first non-local filter enable syntax element is signaled at a picture level and is equal to 0, determining to disable the non-local filter for the slice based on the corresponding PPS.

14. The method of claim 13 , wherein in response to determining that the first non-local filter enable syntax element is equal to 1, the method further include: In response to determining that a second non-local filter enabling syntax element is signaled at a slice level and is equal to 1, determining to enable the non-local filter and to apply the non-local filter to all coding tree blocks (CTBs) in the current slice; In response to determining that the second non-local filter enable syntax element is not present, inferring that the second non-local filter enable syntax element is zero; In response to determining that the second non-local filter enable syntax element is zero and a third non-local filter enable syntax element is signaled at a slice level and is equal to one, determining to enable the non-local filter and apply the non-local filter to one or more CTBs in the current slice; as well as In response to determining that the second non-local filter enable syntax element is zero and the third non-local filter enable syntax element is equal to 0, it is inferred that the third non-local filter enable syntax element is equal to the second non-local filter enable syntax element.

15. The method of claim 14, wherein in response to determining that the second non-local filter enable syntax element is equal to 0 and the third non-local filter enable syntax element is equal to 1, the method further include: In response to determining that a fourth non-local filter enabled syntax element is equal to 1, determining to apply the non-local filter to a luma CTB in the CTU at a luma position; In response to determining that the fourth non-local filter enable syntax element is equal to 0, determining not to apply the non-local filter to the luma CTB in the CTU at the luma position; as well as In response to determining that the fourth non-local filter enable syntax element is not present, the fourth non-local filter enable syntax element is inferred based on the second non-local filter enable syntax element and the third non-local filter enable syntax element.

16. The method according to claim 15, further comprising: include: One or more filter parameters in the filter parameter set are predefined by the encoder.

17. The method according to claim 15, further comprising: include: In response to determining to apply the non-local filter to the current slice, one or more filter parameters in the filter parameter set are signaled by the encoder at a slice level.

18. The method of claim 15, wherein the specified level further comprises a sub-block level, and the method further comprises: include: signaling, by the encoder, a fifth non-local filter enabling syntax element to indicate whether the non-local filter is enabled for the CTU and applied to all subblocks in a current CTB; as well as A sixth non-local filter enabling syntax element is signaled by the encoder to indicate whether the non-local filter is enabled for a current sub-block.

19. The method according to claim 18, further comprising: include: In response to determining that the fifth non-local filter enable syntax element is equal to 1, determine to enable the non-local filter for the CTU and apply the non-local filter to all sub-blocks in the current CTB; as well as In response to determining that the fifth non-local filter enable syntax element is not present, the fifth non-local filter enable syntax element is inferred to be equal to zero.

20. The method according to claim 18, further comprising: include: In response to determining that the sixth non-local filter enable syntax element is equal to 1, determining to enable the non-local filter for the current sub-block.

21. A method for video decoding, include: Obtaining, by a decoder, one or more filtering parameters, wherein the one or more filtering parameters are from a filtering parameter set, the filtering parameter set comprising a number of similar blocks, a search range, and a window size; as well as Obtaining, by the decoder based on the one or more filtering parameters, a first pixel to be filtered in the picture and one or more similar pixels to the first pixel; as well as An original pixel associated with the first pixel is obtained by the decoder based on the one or more similar pixels.

22. The method according to claim 21, further comprising: include: The decoder obtains one or more similar blocks based on the Sum of Absolute Difference (SAD); as well as The one or more similar pixels are obtained by the decoder from the one or more similar blocks, respectively.

23. The method according to claim 21, further comprising: include: The filter parameter set is obtained by the decoder according to a quantization parameter QP value used in the encoding process.

24. The method according to claim 21, further comprising: include: The filter parameter set is obtained by the decoder according to the codec configuration used in the encoding process.

25. The method according to claim 21, further comprising: include: The one or more filter parameters signaled at a specified level in a bitstream received from an encoder are obtained by the decoder, wherein the specified level comprises one of the following levels: picture level, slice level or coding tree unit (CTU) level.

26. The method according to claim 21, further comprising: include: Optimal filtering parameters are obtained by the decoder from a candidate list for filtering parameters from the filtering parameter set according to rate-distortion cost.

27. The method of claim 21, wherein the set of filtering parameters further comprises a filter strength, and the set of filtering parameters is associated with a non-local means filter.

28. A method according to claim 21, wherein the filter parameter set also includes one or more first estimation parameters for estimating the deviation of compression noise, second estimation parameters for estimating the deviation of original image blocks, and a constant parameter for estimating a threshold, and wherein the filter parameter set is associated with a non-local low rank filter.

29. The method of claim 21, wherein the filter parameter set is one filter parameter set from a plurality of filter parameter sets, and the plurality of filter parameter sets correspond to a plurality of categories for a plurality of partitions from the picture.

30. The method according to claim 29, further comprising: include: The plurality of blocks are classified into the plurality of categories based on directionality and activity.

31. The method of claim 29, wherein each set of filtering parameters is determined based on at least one of the following parameters: Category, the quantization parameter (QP) value used during encoding, or the codec configuration used during encoding.

32. The method according to claim 21, further comprising: include: One or more non-local filter enabling syntax elements are obtained by the decoder at a specified level, the specified level comprising one or more of the following levels: a picture level, a slice level, or a coding tree unit (CTU) level.

33. The method according to claim 32, further comprising: include: In response to determining that a first non-local filter enabling syntax element is signaled at a picture level and is equal to 1, determining to enable a non-local filter for a slice that references a corresponding picture parameter set (PPS); as well as In response to determining that the first non-local filter enable syntax element is signaled at a picture level and is equal to 0, determining to disable the non-local filter for the slice that references the corresponding PPS.

34. The method of claim 33, wherein in response to determining that the first non-local filter enable syntax element is equal to 1, the method further include: In response to determining that a second non-local filter enable syntax element is signaled at a slice level and is equal to 1, determining to enable the non-local filter and apply the non-local filter to all coding tree blocks (CTBs) in the current slice; In response to determining that the second non-local filter enable syntax element is not present, inferring that the second non-local filter enable syntax element is zero; In response to determining that the second non-local filter enable syntax element is zero and a third non-local filter enable syntax element is signaled at a slice level and is equal to one, determining to enable the non-local filter and apply the non-local filter to one or more CTBs in the current slice; as well as In response to determining that the second non-local filter enable syntax element is zero and the third non-local filter enable syntax element is equal to 0, it is inferred that the third non-local filter enable syntax element is equal to the second non-local filter enable syntax element.

35. The method of claim 34, wherein in response to determining that the second non-local filter enable syntax element is equal to 0 and the third non-local filter enable syntax element is equal to 1, the method further include: In response to determining that a fourth non-local filter enabled syntax element is equal to 1, determining to apply the non-local filter to a luma CTB in the CTU at a luma position; In response to determining that the fourth non-local filter enable syntax element is equal to 0, determining not to apply the non-local filter to the luma CTB in the CTU at the luma position; as well as In response to determining that the fourth non-local filter enable syntax element is not present, the fourth non-local filter enable syntax element is inferred based on the second non-local filter enable syntax element and the third non-local filter enable syntax element.

36. The method according to claim 35, further comprising: include: One or more filter parameters in the filter parameter set are predefined by the decoder.

37. The method according to claim 35, further comprising: include: In response to determining to apply the non-local filter to the current slice, the one or more filtering parameters are obtained by the decoder at the slice level.

38. The method of claim 15, wherein the specified level further comprises a sub-block level, and the method further comprises: include: Obtaining, by the decoder, a fifth non-local filter enabling syntax element, the fifth non-local filter enabling syntax element indicating whether the non-local filter is enabled for the CTU and is applied to all sub-blocks in a current CTB; as well as A sixth non-local filter enabling syntax element is obtained by the decoder, the sixth non-local filter enabling syntax element indicating whether the non-local filter is enabled for a current sub-block.

39. The method according to claim 38, further comprising: include: In response to determining that the fifth non-local filter enable syntax element is equal to 1, determine to enable the non-local filter for the CTU and apply the non-local filter to all sub-blocks in the current CTB; as well as In response to determining that the fifth non-local filter enable syntax element is not present, the fifth non-local filter enable syntax element is inferred to be equal to zero.

40. The method according to claim 38, further comprising: include: In response to determining that the sixth non-local filter enable syntax element is equal to 1, determining to enable the non-local filter for the current sub-block.

41. A device for video encoding, wherein include: 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 the one or more processors are configured to perform the method according to any one of claims 1-20 when executing the instructions.

42. A device for video decoding, include: 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 the one or more processors are configured to perform the method according to any one of claims 21-40 when executing the instructions.

43. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to any one of claims 1-20 to encode a current block into a bitstream and send the bitstream.

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

Citation Information

Cited By

  • Structure-aware non-local filtering

    WO2026137276A1