Filtering Process for Video Coding
Patent Information
- Application Number
- JP2023515165
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-09-23
- Filing Date
- 2021-09-24
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2041-09-24
AI Technical Summary
Existing video coding techniques face challenges in optimizing filtering processes for distorted video data, leading to suboptimal compression efficiency and visual quality, particularly when using neural network-based filters trained on general video datasets.
Applying a scaling factor to filtered decoded video data, determined through rate-distortion optimization, to refine the filtering process, and encoding data indicating whether to perform filtering refinement at various levels such as slice, picture, or block levels, using neural network-based filters.
Improves video coding efficiency by reducing distortion and enhancing visual quality, leading to more accurate prediction and lower bit rates in encoded video streams.
Abstract
Description
Technical Field
[0001] This application claims the priority of U.S. Application No. 17 / 448,547, filed on September 23, 2021, and U.S. Provisional Patent Application No. 63 / 085,094, filed on September 29, 2020, and the entire contents of each of these applications are incorporated herein by reference. U.S. Application No. 17 / 448,547, filed on September 23, 2021, claims the benefit of U.S. Provisional Application No. 63 / 085,094, filed on September 29, 2020.
[0002] This disclosure relates to video encoding and video decoding.
Background Art
[0003] Digital video capabilities can be incorporated into a wide range of devices including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radiotelephones, so-called "smartphones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), and extensions to such standards. By implementing such video coding techniques, video devices can transmit, receive, encode, decode, and / or store digital video information more efficiently.
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or eliminate redundancy inherent in video sequences. In block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be divided into video blocks, which may also be called coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are coded using spatial predictions for reference samples in adjacent blocks within the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial predictions for reference samples in adjacent blocks within the same picture or temporal predictions for reference samples in other reference pictures. Pictures may be called frames, and reference pictures may be called reference frames. [Overview of the Initiative] [Means for solving the problem]
[0005] In general, this disclosure describes techniques for filtering video data. Specifically, this disclosure describes techniques for filtering processes applied to distorted pictures. The filtering processes of this disclosure may be based on neural network techniques and may be used in the context of advanced video codecs, such as extensions to the Versatile Video Coding (VVC) standard, next-generation video coding standards, and / or any other video codecs.
[0006] For example, a method for filtering decoded video data includes the steps of: decoding blocks of video data to form decoded blocks; applying filters to the decoded blocks to form filtered blocks; multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and combining samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0007] In another example, a device for filtering decoded video data includes a memory configured to store the video data, and one or more processors implemented in the circuit, configured to decode blocks of video data to form decoded blocks, apply filters to the decoded blocks to form filtered blocks, multiply samples of the filtered blocks by a scaling factor to form refined filtered blocks, and combine samples of the refined filtered blocks with corresponding samples of the decoded blocks.
[0008] In another example, a computer-readable storage medium stores instructions, which, when executed, cause a processor to decode blocks of video data to form decoded blocks, apply filters to the decoded blocks to form filtered blocks, multiply samples from the filtered blocks by a scaling factor to form refined and filtered blocks, and combine samples from the refined and filtered blocks with corresponding samples from the decoded blocks.
[0009] In another example, a device for filtering decoded video data includes means for decoded blocks of video data to form decoded blocks; means for applying filters to the decoded blocks to form filtered blocks; means for multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and means for combining samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0010] Details of one or more examples are described in the accompanying drawings and the following description. Other features, purposes, and advantages will become apparent from the description, drawings, and claims. [Brief explanation of the drawing]
[0011] [Figure 1] Block diagram shows an exemplary video encoding and decoding system capable of performing the techniques of this disclosure. [Figure 2] A block diagram illustrating an exemplary hybrid video coding framework. [Figure 3] This is a conceptual diagram showing a hierarchical prediction structure with a picture group (GOP) size equal to 16. [Figure 4] This is a block diagram illustrating an exemplary convolutional neural network-based filter with four layers. [Figure 5A] This is a conceptual diagram illustrating an exemplary quad-binary tree (QTBT) structure. [Figure 5B] This is a conceptual diagram showing the corresponding coding tree unit (CTU). [Figure 6] A block diagram illustrating a video encoder capable of performing the techniques of this disclosure. [Figure 7] A block diagram illustrating an exemplary video decoder capable of performing the techniques of this disclosure. [Figure 8] This flowchart shows an exemplary method for encoding the current block using the technique of the present disclosure. [Figure 9] This flowchart shows an exemplary method for decoding the current block using the technique of the present disclosure. [Figure 10] This flowchart illustrates exemplary methods for encoding video data and filtering decoded video data using the techniques of the present disclosure. [Figure 11] This flowchart shows an exemplary method for filtering decoded video data using the technique of the present disclosure. [Modes for carrying out the invention]
[0012] Generally, this disclosure describes techniques related to filtering decoded video data. Generally, a video decoder may decode blocks of video data by, for example, generating prediction blocks using interprediction / intraprediction, and then combining the prediction blocks with decoded residual blocks. A video encoder may encode blocks of video data such that any distortions introduced by the encoding process are also replicated in the video encoder when performing predictive encoding, and then decode the blocks in substantially the same manner as the decoder.
[0013] Furthermore, video encoders and video decoders may be configured to filter the decoded blocks of video data. For example, video encoders and video decoders may perform “in-loop” filtering in the same manner so that the filtered and decoded blocks of video data are used for reference when performing subsequent predictive coding (encoding or decoding). Such filters may include, for example, adaptive loop filters (ALFs) and neural network (NN)-based filters.
[0014] Predefined filters are typically configured or trained on large sets of video and image data in a database. While this configuration process may result in optimized filters for general video data, there may be specific cases of video data where the filter output can be improved. This disclosure describes techniques that may be used to improve the filtering of decoded video data.
[0015] Generally, the techniques of the Disclosure include decoding video data, applying a filter to the decoded video data, and then applying a scaling factor to the filtered and decoded video data. The scaling factor can improve the filtering result. For example, a video encoder may determine the scaling factor using, for example, a rate-distortion optimization (RDO) process. The video encoder may determine the scaling factor for slices of video data, pictures of video data, or sequences of pictures of video data at the block level (e.g., coding tree units (CTUs)). Thus, the video encoder may encode data representing the scaling factor. The video encoder may further encode data indicating whether to perform filtering refinement according to the techniques of the Disclosure. The video encoder may then apply the scaling factor to the filtered and decoded video data and store the resulting refined, filtered and decoded video data in a decoded picture buffer (DPB).
[0016] A video decoder may similarly receive data indicating whether to perform filter processing refinement. When the data indicates that the video decoder should perform filter processing refinement, the video decoder may decode data representing scaling factors in, for example, a slice header, an adaptive parameter set (APS), a picture header, a picture parameter set (PPS), a block header (e.g., a CTU header), etc. The video decoder may then apply the scaling factors to the filtered and decoded video data and store the resulting refined, filtered, and decoded video data in the DPB. The video decoder may also output the refined, filtered, and decoded video data from the DPB as output decoded video data for display.
[0017] Thus, the filtered data can be improved using the scaling factors. Therefore, the refined and filtered data can more accurately reflect the raw video data initially received by the video encoder. Therefore, the refined and filtered data can improve the prediction of subsequent video data, thereby reducing the bitrate associated with the encoded video bitstream. Additionally, the refined and filtered data has reduced distortion, thereby making the user viewing the displayed video data more visually pleasing.
[0018] FIG. 1 is a block diagram illustrating an exemplary video encoding and decoding system 100 that may implement the techniques of the present disclosure. The techniques of the present disclosure generally are directed to coding (encoding and / or decoding) video data. Generally, video data includes any data for processing video. Thus, video data may include raw, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata such as signaling data.
[0019] As shown in FIG. 1, system 100 includes, in this example, 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 a computer-readable medium 110. Source device 102 and destination device 116 may comprise any of a wide range of devices including desktop computers, notebook (i.e., laptop) computers, mobile devices, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming devices, broadcast receiver devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and thus may be referred to as wireless communication devices.
[0020] In the example of FIG. 1, source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to the present disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply techniques for filtering video data. Thus, source device 102 represents an example of a video encoding device and destination device 116 represents an example of a video decoding device. In other examples, source devices and destination devices may include other components or configurations. 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 rather than include an integrated display device.
[0021] System 100, as shown in Figure 1, is merely an example. In general, any digital video coding and / or decoding device can perform techniques for filtering video data. Source device 102 and destination device 116 are merely examples of coding devices such that source device 102 generates coded video data for transmission to destination device 116. This disclosure refers to a device that performs coding (encoding and / or decoding) of data as a “coding” device. Thus, video encoder 200 and video decoder 300 represent examples of coding devices, specifically, video encoder and 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 coding and decoding components. Thus, system 100 may support one-way or two-way video transmission between source device 102 and destination device 116 for, for example, video streaming, video playback, video broadcasting, or video telephony.
[0022] Generally, the video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides the video encoder 200 with a sequence of pictures (also called "frames") of video data, which the video encoder 200 encodes the data for the pictures. The video source 104 of source device 102 may include video capture devices such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, the 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, the video encoder 200 encodes the captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange the pictures from the order in which they were received (sometimes called the "display order") to a coding order for encoding. The video encoder 200 may generate a bitstream containing the encoded video data. The source device 102 may then output the encoded video data onto a computer-readable medium 110 via the output interface 108 for reception and / or retrieval by the input interface 122 of the destination device 116.
[0023] Memory 106 of source device 102 and memory 120 of destination device 116 represent general-purpose memory. In some examples, memories 106 and 120 may store raw video data, for example, raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106 and 120 may store, for example, software instructions executable by video encoder 200 and video decoder 300, respectively. 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, for example, output from video encoder 200 and input to video decoder 300. In some examples, portions of memory 106, 120 may be allocated as one or more video buffers for storing, for example, raw, decoded, and / or encoded video data.
[0024] The computer-readable medium 110 may represent any type of medium or device capable of transporting encoded video data from the source device 102 to the destination device 116. For example, the computer-readable medium 110 may represent a communication medium that enables the source device 102 to directly transmit encoded video data to the destination device 116 in real time, for example, over a radio frequency network or a computer-based network. According to a communication standard such as a wireless communication protocol, the output interface 108 may modulate the transmission signal containing the encoded video data, and the input interface 122 may demodulate the received transmission signal. The communication medium may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful to facilitate communication from the source device 102 to the destination device 116.
[0025] In some examples, the source device 102 may output encoded data to the storage device 112 via the output interface 108. Similarly, the destination device 116 may access the encoded data from the storage device 112 via the input interface 122. The storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0026] In some examples, the source device 102 may output the encoded video data to a file server 114 or another intermediate storage device capable of storing the encoded video data generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via streaming or download.
[0027] The file server 114 may be any type of server device capable of storing encoded video data and transmitting that encoded video data to the destination device 116. The file server 114 may represent a web server (for example, for a website), a server configured to provide file transfer protocol services (such as the File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE) 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. The file server 114 may, in addition or alternatively, implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), Real Time Streaming Protocol (RTSP), or HTTP Dynamic Streaming.
[0028] The destination device 116 may access the encoded video data from the file server 114 through any standard data connection, including an internet connection. This may include wireless channels (e.g., Wi-Fi connection), wired connections (e.g., digital subscriber line (DSL), cable modem, etc.), or a combination of both suitable for accessing the encoded video data stored on the file server 114. The input interface 122 may be configured to operate according to one or more of the various protocols described above for retrieving or receiving media data from the file server 114, or other such protocols for retrieving media data.
[0029] The output interface 108 and input interface 122 may 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 the output interface 108 and input interface 122 include wireless components, the output interface 108 and input interface 122 may be configured to transfer data such as encoded video data according to cellular communication standards such as 4G, 4G-LTE (Long Term Evolution), LTE Advanced, or 5G. In some examples where the output interface 108 includes a wireless transmitter, the output interface 108 and input interface 122 may be configured to transfer data such as encoded video data according to other wireless standards such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee®), or the Bluetooth® standard. In some examples, the source device 102 and / or destination device 116 may include their respective system-on-chip (SoC) devices. For example, source device 102 may include an SoC device for performing functions related to the video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device for performing functions related to the video decoder 300 and / or input interface 122.
[0030] The techniques of this disclosure can be applied to video coding that supports any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0031] 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, a storage device 112, a 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 that describe the characteristics and / or processing of video blocks or other coded units (e.g., slices, pictures, picture groups, sequences, etc.). The display device 118 displays the decoded picture of the decoded video data to the user. The display device 118 may represent any of various 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.
[0032] Although not shown in Figure 1, in some examples the video encoder 200 and video decoder 300 may be integrated with an audio encoder and / or audio decoder, respectively, and may include a suitable MUX-DEMUX unit or other hardware and / or software to handle multiplexed streams containing both audio and video in a common data stream. Where applicable, the MUX-DEMUX unit may comply with the ITU H.223 Multiplexer Protocol or other protocols such as the User Datagram Protocol (UDP).
[0033] The video encoder 200 and video decoder 300 may each be implemented as one or more 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 technique is partially implemented in software, the device may store instructions for the software in a suitable non-temporary computer-readable medium and execute the instructions in hardware using one or more processors to perform the technique of this disclosure. Each of the video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a composite encoder / decoder (CODEC) in their respective devices. A device including the video encoder 200 and / or video decoder 300 may include an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular telephone.
[0034] The video encoder 200 and video decoder 300 may operate in accordance with video coding standards such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or its extensions, such as the Multiview and / or Scalable Video Coding extension. Alternatively, the video encoder 200 and video decoder 300 may operate in accordance with other proprietary or industry standards, such as ITU-T H.266, also known as Versatile Video Coding (VVC). A draft of the VVC standard is described in Bross et al., "Versatile Video Coding (Draft 10)," ITU-T SG 16 WP 3 and the Joint Video Experts Team (JVET) of ISO / IEC JTC 1 / SC 29 / WG 11, 18th Meeting: Remote Meeting, June 22–July 1, 2020, JVET-S2001-vA (hereinafter referred to as "VVC"). However, the techniques described herein are not limited to any specific coding standard.
[0035] Generally, the video encoder 200 and video decoder 300 can perform block-based coding of a picture. The term “block” generally refers to a structure containing data to be processed (e.g., encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block may contain a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, the video encoder 200 and video decoder 300 can code video data represented in YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for the samples of a picture, the video encoder 200 and video decoder 300 can code luminance and chrominance components, and the chrominance component may contain both red and blue chrominance components. In some examples, the video encoder 200 converts the received RGB-formatted data to a YUV representation prior to encoding, and the video decoder 300 converts the YUV representation to RGB format. Alternatively, pre-processing units and post-processing units (not shown) may perform these conversions.
[0036] This disclosure may refer to coding a picture (e.g., encoding and decoding) to include, in general, the process of encoding or decoding the data of a picture. Similarly, this disclosure may refer to coding a block of a picture (e.g., predictive and / or residual coding) to include the process of encoding or decoding the data for that block. An encoded video bitstream generally contains a set of values for syntax elements representing coding decisions (e.g., coding modes) and divisions of the picture into blocks. Thus, references to coding a picture or a block should generally be understood as coding values for the syntax elements that make up the picture or block.
[0037] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transformation units (TUs). According to HEVC, a video coder (such as video encoder 200) divides coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder divides the CTUs and CUs into four equal, non-overlapping squares, and each node in the quadtree has either zero or four child nodes. Nodes without child nodes are sometimes called "leaf nodes," and the CUs of such leaf nodes may contain one or more PUs and / or one or more TUs. The video coder may further divide the PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents a division of TUs. In HEVC, PUs represent intra-prediction data, and TUs represent residual data. Intra-predicted CUs contain intra-prediction information, such as intra-mode indications.
[0038] As another example, a video encoder 200 and a video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as the video encoder 200) divides a picture into multiple coding tree units (CTUs). The video encoder 200 may divide the CTUs according to a tree structure such as a quad-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure eliminates the concept of multiple division types, such as the distinction between CU, PU, and TU in HEVC. The QTBT structure includes two levels: a first level divided according to quad-tree divisions and a second level divided according to binary tree divisions. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0039] In an MTT partitioned structure, blocks can be partitioned using quadrant (QT) partitions, binary (BT) partitions, and one or more types of triple tree (TT) partitions (also called ternary tree) partitions. A triple tree or ternary tree partition is a partition in which a block is divided into three subblocks. In some examples, a triple tree or ternary tree partition divides a block into three subblocks without dividing the original block through a center. The partition types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0040] In some examples, the video encoder 200 and video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, while in other examples, the video encoder 200 and video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for both chrominance components (or two QTBT / MTT structures for each chrominance component).
[0041] The video encoder 200 and video decoder 300 may be configured to use a quadtree partition, QTBT partition, MTT partition, or other partitioning structure per HEVC. For illustrative purposes, the description of the technique in this disclosure is presented in relation to the QTBT partition. However, it should be understood that the technique in this disclosure may also be applicable to video coders configured to use a quadtree partition or other types of partitions.
[0042] In some examples, a CTU includes a coding tree block (CTB) of a lumen sample, two corresponding CTBs of a chroma sample for a picture with three sample arrays, or a CTB of a sample for a picture coded using three separate color planes and syntax structures used to code a monochrome picture or sample. A CTB can be an N×N block of samples for some value N, such that the division of the components into the CTB is a partition. A component is a single sample from one array or one of three arrays (lumen and two chroma) that create a picture in a 4:2:0, 4:2:2, or 4:4:4 color format, or a single sample from an array or an array that creates a picture in a monochrome format. In some examples, a coding block is an M×N block of samples for some values M and N, such that the division of the CTB into the coding block is a partition.
[0043] Blocks (e.g., CTUs or CUs) can be grouped in various ways within a picture. For example, a brick may refer to a rectangular area of a row of CTUs within a particular tile in a picture. A tile can be a rectangular area of CTUs within a particular tile column or row in a picture. A tile column refers to a rectangular area of CTUs with a height equal to the height of the picture and a width specified by a syntax element (e.g., in a picture parameter set). A tile row refers to a rectangular area of CTUs with a height specified by a syntax element (e.g., in a picture parameter set) and a width equal to the width of the picture.
[0044] In some examples, a tile may be divided into multiple bricks, each brick containing one or more CTU rows within the tile. A tile that is not divided into multiple bricks may also be called a brick. However, a brick that is a true subset of a tile may not be called a tile.
[0045] Bricks within a picture can also be arranged in slices. A slice can be an integer number of bricks in a picture that can exclusively be contained within a single Network Abstraction Layer (NAL) unit. In some examples, a slice may contain either a certain number of complete tiles or only a continuous sequence of complete bricks of a single tile.
[0046] This disclosure may interchangeably use "N×N" and "N by N," e.g., 16×16 samples or 16 by 16 samples, to refer to the sample dimension of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions. Generally, a 16×16 CU has 16 samples vertically (y=16) and 16 samples horizontally (x=16). Similarly, an N×N CU generally has N samples vertically and N samples horizontally, where N represents a non-negative integer. The samples in a CU can be arranged in rows and columns. Furthermore, a CU does not necessarily have to have the same number of samples horizontally as vertically. For example, a CU may have N×M samples, where M is not necessarily equal to N.
[0047] The video encoder 200 encodes video data for CUs that represent prediction and / or residual information, as well as other information. The prediction information indicates how the CUs will be predicted to form prediction blocks for the CUs. The residual information generally represents the sample-by-sample difference between the samples of the CUs prior to encoding and the samples of the prediction blocks.
[0048] To predict a CU, the video encoder 200 can generally form prediction blocks for the CU through inter-prediction or intra-prediction. Inter-prediction generally refers to predicting the CU from data of a previously coded picture, while intra-prediction generally refers to predicting the CU from previously coded data of the same picture. To perform inter-prediction, the video encoder 200 can generate prediction blocks using one or more motion vectors. The video encoder 200 can generally perform motion search to identify a reference block that exactly matches the CU with respect to the difference between the CU and the reference block. The video encoder 200 can compute a difference metric using absolute difference sum (SAD), squared difference sum (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to determine whether the reference block exactly matches the current CU. In some examples, the video encoder 200 can predict the current CU using unidirectional or bidirectional prediction.
[0049] Some examples of VVC also offer an affine motion compensation mode, which can be considered an interpredictive mode. In affine motion compensation mode, the video encoder 200 may determine two or more motion vectors representing non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.
[0050] To perform intra-prediction, the video encoder 200 may select an intra-prediction mode to generate a prediction block. Several examples of VVCs provide 67 intra-prediction modes, including various directional modes, as well as planar and DC modes. Generally, the video encoder 200 selects an intra-prediction mode that describes adjacent samples to the current block (e.g., a block of CUs) from which to predict a sample of the current block. Such samples could generally be above, above and to the left of, or to the left of, the current block in the same picture as the current block, assuming that the video encoder 200 codes CTUs and CUs in raster scanning order (left to right, top to bottom).
[0051] The video encoder 200 encodes data representing the prediction mode for the current block. For example, in interprediction mode, the video encoder 200 may encode data representing which of the various available interprediction modes is used, as well as motion information about the corresponding mode. In the case of unidirectional or bidirectional interprediction, for example, the video encoder 200 may encode the motion vectors using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 may use similar modes to encode the motion vectors for affine motion compensation mode.
[0052] Following predictions such as intra-prediction or inter-prediction of a block, the video encoder 200 may compute residual data for the block. Residual data, such as a residual block, represents the sample-by-sample difference between the block and the predicted block for that block formed using the corresponding prediction mode. The video encoder 200 may apply one or more transformations to the residual block to generate transformation data in the transformation domain rather than the sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), integer transform, wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may apply a second-order transform such as a mode-dependent non-separable secondary transform (MDNSST), signal-dependent transform, or Karhunen-Loeve transform (KLT) following the first transformation. Following the application of one or more transformations, the video encoder 200 generates transformation coefficients.
[0053] As described above, following any transformation to generate the transformation coefficients, the video encoder 200 may perform quantization of the transformation coefficients. Quantization generally refers to the process of quantizing the transformation coefficients to reduce the amount of data used to represent them as much as possible, thereby achieving further compression. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transformation coefficients. For example, the video encoder 200 may truncate an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 may perform a bitwise right shift of the value to be quantized.
[0054] Following quantization, the video encoder 200 may scan the transformation coefficients and generate a one-dimensional vector from a two-dimensional matrix containing the quantized transformation coefficients. The scan may be designed to place higher-energy (and therefore lower-frequency) transformation coefficients at the beginning of the vector and lower-energy (and therefore higher-frequency) transformation coefficients at the end. In some examples, the video encoder 200 may utilize a predefined scan order for scanning the quantized transformation coefficients to generate a serialized vector and then entropy-encode the quantized transformation coefficients of the vector. In other examples, the video encoder 200 may perform an adaptive scan. After scanning the quantized transformation coefficients to form a one-dimensional vector, the video encoder 200 may entropy-encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 may also entropy-encode values for syntax elements that describe metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.
[0055] To perform CABAC, the video encoder 200 may assign a context within a context model to the symbols to be transmitted. The context may relate, for example, to whether the symbol's adjacency values are zero-valued. Probability decisions may be based on the context assigned to the symbols.
[0056] The video encoder 200 may further generate syntax data for the video decoder 300, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, in other syntax data such as a picture header, block header, slice header, or sequence parameter set (SPS), picture parameter set (PPS), or video parameter set (VPS). The video decoder 300 may similarly decode such syntax data to determine how to decode the corresponding video data.
[0057] Thus, the video encoder 200 can generate a bitstream containing encoded video data, for example, a bitstream containing syntax elements that describe the division of a picture into blocks (e.g., CUs) and predictive and / or residual information about the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0058] Generally, the video decoder 300 decodes the encoded video data of the bitstream by performing a process that is the reverse of the process performed by the video encoder 200. For example, the video decoder 300 may decode values for syntax elements of the bitstream using CABAC in a substantially similar, but reverse, manner to the CABAC encoding process of the video encoder 200. The syntax elements may define the CUs of the CTUs by defining partitioning information for partitioning the picture into CTUs, and partitioning each CTU according to a corresponding partitioning structure such as a QTBT structure. The syntax elements may further define prediction and residual information for blocks of video data (e.g., CUs).
[0059] Residual information may be represented, for example, by quantized transformation coefficients. The video decoder 300 may dequantize and inverse transform the quantized transformation coefficients of a block in order to reconstruct the residual block for the block. The video decoder 300 uses a signaled prediction mode (intra-prediction or inter-prediction) and associated prediction information (for example, motion information about inter-prediction) to form a prediction block for the block. The video decoder 300 may then synthesize the prediction block and the residual block (sample by sample) to reconstruct the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the block boundaries.
[0060] This disclosure may generally refer to “signaling” certain information, such as syntax elements. The term “signaling” may generally refer to the communication of values for syntax elements and / or other data used to decode the encoded video data. That is, the video encoder 200 may signal values for syntax elements in the bitstream. In general, signaling refers to generating values in the bitstream. As described above, the source device 102 may transport the bitstream to the destination device 116 in substantially real time, or not in real time, such as when storing the syntax elements in the storage device 112 for later retrieval by the destination device 116.
[0061] According to the techniques of the present disclosure, the video encoder 200 and video decoder 300 may be configured to perform one or more filtering techniques of the present disclosure, including neural network-based filtering techniques, as will be described in more detail below.
[0062] Most video coding standards since H.261 are based on the so-called hybrid video coding principle, as shown in Figure 2.
[0063] Figure 2 is a block diagram illustrating an exemplary hybrid video coding framework. The term "hybrid" refers to a combination of two methods for reducing redundancy in a video signal: predictive and transformative coding using predictive residual quantization. Predictive and transformative coding reduces redundancy in the video signal through decorrelation, while quantization reduces the data in the transformative coefficient representation by removing only irrelevant details, ideally by reducing its precision. This hybrid video coding design principle is also used in two recent standards, namely HEVC and VVC.
[0064] As shown in Figure 2, a modern hybrid video coder 130 typically includes block segmentation, motion compensation or interpicture prediction, intrapicture prediction, transformation, quantization, entropy coding, and post / in-loop filtering. In the example in Figure 2, the video coder 130 includes an adder unit 134, a transformer unit 136, a quantization unit 138, an entropy coding unit 140, an inverse quantization unit 142, an inverse transformer unit 144, an adder unit 146, a loop filter unit 148, a decoded picture buffer (DPB) 150, an intra-prediction unit 152, an inter-prediction unit 154, and a motion estimation unit 156.
[0065] Generally, when a video coder 130 encodes video data, it may receive input video data 132. Block partitioning is used to divide the received picture (image) of the video data into smaller blocks for the operation of the prediction and conversion processes. Early video coding standards used a fixed block size, typically 16x16 samples. Recent standards such as HEVC and VVC use a tree-based partitioning structure to perform flexible partitioning.
[0066] The motion estimation unit 156 and the inter-picture prediction unit 154 can predict the input video data 132 from, for example, previously decoded data of the DPB 150. Motion compensation or inter-picture prediction utilizes the redundancy that exists (and therefore "inter") between pictures in a video sequence. According to block-based motion compensation used in all modern video codecs, the prediction is taken from one or more previously decoded pictures, i.e., reference pictures. The corresponding area for generating the inter-picture prediction is indicated by motion information, which includes motion vectors and reference picture indices.
[0067] The addition unit 134 may calculate residual data as the difference between the input video data 132 and the predicted data from the intra-prediction unit 152 or the inter-prediction unit 134. The addition unit 134 provides the residual block to the transformation unit 136, which applies one or more transformations to the residual block to generate a transformation block. The quantization unit 138 quantizes the transformation block to form quantized transformation coefficients. The entropy coding unit 140 entropy encodes the quantized transformation coefficients, as well as other syntax elements such as motion information or intra-prediction information, to generate an output bitstream 158.
[0068] Meanwhile, to reconstruct the residual blocks, the inverse quantization unit 142 inverse quantizes the quantized transformation coefficients, and the inverse transformation unit 144 inverse transforms the transformation coefficients. The addition unit 146 combines the residual blocks with the prediction blocks (sample by sample) to generate decoded blocks of video data. The loop filter unit 148 applies one or more filters (for example, 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 blocks to generate filtered and decoded blocks.
[0069] According to the techniques of this disclosure, the loop filter unit 148 may be further configured to refine the filtered and decoded blocks. For example, the loop filter unit 148 may apply a scaling factor to the filtered and decoded blocks to form refined filtered and decoded blocks. The loop filter unit 148 may then add the refined filtered and decoded blocks to the corresponding decoded blocks. The loop filter unit 148 may then store these final blocks in the DPB 150. The data in the DPB 150 may be used as reference data by, for example, the inter-prediction unit 154 or the intra-prediction unit 152, and may also be output as output video data 160.
[0070] Figure 3 is a conceptual diagram showing a hierarchical prediction structure 170 with a picture group (GOP) size equal to 16.
[0071] Intra-picture prediction leverages the spatial redundancy (and therefore "intra") present within a picture by deriving predictions about blocks from already coded / decoded, spatially adjacent (reference) samples. Directional angle prediction, DC prediction, and plane or planar prediction are used in recent video codecs, including AVC, HEVC, and VVC.
[0072] Several exemplary hybrid video coding standards apply a block transform to the predictive residuals (regardless of whether the predictive residuals originate from interpicture or intrapicture predictions). Early standards, including H.261 / 262 / 263, use the discrete cosine transform (DCT). HEVC and VVC apply additional transform kernels other than the DCT to account for different statistics in a given video signal.
[0073] Quantization aims to reduce the precision of an input value or set of input values in order to decrease the amount of data required to represent the value. In hybrid video coding, quantization is typically applied to individual transformed residual samples, for example, to a transformation coefficient, resulting in an integer coefficient level. In recent video coding standards, the step size is derived from so-called quantization parameters (QPs) that control fidelity and bitrate. Larger step sizes reduce the bitrate but can also degrade quality, resulting in, for example, video pictures exhibiting blocking artifacts and blurred details.
[0074] Context-Adaptive Binary Arithmetic Coding (CABAC) is used in modern video codecs such as AVC, HEVC, and VVC due to its high efficiency.
[0075] Post- / in-loop filtering is a filtering process (or a combination of such processes) applied to a reconstructed picture to reduce coding artifacts. The input to the filtering process is typically a reconstructed picture, which is a combination of the reconstructed residual signal (including quantization errors) and the prediction. As shown in Figure 2, the reconstructed picture after in-loop filtering is stored and used as a reference for interpicture prediction of subsequent pictures. Coding artifacts are largely determined by QP. Therefore, QP information is generally used in the design of the filtering process. In HEVC, in-loop filtering includes deblocking filtering and sample-adaptive offset (SAO) filtering. In the VVC standard, adaptive loop filtering (ALF) was introduced as a third filter. The ALF filtering process is as follows: R'(i,j)=R(i,j)+((Σ k≠0 Σ l≠0 )f(k,l)×K(R(i+k,j+l)-R(i,j),c(k,l))+64)≫7) (1) Here, R(i,j) is the sample before the filtering process, and R'(i,j) is the sample value after the filtering process. f(k,l) represents the filter coefficient, K(x,y) is the clipping function, and c(k,l) represents the clipping parameter. The variables k and l are
[0076]
number
[0077] from
[0078]
number
[0079] There can be differences between these, where L represents the filter length. The clipping function is K(x,y)=min(y,max(-y,x)), which corresponds to the function Clip3(-y,y,x). The clipping operation introduces a nonlinearity that makes ALF more efficient by reducing the influence of neighboring sample values that are too different from the current sample value. In VVC, the filtering parameters can be signaled in the bitstream and selected from a predefined set of filters. The ALF filtering process can also be summarized as shown in the following equation. R'(i,j)=R(i,j)+ALF_residual_ouput(R) (2)
[0080] Several examples have shown that embedding neural networks in hybrid video coding frameworks can improve compression efficiency. Neural networks are used in intra-prediction and inter-prediction modules to improve prediction efficiency. In recent years, NN-based in-loop filters have also become a research topic. In some examples, the filtering process is applied as a post-filter. In this case, the filtering process is applied only to the output picture, and the unfiltered picture is used as a reference picture.
[0081] NN-based filters can be applied as an addition on top of existing filters such as deblocking filters, SAO, and ALF. NN-based filters can also be applied exclusively if they are designed to replace all existing filters.
[0082] Figure 4 is a block diagram illustrating an exemplary convolutional neural network-based filter with four layers. As shown in Figure 4, the NN-based filtering process 182 takes reconstructed samples 180 as input, with an intermediate output being residual samples, which are added back to the input to refine the input samples, thereby producing refined data 184. The NN filter may use all color components as input to leverage inter-component correlations. Different components may share the same filter (including network structure and model parameters), or each component may have its own unique filter.
[0083] The filtering process can also be generalized as follows: R'(i,j)=R(i,j)+NN_filter_residual_ouput(R) (3)
[0084] The model structure and model 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 signaled in the bitstream.
[0085] Existing NN-based filters for video coding may have problems. For example, predefined filters (e.g., NN-based filters or ALF) can be trained on a large set of video and image databases. While such training sets may be optimal in a general sense, they may not be optimal for specific distorted sequences.
[0086] This disclosure describes the following techniques that can improve coding efficiency and / or reduce distortion when using NN-based filters for video coding. The following itemized techniques may be applied individually. Alternatively, any combination of the techniques described below may be applied. The video encoder 200 and video decoder 300 may be configured according to any of the various techniques of this disclosure, either individually or in any combination.
[0087] Referring again to Figure 1, in one example of this disclosure, the video encoder 200 and video decoder 300 may be configured to apply a refining process to the output residual of a filtering process, and then update the input sample by adding the refined filter output residual. The proposed method may be expressed as follows: R'(i,j)=R(i,j)+f(filter_residual_ouput(R)) (4) Here, f() is a function of the refining process applied to the filtered output residual of a particular filtering process. The video encoder 200 and video decoder 300 may be configured to apply one or more of the following processes as the refining process. a. As an example, the video encoder 200 and video decoder 300 may modify the filtered values by multiplying a scaling factor by the filtered samples of the decoded block, and then update the input samples by adding the refined and filtered values to the decoded block. i. The video encoder 200 may quantize the scaling factor using an integer value with a predefined bit precision. The video decoder 300 may determine the scaling factor by dequantizing that value using an integer value with a predefined bit precision. ii. The video encoder 200 may signal the scaling factor value in the bitstream. The video decoder 300 may determine the scaling factor value from the signaled data in the bitstream. iii. The video encoder 200 may signal the scaling factor value in the bitstream as a syntax element in a slice header, picture header, picture parameter set (PPS), adaptive parameter set (APS), or any other high-level syntax element body. The video decoder 300 may determine the scaling factor from the signaled data in the corresponding data structure. iv. The video encoder 200 may signal the scaling factor value in the bitstream as a syntax element at the block level, for example, at the CTU level. The video decoder 300 may determine the scaling factor from the data signaled at the block level. The video encoder 200 may signal a set of scaling factors in the bitstream, or the set of scaling factors may be predefined in the video encoder 200 and the video decoder 300. The video encoder 200 may signal index values at the block level, for example at the CTU level, to specify the values of the scaling factors. The video decoder 300 may determine the scaling factors from the index values using table-mapping index values for the set of scaling factors. vi. Scaling coefficients can be derived separately for each color component. That is, the video encoder 200 can individually signal scaling coefficients for each color component (e.g., luminance component, blue hue component, and red hue component). The video decoder 300 can determine the scaling coefficients for each color component from the signaled values. b. As another example, the video encoder 200 and video decoder 300 may modify the filtered output residual by multiplying by a scaling factor and adding the offset to the scaled filtered value, and then add the refined filtered value to the input sample. i. The video encoder 200 may quantize the scaling factor using an integer value with a predefined bit precision. The video decoder 300 may determine the scaling factor by dequantizing that value using an integer value with a predefined bit precision. ii. The video encoder 200 may quantize the offset with an integer value having a predefined bit precision. The video decoder 300 may determine the offset by dequantizing that value with an integer value having a predefined bit precision. iii. The video encoder 200 may signal the scaling factor and offset values in the bitstream. The video decoder 300 may determine the scaling factor and offset values from the data signaled in the bitstream. iv. The video encoder 200 may signal the scaling factor and offset values in the bitstream as syntax elements in a slice header, picture header, picture parameter set (PPS), adaptive parameter set (APS), or any other high-level syntax element body. The video decoder 300 may determine the scaling factor and offset from the signaled data in the corresponding data structure. v. The scaling coefficient and offset values are derived during the encoding process and may be signaled in the bitstream as syntax elements in the slice header, picture header, adaptive parameter set (APS), or any other high-level syntax element body. vi. The video encoder 200 may signal the values of the scaling factor and offset in the bitstream as syntax elements at the block level, for example, at the CTU level. The video decoder 300 may determine the scaling factor and offset from the data signaled at the block level. vii. The video encoder 200 may signal a set of scaling factors and a set of offsets in the bitstream, or the set of scaling factors and the set of offsets may be predefined in the video encoder 200 and the video decoder 300. The video encoder 200 may signal index values at the block level, for example at the CTU level, to specify the values of the scaling factors and offsets. The video decoder 300 may determine the scaling factors and offsets from the index values using the respective table mapping index values for the set of scaling factors and the set of offsets. viii. Scaling coefficients and offsets may be derived separately for each color component. That is, the video encoder 200 may individually signal scaling coefficients and offsets for each color component (e.g., luminance component, blue component, and red component). The video decoder 300 may determine the scaling coefficients and offsets for each color component from the signaled values. c. The filtering process described herein may be any filtering process that generates a residual output used to update the input sample. i. As an example, the filtering process described in this section is a neural network-based filter. ii. As another example, the filtering process described in this section is a NN-based loop filter applied in the context of a video codec. iii. As another example, the filtering process described in this section is a NN-based post-filter applied in the context of a video codec. iv. As another example, the filtering process described in this section is an adaptive in-loop filter applied in the context of a video codec. v. As another example, the filtering process described in this section is a predefined adaptive in-loop filter applied in the context of a video codec. d. A flag may be signaled to indicate whether or not a refinement application is applied to refine the filter output residuals. The flag may be signaled in the bitstream as a syntax element in the slice header, picture header, picture parameter set (PPS), adaptive parameter set (APS), or any other high-level syntax element body.
[0088] Therefore, the video encoder 200 and video decoder 300 may be configured to decode blocks of video data and then apply filters to the decoded blocks of video data. The filters may be one of the following: neural network-based filters, neural network-based loop filters, neural network-based post-loop filters, adaptive in-loop filters, or predefined adaptive in-loop filters. In some examples, the video encoder 200 and video decoder 300 may apply a combination of such filters to the decoded blocks of video data.
[0089] After filtering the decoded blocks (to form filtered blocks), the video encoder 200 and video decoder 300 may refine the filtered blocks, for example, by multiplying samples of the filtered blocks by a scaling factor to form refined filtered blocks. The video encoder 200 and video decoder 300 may then combine samples of the decoded blocks with corresponding samples of the refined filtered blocks. The video encoder 200 and video decoder 300 may perform equation (4) above to form refined filtered blocks and to combine the refined filtered blocks with the decoded blocks to form a final decoded filtered block to be stored in the decoded picture buffer (DPB) and used for output.
[0090] The video encoder 200 may determine the scaling factor according to a rate-distortion optimization (RDO) process. For example, the video encoder 200 may test various different scaling factors and determine which of the tested scaling factors reduces distortion without excessively increasing the bitrate of the corresponding bitstream. The video encoder 200 may select the scaling factor with the best RDO performance as the scaling factor for the block (or slice or picture containing the block). The video encoder 200 may then encode data representing the selected scaling factor as the value of a syntax element in, for example, a slice header, adaptive parameter set (APS), picture header, picture parameter set (PPS), or block header (e.g., CTU header). The video decoder 300 may determine the scaling factor from the encoded data representing the scaling factor.
[0091] In some examples, the video encoder 200 and video decoder 300 may encode values of syntax elements that directly represent scaling factors. In some examples, the video encoder 200 and video decoder 300 may consist of lookup tables that map index values to scaling factors, and the video encoder 200 may encode values that represent index values corresponding to selected scaling factors. Thus, the video decoder 300 may decode the index values and determine the scaling factors using the index values and the lookup table, i.e., by determining the scaling factors to which the lookup table maps the index values. The lookup table is sometimes called an index table.
[0092] In some cases, the video encoder 200 may further determine whether to enable filtering refinement as described above. For example, if none of the scaling factors yield a sufficient RDO value, the video encoder 200 may disable filtering refinement, for example, by signaling a syntax element value that indicates filtering refinement is disabled. The video decoder 300 may use the syntax element value to determine whether to perform filtering refinement.
[0093] In some examples, the video encoder 200 may quantize the value representing the scaling factor by an integer value with a predefined bit precision. Thus, the video decoder 300 may determine the scaling factor by dequantizing the decoded value by an integer value with a predefined bit precision.
[0094] In another example of this disclosure, the output residuals of multiple filters are combined to update the input sample. As an example, the proposed method may be expressed as follows: R'(i,j)=R(i,j)+f1(filter1_residual_ouput(R))+f2(filter2_residual_ouput(R)) (5) Here, f1() and f2() are functions of the refining process applied to the filtered output residuals of a particular filtering process. Combinations of two or more models can be generalized as follows: R'(i,j)=R(i,j)+f1(filter1_residual_ouput(R))+..+fK(filterK_residual_ouput(R)) (6)
[0095] In other words, the video encoder 200 and video decoder 300 may apply two or more (for example, multiple) scaling factors and filters to the decoded block to form their respective refined and filtered blocks, and then combine the decoded block with the refined and filtered block, for example, according to either equation (5) or equation (6) above.
[0096] The video encoder 200 and video decoder 300 may be configured to apply one or more of the following processes as a refining process. a) As an example, the video encoder 200 and video decoder 300 may modify the output residual of each filtering process, including multiplying by a scaling factor and then synthesizing the refined and filtered block with the input sample. i) The video encoder 200 may quantize the scaling coefficient by an integer value having a predefined bit precision. The video decoder 300 may dequantize the scaling coefficient by an integer value having a predefined bit precision. ii) The video encoder 200 may derive scaling factor values during the encoding process and signal these values in the bitstream. The video decoder 300 may determine the scaling factor from the signaled values. iii) The video encoder 200 may signal the scaling factor value as a syntax element in a slice header, picture header, picture parameter set (PPS), adaptive parameter set (APS), or any other high-level syntax element body. The video decoder 300 may determine the scaling factor value from the corresponding data structure. iv) The video encoder 200 may signal the value of the scaling factor in the bitstream as a syntax element at the block level, for example at the CTU level. The video decoder 300 may determine the value of the scaling factor from the signaled block-level syntax element. v) The video encoder 200 may signal a set of scaling factors in the bitstream, or the values of the scaling factors may be predefined in the video encoder 200 and the video decoder 300. The video encoder 200 may signal index values at the block level, for example at the CTU level, to specify the values of the scaling factors. vi) The video encoder 200 may signal scaling coefficients for each color component separately, and the video decoder 300 may determine scaling coefficients for each color component separately from the signaled values. b) As an example, the video encoder 200 and video decoder 300 may modify the output residual of each filtering process by multiplying by their respective scaling factors and adding an offset. The video encoder 200 and video decoder 300 may then add the refined and filtered data to the input sample. i) The video encoder 200 may quantize the scaling coefficient by an integer value having a predefined bit precision. The video decoder 300 may dequantize the scaling coefficient by an integer value having a predefined bit precision. ii) The video encoder 200 may quantize the offset by an integer value having a predefined bit precision. The video decoder 300 may dequantize the offset by an integer value having a predefined bit precision. iii) The video encoder 200 may derive scaling factor and offset values during the encoding process and signal these values in the bitstream. The video decoder 300 may determine the scaling factor and offset from the signaled values. iv) The video encoder 200 may signal the scaling factor and offset values as syntax elements in a slice header, picture header, picture parameter set (PPS), adaptive parameter set (APS), or any other high-level syntax element body. The video decoder 300 may determine the scaling factor and offset values from the corresponding data structure. v) To save on the signaling overhead of scaling factors, several predefined, fixed scaling factors may be used in both the video encoder 200 and the video decoder 300. The following table shows examples of different scaling factors.
[0097] [Table 1]
[0098] The video encoder 200 may select one of the scaling factors based on the RD cost and then signal the best scaling factor (i.e., the scaling factor with the best RD cost) using a direct representation of the scaling factor or an index representing the scaling factor in the bitstream data. The index may be coded as a unary code, a shortened binary code, or as a variable-length code coded based on the statistical properties of the scaling factor. When the scaling factor has a specific value that is most probable across all input sequences, unary code signaling may be chosen as the signaling method, where the minimum index value may be assigned to the most probable scaling factor value. vi) The scaling coefficient and offset values are derived during the encoding process and can be signaled in the bitstream as syntax elements at the block level, for example, at the CTU level. vii) The set of scaling factors and offsets is signaled in the bitstream or predefined on the encoder and decoder side, and index values are signaled at the block level, e.g., at the CTU level, to specify the values of the scaling factors and offsets. viii) Scaling coefficients and offsets can be derived separately for each color component. c) The filtering process described herein may be any filtering process that generates a residual output used to update the input sample. i) As an example, the filtering process described in this section is a neural network-based filter. ii) As another example, the filtering process described in this section is a set of NN-based loop filters applied in the context of a video codec. iii) As another example, the filtering process described in this section is a set of NN-based post-filters applied in the context of a video codec. iv) As another example, the filtering process described in this section is an adaptive in-loop filter applied in the context of a video codec. v) As another example, the filtering process described in this section is a predefined adaptive in-loop filter applied in the context of a video codec.
[0099] As an example, one of the proposed ideas can be implemented by using the following formula. R'(i,j)=R(i,j)+((Scale_factor*filter_residual_ouput(R)+(1≪(shift-1))+offset)>>shift) (7)
[0100] The "shift" value is a predefined positive integer. The value of shift can be equal to any positive value. Typical values for shift can be in the range of 4 to 8. The scale_factor is quantized by the "shift" bit, and its value is signaled in the bitstream. The value of "offset" can be set to equal to 0. Alternatively, the value of offset can be signaled in the bitstream. In this example, filter_residual_output is quantized with the same precision as the input samples.
[0101] As another example, `scale_factor` is quantized with N bits where the value of N is smaller than "shift". In this example, `filter_residual_output` is quantized with a precision higher than the precision of the input sample.
[0102] A clipping operation may be further applied to clip the value of R'(i,j) to the dynamic range of the original input sample.
[0103] As an example, one of the proposed ideas can be implemented by using the following formula. R'(i,j)=R(i,j)+((Scale_factor1*filter1_residual_ouput(R)+((Scale_factor2*filter2_residual_ouput(R)+(1≪(shift-1))+offset)>>shift) (8)
[0104] The “shift” value in equation (8) is a predefined positive integer. The value of shift can be equal to any positive value. Exemplary values for shift can be in the range of 4 to 8. scale_factor1 and scale_factor2 are quantized by the “shift” bit, and their values are signaled in the bitstream. The value of “offset” can be set to equal to 0. In another example, the value of “offset” can be signaled in the bitstream. In this example, filter1_residual_ouput and filter2_residual_ouput are quantized with the same precision as the input samples.
[0105] As another example, scale_factor1 and scale_factor2 can be quantized with N bits where the value of N is smaller than "shift". In this example, filter_residual_output is quantized with a precision higher than the precision of the input samples.
[0106] A clipping operation may be further applied to clip the value of R'(i,j) to the dynamic range of the original input sample.
[0107] Figures 5A and 5B are conceptual diagrams showing an exemplary quadtree-binary (QTBT) structure 190 and its corresponding coding tree unit (CTU) 192. Solid lines represent quadtree partitions, and dotted lines represent binary tree partitions. At each partition (i.e., non-leaf) node of the binary tree, one flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where in this example, 0 indicates a horizontal partition and 1 indicates a vertical partition. In the case of a quadtree partition, there is no need to indicate the partition type, as the quadtree node divides the block horizontally and vertically into four subblocks of equal size. Thus, the video encoder 200 can encode syntax elements (such as partition information) for the domain tree level (i.e., solid lines) of the QTBT structure 190 and syntax elements (such as partition information) for the prediction tree level (i.e., dashed lines) of the QTBT structure 190, and the video decoder 300 can decode those syntax elements. The video encoder 200 can encode video data such as prediction data and transformation data for CUs represented by terminal leaf nodes of the QTBT structure 190, and the video decoder 300 can decode that video data.
[0108] In general, CTU192 in Figure 5B can be associated with parameters that define the size of the blocks corresponding to the nodes of the QTBT structure 190 at the first and second levels. These parameters may include the CTU size (representing the size of CTU192 in the sample), the minimum quadtree size (MinQTSize, representing the minimum allowed quadtree leaf node size), the maximum binary tree size (MaxBTSize, representing the maximum allowed binary tree root node size), the maximum binary tree depth (MaxBTDepth, representing the maximum allowed binary tree depth), and the minimum binary tree size (MinBTSize, representing the minimum allowed binary tree leaf node size).
[0109] The root node of a QTBT structure corresponding to a CTU may have four child nodes at the first level of the QTBT structure, each of which may be subdivided according to a quadruple tree partition. That is, a node at the first level is either a leaf node (with no child nodes) or has four child nodes. Example QTBT structure 190 represents a node that includes a parent node and child nodes with solid lines for branching. If the nodes at the first level are not larger than the maximum allowable binary tree root node size (MaxBTSize), these nodes may be further subdivided by their respective binary trees. Binary tree partitioning of a single node may be repeated until the resulting nodes reach the minimum allowable binary tree leaf node size (MinBTSize) or the maximum allowable binary tree depth (MaxBTDepth). Example QTBT structure 190 represents a node that has dashed lines for branching. A leaf node in a binary tree is called a coding unit (CU), and without further distinction, coding units (CUs) are used for prediction (e.g., intra-picture prediction or inter-picture prediction) and transformation. As described above, CUs are sometimes also called "video blocks" or "blocks".
[0110] In one example of a QTBT partitioned structure, the CTU size is set to 128×128 (a chroma sample and two corresponding 64×64 chroma samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. To generate a quadtree leaf node, the quadtree partition is first applied to the CTU. The quadtree leaf node can have sizes ranging from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the quadtree leaf node is 128×128, the size exceeds MaxBTSize (i.e., 64×64 in this example), so the quadtree leaf node is not further partitioned by a binary tree. Otherwise, the quadtree leaf node is further partitioned by a binary tree. Therefore, a quad tree leaf node is also the root node of a binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further partitioning is allowed. A binary tree node with a width equal to MinBTSize (4 in this example) suggests that no further vertical partitioning (i.e., partitioning by width) is allowed for that binary tree node. Similarly, a binary tree node with a height equal to MinBTSize suggests that no further horizontal partitioning (i.e., partitioning by height) is allowed for that binary tree node. As mentioned above, a leaf node of a binary tree is called a CU and is further processed according to prediction and transformation without further partitioning.
[0111] Figure 6 is a block diagram showing an exemplary video encoder 200 capable of performing the techniques of this disclosure. Figure 6 is provided for illustrative purposes and should not be considered a limitation of the techniques broadly illustrated and described herein. For illustrative purposes, this disclosure describes a video encoder 200 using the VVC (ITU-T H.266 in development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video encoding devices configured according to other video coding standards.
[0112] In the example in Figure 6, the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a conversion processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse conversion 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, conversion processing unit 206, quantization unit 208, inverse quantization unit 210, inverse conversion 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 processing circuits. For example, the units of the video encoder 200 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Furthermore, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.
[0113] The video data memory 230 can store video data to be encoded by the components of the video encoder 200. The video encoder 200 can receive video data stored in the video data memory 230 from, for example, a video source 104 (Figure 1). The DPB 218 can act as a reference picture memory that stores reference video data for use in predicting subsequent video data by the video encoder 200. The video data memory 230 and DPB 218 can be formed by any of various 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 may be on-chip with the other components of the video encoder 200, as shown in the figure, or it may be off-chip relative to those components.
[0114] In this disclosure, references to the video data memory 230 should not be interpreted as being limited to internal memory of the video encoder 200, or external memory of the video encoder 200, unless otherwise specifically described. Rather, references to the video data memory 230 should be understood as reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for the current block to be encoded). Memory 106 in Figure 1 may also provide temporary storage for outputs from various units of the video encoder 200.
[0115] The various units in Figure 6 are illustrated to help understand the operations performed by the video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide a specific function and are preset for the operations they may perform. Programmable circuits refer to circuits that can be programmed to perform a variety of tasks and offer flexibility in the operations they may perform. For example, a programmable circuit may execute software or firmware that operates the programmable circuit in a manner defined by software or firmware instructions. Fixed-function circuits may 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 of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0116] The video encoder 200 may include a programmable core formed from an arithmetic logic unit (ALU), an elementary function unit (EFU), digital circuits, analog circuits, and / or programmable circuits. In an example where the operation of the video encoder 200 is performed using software executed by the programmable circuits, memory 106 (Figure 1) may store instructions (e.g., object code) of the software that the video encoder 200 receives and executes, or another memory (not shown) within the video encoder 200 may store such instructions.
[0117] The video data memory 230 is configured to store the received video data. The video encoder 200 can retrieve a picture of the video data from the video data memory 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 memory 230 may be raw video data to be encoded.
[0118] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra-prediction unit 226. The mode selection unit 202 may include additional functional units for performing video prediction according to other prediction modes. For example, the mode selection unit 202 may include a palette unit, an intra-block copy 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, and the like.
[0119] The mode selection unit 202 generally coordinates multiple coding paths to test combinations of coding parameters and the resulting rate distortion values for such combinations. The coding parameters may include the division of the CTU to the CU, the prediction mode for the CU, the transformation type for the residual data of the CU, and the quantization parameters for the residual data of the CU. The mode selection unit 202 may ultimately select a combination of coding parameters that has a better rate distortion value than other tested combinations.
[0120] The video encoder 200 divides the picture retrieved from the video data memory 230 into a series of CTUs, and may encapsulate one or more CTUs within a slice. The mode selection unit 202 may divide the picture's CTUs according to a tree structure such as the HEVC QTBT structure or quadtree structure described above. As described above, the video encoder 200 may form one or more CUs from dividing the CTUs according to the tree structure. Such CUs are sometimes commonly referred to as "video blocks" or "blocks".
[0121] Generally, the 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 a predictive block for the current block (e.g., the current CU, or in HEVC, the overlapping portion of PU and TU). For intra-prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more exactly matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in DPB 218). Specifically, the motion estimation unit 222 may calculate a value representing how similar a potential reference block is to the current block, for example, according to the sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), etc. The motion estimation unit 222 may generally perform these calculations using sample-by-sample differences between the current block and the reference blocks under consideration. The motion estimation unit 222 can identify the reference block with the lowest value resulting from these calculations, which indicates the reference block that most closely matches the current block.
[0122] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of the current block in the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, in the case of unidirectional interpretation, the motion estimation unit 222 may provide a single motion vector, but in the case of bidirectional interpretation, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate predicted blocks. For example, the motion compensation unit 224 may use the motion vectors to extract data for the reference blocks. As another example, if the motion vectors have fractional sample accuracy, the motion compensation unit 224 may interpolate values for the predicted blocks according to one or more interpolation filters. Furthermore, in the case of bidirectional interpretation, the motion compensation unit 224 may extract data for the two reference blocks identified by each motion vector and synthesize the extracted data, for example, by sample-wise averaging or weighted averaging.
[0123] As another example, in the case of intra-prediction or intra-prediction coding, the intra-prediction unit 226 may generate a prediction block from samples adjacent to the current block. For example, in directional mode, the intra-prediction unit 226 may generally generate a prediction block by mathematically synthesizing the values of adjacent samples and populating these calculated values in a defined direction across the current block. As another example, in DC mode, the intra-prediction unit 226 may calculate the average of adjacent samples for the current block and generate a prediction block in which each sample of the prediction block should include this resulting average.
[0124] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives a raw, unencoded version of the current block from the video data memory 230 and the prediction block from the mode selection unit 202. The 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, the residual generation unit 204 may also determine the difference between sample values in the residual block to generate the residual block using residual difference pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0125] In an example where the mode selection unit 202 divides a CU into PUs, each PU may be associated with a lumar prediction unit and a corresponding chroma prediction unit. The video encoder 200 and video decoder 300 may support PUs of various sizes. As shown above, the size of a CU may refer to the size of the lumar coding block of the CU, and the size of a PU may refer to the size of the lumar prediction unit of the PU. Assuming that the size of a particular CU is 2N × 2N, the video encoder 200 may support PU sizes of 2N × 2N or N × N for intra-prediction, and symmetric PU sizes of 2N × 2N, 2N × N, N × 2N, N × N, or similar for inter-prediction. The video encoder 200 and video decoder 300 may also support asymmetric divisions for PU sizes of 2N × nU, 2N × nD, nL × 2N, and nR × 2N for inter-prediction.
[0126] In cases where the mode selection unit 202 does not further subdivide the CU into PUs, each PU may be associated with a ruma coding block and a corresponding chroma coding block. As described above, the size of the CU may refer to the size of the ruma coding block within the CU. The video encoder 200 and video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.
[0127] In some examples, such as intra-block copy mode coding, affine mode coding, and other video coding techniques like linear model (LM) mode coding, the mode selection unit 202 generates a predicted block for the current block being coded via the respective unit associated with the coding technique. In some examples, such as palette mode coding, the mode selection unit 202 does not need to generate a predicted block; instead, it may generate syntax elements indicating how to reconstruct the block based on the selected palette. In such modes, the mode selection unit 202 may provide these syntax elements to be coded to the entropy coding unit 220.
[0128] As described above, the residual generation unit 204 receives video data for the current block and the corresponding predicted block. The residual generation unit 204 then 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 predicted block and the current block.
[0129] The transformation processing unit 206 applies one or more transformations to the residual block to generate a block of transformation coefficients (referred to herein as the “transformation coefficient block”). The transformation processing unit 206 may apply various transformations to the residual block to form the transformation coefficient block. For example, the transformation processing unit 206 may apply a discrete cosine transform (DCT), a direction transform, a Carunenlobe transform (KLT), or a conceptually similar transformation to the residual block. In some examples, the transformation processing unit 206 may perform multiple transformations on the residual block, such as a rotation transform, a linear transformation, and a quadratic transformation. In some examples, the transformation processing unit 206 does not apply any transformations to the residual block.
[0130] The quantization unit 208 can quantize the transformation coefficients in the transformation coefficient block to produce a quantized transformation coefficient block. The quantization unit 208 can quantize the transformation coefficients of the transformation coefficient block according to the quantization parameter (QP) value associated with the current block. The video encoder 200 can adjust the degree of quantization applied to the transformation coefficient block associated with the current block by adjusting the QP value associated with the CU (for example, via the mode selection unit 202). Quantization may result in a loss of information, and therefore the quantized transformation coefficients may have lower precision than the original transformation coefficients generated by the transformation processing unit 206.
[0131] The inverse quantization unit 210 and the inverse transformation processing unit 212 can reconstruct the residual block from the transformed coefficient block by applying inverse quantization and inverse transformation, respectively. The reconstruction unit 214 can generate a reconstructed block corresponding to the current block (which may be with some distortion) based on the reconstructed residual block and the predicted block generated by the mode selection unit 202. For example, the reconstruction unit 214 can generate a reconstructed block by adding a sample from the reconstructed residual block to a corresponding sample from the predicted block generated by the mode selection unit 202.
[0132] The filter unit 216 may perform one or more filtering operations on the reconfigured block. For example, the filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edges of the CU / TU. The operation of the filter unit 216 may be skipped in some examples. In addition, the filter unit 216 may be configured to perform one or more filtering techniques of this disclosure, including neural network-based filtering techniques.
[0133] Specifically, the filter unit 216 may be configured to apply at least one of the following to a decoded block of video data: 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 form one or more filtered and decoded blocks. The filter unit 216 may then refine the filtered and decoded blocks by applying one or more scaling factors to the filtered and decoded blocks. For example, the filter unit 216 may test one or more dynamically determined or predefined scaling factors on the filtered and decoded blocks. For example, the filter unit 216 may apply one of the equations (3) to (8) described above to refine the filtered and decoded blocks. The mode selection unit 202 may perform a rate-distortion optimization (RDO) process to calculate the RDO value for each of the tested scaling factors, representing the distortion and bitrate of various scaling factors. The mode selection unit 202 may select the scaling factor that yields the best RDO value.
[0134] In addition, the mode selection unit 202 may provide the entropy coding unit 220 with data representing a filter refinement enable flag and data representing scaling factors. Thus, the entropy coding unit 220 may encode a flag (having a value indicating whether filter refinement using scaling factors is enabled), as well as values representing scaling factors for specific units of video data, such as slices, pictures, CTUs, etc. For example, the entropy coding unit 220 may encode data directly representing scaling factors, or index values representing scaling factors in a lookup table (e.g., an index table).
[0135] In some examples, the filter unit 216 may further apply the offset values to the scaled, filtered, and decoded block to form a refined, filtered, and decoded block. The mode selection unit 202 may similarly provide data representing the offset values to the entropy coding unit 220, which may encode the offset values, for example, directly or using index values.
[0136] The entropy coding unit 220 may encode data representing scaling coefficients and offset values (when applied) in a picture header, picture parameter set (PPS), slice header, and / or adaptive parameter set (APS), or other such high-level syntax structures.
[0137] The video encoder 200 stores the reconstructed blocks (which may be filtered and refined) in the DPB 218. For example, in cases where the filter unit 216 does not operate, the reconstruction unit 214 may store the reconstructed blocks in the DPB 218. In cases where the filter unit 216 operates, the filter unit 216 may store the refined, filtered and reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve a reference picture formed from the reconstructed (and possibly filtered) blocks from the DPB 218 to interpret blocks of the picture to be encoded later. In addition, the intraprediction unit 226 may use the reconstructed blocks in the DPB 218 of the current picture to intrapret other blocks in the current picture.
[0138] In general, the entropy coding unit 220 can entropy code syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 can entropy code quantized transformation coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 can entropy code prediction syntax elements from the mode selection unit 202 (e.g., motion information for inter-prediction or intra-mode information for intra-prediction). The entropy coding unit 220 can perform one or more entropy coding operations on syntax elements, which are another example of video data, to generate entropy coded data. For example, the entropy coding unit 220 may perform context-adaptive variable-length coding (CAVLC) operation, CABAC operation, variable-to-variable (V2V) length coding operation, syntax-based context-adaptive binary arithmetic coding (SBAC) operation, probability interval partitioned entropy (PIPE) coding operation, exponential Golomb coding operation, or another type of entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode in which syntax elements are not entropically coded.
[0139] The video encoder 200 may output a bitstream containing entropy-encoded syntax elements required to reconstruct a slice or block of a picture. Specifically, the entropy encoding unit 220 may output a bitstream.
[0140] The behavior described above is described in relation to blocks. Such descriptions should be understood as behavior for rumacoding blocks and / or chromacoding blocks. As described above, in some examples, the rumacoding block and chromacoding block are the ruma and chroma components of the CU. In some examples, the rumacoding block and chromacoding block are the ruma and chroma components of the PU.
[0141] In some cases, actions performed for a rumacoding block do not need to be repeated for a chromacoding block. For example, actions to identify the motion vector (MV) and reference picture for a rumacoding block do not need to be repeated to identify the MV and reference picture for a chromacoding block. Rather, the MV for the rumacoding block may be scaled to determine the MV for the chromacoding block, and the reference picture may be the same. In another example, the intra-prediction process may be the same for both rumacoding and chromacoding blocks.
[0142] The video encoder 200 represents an example of a device configured to filter decoded video data, comprising a memory configured to store video data, and one or more processors implemented in the circuit, configured to decode blocks of video data to form decoded blocks, apply filters to the decoded blocks to form filtered blocks, multiply samples of the filtered blocks by a scaling factor to form refined filtered blocks, and combine samples of the refined filtered blocks with corresponding samples of the decoded blocks.
[0143] Figure 7 is a block diagram showing an exemplary video decoder 300 capable of performing the techniques of this disclosure. Figure 7 is provided for illustrative purposes and is not intended to limit the techniques that are broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes a video decoder 300 using VVC (ITU-T H.266) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video coding devices configured according to other video coding standards.
[0144] In the example in Figure 7, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transformation processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transformation processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 may be implemented in one or more processors or processing circuits. For example, the units of the video decoder 300 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.
[0145] 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 for performing predictions according to other prediction modes. For example, the prediction processing unit 304 may include a pallet unit, an intra-block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, and the like. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0146] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by the components of the video decoder 300. Video data stored in the CPB memory 320 may be retrieved, for example, from a computer-readable medium 110 (Figure 1). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. The CPB memory 320 may also store video data other than syntax elements of the encoded picture, such as temporary data representing outputs from various units of the video decoder 300. The DPB 314 generally stores the decoded picture, which the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures from the encoded video bitstream. The CPB memory 320 and DPB 314 may be formed by any of various memory devices, such as DRAM, MRAM, RRAM, or other types of memory devices, including SDRAM. The CPU memory 320 and 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 along with the other components of the video decoder 300, or it may be off-chip relative to those components.
[0147] As an addition or alternative, in some examples, the video decoder 300 may retrieve coded video data from memory 120 (Figure 1). That is, memory 120 may store data as described above with respect to the CPB memory 320. Similarly, memory 120 may store instructions to be executed by the video decoder 300 when some or all of the functions of the video decoder 300 are implemented in software to be executed by the processing circuit of the video decoder 300.
[0148] The various units shown in Figure 7 are illustrated to help understand the operations performed by the video decoder 300. The units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Similar to Figure 6, fixed-function circuits refer to circuits that provide a specific function and are preset for the operations they can perform. Programmable circuits refer to circuits that can be programmed to perform various tasks and offer flexibility in the operations they can perform. For example, a programmable circuit may execute software or firmware that operates the programmable circuit in a manner defined by software or firmware instructions. Fixed-function circuits may 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 of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0149] The video decoder 300 may include a programmable core formed from an ALU, EFU, digital circuitry, analog circuitry, and / or programmable circuitry. In an example where the operation of the video decoder 300 is performed by software running on the programmable circuitry, on-chip memory or off-chip memory may store software instructions (e.g., object code) that the video decoder 300 receives and executes.
[0150] The entropy decoding unit 302 can receive video data encoded from the CPB and reconstruct the syntax elements by entropy decoding the video data. The prediction processing unit 304, the inverse quantization unit 306, the inverse transformation processing unit 308, the reconstruction unit 310, and the filter unit 312 can generate the decoded video data based on the syntax elements extracted from the bitstream.
[0151] Generally, the video decoder 300 reconstructs the picture block by block. The video decoder 300 can perform the reconstruction operation individually for each block (where the block currently being reconstructed, i.e., decoded, is sometimes called the "current block").
[0152] The entropy decoding unit 302 can entropy decode the quantized transformation coefficients of the quantized transformation coefficient block, as well as syntax elements that define transformation information such as quantization parameters (QP) and / or transformation mode indications. The inverse quantization unit 306 may use the QP associated with the quantized transformation coefficient block to determine the degree of quantization and, similarly, the degree of inverse quantization that the inverse quantization unit 306 should apply. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transformation coefficients. The inverse quantization unit 306 may thereby form a transformation coefficient block containing the transformation coefficients.
[0153] After the inverse quantization unit 306 has formed a transformation coefficient block, the inverse transformation processing unit 308 may apply one or more inverse transformations to the transformation coefficient block to generate a residual block associated with the current block. For example, the inverse transformation processing unit 308 may apply an inverse DCT, an inverse integer transformation, an inverse Carunenlebe transform (KLT), an inverse rotation transform, an inverse direction transform, or another inverse transformation to the transformation coefficient block.
[0154] Furthermore, the prediction processing unit 304 generates prediction blocks according to 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 interpredicted, the motion compensation unit 316 may generate a prediction block. In this case, the prediction information syntax elements may indicate a reference picture in the DPB 314 from which the reference block should be extracted, as well as a motion vector that identifies the location of the reference block in the reference picture relative to the location of the current block in the current picture. The motion compensation unit 316 can generally perform the interprediction process in substantially the same manner as described with respect to the motion compensation unit 224 (Figure 6).
[0155] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 may generate a predicted block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 may generally perform the intra-prediction process in substantially the same manner as described with respect to the intra-prediction unit 226 (Figure 6). The intra-prediction unit 318 may retrieve adjacent sample data for the current block from the DPB 314.
[0156] The reconstruction unit 310 may reconstruct the current block using the predicted block and the residual block. For example, the reconstruction unit 310 may reconstruct the current block by adding a sample from the residual block to the corresponding sample from the predicted block.
[0157] The filter unit 312 may perform one or more filtering operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 are not necessarily performed in all examples. In addition, the filter unit 312 may be configured to perform one or more filtering techniques of this disclosure, including neural network-based filtering techniques.
[0158] Specifically, first, the entropy decoding unit 302 may decode a flag value indicating whether a smelting filter should be applied. If a smelting filter should be applied, the entropy decoding unit 302 may entropy decode data representing one or more scaling coefficients. For example, the entropy decoding unit 302 may entropy decode the scaling coefficients directly or the index values corresponding to the scaling coefficients in a lookup table (e.g., an index table or mapping table). The entropy decoding unit 302 may decode flags and scaling coefficients from slice headers, picture headers, picture parameter sets (PPS), adaptive parameter sets (APS), or other high-level syntax structures.
[0159] The filter unit 312 may be configured to apply at least one of the following to a decoded block of video data: 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 form one or more filtered and decoded blocks. Then, assuming that refinement filtering is enabled, the filter unit 312 may refine the filtered and decoded blocks by applying one or more scaling factors to the filtered and decoded blocks. For example, the filter unit 312 may apply one of the equations (3) to (8) described above to refine the filtered and decoded blocks.
[0160] In some examples, the filter unit 312 may further apply the offset values to the scaled, filtered, and decoded block to form a refined, filtered, and decoded block. The entropy decoding unit 302 may decode data that directly represents the offset values or that is represented by index values in a lookup table (i.e., an index table or mapping table).
[0161] The entropy decoding unit 302 can decode data representing scaling factors and offset values (when applied) from a picture header, picture parameter set (PPS), slice header, and / or adaptive parameter set (APS), or other such high-level syntax structures.
[0162] The video decoder 300 may store the reconstructed blocks in the DPB 314. For example, in an example where the filter unit 312 does not operate, the reconstruction unit 310 may store the reconstructed blocks in the DPB 314. In an example where the filter unit 312 operates, the filter unit 312 may store the refined, filtered, and reconstructed blocks in the DPB 314. As described above, the DPB 314 may provide the prediction processing unit 304 with reference information such as the current picture for intra-prediction and samples of previously decoded pictures for subsequent motion compensation. Furthermore, the video decoder 300 may output the decoded picture (e.g., decoded video) from the DPB 314 for later presentation on a display device such as the display device 118 in Figure 1.
[0163] Thus, the video decoder 300 represents an example of a device for filtering decoded video data, comprising a memory configured to store video data, and one or more processors implemented in a circuit, configured to decode blocks of video data to form decoded blocks, apply filters to the decoded blocks to form filtered blocks, multiply samples of the filtered blocks by a scaling factor to form refined filtered blocks, and combine samples of the refined filtered blocks with corresponding samples of the decoded blocks.
[0164] Figure 8 is a flowchart illustrating an exemplary method for encoding the current block using the technique of this disclosure. The current block may include the current CU. While the video encoder 200 (Figures 1 and 6) is described, it should be understood that other devices may be configured to perform a similar method to that in Figure 6.
[0165] In this example, the video encoder 200 first predicts the current block (350). For example, the video encoder 200 may form a predicted block for the current block. The video encoder 200 may then compute the residual block for the current block (352). To compute the residual block, the video encoder 200 may compute the difference between the original unencoded block and the predicted block for the current block. The video encoder 200 may then transform the residual block and quantize the transformation coefficients of the residual block (354). The video encoder 200 may then scan the quantized transformation coefficients of the residual block (356). During or following the scan, the video encoder 200 may entropy encode the transformation coefficients (358). For example, the video encoder 200 may entropy encode the transformation coefficients using, for example, CAVLC or CABAC. The video encoder 200 may then output the entropy encoded data of the block (360).
[0166] The video encoder 200 may also encode the current block and then decode the current block to use the decoded version of the current block as reference data for data to be coded later (for example, in inter-prediction mode or intra-prediction mode). Thus, the video encoder 200 may inversely quantize and inversely transform the coefficients to reconstruct the residual block (362). The video encoder 200 may combine the residual block with the prediction block to form a decoded block (364). According to the techniques of the present disclosure, the video encoder 200 may filter and refine the decoded block (366). The video encoder 200 may then store the filtered and decoded block in the DPB 218 (368).
[0167] Thus, the method shown in Figure 8 represents an example of a method for filtering decoded video data, comprising the steps of: decoding blocks of video data to form decoded blocks; applying a filter to the decoded blocks to form filtered blocks; multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and combining samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0168] Figure 9 is a flowchart illustrating an exemplary method for decoding the current block of video data using the technique of this disclosure. The current block may include the current CU. While the video decoder 300 (Figures 1 and 7) is described, it should be understood that other devices may be configured to perform a similar method to that shown in Figure 7.
[0169] The video decoder 300 may receive entropy-encoded data for the current block, such as entropy-encoded prediction information and entropy-encoded data of the transformation coefficients of the residual block corresponding to the current block (370). The video decoder 300 may entropy-decode the entropy-encoded data to determine the prediction information for the current block and reconstruct the transformation coefficients of the residual block (372). The video decoder 300 may predict the current block, for example, using an intra-prediction mode or inter-prediction mode as indicated by the prediction information for the current block, in order to compute a prediction block for the current block (374). The video decoder 300 may then back-scan the reconstructed transformation coefficients to create a block of quantized transformation coefficients (376). The video decoder 300 may then inverse-quantize the transformation coefficients and apply the inverse transformation to the transformation coefficients to generate a residual block (378). The video decoder 300 may finally decode the current block by combining the prediction block and the residual block (380).
[0170] Thus, the method in Figure 9 represents an example of a method for filtering decoded video data, comprising the steps of: decoding blocks of video data to form decoded blocks; applying a filter to the decoded blocks to form filtered blocks; multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and combining samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0171] Figure 10 is a flowchart illustrating an exemplary method for encoding video data and filtering decoded video data using the technique of the present disclosure. The method of Figure 10 is described with respect to the video encoder 200 of Figures 1 and 6, but other video encoding devices may be configured to perform this method or a similar method.
[0172] First, the video encoder 200 may encode a block of video data and then decode the block (390). Next, the video encoder 200 may filter the decoded block using, for example, one or more of the following: 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 (392).
[0173] The video encoder 200 may then use rate-distortion optimization (RDO) to test several dynamically determined or predefined scaling factors (394). For example, the video encoder 200 may apply each of the scaling factors to a filtered and decoded block and compare the resulting refined, filtered and decoded block to the original uncoded block to calculate an RDO value. Assuming that at least one of the scaling factors results in a refined, filtered and decoded block having better RDO performance than an unrefined filtered and decoded block, the video encoder 200 may decide to enable the refinement filtering by the technique of the present disclosure. In some examples, the RDO process may further include testing an offset applied along with the scaling factor. In some examples, the video encoder 200 may test several different filters and / or several different scaling factors, possibly together with the offset, as described above.
[0174] The video encoder 200 may then determine one of the scaling factors (or a set of scaling factors, possibly with an offset) that has the best RDO value (396). The video encoder 200 may then apply the determined scaling factor (or set of scaling factors and / or offset) to the filtered and decoded block (398). The video encoder 200 may then, for example, for each sample, combine the refined and filtered block with the original decoded block (400) and store the resulting block in the DPB 218 (402).
[0175] Furthermore, the video encoder 200 may encode data representing selected scaling factors in, for example, a slice header, picture header, picture parameter set (PPS), adaptive parameter set (APS), or other such high-level syntax structures (404). Additionally, the video encoder 200 may encode the values of flags that enable filter refinement as described above. In some examples, the video encoder 200 may encode data directly representing scaling factors and / or offsets, while in other examples, the video encoder 200 may encode index values corresponding to selected scaling factors and / or offsets in the corresponding lookup table.
[0176] Thus, the method in Figure 10 represents an example of a method for filtering decoded video data, comprising the steps of: decoding blocks of video data to form decoded blocks; applying a filter to the decoded blocks to form filtered blocks; multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and combining samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0177] Figure 11 is a flowchart illustrating an exemplary method for filtering decoded video data using the technique of the present disclosure. The method of Figure 11 is described with respect to the video decoder 300 of Figures 1 and 7, but other video decoding devices may be configured to perform this method or a similar method.
[0178] First, the video decoder 300 may encode a block of video data and then decode the block (410). Next, the video decoder 300 may filter the decoded block using, for example, one or more of the following: 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 (412).
[0179] Next, the video decoder 300 may decode data that enables the smelting filter by the technique of the present disclosure (414). That is, the video decoder 300 may decode a syntax element that indicates whether the smelting filter is enabled and determine that the value of the syntax element indicates that the smelting filter is enabled. Next, the video decoder 300 may decode data that indicates scaling factors (416). For example, the data may directly represent scaling factors or may be index values in a lookup table that maps index values to scaling factors. In some examples, the video decoder 300 may decode data that represents a set of scaling factors and / or offsets. This data may be contained in a slice header, picture header, picture parameter set (PPS), adaptive parameter set (APS), or other high-level syntax structure. The video decoder 300 may apply the determined scaling factors (or the set of scaling factors and / or offsets) to the filtered and decoded block to produce a smelted and filtered block (418). Next, the video decoder 300 may, for example, combine the refined and filtered blocks with the original decoded blocks for each sample (420), and store the resulting blocks in the DPB 314 (422). The video decoder 300 may also output the video data obtained from the DPB 314 to a display device, for example (424).
[0180] Thus, the method in Figure 11 represents an example of a method for filtering decoded video data, comprising the steps of: decoding blocks of video data to form decoded blocks; applying a filter to the decoded blocks to form filtered blocks; multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and combining samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0181] Some exemplary techniques of this disclosure are summarized in the following clauses.
[0182] Clause 1: A method for decoding video data, comprising the steps of reconstructing the video data and applying a filter to the reconstructed video data, wherein the step of applying the filter includes the steps of refining the filter output residuals and updating the input samples by adding the refined filter output residuals.
[0183] Clause 2: The method of Clause 1, wherein the step of refining the filter output residuals includes the step of multiplying the filter output residuals by a scaling factor.
[0184] Clause 3: The method of Clause 1, wherein the step of refining the filter output residuals includes the step of multiplying the filter output residuals by a scaling factor and adding an offset.
[0185] Clause 4: The filter is one of the following: 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, in any way according to Clauses 1-3.
[0186] Clause 5: Any combination of Clauses 1 to 5, wherein the step of refining the filter output residuals includes a step of refining the filter output residuals of multiple filters.
[0187] Clause 6: Any method of Clauses 1-5, wherein the coding step includes the encoding step.
[0188] Clause 7: Any method of Clauses 1-5, wherein the coding step includes a decryption step.
[0189] Clause 8: A device for coding video data, comprising one or more means for performing any of the methods described in Clauses 1 to 7.
[0190] Clause 9: The device of Clause 8, wherein one or more means comprises one or more processors implemented in a circuit.
[0191] Clause 10: Any device under Clauses 8 and 9, further comprising memory for storing video data.
[0192] Clause 11: Any device of Clauses 8-10, further comprising a display configured to display decoded video data.
[0193] Clause 12: A device that includes one or more of the following: a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box, as described in any of Clauses 8-11.
[0194] Clause 13: Any device according to Clauses 8-12, wherein the device is equipped with a video decoder.
[0195] Clause 14: Any device according to Clauses 8-13, wherein the device is equipped with a video encoder.
[0196] Clause 15: A computer-readable storage medium storing instructions that, when executed, cause one or more processors to perform any of the methods described in Clauses 1 through 7.
[0197] Clause 16: A method for filtering decoded video data, comprising the steps of: decoding blocks of video data to form decoded blocks; applying filters to the decoded blocks to form filtered blocks; multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and combining samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0198] Clause 17: The method of Clause 16, further comprising the step of decoding the value of a syntax element representing a scaling factor.
[0199] Clause 18: The method of Clause 17, wherein the step of decoding the value of a syntax element includes the step of decoding the picture header of a picture containing a block, the picture header containing a syntax element representing a scaling factor.
[0200] Clause 19: The method of Clause 17, wherein the step of decoding the value of a syntax element includes decoding at least one of the following: a slice header of a slice containing a block, a slice header containing a syntax element; an adaptive parameter set (APS) of a slice, an APS containing a syntax element; or a block header of a block, a block header containing a syntax element.
[0201] Clause 20: Any method of Clauses 17-19, wherein the step of decoding the value of a syntax element includes the step of decoding an index value mapped to a scaling factor in an index table, and the method further includes the step of determining a scaling factor from an index value using an index table.
[0202] Clause 21: Any method of Clauses 17-20, further comprising the step of dequantizing the value by an integer value having a predefined bit precision.
[0203] Clause 22: Any method of Clauses 16 to 21, wherein the scaling factor includes a first scaling factor among a plurality of scaling factors, and the step of multiplying the filtered block sample by the scaling factor includes the step of multiplying the filtered block sample by each of the scaling factors among the plurality of scaling factors.
[0204] Clause 23: Any method of Clauses 16 to 22, wherein the step of multiplying a sample of the filtered block by a scaling factor to form a refined and filtered block further comprises adding an offset to the product of the sample of the filtered block and the scaling factor to form a refined and filtered block.
[0205] Clause 24: Any method of Clauses 16 to 22, wherein the step of multiplying a sample of the filtered block by a scaling factor to form a refined and filtered block further comprises the steps of determining an offset value, applying a bitwise shift to the offset value to form a shifted offset value, and adding the shifted offset value to the product of the sample of the filtered block and the scaling factor to form a refined and filtered block.
[0206] Clause 25: Any method of Clauses 16-24, wherein the step of applying a filter includes the step of applying at least one of the following: 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.
[0207] Clause 26: Any method of Clauses 16-25, further comprising the step of determining whether a syntax element indicating whether to refine a filtered block has a value indicating that the filtered block should be refined, before multiplying a sample of the filtered block by a scaling factor.
[0208] Clause 27: The method of Clause 26, further comprising the step of decoding the value of a syntax element in at least one of the following: a slice header of a slice containing a block, a picture header of a picture containing a block, or an adaptive parameter set (APS) corresponding to a slice containing a block, indicating whether the filtered block is refined.
[0209] Clause 28: Any method of Clauses 16 to 27, wherein the filter comprises a first filter, the filtered block comprises a first filtered block, the refined filtered block comprises a first refined filtered block, the scaling factor comprises a first scaling factor, and the method further comprises the steps of applying a second filter to a decoded block to form a second filtered block, and multiplying a sample of the second filtered block by a second scaling factor to form a second refined filtered block, and the step of combining a sample of the first refined filtered block with a corresponding sample of the decoded block comprises the steps of combining a sample of the first refined filtered block and a sample of the second refined filtered block with a corresponding sample of the decoded block.
[0210] Clause 29: Any method of Clauses 16 to 27, wherein the filter comprises a first filter, the filtered block comprises a first filtered block, the refined filtered block comprises a first refined filtered block, the scaling factor comprises a first scaling factor, the step of applying the first filter to the decoded block comprises applying each of the plurality of filters comprising the first filter to the decoded block to form each plurality of filtered blocks comprising the first filtered block, the step of multiplying a sample of the first filtered block by a first scaling factor comprises multiplying a sample of each plurality of filtered blocks comprising the first filtered block by each plurality of scaling factors comprising the first scaling factor to form a plurality of refined filtered blocks comprising the first refined filtered block, and the step of combining a sample of the first refined filtered block with a corresponding sample of the decoded block comprises combining a sample of each plurality of refined filtered blocks with a corresponding sample of the decoded block.
[0211] Clause 30: Any method of Clauses 16-29, further comprising the step of encoding the current block before decrypting the current block.
[0212] Clause 31: A device for filtering decoded video data, comprising: a memory configured to store video data; and one or more processors implemented in a circuit, configured to decode blocks of video data to form decoded blocks; apply filters to the decoded blocks to form filtered blocks; multiply samples of the filtered blocks by a scaling factor to form refined filtered blocks; and combine samples of the refined filtered blocks with corresponding samples of the decoded blocks.
[0213] Clause 32: The device of Clause 31, further configured with one or more processors to decode the values of syntax elements representing scaling factors.
[0214] Clause 33: A device of Clause 32 in which one or more processors are configured to decode the picture header of a picture containing blocks in order to decode the values of syntax elements, the picture header containing syntax elements representing scaling factors.
[0215] Clause 34: A device according to Clause 32, in which one or more processors are configured to decode at least one of the following: a slice header of a slice containing a block, which contains a syntax element; an adaptive parameter set (APS) of a slice, which contains an APS containing a syntax element; or a block header of a block, which contains a syntax element.
[0216] Clause 35: Any device according to Clauses 32-34, wherein one or more processors are configured to decode the values of syntax elements by decoding index values mapped to scaling factors in an index table and using the index table to determine the scaling factors from the index values.
[0217] Clause 36: Any device of Clauses 32-35, wherein one or more processors are further configured to dequantize values by integer values having a predefined bit precision.
[0218] Clause 37: A device according to any of Clauses 31 to 36, wherein the scaling factor includes a first scaling factor among a plurality of scaling factors, and one or more processors are configured to multiply a sample of a filtered block by each of the scaling factors among the plurality of scaling factors.
[0219] Clause 38: Any device of Clauses 31 to 37, wherein one or more processors are configured to form a refined and filtered block by adding an offset to the product of a filtered block sample and a scaling factor.
[0220] Clause 39: Any device according to any of Clauses 31 to 37, wherein one or more processors are configured to determine an offset value, apply a bitwise shift to the offset value to form a shifted offset value, and add the shifted offset value to the product of a sample of the filtered block and a scaling factor to form a refined and filtered block.
[0221] Clause 40: A device according to any of Clauses 31-39, wherein one or more processors are configured to apply at least one of the following filters: 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.
[0222] Clause 41: Any device of Clauses 31 to 40, wherein one or more processors are further configured to determine whether a filtered block should be refined, before multiplying a sample of the filtered block by a scaling factor, that a syntax element indicating whether the filtered block should be refined has a value indicating that the filtered block should be refined.
[0223] Clause 42: The device of Clause 41, further configured to decode a value of a syntax element in at least one of the following: a slice header of a slice containing blocks, a picture header of a picture containing blocks, or an adaptive parameter set (APS) corresponding to a slice containing blocks, indicating whether to refine a filtered block.
[0224] Clause 43: Any device according to Clauses 31 to 42, wherein the filter comprises a first filter, the filtered block comprises a first filtered block, the refined filtered block comprises a first refined filtered block, the scaling factor comprises a first scaling factor, and one or more processors are further configured to apply a second filter to a decoded block to form a second filtered block, multiply a sample of the second filtered block by a second scaling factor to form a second refined filtered block, and one or more processors are configured to synthesize a sample of the first refined filtered block and a sample of the second refined filtered block with a corresponding sample of the decoded block in order to synthesize a sample of the first refined filtered block with a corresponding sample of the decoded block.
[0225] Clause 44: Any device according to Clauses 31 to 42, wherein a filter includes a first filter, a filtered block includes a first filtered block, a refined filtered block includes a first refined filtered block, a scaling factor includes a first scaling factor, and one or more processors are configured to apply each of a plurality of filters, including the first filter, to a decoded block to form each plurality of filtered blocks, including the first filtered block, and to multiply each of a plurality of filtered blocks, including the first filtered block, by each plurality of scaling factors, including the first scaling factor, to form a plurality of refined filtered blocks, and one or more processors are configured to synthesize each of a plurality of refined filtered blocks with a corresponding sample of the decoded block in order to synthesize a sample of the first refined filtered block with a corresponding sample of the decoded block.
[0226] Clause 45: Any device of Clauses 31-44, further configured with one or more processors to encode the current block before decoding it.
[0227] Clause 46: Any device according to Clauses 31-45, further comprising a display configured to display decoded video data.
[0228] Clause 47: Any device under Clauses 31-46, comprising one or more of the following: a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0229] Clause 48: A computer-readable storage medium storing instructions, wherein, when an instruction is executed, the processor causes a processor to decode blocks of video data to form decoded blocks, apply a filter to the decoded blocks to form filtered blocks, multiply samples of the filtered blocks by a scaling factor to form refined and filtered blocks, and combine samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0230] Clause 49: A computer-readable storage medium of Clause 48, further comprising instructions causing a processor to decode the values of syntax elements representing scaling factors.
[0231] Clause 50: A computer-readable storage medium of Clause 49, wherein instructions causing a processor to decode the values of syntax elements include instructions causing a processor to decode the picture header of a picture containing blocks, and the picture header contains syntax elements representing scaling factors.
[0232] Clause 51: A computer-readable storage medium according to Clause 49, wherein instructions causing a processor to decode the values of syntax elements include instructions causing a processor to decode at least one of the following: a slice header of a slice containing blocks, which is a slice header containing syntax elements; an adaptive parameter set (APS) of a slice, which is an APS containing syntax elements; or a block header of a block, which is a block header containing syntax elements.
[0233] Clause 52: A computer-readable storage medium according to any of Clauses 49 to 51, wherein instructions causing a processor to decode the values of syntax elements include instructions causing a processor to decode index values mapped to scaling factors in an index table, and the method further includes the step of determining the scaling factors from the index values using the index table.
[0234] Clause 53: A computer-readable storage medium according to any of Clauses 49-52, further comprising instructions causing a processor to dequantize a value by an integer value having a predefined bit precision.
[0235] Clause 54: A computer-readable storage medium according to any of Clauses 48 to 53, wherein the scaling factor includes a first scaling factor among a plurality of scaling factors, and the instruction causing the processor to multiply a sample of a filtered block by the scaling factor includes an instruction causing the processor to multiply a sample of a filtered block by each of the scaling factors among the plurality of scaling factors.
[0236] A computer-readable storage medium according to any of the clauses 48 to 54, wherein instructions to cause the processor to multiply a sample of a filtered block by a scaling factor to form a refined and filtered block further include instructions to cause the processor to add an offset to the product of a sample of a filtered block and a scaling factor to form a refined and filtered block.
[0237] A computer-readable storage medium according to any of the clauses 48 to 55, further comprising instructions causing a processor to multiply a sample of a filtered block by a scaling factor to form a refined and filtered block, instructions causing a processor to determine an offset value, apply a bitwise shift to the offset value to form a shifted offset value, and add the shifted offset value to the product of a sample of a filtered block and a scaling factor to form a refined and filtered block.
[0238] Clause 57: A computer-readable storage medium of any of Clauses 48 to 56, wherein instructions causing the processor to apply a filter include instructions causing the processor to apply at least one of the following: 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.
[0239] A computer-readable storage medium of any of the clauses 48 to 57, further comprising instructions causing a processor to determine whether a filtered block should be refined, before multiplying a sample of the filtered block by a scaling factor, that a syntax element indicating whether the filtered block should be refined has a value indicating that the filtered block should be refined.
[0240] Clause 59: A computer-readable storage medium according to any of Clauses 48 to 58, further comprising instructions for the processor to decode the value of a syntax element in at least one of the following: a slice header of a slice containing blocks, a picture header of a picture containing blocks, or an adaptive parameter set (APS) corresponding to a slice containing blocks, indicating whether to refine a filtered block.
[0241] Clause 60: A computer-readable storage medium according to any of Clauses 48 to 59, wherein Filter includes a first filter, Filtered Block includes a first filtered block, Refined and Filtered Block includes a first refined and filtered block, Scaling Factor includes a first scaling factor, and further includes instructions to cause a processor to apply a second filter to a decoded block to form a second filtered block, and to multiply a sample of the second filtered block by a second scaling factor to form a second refined and filtered block, and instructions to cause a processor to combine a sample of the first refined and filtered block with a corresponding sample of the decoded block, wherein instructions cause a processor to combine a sample of the first refined and filtered block and a sample of the second refined and filtered block with a corresponding sample of the decoded block.
[0242] Clause 61: A filter includes a first filter, a filtered block includes a first filtered block, a refined filtered block includes a first refined filtered block, a scaling factor includes a first scaling factor, an instruction causing the processor to apply the first filter to a decoded block includes an instruction causing the processor to apply each of a plurality of filters including the first filter to a decoded block to form each of a plurality of filtered blocks including the first filtered block, an instruction causing the processor to multiply a sample of the first filtered block by a first scaling factor, A computer-readable storage medium according to any of the clauses 48 to 59, comprising instructions to cause a losser to multiply each of a plurality of filtered blocks containing a first filtered block by each of a plurality of scaling factors containing a first scaling factor to form a plurality of refined filtered blocks containing a first refined filtered block, and instructions to cause a processor to combine a sample of the first refined filtered block with a corresponding sample of a decoded block, wherein the instructions cause the processor to combine each of the plurality of refined filtered blocks with a corresponding sample of a decoded block.
[0243] Clause 62: A computer-readable storage medium of any of Clauses 48-61, further comprising instructions causing a processor to encode the current block before decoding the current block.
[0244] Clause 63: A device for filtering decoded video data, comprising means for decoding blocks of video data to form decoded blocks; means for applying filters to the decoded blocks to form filtered blocks; means for multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and means for synthesizing samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0245] Clause 64: A method for filtering decoded video data, comprising the steps of: decoding blocks of video data to form decoded blocks; applying filters to the decoded blocks to form filtered blocks; multiplying samples of the filtered blocks by a scaling factor to form refined filtered blocks; and combining samples of the refined filtered blocks with corresponding samples of the decoded blocks.
[0246] Clause 65: The method of Clause 64, further comprising the step of decoding the value of a syntax element representing a scaling factor.
[0247] Clause 66: The method of Clause 65, wherein the step of decoding the value of a syntax element includes the step of decoding the picture header of a picture containing a block, the picture header containing a syntax element representing a scaling factor.
[0248] Clause 67: The method of Clause 65, wherein the step of decoding the value of a syntax element includes decoding at least one of the following: a slice header of a slice containing a block, a slice header containing a syntax element; an adaptive parameter set (APS) of a slice, an APS containing a syntax element; or a block header of a block, a block header containing a syntax element.
[0249] Clause 68: The method of Clause 65, wherein the step of decoding the value of a syntax element includes the step of decoding an index value mapped to a scaling factor in an index table, and the method further includes the step of determining a scaling factor from an index value using an index table.
[0250] Clause 69: The method of Clause 65, further comprising the step of dequantizing a value by an integer value having a predefined bit precision.
[0251] Clause 70: The method of Clause 64, wherein the scaling factor includes a first scaling factor among a plurality of scaling factors, and the step of multiplying a sample of the filtered block by the scaling factor includes the step of multiplying a sample of the filtered block by each of the scaling factors among the plurality of scaling factors.
[0252] Clause 71: The method of Clause 64, wherein the step of multiplying a sample of the filtered block by a scaling factor to form a refined and filtered block further comprises adding an offset to the product of the sample of the filtered block and the scaling factor to form a refined and filtered block.
[0253] Clause 72: The method of Clause 64, wherein the step of multiplying a sample of a filtered block by a scaling factor to form a refined and filtered block further includes the steps of determining an offset value, applying a bitwise shift to the offset value to form a shifted offset value, and adding the shifted offset value to the product of a sample of a filtered block and a scaling factor to form a refined and filtered block.
[0254] Clause 73: The method of Clause 64, wherein the step of applying a filter includes the step of applying 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.
[0255] Clause 74: The method of Clause 64, further comprising the step of determining whether a syntax element indicating whether to refine a filtered block has a value indicating that the filtered block should be refined, before multiplying a sample of the filtered block by a scaling factor.
[0256] Clause 75: The method of Clause 74, further comprising the step of decoding the value of a syntax element in at least one of the following: a slice header of a slice containing a block, a picture header of a picture containing a block, or an adaptive parameter set (APS) corresponding to a slice containing a block, indicating whether the filtered block is refined.
[0257] Clause 76: The method of Clause 64, wherein the filter comprises a first filter, the filtered block comprises a first filtered block, the refined filtered block comprises a first refined filtered block, the scaling factor comprises a first scaling factor, and the method further comprises the steps of applying a second filter to a decoded block to form a second filtered block, and multiplying a sample of the second filtered block by a second scaling factor to form a second refined filtered block, and the step of combining a sample of the first refined filtered block with a corresponding sample of the decoded block comprises the step of combining a sample of the first refined filtered block and a sample of the second refined filtered block with a corresponding sample of the decoded block.
[0258] Clause 77: The method of Clause 64, wherein a filter comprises a first filter, a filtered block comprises a first filtered block, a refined filtered block comprises a first refined filtered block, a scaling factor comprises a first scaling factor, the step of applying the first filter to a decoded block comprises applying each of a plurality of filters comprising the first filter to a decoded block to form each plurality of filtered blocks comprising the first filtered block, the step of multiplying a sample of the first filtered block by a first scaling factor comprises multiplying a sample of each plurality of filtered blocks comprising the first filtered block by each plurality of scaling factors comprising the first scaling factor to form a plurality of refined filtered blocks comprising the first refined filtered block, and the step of combining a sample of the first refined filtered block with a corresponding sample of a decoded block comprises combining a sample of each plurality of refined filtered blocks with a corresponding sample of a decoded block.
[0259] Clause 78: The method of Clause 64, further comprising the step of encoding the current block before decrypting the current block.
[0260] Clause 79: A device for filtering decoded video data, comprising: a memory configured to store video data; and one or more processors implemented in a circuit, configured to decode blocks of video data to form decoded blocks; apply filters to the decoded blocks to form filtered blocks; multiply samples of the filtered blocks by a scaling factor to form refined filtered blocks; and combine samples of the refined filtered blocks with corresponding samples of the decoded blocks.
[0261] Clause 80: The device of Clause 79, wherein one or more processors are further configured to decode a value of a syntax element representing a scaling factor.
[0262] Clause 81: The device of Clause 80, wherein one or more processors are configured to decode a picture header of a picture including a block, the picture header including a syntax element representing a scaling factor, for decoding a value of the syntax element.
[0263] Clause 82: The device of Clause 80, wherein one or more processors are configured to decode at least one of a slice header of a slice including a block, the slice header including a syntax element, an adaptive parameter set (APS) of the slice, the APS including a syntax element, or a block header of the block, the block header including a syntax element, for decoding a value of the syntax element.
[0264] Clause 83: The device of Clause 80, wherein one or more processors are configured to decode an index value mapped to a scaling factor in an index table and determine a scaling factor from the index value using the index table, for decoding a value of the syntax element.
[0265] Clause 84: The device of Clause 80, wherein one or more processors are further configured to inverse quantize a value by an integer value having a predefined bit precision.
[0266] Clause 85: The device of Clause 79, wherein the scaling factor includes a first scaling factor among a plurality of scaling factors, and one or more processors are configured to multiply samples of a filtered block by each of the scaling factors among the plurality of scaling factors.
[0267] Clause 86: The device of Clause 79, wherein one or more processors are configured to form a refined and filtered block by adding an offset to a product of samples of a filtered block and scaling factors.
[0268] Clause 87: The device of Clause 79, wherein one or more processors are configured to determine an offset value, apply a bitwise shift to the offset value to form a shifted offset value, and add the shifted offset value to a product of samples of a filtered block and scaling factors to form a refined and filtered block.
[0269] Clause 88: The device of Clause 79, wherein one or more processors are configured to apply 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 apply a filter.
[0270] Clause 89: The device of Clause 79, further configured such that one or more processors determine that a syntax element indicating whether to refine a filtered block has a value indicating to refine the filtered block before multiplying samples of the filtered block by scaling factors.
[0271] Clause 90: The device of Clause 89, further configured such that one or more processors decode a value of a syntax element indicating whether to refine a filtered block in at least one of a slice header of a slice containing the block, a picture header of a picture containing the block, or an adaptive parameter set (APS) corresponding to a slice containing the block.
[0272] Clause 91: The device of Clause 79, wherein a filter comprises a first filter, a filtered block comprises a first filtered block, a refined filtered block comprises a first refined filtered block, a scaling factor comprises a first scaling factor, one or more processors are further configured to apply a second filter to a decoded block to form a second filtered block, multiply a sample of the second filtered block by a second scaling factor to form a second refined filtered block, and one or more processors are configured to synthesize a sample of the first refined filtered block and a sample of the second refined filtered block with a corresponding sample of the decoded block in order to synthesize a sample of the first refined filtered block with a corresponding sample of the decoded block.
[0273] Clause 92: The device of Clause 79, wherein a filter comprises a first filter, a filtered block comprises a first filtered block, a refined filtered block comprises a first refined filtered block, a scaling factor comprises a first scaling factor, and one or more processors are configured to apply each of a plurality of filters, including the first filter, to a decoded block to form each plurality of filtered blocks, including the first filtered block, and to multiply each of a plurality of filtered blocks, including the first filtered block, by each plurality of scaling factors, including the first scaling factor, to form a plurality of refined filtered blocks, including the first refined filtered block, and one or more processors are configured to synthesize each of a plurality of refined filtered blocks with a corresponding sample of the decoded block in order to synthesize a sample of the first refined filtered block with a corresponding sample of the decoded block.
[0274] Clause 93: A device of Clause 79, further configured to encode the current block before decoding the current block, with one or more processors.
[0275] Clause 94: The device of Clause 79, further comprising a display configured to display decoded video data.
[0276] Clause 95: A device under Clause 79 comprising one or more of the following: a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0277] Clause 96: A computer-readable storage medium storing instructions, wherein, when an instruction is executed, the processor causes a processor to decode blocks of video data to form decoded blocks, apply filters to the decoded blocks to form filtered blocks, multiply samples of the filtered blocks by a scaling factor to form refined and filtered blocks, and combine samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0278] Clause 97: A computer-readable storage medium of Clause 96, further comprising instructions causing a processor to decode the values of syntax elements representing scaling factors.
[0279] Clause 98: A computer-readable storage medium of Clause 97, wherein instructions causing a processor to decode the values of syntax elements include instructions causing a processor to decode the picture header of a picture containing blocks, and the picture header contains syntax elements representing scaling factors.
[0280] Clause 99: A computer-readable storage medium of Clause 97, wherein instructions causing a processor to decode the values of syntax elements include instructions causing a processor to decode at least one of the following: a slice header of a slice containing blocks, which is a slice header containing syntax elements; an adaptive parameter set (APS) of a slice, which is an APS containing syntax elements; or a block header of a block, which is a block header containing syntax elements.
[0281] Clause 100: A computer-readable storage medium of Clause 97, wherein instructions causing a processor to decode the values of syntax elements include instructions causing a processor to decode index values mapped to scaling factors in an index table, and the method further includes the step of determining the scaling factors from the index values using the index table.
[0282] Clause 101: A computer-readable storage medium according to Clause 97, further comprising instructions causing a processor to dequantize a value by an integer value having a predefined bit precision.
[0283] Clause 102: A computer-readable storage medium of Clause 96, wherein the scaling factor includes a first scaling factor among a plurality of scaling factors, and the instruction causing the processor to multiply a sample of a filtered block by the scaling factor includes an instruction causing the processor to multiply a sample of a filtered block by each of the scaling factors among the plurality of scaling factors.
[0284] Clause 103: A computer-readable storage medium of Clause 96, wherein instructions causing a processor to multiply a sample of a filtered block by a scaling factor to form a refined and filtered block further include instructions causing a processor to add an offset to the product of a sample of a filtered block and a scaling factor to form a refined and filtered block.
[0285] Clause 104: The computer-readable storage medium of Clause 96, further including an instruction that causes the processor to multiply the samples of the filtered block by a scaling factor to form a refined and filtered block, and an instruction that causes the processor to determine an offset value, apply a bitwise shift to the offset value to form a shifted offset value, and add the shifted offset value to the product of the samples of the filtered block and the scaling factor to form a refined and filtered block.
[0286] Clause 105: The computer-readable storage medium of Clause 96, including an instruction that causes the processor to apply a filter, and an instruction that causes the processor to apply 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.
[0287] Clause 106: The computer-readable storage medium of Clause 96, further including an instruction that causes the processor to determine that a syntax element representing whether to refine the filtered block has a value indicating that the filtered block is to be refined before multiplying the samples of the filtered block by a scaling factor.
[0288] Clause 107: The computer-readable storage medium of Clause 106, further including an instruction that causes the processor to decode the value of a syntax element representing whether to refine the filtered block in at least one of the slice header of a slice including the block, the picture header of a picture including the block, or the adaptive parameter set (APS) corresponding to the slice including the block.
[0289] Clause 108: A computer-readable storage medium of Clause 96, wherein Filter comprises a first filter, Filtered Block comprises a first filtered block, Refined Filtered Block comprises a first refined filtered block, Scaling Factor comprises a first scaling factor, and further includes instructions to cause a processor to apply a second filter to a decoded block to form a second filtered block, and to multiply a sample of the second filtered block by a second scaling factor to form a second refined filtered block, and instructions to cause a processor to combine a sample of the first refined filtered block with a corresponding sample of the decoded block, wherein instructions cause a processor to combine a sample of the first refined filtered block and a sample of the second refined filtered block with a corresponding sample of the decoded block.
[0290] Clause 109: A filter includes a first filter, a filtered block includes a first filtered block, a refined filtered block includes a first refined filtered block, a scaling factor includes a first scaling factor, an instruction causing the processor to apply the first filter to a decoded block includes an instruction causing the processor to apply each of a plurality of filters including the first filter to a decoded block to form each of a plurality of filtered blocks including the first filtered block, an instruction causing the processor to multiply a sample of the first filtered block by a first scaling factor A computer-readable storage medium of Clause 96, wherein the instructions include an instruction causing a processor to multiply each of a plurality of filtered blocks, including a first filtered block, by a plurality of scaling factors, including a first scaling factor, to form a plurality of refined filtered blocks, and the instructions causing the processor to combine a sample of the first refined filtered block with a corresponding sample of a decoded block include an instruction causing the processor to combine each of the plurality of refined filtered blocks with a corresponding sample of a decoded block.
[0291] Clause 110: A computer-readable storage medium of Clause 96, further comprising instructions causing a processor to encode the current block before decoding the current block.
[0292] Clause 111: A device for filtering decoded video data, comprising means for decoding blocks of video data to form decoded blocks; means for applying filters to the decoded blocks to form filtered blocks; means for multiplying samples of the filtered blocks by a scaling factor to form refined and filtered blocks; and means for synthesizing samples of the refined and filtered blocks with corresponding samples of the decoded blocks.
[0293] It should be noted that, depending on the example, some of the actions or events of any of the techniques described herein may be performed in different sequences, and may be added, merged, or excluded entirely (for example, not all actions or events described may be necessary for the practice of the technique). Furthermore, in some examples, the actions or events may be performed not sequentially, but concurrently, for example, through multithreading, interrupt handling, or multiple processors.
[0294] In one or more examples, the described functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may include computer-readable storage media corresponding to tangible media such as data storage media, or communication media including any medium that facilitates the transfer of computer programs from one location to another, for example, according to a communication protocol. Thus, the computer-readable medium may generally correspond to (1) non-transient tangible computer-readable storage media, or (2) communication media such as signals or carrier waves. The 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, codes and / or data structures for implementing the techniques described herein. A computer program product may include computer-readable media.
[0295] As an example, and not an limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and can be accessed by a computer. Any connection is also appropriately referred to as computer-readable media. 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 technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals, or other temporary media, but instead refer to non-temporary tangible storage media. The terms "disk" and "disc" as used herein include Compact Disc (CD), LaserDisc (registered trademark) (disc), Optical Disc (disc), Digital Multipurpose Disc (disc) (DVD), Floppy Disk (disk), and Blu-ray Disc (disc), where a Disk typically reproduces data magnetically, and a Disc (disc) reproduces data optically using a laser. Any combination of the above should also be included within the scope of computer-readable media.
[0296] Instructions may 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 may refer to any of the above-described structures or any other structure suitable for implementing the techniques described herein. In addition, in some embodiments, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a composite codec. Furthermore, the techniques may be fully implemented in one or more circuits or logic elements.
[0297] The techniques of this disclosure can be implemented in a wide variety of devices or apparatus, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). While various components, modules, or units have been described in this disclosure to highlight the functional aspects of devices configured to perform the disclosed techniques, they do not necessarily require implementation by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit, or they may be provided by a set of interoperable hardware units, including one or more processors as described above, along with suitable software and / or firmware.
[0298] We have described various examples. These and other examples fall within the scope of the following claims. [Explanation of Symbols]
[0299] 100 video encoding and decoding systems, systems 102 Source Device 104 Video Sources 106 memory 108 Output Interfaces 110 Computer-readable media 112 Storage Devices 114 File Server 116 Destination device 118 Display Devices 120 memory 122 Input Interfaces 130 Hybrid Video Coder, Video Coder 132 Input video data 134 Adding Units 136 Conversion Unit 138 Quantization Units 140 Entropy Coding Units 142 Inverse Quantization Unit 144 Inverse Conversion Unit 146 Adding Units 148 Loop Filter Unit 150 Decoded Picture Buffer (DPB), DPB 152 Intra Prediction Units 154 Interpretation Units 156 Motion Estimation Unit 158 output bitstreams 160 Output Video Data 170-layer prediction structure 180 reconstructed samples 182 NN-based filtering process 184 Refined Data 190 Quadriary-Bidriary (QTBT) Structure, QTBT Structure 192 Coding Tree Unit (CTU), CTU 200 video encoders 202 Mode Selection Unit 204 Residual Generation Unit 206 Conversion Processing Unit 208 Quantization Units 210 Inverse Quantization Unit 212 Inverse Transform Processing Unit 214 Reconfiguration Unit 216 Filter Unit 218 Decoded Picture Buffer (DPB), DPB 220 Entropy Coding Units 222 Motion Estimation Unit 224 Motion Compensation Unit 226 Intra Prediction Units 230 video data memory 300 video decoders 302 Entropy Decoding Unit 304 Prediction Processing Unit 306 Inverse Quantization Unit 308 Inverse Transformation Processing Unit 310 Reconfiguration Unit 312 Filter Unit 314 Decoded Picture Buffer (DPB), DPB 316 Motion Compensation Unit 318 Intra Prediction Units 320 Encoded Picture Buffer (CPB) memory, CPB memory
Claims
1. 1. A method for filtering decoded video data, comprising the steps of: decoding a block of video data to form a decoded block; applying a first filter to the decoded block to form a first filtered block; multiplying samples of the first filtered block by a first scaling factor to form a first refined filtered block; applying a second filter to the decoded block to form a second filtered block; multiplying the samples of the second filtered block by a second scaling factor to form a second refined filtered block; adding sample values of the first refined filtered block and the second refined filtered block to corresponding samples of the decoded block to form a resulting block of a decoded picture. The method includes:
2. The method of claim 1 , further comprising the step of decoding values of syntax elements representing the first and / or second scaling factors.
3. Decoding the value of the syntax element comprises: decoding a picture header of a picture including the block of video data, the picture header including the syntax element representing the first and / or second scaling factor; decoding at least one of a slice header of a slice including the block, the slice header including the syntax element, an adaptation parameter set (APS) of the slice, the APS including the syntax element, or a block header of the block, the block header including the syntax element; decoding index values mapped to said first and / or second scaling factors in an index table; Including, the method further comprising determining the scaling factor from the index value using the index table; The method of claim 2.
4. The method of claim 2 , further comprising the step of dequantizing the value of the syntax element by an integer value having a predefined bit precision.
5. the first and / or second scaling factor comprises a first scaling factor of a plurality of scaling factors; 2. The method of claim 1, wherein multiplying the samples of the filtered block with the scaling factors comprises multiplying the samples of the filtered block with each of the scaling factors in the plurality of scaling factors.
6. 2. The method of claim 1 , wherein multiplying the samples of the filtered block by the first and / or second scaling factors to form the respective refined filtered blocks further comprises adding an offset to a product of the samples of the filtered block and the first and / or second scaling factors to form the refined filtered blocks.
7. multiplying the samples of the filtered block by the first and / or second scaling factors to form the respective refined filtered blocks, determining an offset value; applying a bit-wise shift to the offset value to form a shifted offset value; adding the shifted offset value to a product of the samples of the filtered block and the scaling factor to form the refined filtered block; The method of claim 1, further comprising:
8. 2. The method of claim 1, wherein applying the filter comprises applying 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.
9. 2. The method of claim 1 , further comprising: determining that a syntax element representing whether to refine the respective filtered block has a value indicating to refine the respective filtered block before multiplying the samples of the filtered block by the first and / or second scaling factor, preferably decoding the value of the syntax element representing whether to refine the respective filtered block in at least one of a slice header of a slice including the block, a picture header of a picture including the block, or an adaptive parameter set (APS) corresponding to the slice including the block.
10. applying the first filter to the decoded block includes applying each of a plurality of filters including the first filter to the decoded block to form a respective plurality of filtered blocks including the first filtered block; multiplying the samples of the first filtered block by the first scaling factor comprises multiplying samples of each of the plurality of filtered blocks including the first filtered block by a respective plurality of scaling factors including the first scaling factor to form a plurality of refined filtered blocks including the first refined filtered block; adding the samples of the first refined filtered block to the corresponding samples of the decoded block comprises combining the samples of each of the plurality of refined filtered blocks with the corresponding samples of the decoded block. The method of claim 1.
11. The method of claim 1 , further comprising the step of encoding the current block before decoding the current block.
12. A device for filtering decoded video data, comprising: means for decoding blocks of video data to form decoded blocks; means for applying a first filter to the decoded block to form a first filtered block; means for multiplying samples of the first filtered block by a first scaling factor to form a first refined filtered block; means for applying a second filter to the decoded block to form a second filtered block; means for multiplying samples of the second filtered block by a second scaling factor to form a second refined filtered block; means for adding samples of the first refined filtered block and the second refined filtered block to corresponding samples of the decoded block to form a resulting block of a decoded picture; 16. A device comprising:
13. A memory configured to store video data; one or more processors implemented in a circuit and configured to perform the decoding, filtering, multiplying, and adding to form the resulting blocks of the decoded picture; A device for filtering decoded video data according to claim 12, comprising:
14. 14. The device of claim 13, further comprising one or more of a display, a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box configured to display the decoded video data.
15. A computer readable storage medium having instructions stored thereon which, when executed, cause a processor to perform the method of any one of claims 1 to 11.
