Resnet-based in-loop filter with integer transformer module for video coding
Patent Information
- Application Number
- CN202580019942.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-03-18
- Filing Date
- 2025-03-20
- Publication Date
- 2026-10-09
Smart Images

Figure CN122893307A_ABST
Abstract
Description
[0001] This application claims priority to U.S. Patent Application No. 19 / 082,292, filed March 18, 2025; U.S. Provisional Patent Application No. 63 / 568,842, filed March 22, 2024; and U.S. Provisional Patent Application No. 63 / 567,857, filed March 20, 2024, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 19 / 082,292, filed March 18, 2025, claims the benefit of U.S. Provisional Patent Application No. 63 / 568,842, filed March 22, 2024; and U.S. Provisional Patent Application No. 63 / 567,857, filed March 20, 2024. Technical Field
[0002] This disclosure relates to video encoding and video decoding. Background Technology
[0003] Digital video capabilities can be incorporated into a wide variety of devices, including digital televisions, digital live broadcast systems, wireless broadcasting systems, personal digital assistants (PDAs), laptops or desktop computers, tablets, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless phones (so-called "smartphones"), video conferencing equipment, video streaming devices, and more. Digital video devices implement video decoding technologies, such as those defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Decoding (AVC)), ITU-T H.265 / High Efficiency Video Decoding (HEVC), ITU-T H.266 / Variety Video Decoding (VVC) and extensions to these standards, as well as proprietary video codecs / formats such as AOMedia Video1 (AV1) developed by the Open Media Alliance. By implementing such video decoding technologies, video devices can more efficiently send, receive, encode, decode, and / or store digital video information.
[0004] Video decoding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video decoding, video slices (e.g., video pictures or portions of video pictures) can be divided into video blocks, which may also be referred to as decoding tree units (CTUs), decoding units (CUs), and / or decoding nodes. Video blocks in a slice after intra-frame decoding (I) of a picture are encoded using spatial prediction relative to reference samples in adjacent blocks within the same picture. Video blocks in a slice after inter-frame decoding (P or B) of a picture can use spatial prediction relative to reference samples in adjacent blocks within the same picture or temporal prediction relative to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention
[0005] This disclosure describes a technique for integrating attention blocks into a ResNet-based In-Loop Filtering (ILF) architecture for video decoding purposes. Filters based on Convolutional Neural Networks (CNNs) with a ResNet architecture (which utilizes multiple cascaded backbone blocks) have become a popular ILF architecture. To improve the performance of such filters, a transformer self-attention mechanism is utilized to capture long-range, non-local correlations in the image. However, transformer blocks involve nonlinear operators. According to the technique of this disclosure, approximations of these operators are introduced, and then integer quantization is performed to accelerate filtering in integer arithmetic. By rounding floating-point values in the transformer block to the nearest integer, the video decoder can process video data blocks using the transformer block of the CNN-based filter by performing only integer arithmetic, which significantly reduces computational complexity without significantly degrading the overall decoding quality.
[0006] According to an example of this disclosure, a method for decoding encoded video data includes: determining blocks of an image based on the encoded video data; applying a neural network (NN)-based filter to the blocks to generate a filtered block, wherein applying the NN-based filter includes: transforming the block of the image using a transform block, wherein transforming the block of the image using the transform block includes: rounding floating-point values to the nearest integer; determining a decoded version of the block based on the filtered block; and outputting a decoded version of the image including the decoded version of the block.
[0007] According to an example of this disclosure, an apparatus for decoding encoded video data includes: a memory configured to store video data; and one or more processors implemented in a circuit and configured to determine blocks of an image based on the encoded video data; apply a neural network (NN)-based filter to the blocks to generate filtered blocks, wherein applying the NN-based filter includes: transforming the blocks of the image using a transform block, wherein transforming the blocks of the image using the transform block includes: rounding floating-point values to the nearest integer; determining a decoded version of the block based on the filtered blocks; and outputting a decoded version of the image including the decoded version of the blocks.
[0008] Details of one or more examples are set forth in the accompanying drawings and the following description. Other features, objects, and advantages will be apparent from the description, drawings, and claims. Attached Figure Description
[0009] Figure 1 This is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of this disclosure.
[0010] Figure 2 This is a block diagram illustrating an example of a hybrid video decoding framework.
[0011] Figure 3 This is a conceptual diagram illustrating a hierarchical prediction structure using a group of pictures (GOP) of size 16.
[0012] Figure 4 This is a block diagram illustrating an example of a four-layer convolutional neural network (CNN) based filter.
[0013] Figure 5 This is a block diagram illustrating an example CNN-based filter with padded input samples and supplementary data.
[0014] Figure 6 This is a block diagram illustrating another example of a CNN-based filter with padded input samples and supplementary data.
[0015] Figure 7 This is an example Figure 6 A block diagram of an example attention residual block for a neural network filter.
[0016] Figure 8 This is an example Figure 6 A block diagram of an example of a spatial attention layer.
[0017] Figure 9 This is a block diagram illustrating an example of a simplified CNN-based filter architecture using a residual block structure, with padded input samples and supplementary data.
[0018] Figure 10 This is an example Figure 9 Here is a block diagram of an example residual block structure.
[0019] Figure 11 This is a block diagram illustrating an example of a simplified CNN-based filter architecture that uses a filter block structure and has padding input samples and supplementary data.
[0020] Figure 12 This is an example Figure 11 Here is a block diagram of an example filter block structure.
[0021] Figure 13 This is a block diagram illustrating an example of a multidimensional convolution solution.
[0022] Figure 14 An example of a multi-scale feature extraction backbone network with two-component convolutions is shown.
[0023] Figure 15 An example of a unified filter with a joint model (joint luminance and chrominance) is shown.
[0024] Figure 16 An example of a unified filter with separate luminance / chrominance models (luminance) is shown.
[0025] Figure 17 An example of a unified filter with separate luminance / chrominance models (chrominance) is shown.
[0026] Figure 18 An example of a unified filter with luminance / chrominance separation is shown.
[0027] Figures 19 to 22 An example of a backbone residual block is shown.
[0028] Figure 23 An example of the proposed switching order decomposition integrated into a unified filter architecture (luminance filtering) is shown.
[0029] Figure 24 An example of a high-level overview of the converter module is shown.
[0030] Figure 25 An example of a transformer block in the ResNet architecture is shown (top: attention block; bottom: feedforward network).
[0031] Figures 26 to 28 An example of placing a transformer block inside a ResNet architecture is shown.
[0032] Figure 29 This is a block diagram illustrating an example video encoder that can perform the techniques of this disclosure.
[0033] Figure 30 This is a block diagram illustrating an example video decoder that can perform the techniques of this disclosure.
[0034] Figure 31 This is a flowchart illustrating an example process for encoding the current block according to the technology of this disclosure.
[0035] Figure 32 This is a flowchart illustrating an example process for decoding the current block according to the technology of this disclosure.
[0036] Figure 33 This is a flowchart illustrating an example process for decoding the current block according to the technology of this disclosure. Detailed Implementation
[0037] Video decoding (e.g., video encoding and / or video decoding) typically involves predicting video data blocks based on decoded video data blocks within the same frame (e.g., intra-frame prediction) or based on decoded video data blocks in different frames (e.g., inter-frame prediction). In some cases, the video encoder also computes residual data by comparing the predicted block to the original block. Therefore, the residual data represents the difference between the predicted block and the original block. To reduce the number of bits required to signal the residual data, the video encoder transforms and quantizes the residual data and signals the transformed and quantized residual data in the encoded bitstream. Compression achieved through the transformation and quantization process can be lossy, meaning that the transformation and quantization process may introduce distortion into the decoded video data.
[0038] The video decoder decodes the residual data and adds it to the predicted blocks to produce a reconstructed video block that more closely matches the original video block compared to individual predicted blocks. Due to losses introduced by the transformation and quantization of the residual data, the first reconstructed block may have distortion or artifacts. A common type of artifact or distortion is called block artifacts, where the boundaries of the blocks used to decode the video data are visible.
[0039] To further improve the quality of decoded video, the video decoder can perform one or more filtering operations on the reconstructed video blocks. Examples of these filtering operations include deblocking filtering, sample adaptive offset (SAO) filtering, and adaptive loop filtering (ALF). The parameters of these filtering operations can be determined by the video encoder and explicitly signaled in the encoded video bitstream, or they can be implicitly determined by the video decoder without explicit signaling in the encoded video bitstream. This disclosure describes techniques related to in-loop filtering based on convolutional neural networks (CNNs) or (more generally) neural network (NN) based filtering.
[0040] Research has shown that neural network (NN)-based filtering techniques are highly capable of improving decoded and / or reconstructed video data. NN-based filtering techniques can be highly complex and require significant processing power to execute effectively.
[0041] This disclosure describes a technique for integrating attention blocks into a ResNet-based In-Loop Filtering (ILF) architecture for video decoding purposes. CNN-based filters with a ResNet architecture (which utilizes multiple cascaded backbone blocks) have become a popular ILF architecture. To improve the performance of such filters, a transformer self-attention mechanism is utilized to capture long-range, non-local correlations in the image. However, transformer blocks involve nonlinear operators. According to the technique of this disclosure, approximations of these operators are introduced, and then integer quantization is performed to accelerate filtering in integer arithmetic. By rounding floating-point values in the transformer block to the nearest integer, the video decoder can process video data blocks using the transformer block of the CNN filter by performing only integer arithmetic, which significantly reduces computational complexity without significantly degrading the overall decoding quality.
[0042] The techniques disclosed herein relate to CNN-assisted loop filtering, but are more generally applicable to any cascaded CNN-based video decoding tool. The described techniques can be used in the context of advanced video codecs, such as extensions to VVC, or next-generation video decoding standards, and / or any other video codec.
[0043] As used in this disclosure, the term video decoding generally refers to video encoding or video decoding. Similarly, the term "video decoder" generally refers to a video encoder or a video decoder. Furthermore, some of the techniques described in this disclosure with respect to video decoding can also be applied to video encoding, and vice versa. For example, video encoders and video decoders are often configured to perform the same or opposite processes. Moreover, a video encoder typically performs video decoding (also known as reconstruction) as part of a process of determining how to encode video data. For example, a video encoder may perform deblocking filtering on decoded video blocks to determine whether a particular encoding scheme produces a desired rate-distortion tradeoff and also allows the video encoder to perform motion estimation using the same blocks available to the video decoder when the video decoder performs motion compensation.
[0044] Figure 1 This is a block diagram illustrating an example video encoding and decoding system 100 capable of performing the techniques of this disclosure. The techniques of this disclosure generally relate to decoding (encoding and / or decoding) video data, including filtering the video data using neural network-based techniques. Generally, video data includes any data used for processing video. Therefore, video data may include unencoded raw video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0045] like Figure 1 As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 can be or may include any of a wide range of devices, such as desktop computers, laptop computers, mobile devices, tablet computers, set-top boxes, mobile phones (such as smartphones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receiver devices, etc. In some cases, source device 102 and destination device 116 may be configured for wireless communication and are therefore referred to as wireless communication devices.
[0046] exist Figure 1 In the example, source device 102 includes a video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes an input interface 122, video decoder 300, memory 120, and display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply techniques for NN-based video decoding and filtering. Therefore, source device 102 represents an example of a video encoding device, while destination device 116 represents an example of a video decoding device. In other examples, the source device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device instead of including an integrated display device.
[0047] like Figure 1The system 100 shown is merely an example. Typically, any digital video encoding and / or decoding device can perform techniques for NN-based video decoding and filtering. Source device 102 and destination device 116 are merely examples of such decoding devices, where source device 102 generates decoded video data for transmission to destination device 116. This disclosure refers to a “decoding” device as a device that performs the decoding (e.g., encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of decoding devices, specifically, a video encoder and a video decoder, respectively. In some examples, source device 102 and destination device 116 may operate in a substantially symmetrical manner, such that each of source device 102 and destination device 116 includes video encoding and decoding components. Therefore, system 100 may support one-way or two-way video transmission between source device 102 and destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0048] Generally, video source 104 represents the source of video data (i.e., unencoded raw video data) and provides a sequential series of pictures (also referred to as "frames") of video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include video capture devices such as cameras, video archives containing previously captured raw video, and / or video feed interfaces for receiving video from video content providers. Alternatively, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange the pictures from the received order (sometimes referred to as "display order") to a decoding order for decoding. Video encoder 200 may generate a bitstream comprising the encoded video data. Then, the source device 102 can output the encoded video data to the computer-readable medium 110 via the output interface 108 for reception and / or retrieval by, for example, the input interface 122 of the destination device 116.
[0049] The memory 106 of source device 102 and the memory 120 of destination device 116 represent general-purpose memory. In some examples, memories 106 and 120 may store raw video data, such as raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106 and 120 may store software instructions executable by, for example, video encoder 200 and video decoder 300. Although memories 106 and 120 are shown separately from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 may also include internal memory for functionally similar or equivalent purposes. Furthermore, memories 106 and 120 may store encoded video data, such as output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106 and 120 may be allocated as one or more video buffers, for example, to store raw decoded and / or encoded video data.
[0050] Computer-readable medium 110 may represent any type of medium or device capable of transmitting encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium that enables source device 102 to directly transmit encoded video data to destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to a communication standard such as a wireless communication protocol, output interface 108 may modulate the transmitted signal including the encoded video data, and input interface 122 may demodulate the received transmitted signal. The communication medium may include any wireless or wired communication medium, such as radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as a local area network, a wide area network, or a global network (such as the Internet). The communication medium may include a router, switch, base station, or any other equipment that may be useful for facilitating communication from source device 102 to destination device 116.
[0051] In some examples, source device 102 can output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 can access encoded data from storage device 112 via input interface 122. Storage device 112 may include any data storage medium of various distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0052] In some examples, source device 102 can output encoded video data to file server 114 or another intermediate storage device that can store the encoded video data generated by source device 102. Destination device 116 can access the stored video data from file server 114 via streaming or download.
[0053] File server 114 can be any type of server device capable of storing encoded video data and sending the encoded video data to destination device 116. File server 114 may represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or FLUTE-based file delivery protocol), a Content Delivery Network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or Enhanced MBMS (eMBMS) server, and / or a Network Attached Storage (NAS) device. File server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as HTTP-based Dynamic Adaptive Streaming (DASH), HTTP Live Streaming (HLS), Real-Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.
[0054] Destination device 116 can access encoded video data from file server 114 via any standard data connection, including an internet connection. This may include a wireless channel (e.g., Wi-Fi connection), a wired connection (e.g., digital subscriber line (DSL), cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on file server 114. Input interface 122 can be configured to operate according to any or more of the various protocols discussed above for retrieving or receiving media data from file server 114, or other such protocols for retrieving media data.
[0055] Output interface 108 and input interface 122 can represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 can be configured to transmit data, such as encoded video data, according to cellular communication standards such as 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc. In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 can be configured to comply with other wireless standards such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee), etc.™ ),Bluetooth ™ Standards are used to transmit data, such as encoded video data. In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include an SoC device for performing functions belonging to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device for performing functions belonging to video decoder 300 and / or input interface 122.
[0056] The technology disclosed herein can be applied to video decoding to support any multimedia application in a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission (such as HTTP-based Dynamic Adaptive Streaming (DASH)), digital video encoded onto data storage media, decoding of digital video stored on data storage media, or other applications.
[0057] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, storage device 112, file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements having values describing the characteristics and / or processing of video blocks or other decoded units (e.g., slices, pictures, picture groups, sequences, etc.). The display device 118 displays a decoded picture of the decoded video data to the user. The display device 118 may represent 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.
[0058] Despite Figure 1 Not shown, but in some examples, both the video encoder 200 and the video decoder 300 may be integrated with the audio encoder and / or audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams that include both audio and video in a common data stream.
[0059] Both the video encoder 200 and the video decoder 300 can be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is partially implemented in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the technology of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. Devices including the video encoder 200 and / or the video decoder 300 may implement the video encoder 200 and / or the video decoder 300 in processing circuitry such as integrated circuits and / or microprocessors. Such devices may be wireless communication devices (such as cellular phones) or any other type of device described herein.
[0060] Video encoder 200 and video decoder 300 may operate according to video decoding standards such as ITU-T H.265 (also known as High Efficiency Video Decoding (HEVC)) or extensions thereof such as Multi-View and / or Scalable Video Decoding Extensions. Alternatively, video encoder 200 and video decoder 300 may operate according to other proprietary or industry standards such as ITU-T H.266 (also known as Multi-Functional Video Decoding (VVC)). In other examples, video encoder 200 and video decoder 300 may operate according to proprietary video codecs / formats such as AOMedia Video 1 (AV1), extensions to AV1, and / or subsequent versions of AV1 (e.g., AV2)). In other examples, video encoder 200 and video decoder 300 may operate according to other proprietary formats or industry standards. However, the techniques disclosed herein are not limited to any particular decoding standard or format. Generally, video encoder 200 and video decoder 300 may be configured to perform the techniques of this disclosure in conjunction with any video decoding technique using neural networks.
[0061] Generally, the video encoder 200 and video decoder 300 perform block-based decoding of images. The term "block" typically refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used during encoding and / or decoding). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, the video encoder 200 and video decoder 300 decode video data represented in YUV (e.g., Y, Cb, Cr) format. That is, instead of decoding the red, green, and blue (RGB) data used for images, the video encoder 200 and video decoder 300 decode both the luminance and chrominance components, where the chrominance components may include both red hue chrominance components and blue hue chrominance components. In some examples, the video encoder 200 converts the received RGB format data to a YUV representation before encoding, and the video decoder 300 converts that YUV representation to RGB format. Alternatively, preprocessing and post-processing units (not shown) may perform these conversions.
[0062] This disclosure generally relates to the decoding (e.g., encoding and decoding) of images to include processes of encoding or decoding data of the image. Similarly, this disclosure may relate to the decoding of blocks of images to include processes of encoding or decoding data used for the blocks (e.g., prediction and / or residual decoding). Encoded video bitstreams typically include a series of values for syntax elements representing decoding decisions (e.g., decoding modes) and the partitioning of images into blocks. Therefore, references to the decoding of images or blocks should generally be understood as the decoded values of the syntax elements that form the images or blocks.
[0063] HEVC defines various blocks, including decoding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (such as a video encoder 200) divides the decoding tree unit (CTU) into CUs based on a quadtree structure. That is, the video decoder divides the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. Nodes without child nodes are called "leaf nodes," and the CU of such leaf nodes may include one or more PUs and / or one or more TUs. The video decoder may further divide the PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of the TU. In HEVC, the PU represents inter-frame prediction data, while the TU represents residual data. The CU after intra-frame prediction includes intra-frame prediction information, such as intra-frame mode indication.
[0064] As another example, video encoder 200 and video decoder 300 can be configured to operate according to VVC. According to VVC, the video decoder (such as video encoder 200) partitions the image into multiple CTUs. Video encoder 200 can partition the CTUs according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure removes the concept of multiple partition types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to CUs.
[0065] In the MTT partitioning structure, blocks can be divided using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning (also known as triplet tree (TT)). A ternary tree or triplet tree partition is a partition in which a block is divided into three sub-blocks. In some examples, a ternary tree or triplet tree partition divides a block into three sub-blocks without dividing the original block through the center. Partition types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0066] When operating according to the AV1 codec, the video encoder 200 and video decoder 300 can be configured to decode video data in blocks. In AV1, the largest processable decoded block is called a superblock. In AV1, a superblock can be 128x128 luma samples or 64x64 luma samples. However, in subsequent video decoding formats (e.g., AV2), superblocks can be defined by different (e.g., larger) luma sample sizes. In some examples, the superblock is the top level of a block quadtree. The video encoder 200 can further divide the superblock into smaller decoded blocks. The video encoder 200 can divide the superblock and other decoded blocks into smaller blocks using square or non-square partitions. Non-square blocks can include N / 2xN blocks, NxN / 2 blocks, N / 4xN blocks, and NxN / 4 blocks. The video encoder 200 and video decoder 300 can perform separate prediction and transform processing on each decoded block within the decoded block.
[0067] AV1 also defines video data tiles. A tile is a rectangular array of superblocks that can be decoded independently of other tiles. That is, the video encoder 200 and video decoder 300 can encode and decode the decoding blocks within a tile separately without using video data from other tiles. However, the video encoder 200 and video decoder 300 can perform filtering across tile boundaries. The tile size can be uniform or non-uniform. Tile-based decoding enables parallel processing and / or multithreading in the encoder and decoder implementations.
[0068] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the respective chroma components).
[0069] The video encoder 200 and the video decoder 300 can be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning or other partitioning structures.
[0070] In some examples, a CTU includes a decoded tree block (CTB) of luminance samples, two corresponding CTBs of chrominance samples of an image with three sample arrays, or a CTB of samples of an image decoded using three separate color planes and a syntax structure for decoding the samples. A CTB can be an NxN sample block of some value N, such that a partitioning method divides the components into CTBs. A component is an array or a single sample from one of the three arrays (luminance and two chrominance) constituting a 4:2:0, 4:2:2, or 4:4:4 color format image, or an array or a single sample constituting an array or array constituting a monochrome format image. In some examples, a decoded block is an MxN sample block of values M and N, such that a partitioning method divides the CTB into decoded blocks.
[0071] Blocks (e.g., CTUs or CUs) can be grouped in various ways within an image. As an example, a brick can refer to a rectangular area of a row of CTUs within a specific tile in an image. A tile can be a rectangular area of CTUs within a specific tile column and a specific tile row in an image. A tile column refers to a rectangular area of a CTU having a height equal to the height of the image and a width specified by syntax elements (e.g., such as in an image parameter set). A tile row refers to a rectangular area of a CTU having a height specified by syntax elements (e.g., such as in an image parameter set) and a width equal to the width of the image.
[0072] In some examples, a tile can be divided into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not divided into multiple bricks can also be called a brick. However, bricks that are a true subset of a tile cannot be called a tile. Bricks in an image can also be arranged in slices. A slice can be an integer number of bricks in an image that can be uniquely contained within a single Network Abstraction Layer (NAL) unit. In some examples, a slice includes multiple complete tiles or a continuous sequence of complete bricks that include only one tile.
[0073] This disclosure uses "NxN" and "N by N" interchangeably to refer to the sample size of a block (such as a CU or other video block) in the vertical and horizontal dimensions, for example, 16x16 samples or 16 by 16 samples. Generally, a 16x16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxNCU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. Samples in a CU can be arranged in rows and columns. Furthermore, a CU does not necessarily need to have the same number of samples in the horizontal direction as it does in the vertical direction. For example, a CU may include NxM samples, where M is not necessarily equal to N.
[0074] The video encoder 200 encodes video data representing prediction and / or residual information, as well as other information, for use in the control unit (CU). The prediction information indicates how the CU should be predicted to form a prediction block for the CU. The residual information typically represents the sample-by-sample difference between a sample of the CU before encoding and the prediction block.
[0075] To predict the Cubic Frame (CU), the video encoder 200 typically forms prediction blocks for the CU through inter-frame prediction or intra-frame prediction. Inter-frame prediction typically refers to predicting the CU from data in a previously decoded image, while intra-frame prediction typically refers to predicting the CU from data in a previously decoded image within the same frame. To perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate prediction blocks. The video encoder 200 can typically perform a motion search to identify reference blocks that closely match the CU, for example, based on the differences between the CU and a reference block. The video encoder 200 can use sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to compute difference metrics to determine whether a reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional or bidirectional prediction to predict the current CU.
[0076] Some examples of VVC also provide an affine motion compensation mode, which can be viewed as an inter-frame prediction mode. In affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.
[0077] To perform intra-frame prediction, the video encoder 200 can select an intra-frame prediction mode to generate prediction blocks. Some examples of VVC provide sixty-seven intra-frame prediction modes, including various directional modes, as well as planar and DC modes. Generally, the video encoder 200 selects an intra-frame prediction mode that describes the neighboring samples of the current block (e.g., the block of the CU) and predicts samples of the current block from them. Assuming the video encoder 200 decodes the CTU and CU in raster scan order (from left to right, from top to bottom), such samples can typically be located above, to the upper left, or to the left of the current block in the same image as the current block.
[0078] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter-frame prediction modes, the video encoder 200 may encode data indicating which of the various available inter-frame prediction modes is used, as well as the motion information for the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode motion vectors using Advanced Motion Vector Prediction (AMVP) or merging modes. The video encoder 200 may use similar modes to encode motion vectors used for affine motion compensation modes.
[0079] AV1 includes two common techniques for encoding and decoding blocks of video data. These two common techniques are intra-frame prediction (e.g., intra-frame prediction or spatial prediction) and inter-frame prediction (e.g., inter-frame prediction or temporal prediction). In the context of AV1, when using intra-frame prediction modes to predict blocks of video data for the current frame, the video encoder 200 and video decoder 300 do not use video data from other frames of the video data. For most intra-frame prediction modes, the video encoder 200 encodes blocks of the current frame based on the difference between sample values in the current block and predicted values generated from reference samples in the same frame. The video encoder 200 determines the predicted values generated from the reference samples based on the intra-frame prediction mode.
[0080] After prediction (such as intra-frame or inter-frame prediction for a block), the video encoder 200 can compute residual data for the block. The residual data (such as a residual block) represents the sample-wise difference between the block and the prediction block used to form the block, which is formed using the corresponding prediction mode. The video encoder 200 can apply one or more transforms to the residual block to produce transformed data in the transform domain rather than the sample domain. For example, the video encoder 200 can apply a Discrete Cosine Transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 can apply a secondary transform after the first transform, such as a Mode Correlated Inseparable Secondary Transform (MDNSST), a Signal Correlation Transform, a Karhunen-Loeve Transform (KLT), etc. The video encoder 200 produces transform coefficients after applying one or more transforms.
[0081] As noted above, after any transformation that produces the transform coefficients, the video encoder 200 may perform quantization on the transform coefficients. Quantization generally refers to the process in which the transform coefficients are quantized to reduce the amount of data used to represent them, thereby providing further compression. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 may quantize the transform coefficients during quantization. n The place value is rounded down to... m Bit value, where n Greater than m In some examples, in order to perform quantization, the video encoder 200 may perform a bit-by-bit right shift of the value to be quantized.
[0082] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix containing the quantized transform coefficients. The scan can be designed to place higher-energy (and therefore lower-frequency) transform coefficients before the vector and lower-energy (and therefore higher-frequency) transform coefficients after the vector. In some examples, the video encoder 200 can utilize a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy-encode the quantized transform coefficients of that vector. In other examples, the video encoder 200 can perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy-encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic decoding (CABAC). The video encoder 200 can also entropy-encode the values of syntax elements describing metadata associated with the encoded video data, which is used by the video decoder 300 when decoding the video data.
[0083] To perform CABAC, the video encoder 200 can assign context within a context model to the symbols to be transmitted. Context may involve, for example, whether the neighboring values of a symbol are zero. Probability determination can be based on the context assigned to the symbols.
[0084] The video encoder 200 may further generate syntax data for the video decoder 300, such as block-based syntax data, image-based syntax data, and sequence-based syntax data, for example, in image headers, block headers, and slice headers, or generate other syntax data such as sequence parameter sets (SPS), image parameter sets (PPS), or video parameter sets (VPS). The video decoder 300 may also decode such syntax data to determine how to decode the corresponding video data.
[0085] In this way, the video encoder 200 can generate a bitstream that includes encoded video data, such as syntax elements describing the partitioning of images into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0086] Generally, the video decoder 300 performs the reverse process of the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC to decode the values of syntax elements used for the bitstream in a manner substantially similar to but reversed by the CABAC encoding process of the video encoder 200. Syntax elements can define partitioning information for dividing a picture into CTUs and defining the CUs of each CTU according to a corresponding partitioning structure such as a QTBT structure. Syntax elements can further define prediction and residual information for video data blocks (e.g., CUs).
[0087] The residual information can be represented, for example, by quantized transform coefficients. The video decoder 300 can inversely quantize and inverse transform the quantized transform coefficients of the block to reconstruct the residual block for the block. The video decoder 300 uses a signaling prediction mode (intra-frame prediction or inter-frame prediction) and associated prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 can then combine the prediction block and the residual block (on a sample-by-sample basis) to reconstruct the original block. The video decoder 300 can perform additional processing, such as performing a deblocking process to reduce visual artifacts along the block boundaries.
[0088] This disclosure may generally relate to "signaling" certain information (such as syntax elements). The term "signaling" can generally refer to the communication of values and / or other data of syntax elements used to decode encoded video data. That is, video encoder 200 may signal the values of syntax elements in the bitstream. Generally speaking, signaling refers to generating values in the bitstream. As noted above, source device 102 may transmit the bitstream to destination device 116 substantially in real time or not in real time (such as when syntax elements are stored in storage device 112 for later retrieval by destination device 116).
[0089] This disclosure describes processes, techniques, and structures that can reduce the computational complexity and / or memory bandwidth requirements of neural network (NN)-based video decoding tools. The example techniques described below relate to NN-assisted loop filtering. However, the techniques of this disclosure are applicable to any NN-based video decoding tool using input data with certain statistical properties. The techniques of this disclosure can be used in the context of advanced video codecs, such as extensions to VVC, next-generation video decoding standards, and / or any other video codec.
[0090] According to the techniques disclosed herein, the video encoder 200 and the video decoder 300 can be configured to perform NN-based video decoding, including NN-based filtering using any combination of techniques described below.
[0091] Figure 2 This is a conceptual diagram illustrating a hybrid video decoding framework. Video decoding standards since H.261 are based on the so-called hybrid video decoding principle, which... Figure 2 The example is shown below. The term hybrid refers to a combination of two methods used to reduce redundancy in video signals: predictive and transform decoding with predictive residual quantization. Prediction and transform reduce redundancy in video signals by decorrelation, while quantization reduces the data represented by the transform coefficients by decreasing their precision, ideally by removing only irrelevant details. This hybrid video decoding design principle is also used in two recent standards, ITU-T H.265 / HEVC and ITU-T H.266 / VVC.
[0092] like Figure 2 As shown, a modern hybrid video decoder 130 typically performs block partitioning, motion compensation or inter-picture prediction, intra-picture prediction, transform, quantization, entropy decoding, and post-loop / intra-loop filtering. Figure 2In the example, the video decoder 130 includes a summing unit 134, a transform unit 136, a quantization unit 138, an entropy decoding unit 140, an inverse quantization unit 142, an inverse transform unit 144, a summing unit 146, a loop filter unit 148, a decoded picture buffer (DPB) 150, an intra-frame prediction unit 152, an inter-frame prediction unit 154, and a motion estimation unit 156.
[0093] Typically, the video decoder 130 receives input video data 132 while encoding video data. Block partitioning is used to divide the received video data images into smaller blocks for use in the prediction and transformation processes. Early video decoding standards used a fixed block size, typically 16×16 samples. More recent standards such as HEVC and VVC employ tree-based partitioning structures to provide flexible partitioning.
[0094] Motion estimation unit 156 and inter-frame prediction unit 154 can predict input video data 132, for example, based on previously decoded data from DPB 150. Motion compensation, or inter-picture prediction, utilizes the redundancy present between pictures in the video sequence (hence the term "inter-picture"). According to block-based motion compensation used in modern video codecs, predictions are obtained from one or more previously decoded pictures (i.e., reference pictures). The corresponding regions used to generate inter-frame predictions are indicated by motion information, including motion vectors and reference picture indices.
[0095] The summing unit 134 calculates the residual data as the difference between the input video data 132 and the predicted data from the intra-frame prediction unit 152 or the inter-frame prediction unit 154. The summing unit 134 provides the residual block to the transform unit 136, which applies one or more transforms to the residual block to generate a transform block. The quantization unit 138 quantizes the transform block to form quantized transform coefficients. The entropy decoding unit 140 entropy-encodes the quantized transform coefficients and other syntax elements (such as motion information or intra-frame prediction information) to generate an output bitstream 158.
[0096] Simultaneously, the inverse quantization unit 142 inverse quantizes the quantized transform coefficients, and the inverse transform unit 144 inverse transforms the transform coefficients to reconstruct the residual block. The summation unit 146 combines the residual block with the prediction block (on a sample-by-sample basis) to generate a decoded video data block. The loop filter unit 148 applies one or more filters (e.g., at least one of a neural network-based filter, a neural network-based loop filter, a neural network-based post-loop filter, an adaptive in-loop filter, or a predefined adaptive in-loop filter) to the decoded block to generate a filtered decoded block.
[0097] According to the technology of this disclosure, the neural network filtering unit of the loop filter unit 148 may receive data of a reconstructed image from video data from the summing unit 146 and from one or more other units of the hybrid video decoder 130 (e.g., transform unit 136, quantization unit 138, intra-frame prediction unit 152, inter-frame prediction unit 154, motion estimation unit 156, and / or one or more other filtering units within the loop filter unit 148). For example, the neural network filtering unit may receive data from the deblocking filtering unit (also referred to as the "deblocking unit") of the loop filter unit 148. The neural network filtering unit may receive, for example, boundary strength values, which indicate whether a particular boundary will be filtered for deblocking and, if so, to what extent the boundary will be filtered. For example, the boundary strength values may correspond to multiple samples on either side of a boundary to be modified and / or the degree to which the samples are to be modified.
[0098] In other examples, in addition to or in place of boundary strength values, the neural network filtering unit may receive decoding unit (CU) partitioning data, prediction unit (PU) partitioning data, transform unit (TU) partitioning data, deblocking filtering data, quantization parameter (QP) data, intra-frame prediction data (e.g., reconstructed samples and / or predicted samples), inter-frame prediction data (e.g., reconstructed samples and / or predicted samples), data representing the distance between a decoded image and one or more reference images, or any or all of the motion information of one or more decoded blocks of a decoded image. The deblocking filtering data may also include whether a long filter or a short filter was used for deblocking, or whether a strong filter or a weak filter was used for deblocking, or more of these. The data representing the distance between a decoded image and a reference image may be represented as the difference in picture order count (POC) between the POC values of the images.
[0099] Video data blocks (such as CTUs or CUs) can actually include multiple color components, such as a luminance or "luminance" component, a blue-toned chroma or "chroma" component, and a red-toned chroma (chroma) component. The luminance component can have a larger spatial resolution than the chroma components, and one chroma component can have a larger spatial resolution than the other. Alternatively, the luminance component can have a larger spatial resolution than the chroma components, and the two chroma components can have equal spatial resolution. For example, in a 4:2:2 format, the luminance component can be twice as large as the chroma component horizontally and equal to the chroma component vertically. Similarly, in a 4:2:0 format, the luminance component can be twice as large as the chroma component both horizontally and vertically. The various operations discussed above can generally be applied individually to each of the luminance and chroma components (but some decoding information, such as motion information or intra-frame prediction direction, can be determined for the luminance component and inherited by the corresponding chroma component).
[0100] In recent video codecs, a hierarchical prediction structure within a group of pictures (GOP) is applied to improve decoding efficiency. Figure 3 An example hierarchical prediction structure with a group of pictures (GOP) of size 16 is shown.
[0101] Refer again Figure 2 In-picture prediction utilizes the spatial redundancy present in the picture (hence the term "in-picture") by deriving predictions for blocks from spatially adjacent (reference) samples that have already been decoded / decoded. Angle prediction, DC prediction, and planar or on-plane prediction are used in recent video codecs, including AVC, HEVC, and VVC.
[0102] Hybrid video decoding standards apply block transforms to prediction residuals (regardless of whether the prediction residuals originate from inter-image or intra-image predictions). Early standards, including H.261, H.262, and H.263, employed Discrete Cosine Transform (DCT). In HEVC and VVC, more transform kernels beyond DCT can be applied to handle different statistical information in specific video signals.
[0103] Quantization aims to reduce the precision of input values or a set of input values in order to reduce the amount of data required to represent those values. In hybrid video decoding, quantization is typically applied to the individual transformed residual samples, i.e., the transform coefficients, resulting in integer coefficient levels. In recent video decoding standards, the stride is derived from a so-called quantization parameter (QP) that controls fidelity and bit rate. A larger stride reduces the bit rate but also degrades quality, which can cause, for example, block artifacts and blurred details in video images.
[0104] The entropy decoding unit 140 can perform context-adaptive binary arithmetic decoding (CABAC) on the encoded video. CABAC is used in recent video codecs such as AVC, HEVC, and VVC due to its high efficiency.
[0105] The loop filter unit 148 can perform post-loop or in-loop filtering. Post-loop / in-loop filtering is a filtering process (or a combination of such processes) applied to a reconstructed image to reduce decoding artifacts. The input to the filtering process is typically a reconstructed image (or a reconstructed block of an image), which is a combination of reconstructed residual signals (e.g., reconstructed samples) and predictions (e.g., predicted samples), where these reconstructed samples include quantization errors. Figure 2 As shown, the reconstructed image after in-loop filtering is stored in the decoded image buffer (DPB) 150 and used as a reference for inter-image prediction of subsequent images.
[0106] Decoding artifacts primarily depend on the QP (Quality-to-Pack) filter. Therefore, QP information is typically used in the design of the filtering process. In HEVC, the in-loop filter includes deblocking filtering and Sample Adaptive Offset (SAO) filtering. In the VVC standard, an Adaptive Loop Filter (ALF) is introduced as a third filter. The ALF filtering process is shown below: (1), in These are samples before the filtering process. These are the sample values after the filtering process. Represents the filter coefficients. It is a clipping function, and This represents the clipping parameters. Variables k and l are... and The changes between them, among which L Indicates the filter length. Clipping function. Its corresponding function The pruning operation introduces nonlinearity to make ALF more efficient by reducing the influence of neighboring sample values that are very different from the current sample value. In VVC, the filtering parameters can be signaled in the bitstream and can be selected from a predefined filter bank. The ALF filtering process can also be summarized using the following formula: (2)
[0107] The video encoder 200, video decoder 300, and hybrid video decoder 130 can be configured to perform neural network (NN) based filtering for video decoding. Figure 4 This is a conceptual diagram illustrating a neural network-based filter 170 with four layers. Various studies have shown that embedding neural networks (NNs) into, for example... Figure 2 Compression efficiency can be improved in hybrid video decoding frameworks. Neural networks have been used for intra-frame and inter-frame prediction to improve prediction efficiency. In recent years, NN-based intra-loop filtering has also been an important research topic. In some examples, the filtering process is applied as a post-filter. In such examples, the filtering process is applied to the output image, and the unfiltered image can be used as a reference image.
[0108] In addition to existing filters, NN-based filters 170, such as unblocking filters, sample adaptive offset (SAO), and / or adaptive loop filtering (ALF), can be applied. NN-based filters can also be applied exclusively, where the NN-based filters are designed to replace all existing filters. Additionally or alternatively, NN-based filters (such as NN-based filter 170) can be designed to supplement, enhance, or replace any or all other filters.
[0109] Figure 4 An example of a CNN-based filter with four layers is shown. Figure 4 The neural network-based filtering process takes reconstructed samples as input and outputs residual samples as intermediates, which are then added back to the input to refine it. The neural network filter can use all color components (e.g., Y, U, and V, or Y, Cb, and Cr, i.e., luminance data 172A, blue hue chromaticity 172B, and red hue chromaticity 172C) as input to leverage cross-component correlations. Different color components can share the same filters (including network structure and model parameters), or each component can have its own specific filters.
[0110] The filtering process can also be summarized as follows: (3) The model structure and parameters of the NN-based filter can be predefined and stored in the video encoder 200 and video decoder 300. The filter can also be notified by signals sent in the bitstream.
[0111] exist Figure 4 In the example, a neural network-based filter could include a series of feature extraction layers followed by an output convolution. Figure 4 In a convolutional layer, the feature extraction layer may include a 3×3 convolutional (conv) layer followed by a Parametric Rectified Linear Unit (PReLU) layer. The convolutional layer applies convolution operations to the input data, which involves a filter or kernel sliding across the input data (e.g., a reconstructed sample of input 172) and computing the dot product at each location. The convolutional operation essentially captures local patterns within the input data. For example, in the context of image processing, these patterns could be edges, textures, or other visual features. The filter or kernel is a small matrix of weights that is updated during the training process. By sliding the filter across the input data (or a feature map from a previous layer) and computing the dot product at each location, the convolutional layer creates a feature map that encodes the spatial hierarchy and patterns detected in the input.
[0112] The output of a convolutional layer is a set of feature maps, each corresponding to a filter used to capture different aspects of the input data. As data passes through deeper layers of the network, this layer helps the neural network learn increasingly complex and abstract features. Figure 4 In the naming convention 3×3 conv 3×3×6×8, the first 3×3 indicates that the convolutional layer has a 3×3 filter size (e.g., a 3×3 matrix). 3×3×6×8 refers to both the input and output dimensions of the convolutional layer, where 6 is the number of input channels and 8 is the number of output channels.
[0113] PReLU layers are activation functions used in neural networks and can be variations of the Rectified Linear Unit (ReLU) activation function. As described above, convolutional layers output feature maps, each corresponding to a filter used to represent the detected features in the input. After the convolutional layers, PReLU layers apply the PReLU activation function to each element of the feature map produced by that convolutional layer. For positive values, the PReLU layer acts similarly to standard ReLU, allowing the value to pass through. For negative values, the PReLU layer allows small linear negative outputs instead of setting them to zero (e.g., as ReLU does). This keeps neurons active and maintains gradient flow, which can be beneficial for learning in deep networks.
[0114] In summary, when a convolutional layer is followed by a PReLU layer, the convolutional layer first extracts features from the input data through a set of learned filters. The resulting feature map is then passed through the PReLU activation function, which introduces non-linearity and helps avoid neuron death by allowing small gradients when the input is negative. This combination is effective when learning complex patterns in the data while maintaining a robust gradient flow, which is particularly beneficial in deeper network architectures.
[0115] When applying neural network-based filtering in video decoding, the entire video signal (pixel data) may be divided into multiple processing units (e.g., 2D blocks), and each processing unit may be processed individually or combined with other information associated with that pixel block. Possible choices for processing units include frames, slices / tiles, CTUs, or any predefined or signaled shape and size. Typically, neural network-based filtering is performed on reconstructed blocks of video data. Here, reconstructed blocks and samples may refer to decoded blocks generated by video decoder 300 and blocks reconstructed in the reconstruction loop of video encoder 200.
[0116] To further improve the performance of neural network-based filtering, different types of input data can be jointly processed to produce filtered outputs. Input data may include, but is not limited to, reconstructed pixels / samples, predicted pixels / samples, pixels / samples after loop filtering, partitioning structure information, deblocking parameters (e.g., boundary strength (BS)), QP values, slice or image type, or filter applicability or decoding mode diagrams. Input data can be provided at different granularities. Luminosity reconstruction and predicted samples can be provided at the original resolution, while chromosity samples can be provided at a lower resolution (e.g., for 4:2:0 representation), or can be upsampled to luminosity resolution for per-pixel representation. Similarly, QP, BS, partitioning, or decoding mode information can be provided at lower resolutions, including cases where each box / slice or processed block has a single value (e.g., QP). In other examples, QP, BS, partitioning, or decoding mode information can be expanded (e.g., duplicated) for per-pixel / sample representation.
[0117] Figure 5 An example of an architecture that utilizes supplementary data is shown in the figure. Figure 5 This is a block diagram illustrating an example CNN-based filter with padded input samples and supplementary data. The NN-based filter 171 uses pixels / samples of a processing block combined with supplementary data as input 174. Input 174 may include four sub-blocks 174A of interleaved brightness samples (Y×4) and associated blue hue chromaticity (U) data 174B and red hue chromaticity (V) data 174C. Supplementary data includes quantization parameter (QP) step size 176 and boundary strength (BS) 178. The region of input pixels / samples can be expanded from each side using four padded pixels / samples. The resulting size of the processing volume is (4+64+4)×(4+64+4)×(4Y+2UV+1QP+3BS).
[0118] Compared to Figure 4 The neural network-based filter 171 may include two or more hidden layers utilizing both 1×1 convolutions and Leaky ReLU layers. The Leaky ReLU layer, similar to the PReLU layer, allows the output of a small non-zero gradient when the layer is inactive. Instead of outputting zero for negative inputs, Leaky ReLU multiplies these inputs by a small constant. This small slope ensures that even neurons that would otherwise be inactive still contribute a small amount to the network's learning, thus reducing the likelihood of ReLU dying.
[0119] Video encoder 200, video decoder 300, and hybrid video decoder 130 can be configured to implement NN-based filtering using a multi-mode design. To further improve the performance of NN-based filtering, a multi-mode solution can be designed. For example, for each processing unit, video encoder 200 can select from a set of modes based on rate-distortion optimization and signal this selection in the bitstream. Different modes may include different NN models, different values of input information used as these NN models, etc. In one example, video encoder 200 and video decoder 300 can use a multi-mode NN-based filtering solution based on a single NN model by using different QP values as inputs to the NN model for different modes.
[0120] An example of a neural network architecture will now be described. In one example, a neural network-based filtering solution with multiple modes can be used, as described above. Figure 6 The structure of the network is shown in the figure. Figure 6The NN-based filter includes a first part comprising input 3×3 convolutional filters 510A to 510E and corresponding parametric rectified linear unit (PReLU) filters 512A to 512E for each input in the input to generate feature maps (e.g., the feature extraction portion of the NN filter). A stitching unit 514 stitches the feature maps and provides them to a fusion block 516 and a transformation block 522. Figure 6 The NN-based filter also includes a set 528 of attention residual (AttRes) blocks 530A to 530N; and a final part (tail part) which includes a 3x3 convolutional filter 550, a PReLU filter 552, a 3x3 convolutional filter 554, and a pixel recombination unit 556. The AttRes block can also be referred to as the backbone block.
[0121] In the first part (e.g., the feature extraction part), different inputs are received, including quantization parameters (QP) 500, partitioning information (part) 502, boundary strength (BS) 504, predicted samples (pred) 506, and reconstructed samples (rec) 508. Corresponding 3×3 convolutional filters 510A to 510E and PReLU filters 512A to 512E convolve and activate the corresponding inputs to generate feature maps. Then, a stitching unit 514 stitches these feature maps together. A fusion block 516, including a 1×1 convolutional filter 518 and a PReLU filter 520, fuses the stitched feature maps. A transformation block, including a 3×3 convolutional filter 524 and a PReLU filter 526, subsamples the fused input to create an output 188. The output 188 is then fed through a set 528 of attention residual blocks 530A to 530N, which may include a variety of numbers of attention residual blocks, such as eight. The attention block is relative to Figure 7 Further explanation. The output 189 from the last attention residual block in the set 184 of attention residual blocks is fed into the final part of the NN-based filter. In this final part, a 3×3 convolutional filter 550, a PReLU filter 552, a 3×3 convolutional filter 554, and a pixel reconstruction unit 556 process the output 189, and an adder unit 558 combines this result with the original reconstructed sample input 508. This ultimately forms a filtered output for presentation and storage (e.g., in a decoded image buffer (DPB)) as a reference for subsequent inter-frame prediction. In some examples, Figure 6 The NN-based filter uses 96 feature maps.
[0122] Figure 7 This is an example Figure 6 A conceptual diagram of the attention residual block. That is, Figure 7An attention residual block 530 is depicted, which may include similar attention residual blocks. Figure 6 The attention residual blocks 530A to 530N are components of the components. In this example, the attention residual block 530 includes a first 3×3 convolutional filter 532, a parametric rectified linear unit (PReLU) filter 534, a second 3×3 convolutional filter 536, an attention block 538, and an adder unit 540. The adder unit 540 combines the output of the attention block 538 with the output 188 initially received by the convolutional filter 532 to generate an output 189.
[0123] Figure 8 This is an example Figure 7 A conceptual diagram of an example spatial attention layer. (See also:) Figure 8 As shown, the spatial attention layer of the attention residual block 530 includes a 3×3 convolutional filter 706, a PReLU filter 708, a 3×3 convolutional filter 710, a size expansion unit 712, a 3×3 convolutional filter 720, a PReLU filter 722, and a 3×3 convolutional filter 724. The 3×3 convolutional filter 706 receives input 702, which corresponds to... Figure 6 The quantization parameters (QP) are 500, the partition information (part) is 502, the boundary strength (BS) is 504, the prediction information (pred) is 506, and the reconstruction block (rec) is 508. A 3×3 convolutional filter 720 receives Z... K 704. The outputs of the size expansion unit 712 and the 3×3 convolution filter 724 are combined, and then combined with the R value 730 to generate the S value 732. The S value 732 is then combined with the Z... K Values 704 are combined to generate output Z. K+1 Value 734.
[0124] In other examples, alternative designs of the NN architecture can be used. For example, one could use... Figure 6 The filter backbone has a large number of low-complexity residual blocks, and the number of channels (feature maps) is reduced and the attention module is removed. Figure 9 The alternative convolutional neural network filtering structure (e.g., for brightness filtering) is shown in the figure. Figure 9 This is a block diagram illustrating a simplified CNN-based filter architecture with padded input samples and supplementary data.
[0125] Figure 9The NN-based filters include 3×3 convolutional filters 810A to 810E and PReLU filters 812A to 812E, which convolve the corresponding inputs (i.e., QP 800, Part 802, BS 804, Pred 806, and Rec 808) to generate feature maps (e.g., feature extraction parts). A concatenation unit 814 concatenates the convolutional inputs (e.g., feature maps). Then, a fusion block 816 fuses the concatenated feature maps using a 1×1 convolutional filter 818 and a PReLU filter 820. Finally, a transformation block 822 processes the fused data using a 3×3 convolutional filter 824 and a PReLU filter 826.
[0126] In this example, the NN-based filter comprises a set 828 of residual blocks 830A to 830N (also referred to as backbone blocks), each of which can be configured according to the following discussion. Figure 10 The residual block structure 830 is used for construction. Residual blocks 830A to 830N are replaceable. Figure 6 AttRes blocks 530A to 530N. Figure 9 The example can be used for luminance (luminance) filtering, but similar modifications can be made for chrominance (chrominance) filtering as discussed below.
[0127] Figure 9 The number of residual blocks and channels included in set 828 can be configured differently. That is, N can be set to different values, and the number of channels in residual block structure 830 can be set to a number other than 160 to achieve different performance-complexity tradeoffs. These modifications can be used to perform chroma filtering to process chroma channels.
[0128] The set 828 of residual blocks 830A to 830N has N instances of residual block structure 830. In one example, N can be equal to 32, such that there are 32 residual block structures. Residual blocks 830A to 830N can use 64 feature maps, which are relative to... Figure 6 The 96 feature maps used in the example have been reduced.
[0129] Figure 10 This is an example Figure 9A conceptual diagram of an example residual block structure 830 is provided. In this example, the residual block structure 830 includes a first 1×1 convolutional filter 832, which increases the number of input channels to 160 before the activation layer (PReLU filter 834) processes the input channels. The PReLU filter 834 can then reduce the number of channels to 64 through this processing. A second 1×1 convolutional filter 836 then processes the reduced channels, followed by a 3×3 convolutional filter 838. Finally, a combining unit 840 combines the output of the 3×3 convolutional filter 838 with the original input received by the residual block structure 830.
[0130] In another neural network architecture, residual blocks can be replaced by filter blocks (also known as backbone blocks), such as Figure 11 As shown. In this example, bypass branches around all layers in each residual block are removed, as... Figure 12 As shown. The number of channels and the number of filter blocks are configurable, for example, 64 channels and 24 filter blocks, with 160 channels before and after activation.
[0131] Figure 11 This illustrates alternatives to the technology according to this disclosure. Figure 6 A conceptual diagram of another example filter block structure of an attention residual block set. Figure 11 The NN-based filters include 3×3 convolutional filters 1010A to 1010E and PReLU filters 1012A to 1012E, which convolve the corresponding inputs (i.e., QP 1000, Part 1002, BS 1004, Pred 1006, and Rec 1008) to form feature maps (e.g., feature extraction parts). A concatenation unit 1014 concatenates these feature maps. Then, a fusion block 1016 fuses the concatenated inputs using a 1×1 convolutional filter 1018 and a PReLU filter 1020. Finally, a transformation block 1022 processes the fused data using a 3×3 convolutional filter 1024 and a PReLU filter 1026.
[0132] In this example, the NN-based filtering unit comprises N filter blocks 1030A-1030N (also known as backbone blocks), each of which may have Figure 12 The filter block structure 1030 is discussed below. The filter block structure 1030 is substantially similar to the residual block structure 830, except that the combination unit 840 is omitted from the filter block structure 1030, so that the input is not combined with the output. Instead, the output of each residual block structure can be directly fed to the subsequent block.
[0133] The number of channels and the number of filter blocks can be configured. In one example, these parameters can be set to 64 channels and 32 filter blocks. The number of additional channels in each filter block 198 can be 160 as discussed above.
[0134] Figure 12 This is an example Figure 11 A conceptual diagram of an example filter block structure 1030 is provided. In this example, the residual block structure 1030 includes a first 1×1 convolutional filter 1032, which increases the number of input channels to 160 before the activation layer (PReLU filter 1034) processes the input channels. The PReLU filter 1034 can then reduce the number of channels to 64 through this processing. A second 1×1 convolutional filter 1036 then processes the reduced number of channels, followed by a 3×3 convolutional filter 1038. As discussed above, with... Figure 10 Compared to the residual block structure 830, the filter block structure 1030 does not include a combination unit.
[0135] Convolutions with 3×3 kernels are popular in neural network-based filters. In the architecture described above, 3×3×N×M convolutions are utilized in multiple parts and blocks, where the 3×3 kernels slide in the spatial (2D) domain. However, multidimensional convolutions such as 2D kernel convolutions introduce significant complexity. According to the techniques disclosed herein, video encoder 200 and video decoder 300 can be configured to utilize separable convolutions instead of multidimensional convolutions (e.g., 3×3×N×M convolutions). For example, two separable one-dimensional convolutions can be used instead of 3×3 convolutions in any part of a neural network-based filter. The use of separable convolutions reduces computational complexity and memory bandwidth requirements.
[0136] To avoid overcomputation and reduce the parameter set derived from multidimensional convolutions (such as 3×3 convolutions (or 2D convolutional quantities with higher-dimensional kernels) or similar convolutions in the CNN architecture described above), this disclosure describes a technique in which the video encoder 200 and video decoder 300 are configured to utilize separable convolutions (e.g., 1D separable convolutions) generated by low-complexity approximations instead of multidimensional (e.g., 2D) convolutions that slide in spatial directions. While the techniques of this disclosure are described with reference to 3x3 convolutions (e.g., 4x4, 5x5, or larger), the decomposition techniques of this disclosure can be used for multidimensional convolutions of any size. Typically, a multidimensional convolution has a kernel size n1×n2 in the spatial dimension, where n1 and n2 are positive integers. The values of n1 and n2 can be the same or different. A multidimensional convolution can also have a size K (e.g., n1×n2×K) in the depth dimension. Furthermore, for the number of output channels M, a multidimensional convolution can be represented as a 4-D tensor of n1×n2×K×M.
[0137] The video encoder 200 and video decoder 300 can be configured to perform multidimensional convolution decomposition. In one example of this disclosure, the low-rank convolution approximation decomposes a 3×3×M×N convolution into a pixel-wise convolution (1×1×M×R), two separable convolutions (3×1×R×R, 1×3×R×R), and another pixel-wise convolution (1×1×R×N). Here, R is the rank of the approximation and can be used to adjust the performance / complexity of the approximation. The value of R can be an integer. In some examples, R can be derived as a function (ratio) of M or N or max(M,N). In some examples, R can be set to be equal to A*max(M,N), where A is less than 1 (e.g., 0.2, 0.5, 0.8), A is greater than 1 (e.g., 1.0, 1.2), or other values.
[0138] In a typical example, a multidimensional convolution can be approximated by multiple separable convolutions in the following way: perform a first convolution of size n1×1 and perform a second convolution of size 1×n2 on the output of the first convolution.
[0139] Figure 13 This is a block diagram illustrating another example of a multidimensional convolution solution. For example... Figure 13 As shown, the 3x3xKxK convolution 838 of residual block 830.1 is approximated by the 3x1xKxR convolution 1400, and then by the 1x3xRxK convolution 1410. In other examples, the positions of convolutions 1400 and 1410 can be interchanged. R is the canonical rank of this decomposition. A lower rank implies a larger reduction in complexity. Figure 13 Compared to the previous example, the video encoder 200 and the video decoder 300 can use two separable convolutions to approximate a 3×3 convolution without performing a leading or trailing 1×1 convolution.
[0140] The integration of the described techniques into the CNN architecture will now be described. Although Figure 13 The example is with Figure 9 and Figure 10 The residual blocks described herein are related, but the techniques disclosed herein can be used with any multidimensional convolution found anywhere in a neural network-based filter. For example, Figures 6 to 7 (Attention residual blocks 530A to 530N) and Figures 11 to 12 The 3x3 convolutions in the backbone blocks (filter blocks 1030A to 1030N) can also be approximated using multiple separable convolutions. Additionally, as referenced above, [further details can be provided]. Figure 13 The described multiple separable convolutions approximate the feature extraction portion of any NN-based filter described above (e.g., Figure 11 Convolutional layers 1010A to 1010E and PReLU layers 1012A to 1012E), fusion blocks (e.g., Figure 11 Block 1016), transition blocks (e.g., Figure 11 Block 1022), backbone block (e.g., Figure 11 Block 1028) or the tail portion (e.g., Figure 11 This can be any multidimensional convolution (e.g., a 3x3 convolution) as shown in convolution 1050, PReLU 1052, convolution 1054, and pixel recombination 1056. Typically, the feature extraction portion of a neural network can include any layer configured to extract features from the input data. The tail portion of the neural network can include any number of layers at the end of the neural network before the output.
[0141] The aspects of decomposing the training will now be described. In some examples, the parameters of the separable convolution can be extracted from the trained parameters of the 2D convolution. An example extraction model can be implemented as follows.
[0142] For CP decomposition, 3D convolution kernel (For example, 3x3xk) can be decomposed into ,in It is the rank of the decomposition, and These are kernels in a single dimension. The decomposition can be optimized using a nonlinear optimization process (e.g., Gauss-Newton). The squared error is used to calculate the kernel parameters.
[0143] Alternatively, there are other processes inspired by stochastic gradient descent and machine learning practices. Consider multiple approximate 3×3 convolutions within a neural network model. These approximate convolutions can be optimized individually (e.g., trained sequentially to match the output feature maps of the original 3×3 convolutions as well as any accumulated approximation errors from previous approximate convolutions in the network), or jointly optimized across the entire network (e.g., these approximate convolutions are fed into the network, and then the entire network or only all approximate convolutions are optimized end-to-end).
[0144] This article focuses on 3x3 convolution approximation techniques for CNN architectures (e.g., similar to...). Figure 13 This technique can be applied to different types of architectures and modules that employ 2D convolutions in a sliding window across spatial dimensions and receive supplementary information as input data. The techniques described in this paper can be applied not only to the backbone of a neural network architecture but also to its head blocks (e.g., feature extraction, fusion blocks, and / or transformation blocks) or tail portions.
[0145] Another example of a CNN ILF architecture is a multimodal CNN ILF with separable convolutions. Replacing 2D convolutions (e.g., 3x3) with separable convolutions further reduces the complexity of the CCN ILF structure. In JVET-AD0023's EE1 test 1.3.5, the low-rank convolution approximation decomposes the 3x3xMxN convolution into pixel-wise convolutions (1x1xRxN), and two separable convolutions (3x1xRxR, 1x3xRxR) and another pixel-wise convolution (1x1xRxN) are also applied to the residual blocks of the architecture described in JVET-AC0155. Here, R denotes the rank of the approximation and can be used to ablate the approximation's performance / complexity.
[0146] In some examples, having Figure 13 exemplified decomposed Figure 9 The architecture is implemented using parameters K=64, M=160 and R=51, and the total number of 24 residual blocks results in a network complexity of 356.43kMAC and a number of parameters of 1.07M for the intra-frame luminance model.
[0147] exist Figure 14 In some examples of the illustrated residual blocks, a 3×3 convolution is decomposed into a 3×1×C1×R convolution followed by a 1×3×R×C2 convolution, where C1 and C2 are the number of input and output channels, respectively, and R is the approximate rank. The parameter R can be derived as R = C1xC2 / (C1+C2), controlling the approximate complexity.
[0148] In some examples, having Figure 14 The illustrated residual block is Figure 9 The architecture is implemented using parameters R1=8, R2=44, M1=160 and M2=32, and a total of 24 residual blocks, resulting in a network complexity of 358.43kMAC and a number of parameters of 1.07M for the intra-frame luminance model.
[0149] Figure 14 An example of a multi-scale feature extraction backbone network with two-component convolutions is shown. Figure 14The proposed architecture is shown, where 3×3 convolutional blocks are replaced by separable convolutions of 3×1 and 1×3. In this example, the residual block structure 1530 includes a first 1×1 convolutional filter 1532 preceding a first activation layer (PReLU filter 1534), and a 3×3 convolutional filter 1540 and a second activation layer (PReLU filter 1542) running in parallel with the first 1×1 convolutional filter 1532 and the PReLU filter 1534. A second 1×1 convolutional filter 1536 then processes the combined output of the PReLU filters 1534 and 1542, followed by a 3×3 convolutional filter 1538. However, in... Figure 14 In the example, the 3×3 convolutional filter 1540 can be approximated using multiple separable convolutions, such as Figure 14 The 3×1 convolutional filter 1550 and 1×3 convolutional filter 1552 are shown in the figure. Similarly, the 3×3 convolutional filter 1538 can be approximated by multiple separable convolutions, such as... Figure 14 The 3×1 convolutional filter 1560 and the 1×3 convolutional filter 1562 are shown in the figure.
[0150] Another example neural network architecture is the multimodal CNN ILF, which leverages two-component decomposition for multi-scale feature extraction. The multi-scale feature extraction method proposed in JVET-AD021 utilizes two-component convolutional networks (exemplified in...). Figure 14 In the diagram, a 3x3 convolution is decomposed into a 3x1xC1xR convolution followed by a 1x3xRxC2 convolution, where C1 and C2 are the number of input and output channels, respectively, and R is the approximate rank. The parameter R can be derived proportionally to R = C1xC2 / (C1+C2) and controls the approximate complexity.
[0151] As an example, Figure 14 The illustrated architecture can be implemented using parameters R1=8, R2=44, M1=160 and M2=16, and a total of 24 residual blocks. For the intra-frame luminance model, the network complexity will be 358.43kMAC and the number of parameters will be 1.07M.
[0152] Another example NN architecture is the unified CNN ILF with bicomponent decomposition. The multi-scale feature extraction backbone with bicomponent decomposition has been integrated into the unified model in EE. Furthermore, the specification from EE contains two model versions: (1) a unified model for joint luminance and chrominance, such as... Figure 15 As shown; and (2) separate models for luminance and chromaticity, see respectively. Figure 13 .
[0153] Figure 15 This is a conceptual diagram illustrating an example of a unified filter 1600 with a joint model (joint luminance and chrominance). Figure 15 Indicates the preceding text relative to Figures 4 to 14 A specific implementation of the described general principle is given. Filter 1600 includes one or more instances of backbone block 1650. In some examples, Figure 15 The example parameters include one or more of the following: d1 = 192, d2 = 32, d3 = 16, d4 = 16, d5 = 16, C = 64, C1 = 160, C 21 =32, C 22 =32, C 31 =64, N=24 and d6=48.
[0154] Figure 16 This is a conceptual diagram illustrating an example of a unified filter 1700 with a separate luminance / chrominance model. The filter 1700 can be applied to luminance samples. Figure 16 Indicates the preceding text relative to Figures 4 to 14 A specific implementation of the described general principle is given. Filter 1700 includes one or more instances of backbone block 1750. In some examples, Figure 16 The example parameters include one or more of the following: d1 = 192, d2 = 32, d3 = 16, d4 = 16, d5 = 16, C = 64, C1 = 160, C 21 =32, C 22 =32, C 31 =64, N=20 and d6=48.
[0155] Figure 17 This is a conceptual diagram illustrating an example of a unified filter with separate luminance / chrominance models. Filter 1800 can be applied to chrominance samples. Figure 17 Indicates the preceding text relative to Figures 4 to 14 A specific implementation of the described general principle is provided. Filter 1800 includes one or more instances of backbone block 1850. In some examples, Figure 17 The example parameters include one or more of the following: d1 = 192, d2 = 32, d3 = 16, d4 = 16, d5 = 16, C = 64, C1 = 160, C 21 =32, C 22 =32, C 31 =64, N=16 and d6=48.
[0156] Video encoder 200 and video decoder 300 may be configured to perform NN-based filtering using a unified CNN ILF with luma / chroma separation. A CCN ILF filter architecture with luma / chroma separation is proposed in JVET-AE0281. Separate processing branches for luma and chroma allow NN weights to be trained independently for the target component and achieve a certain degree of complexity-performance trade-off optimization. In Figure 18 the illustrated filter architecture, the chroma branch may use a smaller number of BBs, e.g., N c <N y , or a reduced number of channels, e.g., C uv <Cy or C uv21 <C y21 . Furthermore, Figure 18 the backbone block is depicted with a skip connection, and thus forms the residual block of a ResNet. In the context of the present disclosure, backbone blocks may or may not include skip connections.
[0157] Video encoder 200 and video decoder 300 may be configured to perform NN-based filtering using a unified CNN ILF with switchable decomposition order. Certain processes of separable convolution described above in connection with the multi-mode CNN ILF with two-component decomposition for multi-scale feature extraction and utilized in the ResNet filter architecture described in Figure 15 can adopt a reduced decomposition rank, thus reducing the number of channels in the intermediate stage of separable decomposition.
[0158] In such filter configurations, if R<C1, the first stage of decomposition (e.g., applying 3x1xC1xR in the horizontal direction) reduces the number of output features. In the second stage, if R<C2, the number of features is increased by applying convolution 1x3xRxC2 in the vertical direction. This can result in features in the vertical direction having a certain priority. This may lead to non-optimal filtering / feature extraction due to the bottleneck caused by the use of fixed direction kernels.
[0159] To solve the foregoing problem, certain architectures may flip (switch the order of) the direction of decomposition kernels in the sequence of applied blocks. The examples described below are proposed based on the UF architecture and address decomposition in residual blocks. If a CNN filter employs decomposition of multi-dimensional convolution, switched order decomposition may be utilized in other blocks of the CNN filter, e.g., in the head block or the tail block.
[0160] Examples of backbone residual blocks with different kernel directions for types 1 to 4 are respectively shown in Figure 19 , Figure 20 , Figure 21 and Figure 22In some examples, backbone network 1 and backbone network 2 are proposed to be alternated or mixed sequentially for feature extraction. In some examples, network 3 and network 4 may be alternated and mixed sequentially. In some examples, networks 1, 2, 3 and 4 may be mixed alternately. Figure 19 The backbone residual block 2050 is shown, which includes a 3x1 convolution 2051, followed by a 1x3 convolution 2052, and a 1x3 convolution 2053, followed by a 3x1 convolution 2054. Figure 20 The backbone residual block 2150 is shown, which alternates in a manner similar to residual block 2050 but in a different order. That is, the backbone residual block includes a 1x3 convolution 2151, followed by a 3x1 convolution 2152, and a 3x1 convolution 2153, followed by a 1x3 convolution 2154. Figure 21 The backbone residual block 2250 is shown, which includes a 3x1 convolution 2251, followed by a 1x3 convolution 2252, and a 3x1 convolution 2253, followed by a 1x3 convolution 2054. Figure 22 The backbone residual block 2350 is shown, which has an additional selection of the backbone residual block 2250 in such a sequence that the backbone residual block 2250 includes a 1x3 convolution 2351, followed by a 3x1 convolution 2352, and a 1x3 convolution 2353, followed by a 3x1 convolution 2354.
[0161] Figure 23 An example of a system with decomposition exchange is shown. Figure 23 The proposed switching order decomposition (Type 1) is shown and integrated into a unified filter architecture for luminance filtering. Figure 19 Main block 2050) and type 2 ( Figure 20 Example of the main block 2150).
[0162] The video encoder 200 and the video decoder 300 can be configured to perform NN-based filtering using a unified CNN ILF with a transformer block. Figure 24 A high-level overview of the converter block is shown. Figure 24 In the example, transformer block 2500 includes an input processing unit 2510 that generates a value 2512, a key 2514, and a query 2516. Transformer block 2500 also includes a multi-head attention and normalization layer 2520, and a feedforward network 2530.
[0163] Figure 25 This is a block diagram illustrating an example converter block of a unified filter architecture. Figure 25An example of an attention block architecture is shown, where query, key, and value components are constructed from the input. After the channel arrangement is prepared for performing channel-wise attention, matrix multiplication between the query and key matrices generates cross-correlation between channels. This correlation is translated into a probability weight matrix after the Softmax layer. The weight matrix is applied to the value matrix using element-wise multiplication, and key information from other channels is aggregated to the corresponding channel. Furthermore, when multiple heads are used in the transformer, attention from each head is processed separately, and the results are aggregated.
[0164] The second part of the converter block is Figure 25 The bottom of the diagram shows a feedforward network that further processes the information, thus providing a more flexible output representation for training.
[0165] Figure 25 This is a block diagram illustrating an example converter block according to one or more aspects of this disclosure. TB 2600 can be an example architecture of any converter block described above. Converter block 2600 is illustrated for illustrative purposes only. Any suitable converter block providing self-attention can be used. Figure 25 In the example, self-attention block 2640 is configured to perform self-attention and linear projection block 2650 is configured to perform linear projection.
[0166] Layer normalizer 2602 normalizes the input across feature dimensions to stabilize and accelerate training. Query (q) 2618 represents information about the current symbol and is used to determine how much attention the current symbol should give to other symbols. Key (k) 2612 can represent information about all symbols and is used to compute the relevance of each symbol relative to the query. Value (v) 2608 can contain the actual information about the symbols to be weighted and combined based on attention scores. Softmax 2624 converts attention scores (e.g., the path from query 2618 and key 2612) into probabilities, thereby determining the weight of each symbol's contribution to the output.
[0167] Because the transformer utilizes many nonlinearities, this can increase the implementation complexity on computationally constrained platforms. To address this issue, some ResNet architectures may employ incomplete transformer blocks, using only attention blocks instead. An example of such an architecture is presented in JVET-AG0162.
[0168] Figure 26 An example is shown of inserting a converter block into the residual backbone block of a filter architecture. Figure 26 The residual backbone block 2750 is shown, which generally has the same characteristics as... Figure 19 It has the same structure as the residual backbone block 2050, but also includes the converter block 2755.
[0169] Figure 27An example is shown of inserting a converter block into the residual backbone block of a filter architecture. Figure 27 The residual backbone block 2850 is shown, which generally has the same characteristics as... Figure 19 It has the same structure as the residual backbone block 2050, but also includes the converter block 2855.
[0170] Figure 28 An example is shown of inserting a converter block into the residual backbone block of a filter architecture. Figure 28 The residual backbone block 2950 is shown, which generally has the same characteristics as... Figure 19 It has the same structure as the residual backbone block 2050, but also includes the converter block 2955.
[0171] The startup in the converter is implemented as a point-by-point nonlinearity, examples of which may include a Gaussian error linear unit (GELU), a rectified linear unit (ReLU), or other specific implementations.
[0172] The term layer normalization defines the process of layer normalization, as described, for example, in Layer Normalization by JL Ba, JR Kiros, and GE Hinton (arXiv:1607.06450), which uses the distributions of all inputs in the layer to calculate the mean and variance, and then uses these to normalize the inputs to that layer. The term normalization defines the process of input normalization, which rescales the magnitudes of the input samples to the range 0..1.
[0173] The SoftMax operation is a normalization exponential function used as an activation function in a neural network to normalize the network's output to a probability distribution for the predicted output class. For each input element... z i SoftMax operations apply exponential functions and normalize these values by dividing them by the sum of these exponential functions: Point-by-point multiplication is an operation defined by terminology. The matrix multiplication operation is defined by the terminology. definition.
[0174] ResNets with transformer blocks (as described above regarding the unified CNN ILF with transformer blocks) utilize transformer modules and a series of ResNet backbone blocks, which consist of cascaded convolutions and nonlinear operations (e.g., PreLU). In the transformer blocks of such architectures, some operators (e.g., Softmax, LayerNorm, and Norm) are nonlinear. For example, the Softmax function consists of an exponential function, and the Norm and LayerNorm operators contain square root functions, and they cannot be directly quantized without approximation. Furthermore, this nonlinearity can lead to problems in the system's efficient integer implementation.
[0175] To implement a CNN ILF with a transformer using 16-bit precision fixed-point arithmetic, integer quantization implementation within the transformer block may be necessary, as described above regarding a unified CNN ILF with a transformer block. It is recommended to approximate all normalized layers / operators (including LayerNorm, Norm, and Softmax). Furthermore, PreLU (instead of GELU) can be used in the feedforward network to avoid additional nonlinear approximations. Examples of the approximation and quantization processes are illustrated below.
[0176] First, the quantization process is defined as x q = clip(round(x * (1< <n), minValue, maxValue) ,in round The function rounds the floating-point value x to the nearest integer, where n is the number of bits in the input, and the clip function is defined as follows: clip(x, a, b) = min(max(x, a), b).
[0177] The approximation of the nonlinear operator will now be described for the LayerNorm operation. The LayerNorm operator is defined by the following Equation 1, where... It is a 4-D tensor (batch size, number of channels, height, width), i.e. (B, C, H, W). The small value is added to avoid division by zero, and normalization is performed across the entire channel dimension. For floating-point implementations, this can be set to 1e-6, and for 11-bit quantization, it can be set to 4. In some examples, For the floating-point implementation, it can be set to 1e-6; for the quantization implementation with an 11-bit scaling factor, it can be set to 4 (in this context, the quantization process can be defined as: multiplying the floating-point input by a factor). Then, a floor operation is performed, where n is the number of bits used to represent the input. To make this operator parameterless, in some examples, Equation 1 can be simplified to Equation 2, followed by a 1x1 convolution (i.e., 1x1xCxC1), with C inputs and C1 channels output. The 1x1 convolution here is achieved through Equation 1... Sum of deviations To compensate for scaling functionality. (1) (2)
[0178] The mean and variance operations in Formula 2 are well-defined and straightforward. However, the square root operation may not have the same definition on different computing platforms, and may not be able to implement integer sqrt. Several approximation methods are proposed here.
[0179] In some examples, a linear search algorithm can be used to compute the sqrt. To compute y = sqrt(x), one can search for the maximum value of y such that... In some examples, this process can be performed using a binary search.
[0180] In some examples, Newton's method can be used to calculate the square root, while Hero's method can be used as a special case. To calculate the square root of N, it is equivalent to finding... The solution can be found using the formula. Iteratively computed, where k is initialized to zero, and As a number greater than sqrt(N), for example . Is it a return? A function of the number of bits. Iteration in Stop at this time and the solution is Otherwise, k = k + 1. When N = 0, return a solution of zero directly without performing iteration. In another implementation, Division can be performed using bit shift operations, where positive k represents shifting left by k bits and negative k represents shifting right by k bits.
[0181] In some examples, the normalized data is normalized / cropped / mapped within a range (e.g., 0...1 in floating-point representation, or minValue...maxValue in integer representation). In examples with integer data representation, the complete LUT or a portion thereof of the sqrt(x) value can be provided as edge information.
[0182] The function clip(x, a, b) is defined as follows: idx = min(max(x, a), b). In some examples, a piecewise approximation of the function can be used. A set of parameters can be extracted from the input value x, such as the index of the region (segment) and the index of the position within the region (segment). The set of model parameters (for each region) is provided by the LUT and evaluated by the first index, and applied to the second index to produce the output value: {idx1, idx2} = function1 (x) model_params = LUT(idx) y = function2(idx2, model_params).
[0183] Examples of models may include piecewise linear models, where the model parameters are {scaling factor and offset}, such that y = scaling factor * idx2 + offset.
[0184] We will now describe the approximation of the nonlinear operator in terms of the normalized function. Figure 24 The normalization function of the intermediate converter is defined in Equation 3, where the L2 Norm operator is operated as follows: , where n is the number of elements, and For the specific implementation of floating point, it can be set to 1e-6, and for 11-bit quantized input, it can be set to 4. (3)
[0185] The sum of squares operation in L2 Norm can be performed using integer arithmetic, while the integer sqrt operation can be performed using the example algorithms listed (such as those discussed above).
[0186] In some examples, ( The operation can be performed by trimming the L2 Norm value to a predefined range in the integer representation and using the result value as the access index of the LUT with the square root value: . The function clip(x, a, b) is defined as follows: idx = min(max(x,a), b).
[0187] We will now describe the approximation of the nonlinear operator for the Softmax operator. The Softmax operator is illustrated in Equation 4. It is a real vector, or if If quantized, it is an integer vector. (4)
[0188] For calculation The proposal suggests utilizing the properties of Softmax and the exponential function. For the former, since... ,in yes The maximum value. Then calculations can be performed in the negative region. ,in This not only narrows the approximation range but also improves the numerical stability of the operation. For the latter, further adjustments can be made... The application scope is narrowed to reduce the approximate area. Utilizing... In the negative region, =mod ), and k= Remainder mod ( ) in a much smaller range Within this range, we can approximate the result. Therefore, we only need to perform the calculation. To obtain .
[0189] exist In the case of integer quantization, The approximation needs to take into account the input scaling factor. (That is, using s digits of quantization), making the approximation relative to The original signal or The dequantized signal is then used. In this case, the calculation can be performed similarly to that described in "I-BERT: Integer-only BERT Quantization" (arXiv:2101.01321v3) published by S. Kim, A. Gholami, Z. Yao, MW Mahoney, and K. Keutzer in 2021 (hereinafter referred to as "Kim"), as follows: Let Then k= , We need to perform calculations. To obtain .
[0190] Several processes can be used to perform this. Approximation: a) In some examples, subsamples of a function within a given range can be recorded in a lookup table (LUT) and, based on the LUT, the remaining samples can be interpolated from its two nearest neighbors. b) In some examples, the remaining samples can be obtained using Taylor expansion based on the lookup table described in a). c) In some examples, higher-order polynomials (e.g., second-order polynomials) can be used to approximate the function. Specifically, the function is approximated such that... Furthermore, the parameters a, b, and c can be estimated by solving a least-squares problem using any convex optimization method, such as gradient descent or Gauss-Newton. In some examples, the polynomial parameters can be derived as described by Kim, where the input to the Softmax function is 11-bit quantized and, after the shift and range reduction mentioned above... The polynomial can be rearranged as Based on the estimated parameters proposed in Kim, It can be calculated and set to 2770. It is set to 4024659. S1 is the scaling factor that will be canceled out in Equation 4. Therefore, S1 can be ignored in the calculation. d) In some examples, a piecewise approximation of the function can be used. A set of parameters can be extracted from the input value x, such as the index of the region (segment) and the index of the position within the region (segment). The set of model parameters (for each region) can be provided by a LUT and evaluated by the first index, and applied to the second index to produce the output value: {idx1, idx2} = function1 (x) model_params = LUT(idx) y = function2(idx2, model_params). Examples of models may include piecewise linear models, where the model parameters are {scaling factor and offset}, such that y = scaling factor * idx2 + offset.
[0191] We will now describe approximations of division and quantization operations. Typically, the normalization process involves division of the following form: In order to utilize N-bit quantization representation for quantization In some examples, it can be calculated as follows: In some examples, if b is already a very large number, the denominator b can be shifted to the right first, making... ,in In some examples, for 32-bit arithmetic precision, division can be performed first, making... >>(31-N), where c= .
[0192] In some examples, division can be implemented even if the arithmetic logic unit (ALU) of the computing hardware does not support integer division. Efficient algorithms can be used here, such as those in the following examples: C. Wang, P. Lee, J. Wang, and C. Huang: “Design of a cycle-efficient 64-b / 32-b integer divider using a table-sharing algorithm,” IEEE Trans. VLSI Systems, Vol. 11, No. 4, pp. 737-740, August 2003; and N. Takagi, S. Kadowaki, and K. Takagi, “A hardware algorithm for integer division,” […]. 17 Session IEEE Computer Arithmetic Workshop ( ARITH'05 ), Cape Cod, Massachusetts, USA, 2005, pp. 140-146, doi: 10.1109 / ARITH.2005.6.
[0193] In some examples, reciprocals, or finite sets of reciprocals, can be represented using fixed-point arithmetic with integer values and provided as edge information. In some examples, the denominators used may be limited to those values that can be implemented using multiplication and shift operations.
[0194] In some examples, GELU can be used in the feedforward network, and the approximation process in Kim can also be used.
[0195] In some examples, the quantization precision of the filtering system can be set to 16 bits, and the quantization representations of LayerNorm, Norm, and Softmax can be set to 11 bits. In another embodiment, the quantization bit depth of these operators can be set to adapt to the signal distribution in the characteristic domain.
[0196] The proposed technique has been evaluated and found to be applicable to all NN models with different functionalities and different types of structures and modules. It is implemented with integers and applies quantization.
[0197] Implementing the techniques of this disclosure in an NNVC architecture can reduce computational complexity and memory bandwidth requirements, while providing better performance. The examples described in this document are relative to NN-assisted loop filtering, but are applicable to any NN-based video decoding tool that consumes input data with certain statistical properties, such as static content or sparse representation.
[0198] Figure 29 This is a block diagram illustrating an example video encoder 200 that can perform the techniques of this disclosure. Figure 29 This disclosure is provided for illustrative purposes and should not be construed as a limitation on the techniques extensively illustrated and described herein. For illustrative purposes, this disclosure describes the video encoder 200 in accordance with the techniques of VVC and HEVC. However, the techniques of this disclosure can be performed by video encoding devices configured for other video decoding standards and video decoding formats, such as AV1 and subsequent formats of AV1 video decoding.
[0199] exist Figure 29 In the example, the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, mode selection unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy coding unit 220 may be implemented in one or more processors or in processing circuitry. For example, the units of the video encoder 200 may be implemented as one or more circuit or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0200] Video data storage 230 can store video data to be encoded by components of video encoder 200. Video encoder 200 can receive data from, for example, video source 104 (…). Figure 1 The video data memory 230 receives video data stored in the video data memory 230. The DPB 218 can act as a reference picture memory, storing reference video data for use when the video encoder 200 predicts subsequent video data. The video data memory 230 and DPB 218 can be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and DPB 218 can be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 can be on-chip (as illustrated) with other components of the video encoder 200, or off-chip relative to those components.
[0201] In this disclosure, references to video data memory 230 should not be construed as limited to memory inside video encoder 200 (unless specifically described) or memory outside video encoder 200 (unless specifically described). Rather, references to video data memory 230 should be understood as a reference memory that stores video data received by video encoder 200 for encoding (e.g., video data for the current block to be encoded). Figure 1 The memory 106 can also provide temporary storage for the outputs from various units of the video encoder 200.
[0202] Examples Figure 29 Various units help understand the operations performed by the video encoder 200. Units can be implemented as fixed-function circuits, programmable circuits, or combinations thereof. Fixed-function circuits are circuits that provide specific functionality and are pre-defined for the operations that can be performed. Programmable circuits are circuits that can be programmed to perform various tasks and provide flexible functionality for the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is generally immutable. In some examples, one or more units in the unit may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units in the unit may be integrated circuits.
[0203] The video encoder 200 may include an arithmetic logic unit (ALU), an essential function unit (EFU), digital circuitry, analog circuitry, and / or a programmable core, all formed by programmable circuitry. In an example where the operation of the video encoder 200 is performed using software executed by programmable circuitry, memory 106 ( Figure 1 The video encoder 200 may store instructions (e.g., target code) of the software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0204] The video data storage unit 230 is configured to store received video data. The video encoder 200 can retrieve images of the video data from the video data storage unit 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data storage unit 230 can be raw video data to be encoded.
[0205] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra-frame prediction unit 226. The mode selection unit 202 may include additional functional units for performing video prediction based on other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra-frame block copying unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0206] Mode selection unit 202 typically coordinates multiple coding channels to test combinations of coding parameters and the resulting rate-distortion values for such combinations. Coding parameters may include the CTU-CU partitioning, the prediction mode for the CU, the transformation type of the residual data for the CU, the quantization parameters of the residual data for the CU, etc. Mode selection unit 202 can ultimately select a combination of coding parameters that has a better rate-distortion value compared to other tested combinations.
[0207] The video encoder 200 can divide an image retrieved from the video data storage 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 202 can divide the image's CTUs according to the tree structure described above (such as an MTT structure, QTBT structure, superblock structure, or the quadtree structure described above). As described above, the video encoder 200 can form one or more CUs by dividing the CTUs according to the tree structure. Such CUs are also commonly referred to as "video blocks" or "blocks".
[0208] Generally, mode selection unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra-prediction unit 226) to generate prediction blocks for the current block (e.g., the current CU, or, in HEVC, the overlapping portion of PU and TU). To perform inter-frame prediction for the current block, motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in DPB 218). Specifically, motion estimation unit 222 may calculate values representing the similarity between a potential reference block and the current block, for example, based on sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), etc. Motion estimation unit 222 may typically perform these calculations using sample-by-sample differences between the current block and the reference blocks under consideration. Motion estimation unit 222 may identify reference blocks with the lowest values produced by these calculations to indicate the reference block that best matches the current block.
[0209] Motion estimation unit 222 can generate one or more motion vectors (MVs) that define the location of a reference block in a reference image relative to the location of the current block in the current image. Motion estimation unit 222 can then provide the motion vectors to motion compensation unit 224. For example, for unidirectional inter-frame prediction, motion estimation unit 222 can provide a single motion vector, while for bidirectional inter-frame prediction, motion estimation unit 222 can provide two motion vectors. Motion compensation unit 224 can then use the motion vectors to generate a prediction block. For example, motion compensation unit 224 can use the motion vectors to retrieve data for the reference block. As another example, if the motion vectors have fractional sample accuracy, motion compensation unit 224 can interpolate the prediction block according to one or more interpolation filters. Furthermore, for bidirectional inter-frame prediction, motion compensation unit 224 can retrieve data for two reference blocks identified by corresponding motion vectors and combine the retrieved data, for example, by per-sample averaging or weighted averaging.
[0210] When operating according to the AV1 video decoding format, the motion estimation unit 222 and the motion compensation unit 224 can be configured to encode the decoded blocks of video data (e.g., both luma and chroma decoded blocks) using translational motion compensation, affine motion compensation, overlap block motion compensation (OBMC), and / or composite inter-intra-frame prediction.
[0211] As another example, for intra-prediction or intra-prediction decoding, intra-prediction unit 226 may generate a prediction block from samples adjacent to the current block. For example, for directional mode, intra-prediction unit 226 may typically mathematically combine the values of adjacent samples and fill these calculated values across the current block in a defined direction to produce a prediction block. As another example, for DC mode, intra-prediction unit 226 may calculate the average of the adjacent samples of the current block and generate a prediction block to include the resulting average for each sample of the prediction block.
[0212] When operating according to the AV1 video decoding format, the intra-frame prediction unit 226 can be configured to encode decoded blocks of video data (e.g., both luma and chroma decoded blocks) using directional intra-frame prediction, non-directional intra-frame prediction, recursive filter intra-frame prediction, luma-chroma (CFL) prediction, intra-block copying (IBC), and / or palette modes. The mode selection unit 202 may include additional functional units for performing video prediction based on other prediction modes.
[0213] Mode selection unit 202 provides a prediction block to residual generation unit 204. Residual generation unit 204 receives an uncoded raw version of the current block from video data memory 230 and a prediction block from mode selection unit 202. Residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines the residual block for the current block. In some examples, residual generation unit 204 may also determine the differences between sample values in the residual block to generate the residual block using residual differential pulse decoding modulation (RDPCM). In some examples, residual generation unit 204 may be formed using one or more subtractor circuits performing binary subtraction.
[0214] In the example where mode selection unit 202 divides a CU into PUs, each PU can be associated with a luma prediction unit and a corresponding chroma prediction unit. Video encoder 200 and video decoder 300 can support PUs of various sizes. As noted above, the size of a CU can refer to the size of the luma decoding block of the CU, while the size of a PU can refer to the size of the luma prediction unit of the PU. Assuming a particular CU size is 2Nx2N, video encoder 200 can support PU sizes of 2Nx2N or NxN for intra-frame prediction, and symmetric PU sizes of 2Nx2N, 2NxN, Nx2N, NxN, or similar for inter-frame prediction. Video encoder 200 and video decoder 300 can also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-frame prediction.
[0215] In an example where mode selection unit 202 does not further divide the CU into PUs, each CU can be associated with a luminance decoding block and a corresponding chrominance decoding block. As mentioned above, the size of the CU can refer to the size of the luminance decoding block of the CU. The video encoder 200 and the video decoder 300 can support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0216] For other video decoding techniques, such as intra-block copy mode decoding, affine mode decoding, and linear model (LM) mode decoding, as some examples, mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the decoding technique. In some examples (such as palette mode decoding), mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating how the block is reconstructed based on a selected palette. In such modes, mode selection unit 202 may provide these syntax elements to entropy coding unit 220 for encoding.
[0217] As described above, the residual generation unit 204 receives video data for the current block and the corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0218] Transform processing unit 206 applies one or more transformations to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transformations to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), direction transform, Karhunen-Loeve transform (KLT), or conceptually similar transformations to the residual block. In some examples, transform processing unit 206 may perform multiple transformations on the residual block, such as primary and secondary transformations (e.g., rotation transformations). In some examples, transform processing unit 206 does not apply any transformations to the residual block.
[0219] When operating according to AV1, transform processing unit 206 may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a combination of horizontal / vertical transforms, which may include the Discrete Cosine Transform (DCT), the Asymmetric Discrete Sine Transform (ADST), the Reversed ADST (e.g., ADST in reverse order), and the Identity Transform (IDTX). When using the Identity Transform, the transform is skipped in either the vertical or horizontal direction. In some examples, transform processing may be skipped entirely.
[0220] Quantization unit 208 quantizes the transform coefficients in a transform coefficient block to produce a quantized transform coefficient block. Quantization unit 208 quantizes the transform coefficients of the transform coefficient block according to the quantization parameter (QP) value associated with the current block. Video encoder 200 (e.g., via mode selection unit 202) can adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may cause information loss, and therefore, the quantized transform coefficients may have lower accuracy compared to the original transform coefficients produced by transform processing unit 206.
[0221] The inverse quantization unit 210 and the inverse transform processing unit 212 can apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct the residual block based on the transform coefficient block. The reconstruction unit 214 can generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 can add samples of the reconstructed residual block to corresponding samples of the prediction block generated by the mode selection unit 202 to generate the reconstructed block.
[0222] Filter unit 216 may perform one or more filtering operations on the reconstructed block, including CNN-based filtering techniques described herein. For example, filter unit 216 may also perform deblocking operations to reduce block artifacts along the edges of the CU. In some examples, the operations of filter unit 216 may be skipped.
[0223] When operating according to AV1, filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce block artifacts along the edges of the CU. In other examples, filter unit 216 may apply a constrained direction enhancement filter (CDEF) after deblocking and may include the application of a non-separable, nonlinear, low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop recovery filter applied after CDEF and may include a separable symmetric normalized Wiener filter or a dual-guided filter.
[0224] The video encoder 200 stores reconstructed blocks in the DPB 218. For example, in an example where the filter unit 216 is not operated, the reconstruction unit 214 may store reconstructed blocks in the DPB 218. In an example where the filter unit 216 is operated, the filter unit 216 may store filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve reference images formed by the reconstructed (and potentially filtered) blocks from the DPB 218 to perform inter-frame prediction for blocks of subsequent encoded images. Furthermore, the intra-frame prediction unit 226 may use the reconstructed blocks of the current image in the DPB 218 to perform intra-frame prediction for other blocks in the current image.
[0225] Generally, entropy coding unit 220 can entropy code syntax elements received from other functional components of video encoder 200. For example, entropy coding unit 220 can entropy code quantized transform coefficient blocks from quantization unit 208. As another example, entropy coding unit 220 can entropy code predictive syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from mode selection unit 202. Entropy coding unit 220 can perform one or more entropy coding operations on syntax elements (another example of video data) to generate entropy-coded data. For example, entropy coding unit 220 can perform context-adaptive variable-length decoding (CAVLC), CABAC, variable-to-variable (V2V) length decoding, syntax-based context-adaptive binary arithmetic decoding (SBAC), probability interval partitioning entropy (PIPE) decoding, exponential Golomb coding, or another type of entropy coding operation on the data. In some examples, entropy coding unit 220 can operate in a bypass mode where syntax elements are not entropy-coded.
[0226] The video encoder 200 can output a bitstream that includes the entropy coding syntax elements required to reconstruct slices or blocks of images. Specifically, the entropy coding unit 220 can output a bitstream.
[0227] According to AV1, entropy coding unit 220 can be configured as a symbol-to-symbol adaptive multi-symbol arithmetic decoder. The syntax elements in AV1 consist of an N-element alphabet, and the context (e.g., a probability model) consists of a set of N probabilities. Entropy coding unit 220 can store the probabilities as an n-bit (e.g., 15-bit) cumulative distribution function (CDF). Entropy coding unit 220 can perform recursive scaling using an update factor based on the alphabet size to update the context.
[0228] The operations described above are relative to blocks. This description should be understood as operations applied to luma decoding blocks and / or chroma decoding blocks. As described above, in some examples, the luma decoding block and chroma decoding block are the luma and chroma components of the CU. In some examples, the luma decoding block and chroma decoding block are the luma and chroma components of the PU.
[0229] In some examples, it is not necessary to repeat the operations performed relative to the luma decoder for the chroma decoder block. As an example, the operations for identifying the motion vector (MV) and reference image of the luma decoder block do not need to repeat the MV and reference image used to identify the chroma block. Instead, the MV used for the luma decoder block can be scaled to determine the MV used for the chroma block, and the reference image can be the same. As another example, the intra-frame prediction process can be the same for both the luma and chroma decoders.
[0230] Video encoder 200 represents an example of a device configured to encode video data. The device includes: a memory configured to store the video data; and one or more processing units implemented in circuitry and configured to: determine a prediction block for a current block; determine a residual block for the current block; determine a reconstruction block for the current block based on the prediction block and the residual block; and apply a neural network-based filter to the reconstruction block to determine a filtered block. The neural network-based filter may include one or more convolutions and / or two or more separable convolutions on the reconstruction block.
[0231] Figure 30 This is a block diagram illustrating an example video decoder 300 that can perform the techniques of this disclosure. Figure 30 This disclosure is provided for illustrative purposes and not for limiting the techniques extensively illustrated and described herein. For illustrative purposes, the video decoder 300 is described in accordance with VVC and HEVC techniques. However, the techniques of this disclosure can be implemented by video decoding devices configured for other video decoding standards.
[0232] exist Figure 30 In the example, the video decoder 300 includes a decoded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a DPB 314. Any or all of the CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. For example, the units of the video decoder 300 can be implemented as one or more circuit or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0233] The prediction processing unit 304 includes a motion compensation unit 316 and an intra-prediction unit 318. The prediction processing unit 304 may include additional units that perform predictions based on other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copying unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0234] When operating according to AV1, motion compensation unit 316 can be configured to decode video data blocks (e.g., both luma and chroma blocks) using translational motion compensation, affine motion compensation, OBMC, and / or composite inter-intra-frame prediction, as described above. Intra-frame prediction unit 318 can be configured to decode video data blocks (e.g., both luma and chroma blocks) using directional intra-frame prediction, non-directional intra-frame prediction, recursive filter intra-frame prediction, CFL, IBC, and / or palette mode, as described above.
[0235] CPB memory 320 can store video data to be decoded by components of video decoder 300, such as encoded video bitstreams. For example, it can be retrieved from computer-readable medium 110 ( Figure 1 The video data stored in the CPB memory 320 is obtained. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. Furthermore, the CPB memory 320 may store video data other than the syntax elements of the decoded picture, such as temporary data representing the output from various units of the video decoder 300. The DPB 314 typically stores a decoded picture that the video decoder 300 may output, and / or uses the decoded picture as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed of any memory device from various memory devices, such as DRAM (including SDRAM), MRAM, RRAM, or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to those components.
[0236] Additionally or alternatively, in some examples, the video decoder 300 may be from the memory 120 ( Figure 1 The decoded video data can be retrieved from the memory. In other words, memory 120 can utilize CPB memory 320 to store data as discussed above. Similarly, when some or all of the functionality of video decoder 300 is implemented in software to be executed by the processing circuitry of video decoder 300, memory 120 can store instructions to be executed by video decoder 300.
[0237] Examples Figure 30 The various units shown help to understand the operations performed by the video decoder 300. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Similar to... Figure 29Fixed-function circuits are circuits that provide specific functionality and are pre-defined for the operations they can perform. Programmable circuits are circuits that can be programmed to perform various tasks and provide flexible functionality for the operations they can perform. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is typically immutable. In some examples, one or more units in a cell may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units in a cell may be integrated circuits.
[0238] The video decoder 300 may include an ALU, EFU, digital circuitry, analog circuitry, and / or a programmable core formed by programmable circuitry. In an example where the operation of the video decoder 300 is performed by software executed on programmable circuitry, on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0239] The entropy decoding unit 302 can receive encoded video data from the CPB and perform entropy decoding on the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 can generate decoded video data based on the syntax elements extracted from the bitstream.
[0240] Generally speaking, the video decoder 300 reconstructs the image block by block. The video decoder 300 can perform the reconstruction operation on each block individually (where the block currently being reconstructed (i.e., decoded) can be referred to as the "current block").
[0241] Entropy decoding unit 302 can entropy decode the syntax elements of the quantized transform coefficients defining the quantized transform coefficient block, as well as transform information (such as quantization parameters (QP) and / or transform mode indications). Inverse quantization unit 306 can use the QP associated with the quantized transform coefficient block to determine the degree of quantization, and similarly, determine the degree of inverse quantization to be applied by inverse quantization unit 306. Inverse quantization unit 306 can, for example, perform a bit-by-bit left shift operation to inverse quantize the quantized transform coefficients. Inverse quantization unit 306 can thereby form a transform coefficient block including the transform coefficients.
[0242] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotation transform, an inverse direction transform, or another inverse transform to the transform coefficient block.
[0243] Furthermore, the prediction processing unit 304 generates a prediction block based on the prediction information syntax elements entropy decoded by the entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is an inter-frame prediction, the motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements may indicate the reference picture from which the reference block is to be retrieved in the DPB 314, and a motion vector identifying the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 may generally follow the same procedure as relative to the motion compensation unit 224 ( Figure 29 The method described is essentially the same as the method used to perform the inter-frame prediction process.
[0244] As another example, when the prediction information syntax element indicates that the current block is intra-predictive, intra-predictive unit 318 may generate a prediction block according to the intra-predictive mode indicated by the prediction information syntax element. Similarly, intra-predictive unit 318 may generally follow the same procedure as relative to intra-predictive unit 226 ( Figure 29 The intra-prediction process is performed in a manner substantially similar to that described above. The intra-prediction unit 318 can retrieve data of neighboring samples of the current block from the DPB 314.
[0245] Reconstruction unit 310 can use the prediction block and the residual block to reconstruct the current block. For example, reconstruction unit 310 can add samples from the residual block to the corresponding samples from the prediction block to reconstruct the current block.
[0246] Filter unit 312 may perform one or more filtering operations on the reconstructed block, including CNN-based filtering techniques described herein. For example, filter unit 312 may also perform deblocking operations to reduce block artifacts along the edges of the reconstructed block. The operations of filter unit 312 are not necessarily performed in all examples.
[0247] The video decoder 300 can store reconstructed blocks in the DPB 314. For example, in an example where the operation of the filter unit 312 is not performed, the reconstruction unit 310 can store the reconstructed blocks in the DPB 314. In an example where the operation of the filter unit 312 is performed, the filter unit 312 can store the filtered reconstructed blocks in the DPB 314. As discussed above, the DPB 314 can provide reference information (such as samples of the current image for intra-frame prediction and samples of previously decoded images for subsequent motion compensation) to the prediction processing unit 304. Furthermore, the video decoder 300 can output decoded images (e.g., decoded video) from the DPB 314 for use in applications such as... Figure 1 The subsequent presentation on display devices such as display device 118.
[0248] In this manner, video decoder 300 represents an example of a video decoding device, which includes: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to: determine a prediction block for a current block; determine a residual block for the current block; determine a reconstructed block for the current block based on the prediction block and the residual block; and apply a neural network-based filter to the reconstructed block to determine a filtered block. The neural network-based filter may include one or more convolutions on the reconstructed block and / or two or more separable convolutions.
[0249] Figure 31 This is a flowchart illustrating an example process for encoding the current block according to the technology of this disclosure. The current block may be or may include the current CU. Although relative to the video encoder 200 ( Figure 1 and Figure 29 The description is provided, but it should be understood that other devices can be configured to perform the same actions. Figure 31 The process is similar to that of [the other process].
[0250] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then compute a residual block for the current block (352). To compute the residual block, the video encoder 200 may compute the difference between the unencoded original block for the current block and the prediction block. The video encoder 200 may then transform the residual block and quantize the transform coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (358). For example, the video encoder 200 may use CAVLC or CABAC to encode the transform coefficients. The video encoder 200 may then output the entropy-encoded data of the block (360).
[0251] Figure 32 This is a flowchart illustrating an example process for decoding a current block of video data according to the technology of this disclosure. The current block may be or may include the current CU. Although relative to the video decoder 300 ( Figure 1 and Figure 30 The description is provided, but it should be understood that other devices can be configured to perform the same actions. Figure 32 The process is similar to that of [the other process].
[0252] The video decoder 300 may receive entropy-coded data for the current block, such as entropy-coded prediction information and entropy-coded data for the transform coefficients of the residual block corresponding to the current block (370). The video decoder 300 may entropy decode the entropy-coded data to determine the prediction information for the current block and reproduce the transform coefficients of the residual block (372). The video decoder 300 may predict the current block, for example, using an intra-frame prediction mode or inter-frame prediction mode indicated by the prediction information of the current block (374), to compute a prediction block for the current block. The video decoder 300 may then inverse scan the reproduced transform coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to produce a residual block (378). The video decoder 300 may finally decode the current block by combining the prediction block and the residual block (380).
[0253] Figure 33 This is a flowchart illustrating an example process for decoding a current block of video data according to the technology of this disclosure. The current block may be or may include the current CU. Although relative to the video decoder 300 ( Figure 1 and Figure 30 The description is provided, but it should be understood that other devices can be configured to perform the same actions. Figure 33 The process is similar to that of [the other process].
[0254] exist Figure 33In the example, video decoder 300 determines blocks of an image based on encoded video data (400). Video decoder 300 may apply neural network (NN)-based filters to the blocks to generate filtered blocks (402). As part of applying NN-based filters to the blocks to generate filtered blocks, video decoder 300 transforms the blocks of the image using transform blocks of NN-based filters (404). As part of transforming the blocks of the image using transform blocks of NN-based filters, video decoder 300 rounds floating-point values to the nearest integer (406). For example, this rounding may occur in LayerNorm operations, Softmax operators, or any other normalization function. To round floating-point values to the nearest integer, video decoder 300 may round floating-point values according to the following formula: x q = clip(round(x * (1< <n), minValue, maxValue), Where x q The function represents the nearest integer, x represents a floating-point value, n represents the number of bits used to represent the floating-point value, round() represents the rounding function, and clip() represents the clipping function, which clips the output of the rounding function to minValue or maxValue, where minValue represents the minimum value and maxValue represents the maximum value.
[0255] To transform blocks of an image using transform blocks, the video decoder 300 can be configured to perform only integer arithmetic. To transform blocks of an image using transform blocks, the video decoder 300 can perform an integer approximation of an exponential function in the Softmax layer. To transform blocks of an image using transform blocks, the video decoder 300 can perform an integer approximation of a parameterless layer normalization process. To transform blocks of an image using transform blocks, the video decoder 300 can perform integer approximations of nonlinear operations. To further transform blocks of an image using transform blocks, the video decoder 300 can perform normalization according to the following formula: , Where x represents the 4-D tensor value, E[x] represents the mean of the 4-D tensor value, Var[x] represents the variance of the 4-D tensor value, and ε represents a non-zero value.
[0256] The video decoder 300 determines the decoding version of the block based on the filtered block (408) and outputs the decoded version of the image that includes the decoding version of the block (410).
[0257] The following numbered clauses illustrate one or more aspects of the devices and technologies described in this disclosure.
[0258] Clause 1A: A method for decoding video data, the method comprising: determining a prediction block for a current block; determining a residual block for the current block; determining a reconstruction block for the current block based on the prediction block and the residual block; and applying a neural network (NN) based filter to the reconstruction block to determine a filtered block.
[0259] Clause 2A: The method according to Clause 1A, wherein applying the NN-based filter to the reconstruction block comprises: performing one or more convolutions on the reconstruction block.
[0260] Clause 3A: The method according to Clause 2A, wherein the one or more convolutions comprises two or more separable convolutions.
[0261] Clause 4A: The method according to any one of Clauses 1A to 3A, wherein the method of decoding is performed as part of the video encoding process.
[0262] Clause 5A: An apparatus for decoding video data, the apparatus comprising one or more components for performing a method according to any one of Clauses 1A to 4A.
[0263] Clause 6A: The device according to Clause 5A, wherein the one or more components include one or more processors implemented in a circuit.
[0264] Clause 7A: The device pursuant to any one of Clauses 5A and 6A further includes a memory for storing the video data.
[0265] Clause 8A: The device according to any one of Clauses 5A to 7A further includes a display configured to display decoded video data.
[0266] Clause 9A: The device pursuant to any one of Clauses 5A to 8A, wherein the device includes one or more of a camera, computer, mobile device, broadcast receiver device or set-top box.
[0267] Clause 10A: A device pursuant to any one of Clauses 5A to 9A, wherein the device includes a video decoder.
[0268] Clause 11A: A device pursuant to any one of Clauses 5A to 10A, wherein said device includes a video encoder.
[0269] Clause 12A: A computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to perform a method according to any one of Clauses 1A to 4A.
[0270] Clause 1B. A method for decoding encoded video data, the method comprising: determining blocks of an image based on the encoded video data; applying a neural network (NN)-based filter to the blocks to generate filtered blocks, wherein applying the NN-based filter comprises: transforming the blocks of the image using a transform block, wherein transforming the blocks of the image using the transform block comprises: rounding floating-point values to the nearest integer; determining a decoded version of the block based on the filtered blocks; and outputting a decoded version of the image including the decoded version of the blocks.
[0271] Clause 2B. The method according to Clause 1B, wherein transforming the block of the image using the transform block comprises: performing integer arithmetic only.
[0272] Clause 3B. The method according to Clause 1B or 2B, wherein rounding the floating-point value to the nearest integer comprises rounding the floating-point value according to the following formula: x q = clip(round(x * (1< <n), minValue, maxValue), Where x q The nearest integer is represented by x, the floating-point value is represented by n, the number of bits used to represent the floating-point value is represented by round(), and the clip() function is represented by clipping(), which clips the output of the rounding function to minValue or maxValue, where minValue represents the minimum value and maxValue represents the maximum value.
[0273] Clause 4B. The method according to any one of Clauses 1B to 3B, wherein rounding the floating-point value to the nearest integer is performed within the normalization layer of the transform block.
[0274] Clause 5B. The method according to any one of Clauses 1B to 4B, wherein rounding the floating-point value to the nearest integer is performed within the normalization function of the transform block.
[0275] Clause 6B. The method according to any one of Clauses 1B to 3B, wherein transforming the block of the image using the transform block further comprises: performing an integer approximation of an exponential function in a Softmax layer.
[0276] Clause 7B. The method according to any one of Clauses 1B to 3B, wherein transforming the block of the image using the transform block further comprises: performing an integer approximation on the nonlinear operation.
[0277] Clause 8B. The method according to any one of Clauses 1B to 3B, wherein transforming the block of the image using the transform block further comprises performing normalization according to the following formula: , Where x represents the 4-D tensor value, E[x] represents the average value of the 4-D tensor value, Var[x] represents the variance of the 4-D tensor value, and ε represents a non-zero value.
[0278] Clause 9B. The method according to any one of Clauses 1B to 3B, wherein transforming the block of the image using the transform block further comprises: performing an integer approximation of a parameterless layer normalization process.
[0279] Clause 10B. An apparatus for decoding encoded video data, the apparatus comprising: a memory configured to store video data; and one or more processors implemented in a circuit and configured to determine blocks of an image based on the encoded video data; applying a neural network (NN)-based filter to the blocks to generate filtered blocks, wherein applying the NN-based filter comprises: transforming the blocks of the image using a transform block, wherein transforming the blocks of the image using the transform block comprises: rounding floating-point values to the nearest integer; determining a decoded version of the block based on the filtered blocks; and outputting a decoded version of the image including the decoded version of the block.
[0280] Clause 11B. The device according to Clause 10B, wherein transforming the block of the image using the transform block comprises: performing only integer arithmetic.
[0281] Clause 12B. The apparatus according to Clause 10B or 11B, wherein rounding the floating-point value to the nearest integer comprises rounding the floating-point value according to the following formula: x q = clip(round(x * (1< <n), minValue, maxValue), Where x q The nearest integer is represented by x, the floating-point value is represented by n, the number of bits used to represent the floating-point value is represented by round(), and the clip() function is represented by clipping(), which clips the output of the rounding function to minValue or maxValue, where minValue represents the minimum value and maxValue represents the maximum value.
[0282] Clause 13B. The device according to any one of Clauses 10B to 12B, wherein rounding the floating-point value to the nearest integer is performed within the normalization layer of the transform block.
[0283] Clause 14B. The device according to any one of Clauses 10B to 13B, wherein rounding the floating-point value to the nearest integer is performed within the normalization function of the transform block.
[0284] Clause 15B. The device according to any one of Clauses 10B to 12B, wherein transforming the block of the image using the transform block further comprises: performing an integer approximation of an exponential function in a Softmax layer.
[0285] Clause 16B. The device according to any one of Clauses 10B to 12B, wherein transforming the block of the image using the transform block further comprises: performing an integer approximation on the nonlinear operation.
[0286] Clause 17B. The device according to any one of Clauses 10B to 12B, wherein transforming the block of the image using the transform block further comprises performing normalization according to the following formula: , Where x represents the 4-D tensor value, E[x] represents the average value of the 4-D tensor value, Var[x] represents the variance of the 4-D tensor value, and ε represents a non-zero value.
[0287] Clause 18B. The device according to any one of Clauses 10B to 12B, wherein transforming the block of the image using the transform block further comprises: performing an integer approximation of a parameterless layer normalization process.
[0288] Clause 19B. The device according to any one of Clauses 10B to 18B, the device further comprising a display configured to display decoded video data.
[0289] Clause 20B. The device pursuant to any one of Clauses 10B to 19B, wherein the device includes one or more of a camera, computer, mobile device, broadcast receiver device or set-top box.
[0290] It should be recognized that, based on the examples, certain actions or events of any technique described herein may be performed in a different sequence, and may be added, combined, or omitted entirely (e.g., not all actions or events described are necessary for implementing the technique). Furthermore, in some examples, actions or events may be performed concurrently (e.g., through multithreading, interrupt handling, or multiple processors) rather than sequentially.
[0291] In one or more examples, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored as one or more instructions or code on a computer-readable medium or transmitted via a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium (which corresponds to a tangible medium such as a data storage medium) or a communication medium, including, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol. In this way, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this disclosure. Computer program products may include computer-readable media.
[0292] By way of example, and not limitation, such computer-readable storage media may include one or more of RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology (such as infrared, radio, and microwave), then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technology (such as infrared, radio, and microwave) is included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but instead refer to non-transient tangible storage media. As used herein, disks and optical discs include compact optical discs (CDs), laser optical discs, optical discs, digital versatile optical discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs use lasers to reproduce data optically. Combinations of these should also be included within the scope of computer-readable media.
[0293] Instructions can be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Therefore, the terms "processor" and "processing circuit" as used herein can refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into combined codecs. Moreover, these techniques can be fully implemented in one or more circuit or logic elements.
[0294] The techniques disclosed herein can be implemented in a wide variety of devices or apparatuses, including wireless mobile phones, integrated circuits (ICs), or IC sets (e.g., chipsets). Various components, modules, or units are described in this disclosure to emphasize functional aspects of a device configured to perform the disclosed techniques, but implementation by different hardware units is not necessarily required. Rather, as described above, various units can be combined in a codec hardware unit, or various units can be provided by a collection of interoperable hardware units (including one or more processors as described above) combined with appropriate software and / or firmware.
[0295] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for decoding encoded video data, the method comprising: The image blocks are determined based on the encoded video data; Applying a neural network (NN)-based filter to the block to generate a filtered block, wherein applying the NN-based filter includes: transforming the block of the image using a transform block, wherein transforming the block of the image using the transform block includes: rounding floating-point values to the nearest integer. The decoding version of the block is determined based on the filtered block; and Output the decoded version of the image, including the block.
2. The method according to claim 1, wherein transforming the block of the image using the transform block comprises: Performs only integer arithmetic.
3. The method of claim 1, wherein rounding the floating-point value to the nearest integer comprises rounding the floating-point value according to the following formula: x q = clip(round(x * (1<<n), minValue, maxValue), Where x q The nearest integer is represented by x, the floating-point value is represented by n, the number of bits used to represent the floating-point value is represented by round(), and the clip() function is represented by clipping(), which clips the output of the rounding function to minValue or maxValue, where minValue represents the minimum value and maxValue represents the maximum value.
4. The method of claim 1, wherein rounding the floating-point value to the nearest integer is performed within the normalization layer of the transform block.
5. The method of claim 1, wherein rounding the floating-point value to the nearest integer is performed within the normalization function of the transform block.
6. The method according to claim 1, wherein transforming the block of the image using the transform block further comprises: Perform an integer approximation of the exponential function in the Softmax layer.
7. The method according to claim 1, wherein transforming the block of the image using the transform block further comprises: Perform integer approximation on nonlinear operations.
8. The method of claim 1, wherein transforming the block of the image using the transform block further comprises performing normalization according to the following formula: , where x represents the 4-D tensor value, E[x] represents the average value of the 4-D tensor value, Var[x] represents the variance of the 4-D tensor value, and ε represents a non-zero value.
9. The method according to claim 1, wherein transforming the block of the image using the transform block further comprises: Perform an integer approximation of the parameterless layer normalization process.
10. An apparatus for decoding encoded video data, the apparatus comprising: A memory configured to store video data; One or more processors, said one or more processors being implemented in a circuit and configured to: The image blocks are determined based on the encoded video data; Applying a neural network (NN)-based filter to the block to generate a filtered block, wherein applying the NN-based filter includes: transforming the block of the image using a transform block, wherein transforming the block of the image using the transform block includes: rounding floating-point values to the nearest integer. The decoding version of the block is determined based on the filtered block; and Output the decoded version of the image, including the block.
11. The device of claim 10, wherein transforming the block of the image using the transform block comprises: Performs only integer arithmetic.
12. The device of claim 10, wherein rounding the floating-point value to the nearest integer comprises rounding the floating-point value according to the following formula: x q = clip(round(x * (1<<n), minValue, maxValue), Where x q The nearest integer is represented by x, the floating-point value is represented by n, the number of bits used to represent the floating-point value is represented by round(), and the clip() function is represented by clipping(), which clips the output of the rounding function to minValue or maxValue, where minValue represents the minimum value and maxValue represents the maximum value.
13. The device of claim 10, wherein rounding the floating-point value to the nearest integer is performed within the normalization layer of the transform block.
14. The device of claim 10, wherein rounding the floating-point value to the nearest integer is performed within the normalization function of the transform block.
15. The apparatus of claim 10, wherein transforming the block of the image using the transform block further comprises: Perform an integer approximation of the exponential function in the Softmax layer.
16. The apparatus of claim 10, wherein transforming the block of the image using the transform block further comprises: Perform integer approximation on nonlinear operations.
17. The apparatus of claim 10, wherein transforming the block of the image using the transform block further comprises performing normalization according to the following formula: , where x represents the 4-D tensor value, E[x] represents the average value of the 4-D tensor value, Var[x] represents the variance of the 4-D tensor value, and ε represents a non-zero value.
18. The apparatus of claim 10, wherein transforming the block of the image using the transform block further comprises: Perform an integer approximation of the parameterless layer normalization process.
19. The device of claim 10, further comprising a display configured to display decoded video data.
20. The device of claim 10, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.